summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
Commit message (Collapse)AuthorAgeFilesLines
...
* DenseMapInfo is a 'struct', not a 'class'.Ted Kremenek2010-12-091-1/+1
| | | | llvm-svn: 121321
* Add new libclang hooks for CXCursorSet, aTed Kremenek2010-12-083-2/+76
| | | | | | | DenseMap-backed hashtable for doing client-side management of CXCursors within a set. llvm-svn: 121318
* Remove the TypesCompatibleExprClass AST node. Merge its functionality into ↵Francois Pichet2010-12-082-6/+0
| | | | | | BinaryTypeTraitExpr. llvm-svn: 121298
* Fix bug where annotate tokens was not working for BinaryTypeTraitExpr.Francois Pichet2010-12-081-1/+1
| | | | | | CIndex's EnqueueVisitor must visit elements backward apparently. llvm-svn: 121247
* Type traits intrinsic implementation: __is_base_of(T, U)Francois Pichet2010-12-072-0/+8
| | | | | | New AST node introduced: BinaryTypeTraitExpr; to be reused for more intrinsics. llvm-svn: 121074
* Use atomic operations for libclang's object count tracking.Douglas Gregor2010-12-071-3/+4
| | | | llvm-svn: 121073
* Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoreticalJohn McCall2010-12-061-1/+1
| | | | | | reason this is limited to C++, and it's certainly not limited to temporaries. llvm-svn: 120996
* More anonymous struct/union redesign. This one deals with anonymous field ↵Francois Pichet2010-12-041-2/+2
| | | | | | | | | | | | | | | | used in a constructor initializer list: struct X { X() : au_i1(123) {} union { int au_i1; float au_f1; }; }; clang will now deal with au_i1 explicitly as an IndirectFieldDecl. llvm-svn: 120900
* Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ↵John McCall2010-12-022-3/+1
| | | | | | | | ObjCPropertyRefExpr into the latter. llvm-svn: 120643
* When using a precompiled preamble with detailed preprocessing records,Douglas Gregor2010-11-301-7/+13
| | | | | | | | | | trap the serialized preprocessing records (macro definitions, macro instantiations, macro definitions) from the generation of the precompiled preamble, then replay those when walking the list of preprocessed entities. This eliminates a bug where clang_getCursor() wasn't able to find preprocessed-entity cursors in the preamble. llvm-svn: 120396
* Merge System into Support.Michael J. Spencer2010-11-294-7/+7
| | | | llvm-svn: 120297
* now the FileManager has a FileSystemOpts ivar, stop threadingChris Lattner2010-11-232-6/+5
| | | | | | | | | FileSystemOpts through a ton of apis, simplifying a lot of code. This also fixes a latent bug in ASTUnit where it would invoke methods on FileManager without creating one in some code paths in cindextext. llvm-svn: 120010
* give FileManager a 'FileSystemOptions' ivar, which will be usedChris Lattner2010-11-231-1/+3
| | | | | | | to simplify a bunch of code in it. It should ultimately get inlined into FileManager. llvm-svn: 120007
* Fix a bunch of IndirectFieldDecl-related warnings.Benjamin Kramer2010-11-211-0/+1
| | | | | | - Negative ChainingSize doesn't make sense, make it unsigned. llvm-svn: 119943
* remove old compatibility APIs, use StringRef versions instead.Chris Lattner2010-11-211-2/+1
| | | | llvm-svn: 119935
* Implement a simple hash function for libclang cursorsDouglas Gregor2010-11-203-0/+11
| | | | llvm-svn: 119876
* Implement clang_getCanonicalCursor() in libclang, which does the obvious thing.Douglas Gregor2010-11-193-0/+12
| | | | llvm-svn: 119874
* Extend the libclang diagnostic API to provide information about theDouglas Gregor2010-11-193-1/+98
| | | | | | option name, category ID, and category name corresponding to a diagnostic. llvm-svn: 119802
* Get the number of errors reported from the diagnostic client, in ↵Argyrios Kyrtzidis2010-11-181-2/+2
| | | | | | clang_parseTranslationUnit_Impl. llvm-svn: 119745
* Refactoring of Diagnostic class.Argyrios Kyrtzidis2010-11-181-1/+3
| | | | | | | | | | | -Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class. -DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units. -The rest of the state in Diagnostic object is considered related and tied to one translation unit. -Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a SourceLocation instead of a FullSourceLoc. -Reflect the changes to various interfaces. llvm-svn: 119730
* CursorVisitor: switch remaining expressions overTed Kremenek2010-11-181-127/+93
| | | | | | | to the data-recursion algorithm. CursorVisitor now no longer subclasses StmtVisitor. llvm-svn: 119596
* CursorVisitor: migrate handling ofTed Kremenek2010-11-181-71/+98
| | | | | | | | 'DependentScopeDeclRefExpr' and 'CXXDependentScopeMemberExpr' to the data-recursion algorithm. llvm-svn: 119591
* Make definition of CXTranslationUnitImpl privateTed Kremenek2010-11-178-0/+31
| | | | | | to libclang. llvm-svn: 119585
* When libclang is walking a member access expression, don't walk intoDouglas Gregor2010-11-171-1/+11
| | | | | | | | an implicit "this"; it causes clang_getCursor() to find the implicit "this" expression (which isn't written in the source!) rather than the actual member. llvm-svn: 119516
* When comparing the source range of a declaration against the region ofDouglas Gregor2010-11-171-7/+47
| | | | | | | | | interest (e.g., as used by clang_getCursor()), count the decl-specifier-seq as part of the source range, as we do for clang_annotateTokens(). Makes clang_getCursor() work properly for the result types of functions, for example. llvm-svn: 119514
* CursorVisitor: Migrate handling ofTed Kremenek2010-11-171-22/+10
| | | | | | | 'SizeOfAlignOfExpr' and 'CXXSCalarValueInitExpr' to data-recursion algorithm. llvm-svn: 119452
* For an Objective-C @synthesize statement, e.g.,Douglas Gregor2010-11-171-0/+8
| | | | | | | | | @synthesize foo = _foo; keep track of the location of the ivar ("_foo"). Teach libclang to visit the ivar as a member reference. llvm-svn: 119447
* CursorVisitor: migrate handling of CXXUuidofExpr toTed Kremenek2010-11-171-14/+6
| | | | | | data-recursion algorithm. llvm-svn: 119444
* CursorVisitor: migrate handling of UnaryTypeTraitExprTed Kremenek2010-11-171-5/+4
| | | | | | to data-recursion algorithm. llvm-svn: 119443
* CursorVisitor: refactor visitation ofTed Kremenek2010-11-171-21/+26
| | | | | | | explicit template args within data-recursion algorithm. llvm-svn: 119442
* CursorVisitor: migrate handling ofTed Kremenek2010-11-171-19/+31
| | | | | | | AddrLabelExpr to data-recursion algorithm, and unify that reasoning with GotoStmt. llvm-svn: 119441
* CursorVisitor: migrate handling ofTed Kremenek2010-11-171-8/+5
| | | | | | VAArgExpr to data-recursion algorithm. llvm-svn: 119440
* CursorVisitor: migrate handling ofTed Kremenek2010-11-171-12/+6
| | | | | | CXXTypeidExpr to data-recursion algorithm. llvm-svn: 119439
* CursorVisitor: migrate handling ofTed Kremenek2010-11-171-6/+6
| | | | | | TypesCompatibleExpr to data-recursion algorithm. llvm-svn: 119438
* CursorVisitor: Migrate CXXUnresolvedConstructExpr over to data-recursive ↵Ted Kremenek2010-11-171-10/+7
| | | | | | algorithm. llvm-svn: 119437
* Fix source-range information for Objective-C properties. Previously,Douglas Gregor2010-11-172-4/+28
| | | | | | | | | | | | we were just getting a range covering only the property name, which is certainly not correct (and broke token annotation, among other things). Also, teach libclang about the relationship between @synthesize/@dynamic and @property, so we get property name and cursor-reference information for @synthesize and @dynamic. llvm-svn: 119409
* MSVC doesn't like the noinline attribute at the end of a declaration. Try ↵Benjamin Kramer2010-11-161-1/+1
| | | | | | the other side. llvm-svn: 119349
* Rework USR generation from CXCursors to use CXStringBufsTed Kremenek2010-11-161-20/+42
| | | | | | | | | | | for the backing of generated USRs. This optmizes for the case when a client generates a sequence of USRs in sequence, disposing of them soon after generating them. By using a string buffer, we recycle malloc'ed memory instead of constantly malloc'ing and copying strings. llvm-svn: 119338
* Change CXTranslationUnit to not directly cast to an ASTUnit*,Ted Kremenek2010-11-1611-188/+308
| | | | | | | | | | | | | | | | | | | but to wrap both an ASTUnit and a "string pool" that will be used for fast USR generation. This requires a bunch of mechanical changes, as there was a ton of code that assumed that CXTranslationUnit and ASTUnit* were the same. Along with this change, introduce CXStringBuf, which provides an llvm::SmallVector<char> backing for repeatedly generating CXStrings without a huge amount of malloc() traffic. This requires making some changes to the representation of CXString by renaming a few fields (but keeping the size of the object the same). llvm-svn: 119337
* Add CXString.cpp and CXString.hTed Kremenek2010-11-162-0/+100
| | | | llvm-svn: 119322
* Move CXString creation/management routines intoTed Kremenek2010-11-169-53/+7
| | | | | | | their own .cpp file and make the interpretation of its flags private. llvm-svn: 119319
* CursorVisitor: cache worklists created for data-recursion to reduce malloc() ↵Ted Kremenek2010-11-151-3/+26
| | | | | | traffic. llvm-svn: 119290
* Add a new expression kind, OpaqueValueExpr, which is useful forJohn McCall2010-11-151-0/+1
| | | | | | | certain internal type-checking procedures as well as for representing certain implicitly-generated operations. Uses to follow. llvm-svn: 119289
* Use LLVM_ATTRIBUTE_NOINLINE instead of attribute((noinline)).Ted Kremenek2010-11-151-1/+2
| | | | llvm-svn: 119287
* Cast pointers instead of returning a new value within RunVisitorWorkList().Ted Kremenek2010-11-151-14/+16
| | | | llvm-svn: 119282
* Annotate CursorVisitor::VisitDataRecursive() with attribute 'noinline'.Ted Kremenek2010-11-151-1/+1
| | | | | | | Clang currently uses a ridiculous amount of stack space when inlining this function, which can lead to premature stack overflows. llvm-svn: 119281
* "Fix" some unintentional fallout from convertingTed Kremenek2010-11-142-4/+13
| | | | | | | | | | | | | | | | | | | | the Stmt* visitation in CursorVisitor to be data-recursive. Since AnnotationTokensWorker explicitly calls CursorVisitor::VisitChildren(), it essentially transforms the data-recursive algorithm in CursorVisitor back into a non-data recursive one. This is particularly bad because the data-recursive algorithm uses more stack space per stack frame, which can cause us to blow the stack in some cases. "Fix" this by making the stack that AnnotationTokensWorker runs in really huge. The real fix is to modify AnnotationTokensWorker not to do the explicit recursive call. llvm-svn: 119047
* CursorVisitor: make data-recursion algorithm the default except for the few ↵Ted Kremenek2010-11-141-73/+22
| | | | | | | | remaining Exprs still covered by the normal recursive visitation. llvm-svn: 119030
* Remove stale #include.Ted Kremenek2010-11-141-3/+0
| | | | llvm-svn: 119028
* Rewrite reverse iteration loop in a more natural countdown manner.Ted Kremenek2010-11-131-4/+2
| | | | llvm-svn: 118990
OpenPOWER on IntegriCloud