summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
Commit message (Collapse)AuthorAgeFilesLines
...
* Eliminate the use of getTypeForDecl from clang_getCursorType() andDouglas Gregor2011-01-241-19/+20
| | | | | | | | clang_getDeclObjCTypeEncoding(); use ASTContext's methods instead, which will (lazily) create the type as needed. Otherwise, we can end up with null QualTypes. llvm-svn: 124133
* Teach libclang to generate USRs containing parameter packs and pack expansions.Douglas Gregor2011-01-191-3/+18
| | | | llvm-svn: 123848
* Teach libclang about SizeOfPackExpr.Douglas Gregor2011-01-191-2/+36
| | | | llvm-svn: 123846
* Change QualType::getTypePtr() to return a const pointer, then change aJohn McCall2011-01-192-4/+4
| | | | | | thousand other things which were (generally inadvertantly) relying on that. llvm-svn: 123814
* Don't silently drop warning flags passed in toDouglas Gregor2011-01-191-1/+2
| | | | | | clang_createTranslationUnitFromSourceFile(). llvm-svn: 123793
* Fix warnings found by gcc-4.6, from -Wunused-but-set-variable andJeffrey Yasskin2011-01-182-7/+6
| | | | | | -Wint-to-pointer-cast. llvm-svn: 123719
* Introduce a new kind of TemplateName that captures a substitutedDouglas Gregor2011-01-151-0/+5
| | | | | | | | | | | | | | | template template parameter pack that cannot be fully expanded because its enclosing pack expansion could not be expanded. This form of TemplateName plays the same role as SubstTemplateTypeParmPackType and SubstNonTypeTemplateParmPackExpr do for template type parameter packs and non-type template parameter packs, respectively. We should now handle these multi-level pack expansion substitutions anywhere. The largest remaining gap in our variadic-templates support is that we cannot cope with non-type template parameter packs whose type is a pack expansion. llvm-svn: 123521
* Introduce a new expression kind, SubstNonTypeTemplateParmPackExpr,Douglas Gregor2011-01-152-0/+4
| | | | | | | | | that captures the substitution of a non-type template argument pack for a non-type template parameter pack within a pack expansion that cannot be fully expanded. This follows the approach taken by SubstTemplateTypeParmPackType. llvm-svn: 123506
* Renamed CXXBaseOrMemberInitializer to CXXCtorInitializer. This is both shorter,Alexis Hunt2011-01-081-8/+8
| | | | | | | more accurate, and makes it make sense for it to hold a delegating constructor call. llvm-svn: 123084
* Replace the representation of template template argument packDouglas Gregor2011-01-052-2/+5
| | | | | | | | | | | | | expansions with something that is easier to use correctly: a new template argment kind, rather than a bit on an existing kind. Update all of the switch statements that deal with template arguments, fixing a few latent bugs in the process. I"m happy with this representation, now. And, oh look! Template instantiation and deduction work for template template argument pack expansions. llvm-svn: 122896
* Implement the sizeof...(pack) expression to compute the length of aDouglas Gregor2011-01-042-1/+3
| | | | | | | | | parameter pack. Note that we're missing proper libclang support for the new SizeOfPackExpr expression node. llvm-svn: 122813
* Implement support for pack expansions whose pattern is a non-typeDouglas Gregor2011-01-031-0/+1
| | | | | | | | | | | | | | | | | template argument (described by an expression, of course). For example: template<int...> struct int_tuple { }; template<int ...Values> struct square { typedef int_tuple<(Values*Values)...> type; }; It also lays the foundation for pack expansions in an initializer-list. llvm-svn: 122751
* Expose Objective-C type encodings of declarations to libclang users. This ↵David Chisnall2010-12-303-0/+31
| | | | | | also adds a method in ASTContext which encodes FunctionDecls using the same encoding format that is used for Objective-C methods. llvm-svn: 122639
* The -fshort-wchar option causes wchar_t to become unsigned, in addition to beingChris Lattner2010-12-253-4/+7
| | | | | | | 16-bits in size. Implement this by splitting WChar into two enums, like we have for char. This fixes a miscompmilation of XULRunner, PR8856. llvm-svn: 122558
* Introduced raw_identifier token kind.Abramo Bagnara2010-12-221-14/+5
| | | | llvm-svn: 122394
* When determining which preprocessed entities to traverse in libclang,Douglas Gregor2010-12-211-1/+14
| | | | | | | | take into account the region of interest. Otherwise, we may fail to traverse some important preprocessed entity cursors. Fixes <rdar://problem/8554072>. llvm-svn: 122350
* Teach clang_getCursorSemanticParent() andDouglas Gregor2010-12-211-3/+29
| | | | | | | | clang_getCursorLexicalParent() to cope with class and function templates, along with the parent of the translation unit. Fixes PR8761 and PR8766. llvm-svn: 122324
* Clean up the handling of template argument packs, especially in theDouglas Gregor2010-12-201-4/+1
| | | | | | | area of printing template arguments. The functionality changes here are limited to cases of variadic templates that aren't yet enabled. llvm-svn: 122250
* Introduce a new type, PackExpansionType, to capture types that areDouglas Gregor2010-12-201-0/+5
| | | | | | | | | | | | | | | | | | | | pack expansions, e.g. given template<typename... Types> struct tuple; template<typename... Types> struct tuple_of_refs { typedef tuple<Types&...> types; }; the type of the "types" typedef is a PackExpansionType whose pattern is Types&. This commit introduces support for creating pack expansions for template type arguments, as above, but not for any other kind of pack expansion, nor for any form of instantiation. llvm-svn: 122223
* Replace all uses of PathV1::getLast with PathV2::filename.Michael J. Spencer2010-12-181-2/+1
| | | | llvm-svn: 122117
* Added missing IgnoreParens().Abramo Bagnara2010-12-141-1/+1
| | | | llvm-svn: 121795
* Eliminate the branching in QualType::getTypePtr() by providing aDouglas Gregor2010-12-101-6/+6
| | | | | | | | | | | | | | | | | | | | common base for ExtQuals and Type that stores the underlying type pointer. This results in a 2% performance win for -emit-llvm on a typical C file, with 1% memory growth in the AST. Note that there is an API change in this optimization: QualType::getTypePtr() can no longer be invoked on a NULL QualType. If the QualType might be NULL, use QualType::getTypePtrOrNull(). I've audited all uses of getTypePtr() in the code base and changed the appropriate uses over to getTypePtrOrNull(). A future optimization opportunity would be to distinguish between cast/dyn_cast and cast_or_null/dyn_cast_or_null; for the former, we could use getTypePtr() rather than getTypePtrOrNull(), to take another branch out of the cast/dyn_cast implementation. llvm-svn: 121489
* Added ParenType type node.Abramo Bagnara2010-12-101-0/+5
| | | | llvm-svn: 121488
* In clang_getCursor(), don't override a preprocessing cursor withinDouglas Gregor2010-12-101-0/+6
| | | | | | another preprocessing cursor, since we want the outermost one. llvm-svn: 121470
* Extend libclang debugging output for clang_getCursor() to show the ↵Douglas Gregor2010-12-101-0/+18
| | | | | | definition we found llvm-svn: 121451
* Fix build.Anders Carlsson2010-12-091-1/+1
| | | | llvm-svn: 121341
* Remove extra namespace specifier.Ted Kremenek2010-12-091-1/+1
| | | | llvm-svn: 121334
* 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
OpenPOWER on IntegriCloud