- Nov 03, 2009
-
-
Ted Kremenek authored
Fix buffer overflow in PrintMacroDefinition() by inverting the check to see if the target buffer needs to be resized. Fixes <rdar://problem/7255377>. llvm-svn: 85872
-
- Nov 02, 2009
-
-
Daniel Dunbar authored
llvm-svn: 85828
-
Chris Lattner authored
llvm-svn: 85826
-
- Oct 30, 2009
-
-
Benjamin Kramer authored
llvm-svn: 85588
-
- Oct 29, 2009
-
-
John McCall authored
types. Preserve it through template instantiation. Preserve it through PCH, although TSTs themselves aren't serializable, so that's pretty much meaningless. llvm-svn: 85500
-
Chris Lattner authored
llvm-svn: 85481
-
- Oct 27, 2009
-
-
Douglas Gregor authored
FunctionDecl::isInlineSpecified/setInlineSpecified. llvm-svn: 85305
-
Rafael Espindola authored
The user visible changes are: *) Frameworks are only searched on OS X *) The Cygwin c++ headers are now marked as c++ aware. I am almost sure that not marking them was a bug. llvm-svn: 85240
-
- Oct 25, 2009
-
-
Sebastian Redl authored
Audit the code for places where it is assumed that every base specifier refers to a RecordType. Add assertions or conditions as appropriate. This fixes another crash in the Apache stdlib vector. llvm-svn: 85055
-
- Oct 24, 2009
-
-
John McCall authored
template instantiation. Preserve it through PCH. Show it off to the indexer. I'm healthily ignoring the vector type cases because we don't have a sensible TypeLoc implementation for them anyway. llvm-svn: 84994
-
- Oct 23, 2009
-
-
John McCall authored
in the DeclaratorInfo, if one is present. Preserve source information through template instantiation. This is made more complicated by the possibility that ParmVarDecls don't have DIs, which is possibly worth fixing in the future. Also preserve source information for function parameters in ObjC method declarations. llvm-svn: 84971
-
Douglas Gregor authored
qualified reference to a declaration that is not a non-static data member or non-static member function, e.g., namespace N { int i; } int j = N::i; Instead, extend DeclRefExpr to optionally store the qualifier. Most clients won't see or care about the difference (since QualifierDeclRefExpr inherited DeclRefExpr). However, this reduces the number of top-level expression types that clients need to cope with, brings the implementation of DeclRefExpr into line with MemberExpr, and simplifies and unifies our handling of declaration references. Extended DeclRefExpr to (optionally) store explicitly-specified template arguments. This occurs when naming a declaration via a template-id (which will be stored in a TemplateIdRefExpr) that, following template argument deduction and (possibly) overload resolution, is replaced with a DeclRefExpr that refers to a template specialization but maintains the template arguments as written. llvm-svn: 84962
-
Ted Kremenek authored
llvm-svn: 84930
-
Ted Kremenek authored
identifier. This caused a crash when reading PCH files that contained long identifier names. The issue is that 'StrLenPtr' was previously a 'const char *', meaning the byte loaded from it would be interpretted as a signed integer. If the topmost bit was set, conversion to 'unsigned' would extend that bit, causing an overflow. The solution is to make 'StrLenPtr' an 'unsigned char *', always treating the value as an unsigned integer. This fixes: <rdar://problem/7328900> llvm-svn: 84925
-
John McCall authored
one was PCH'ed without any. llvm-svn: 84920
-
John McCall authored
the DeclaratorInfo, one for semantic analysis), just build a single type whose canonical type will reflect the semantic analysis (assuming the type is well-formed, of course). To make that work, make a few changes to the type system: * allow the nominal pointee type of a reference type to be a (possibly sugared) reference type. Also, preserve the original spelling of the reference type. Both of these can be ignored on canonical reference types. * Remove ObjCProtocolListType and preserve the associated source information on the various ObjC TypeLocs. Preserve the spelling of protocol lists except in the canonical form. * Preserve some level of source type structure on parameter types, but canonicalize on the canonical function type. This is still a WIP. Drops code size, makes strides towards accurate source location representation, slight (~1.7%) progression on Cocoa.h because of complexity drop. llvm-svn: 84907
-
- Oct 22, 2009
-
-
Mike Stump authored
the copy/dispose helpers as appropriate. llvm-svn: 84817
-
- Oct 21, 2009
-
-
Chris Lattner authored
llvm-svn: 84740
-
- Oct 20, 2009
-
-
Ted Kremenek authored
AnalysisManager periodically cleanup its AnalysisContextManager and LocationContextManager objects, as they don't need to forever retain all the CFGs ever created when analyzing a file. llvm-svn: 84684
-
Mike Stump authored
WIP. I have yet to find the magic incantation to get the structure type to be defined. If someone has a pointer, love to hear it. llvm-svn: 84590
-
- Oct 19, 2009
-
-
Ted Kremenek authored
alternate DiagnosticClients. To match this API, ASTUnit::LoadFromPCHFile() now takes a corresponding DiagnosticClient* argument as well. The DiagnosticClient object is destroyed when the ASTUnit object is destroyed. The CIndex library now uses this API to create a 'IgnoreDiagnosticsClient' that simply silences diagnostics when using the clang_createTranslationUnitFromSourceFile() function. This fixes <rdar://problem/7312058>. This API can change in the future as we add more flexibility for clients. llvm-svn: 84539
-
Steve Naroff authored
Removing this shared data should enable clang_createTranslationUnit/clang_createTranslationUnitFromSourceFile to be run from multiple threads (related to <rdar://problem/7303432>). llvm-svn: 84499
-
Daniel Dunbar authored
column computation isn't correct and could exceed the line length, which resulted in a buffer overflow later. - Chris, is there a better way for this code to compute the final column used by the caret? llvm-svn: 84475
-
- Oct 18, 2009
-
-
Daniel Dunbar authored
are updated. llvm-svn: 84447
-
Daniel Dunbar authored
- strcmp -> == - OS.write(II->getName() ...) -> OS << II->getNameStr() - Avoid std::string concatenation - Use getNameStr().str() when an std::string is really needed. llvm-svn: 84437
-
Daniel Dunbar authored
llvm-svn: 84436
-
Benjamin Kramer authored
llvm-svn: 84415
-
John McCall authored
TemplateTypeParmType with the substituted type directly; instead, replace it with a SubstTemplateTypeParmType which will note that the type was originally written as a template type parameter. This makes it reasonable to preserve source information even through template substitution. Also define the new SubstTemplateTypeParmType class, obviously. For consistency with current behavior, we stringize these types as if they were the underlying type. I'm not sure this is the right thing to do. At any rate, I paled at adding yet another clause to the don't-desugar 'if' statement, so I extracted a function to do it. The new function also does The Right Thing more often, I think: e.g. if we have a chain of typedefs leading to a vector type, we will now desugar all but the last one. llvm-svn: 84412
-
John McCall authored
TypeLoc class names to be $(Type classname)Loc. Rewrite the visitor. Provide skeleton implementations for all the new TypeLocs. Handle all cases in PCH. Handle a few more cases when inserting location information in SemaType. It should be extremely straightforward to add new location information to existing TypeLoc objects now. llvm-svn: 84386
-
Daniel Dunbar authored
llvm-svn: 84375
-
Nuno Lopes authored
llvm-svn: 84371
-
- Oct 17, 2009
-
-
Daniel Dunbar authored
llvm-svn: 84360
-
Douglas Gregor authored
so that we catch any macros used within the declarations and types. Also, properly store a NULL selector. llvm-svn: 84334
-
Daniel Dunbar authored
llvm-svn: 84301
-
Ted Kremenek authored
its own BumpPtrAllocator to allocate ASTs. Change clang_createTranslationUnit (CIndex) to pass 'UseBumpPtrAllocator = true' to ASTUnit::LoadFromPCHFile(). llvm-svn: 84296
-
Douglas Gregor authored
format, so that we don't end up with multiple declaration and types blocks. Also, fix a few obscure bugs with PCH loading and generation: - If the DeclIDs DenseMap reallocates while we are writing a declaration (due to recursively writing other declarations), we could end up writing a bad ID to ExternalDefinitions. - When loading an ArrayLoc (part of DeclaratorInfo), we need to set the size expression to NULL if no size expression was provided. PCH -> AST rewriting is still partly broken, unfortunately. llvm-svn: 84293
-
Douglas Gregor authored
interface that can load those source-location entries on demand (from another PCH file). llvm-svn: 84287
-
- Oct 16, 2009
-
-
John McCall authored
core PCH reader/writer implementation files. llvm-svn: 84278
-
Douglas Gregor authored
header or not via a new "PCHLevel" field in Decl. We currently use this information to help CIndex filter out declarations that came from a precompiled header (rather than from an AST file). Further down the road, it can be used to help implement multi-level precompiled headers. llvm-svn: 84267
-
Douglas Gregor authored
only supporting a single stat cache. The immediate benefit of this change is that we can now generate a PCH/AST file when including another PCH file; in the future, the chain of stat caches will likely be useful with multiple levels of PCH files. llvm-svn: 84263
-