summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/recursive-cxx-member-calls.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Print nested name specifiers for typedefs and type aliasesAlex Lorenz2017-03-101-2/+2
| | | | | | | | | | | | Printing typedefs or type aliases using clang_getTypeSpelling() is missing the namespace they are defined in. This is in contrast to other types that always yield the full typename including namespaces. Patch by Michael Reiher! Differential Revision: https://reviews.llvm.org/D29944 llvm-svn: 297465
* Expose cxx constructor and method properties through libclang and python ↵Jonathan Coe2016-04-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | bindings. Summary: I have exposed the following function through libclang and the clang.cindex python bindings: clang_CXXConstructor_isConvertingConstructor, clang_CXXConstructor_isCopyConstructor, clang_CXXConstructor_isDefaultConstructor, clang_CXXConstructor_isMoveConstructor, clang_CXXMethod_isDefaulted I need (some of) these methods for a C++ code model I am building in Python to drive a code generator. Reviewers: compnerd, skalinichev Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15469 llvm-svn: 267706
* libclang: add clang_CXXMethod_isConst API that allows to determine if a C++Dmitri Gribenko2014-04-071-9/+9
| | | | | | | | member function or member function template is declared 'const' Patch by Kevin Funk with testcase updates by me. llvm-svn: 205714
* [libclang] Have clang_getCursorSpelling() return the string for a ↵Argyrios Kyrtzidis2014-03-031-81/+81
| | | | | | | | CXCursor_ObjCStringLiteral or CXCursor_StringLiteral cursor. rdar://16206459 llvm-svn: 202745
* Report a correct end location for nameless parameters.Benjamin Kramer2014-02-021-8/+8
| | | | | | | | | | | | | | | Ranges before: void test(void (*)(int), int, float); ~~~~~~~~~~~~~ ~~~~ ~~~~~~ Ranges after: void test(void (*)(int), int, float); ~~~~~~~~~~~~~ ~~~ ~~~~~ This does not change the actual location of the ParmVarDecl, it still points to the location where the name would be. PR17970. llvm-svn: 200640
* clang/test/Index/recursive-cxx-member-calls.cpp: Add "-target" rather than ↵NAKAMURA Takumi2014-01-141-4/+2
| | | | | | XFAILing. llvm-svn: 199201
* Disable this test for windows buildersDavid Majnemer2014-01-141-0/+2
| | | | | | | This test provides definitions of size_t which are at odds with -fms-compatibility. Disable this test on those builders (for now). llvm-svn: 199196
* [libclang] Make token annotation of type/storage qualifiers accurate.Argyrios Kyrtzidis2013-01-071-23/+23
| | | | | | | | Previously type/storage qualifiers would not be annotated as the declaration they belonged to. Just use the resulting source range of getRawCursorExtent() which is more correct than what AnnotateTokensWorker::Visit() was adjusting it to. llvm-svn: 171774
* PR13470: Ensure that copy-list-initialization isntantiates asRichard Smith2012-12-191-3/+3
| | | | | | | | | | | | copy-list-initialization (and doesn't add an additional copy step): Fill in the ListInitialization bit when creating a CXXConstructExpr. Use it when instantiating initializers in order to correctly handle instantiation of copy-list-initialization. Teach TreeTransform that function arguments are initializations, and so need this special treatment too. Finally, remove some hacks which were working around SubstInitializer's shortcomings. llvm-svn: 170489
* Reland r160052: Default to -std=c++11 on Windows.Nico Weber2012-08-301-1/+1
| | | | | | Also update the tests that rely on c++98 to explicitly mention that. llvm-svn: 162890
* Add correct parenthesis range to CXXConstructExprs insideDaniel Jasper2012-07-161-3/+2
| | | | | | CXXFunctionalCastExprs. llvm-svn: 160252
* [libclang] For CXXOperatorCallExprs, give a valid source location to the ↵Argyrios Kyrtzidis2012-02-081-1/+1
| | | | | | | | | | DeclRefExpr that is referencing the member function, so we can index the referenced function. Fixes rdar://10762375&10324915 & http://llvm.org/PR11192 llvm-svn: 150033
* Revert r145244. It causes us to create broken ASTs with missing type informationRichard Smith2011-11-291-0/+3
| | | | | | | | | | for some cast expressions. Original commit message: Removed useless ImplicitCast nodes in explicit cstyle and static casts llvm-svn: 145447
* Removed useless ImplicitCast nodes in explicit cstyle and static castsNicola Gigante2011-11-281-3/+0
| | | | llvm-svn: 145244
* Expose more statement, expression, and declaration kinds in libclang,Douglas Gregor2011-10-051-387/+383
| | | | | | from Manuel Holtgrewe! llvm-svn: 141200
* Propagate __attribute__((returns_twice)) from C to IL.Rafael Espindola2011-10-031-14/+14
| | | | llvm-svn: 141002
* [libclang] Introduce CXCursor_CXXAccessSpecifier for C++'s ↵Argyrios Kyrtzidis2011-09-301-15/+15
| | | | | | | | public:/private:/protected: specifiers. Patch by Paolo Capriotti! llvm-svn: 140864
* [libclang] For getDeclFromExpr in CIndex.cpp, associate the decl ofArgyrios Kyrtzidis2011-09-121-8/+8
| | | | | | | a DeclRefExpr, MemberExpr, etc. with a CastExpr if it is ImplicitCast, since the implicit cast is the one that is invisible in source code. llvm-svn: 139547
* [libclang] Require explicit cursor visitation for all TypeLocs (compilation willArgyrios Kyrtzidis2011-08-151-1/+1
| | | | | | fail if a TypeLoc kind is not handled) and handle DecltypeTypeLoc and InjectedClassNameTypeLoc. llvm-svn: 137670
* Added clang_getCursorReferenceNameRange to libclang to to retrieve parts ofDouglas Gregor2011-07-251-94/+94
| | | | | | a cursor reference, from Erik Verbruggen! llvm-svn: 135920
* Add c-index-test printing and tests for static and virtual methodDouglas Gregor2011-05-131-17/+17
| | | | | | query functions, from Erik Verbruggen! llvm-svn: 131295
* Based on the new information in the AST provided by r130628, writeChandler Carruth2011-05-011-6/+6
| | | | | | | | | | | 3 lines of code and improve a bunch of information in the libclang view of the code. Updates the two tests that exercise this with the new data, checking that each new source location actually points back to the declared template parameter. llvm-svn: 130656
* Fixed source range for StaticAssertDecl and LinkageSpecDecl. Fixed source ↵Abramo Bagnara2011-03-081-3/+3
| | | | | | range for declarations using postfix types. llvm-svn: 127251
* Fixed NamespaceDecl source range.Abramo Bagnara2011-03-081-5/+5
| | | | llvm-svn: 127242
* Fixed source range for all DeclaratorDecl's.Abramo Bagnara2011-03-081-35/+35
| | | | llvm-svn: 127225
* Fixed TypedefDecl and TemplateTypeParameter source range.Abramo Bagnara2011-03-061-13/+13
| | | | llvm-svn: 127119
* Improved TemplateTypeParmDecl end location.Abramo Bagnara2011-03-041-3/+3
| | | | llvm-svn: 126996
* Fixed end source location for LinkageSpecDecl.Abramo Bagnara2011-03-031-1/+1
| | | | llvm-svn: 126943
* Push nested-name-specifier source-location information into dependentDouglas Gregor2011-03-021-169/+169
| | | | | | | | | | | | | | | | | | | | | | | | template specialization types. This also required some parser tweaks, since we were losing track of the nested-name-specifier's source location information in several places in the parser. Other notable changes this required: - Sema::ActOnTagTemplateIdType now type-checks and forms the appropriate type nodes (+ source-location information) for an elaborated-type-specifier ending in a template-id. Previously, we used a combination of ActOnTemplateIdType and ActOnTagTemplateIdType that resulted in an ElaboratedType wrapped around a DependentTemplateSpecializationType, which duplicated the keyword ("class", "struct", etc.) and nested-name-specifier storage. - Sema::ActOnTemplateIdType now gets a nested-name-specifier, which it places into the returned type-source location information. - Sema::ActOnDependentTag now creates types with source-location information. llvm-svn: 126808
* Reinstate the introduction of source-location information forDouglas Gregor2011-03-011-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | nested-name-speciciers within elaborated type names, e.g., enum clang::NestedNameSpecifier::SpecifierKind Fixes in this iteration include: (1) Compute the type-source range properly for a dependent template specialization type that starts with "template template-id ::", as in a member access expression dep->template f<T>::f() This is a latent bug I triggered with this change (because now we're checking the computed source ranges for dependent template specialization types). But the real problem was... (2) Make sure to set the qualifier range on a dependent template specialization type appropriately. This will go away once we push nested-name-specifier locations into dependent template specialization types, but it was the source of the valgrind errors on the buildbots. llvm-svn: 126765
* Revert r126748, my second attempt at nested-name-specifier sourceDouglas Gregor2011-03-011-13/+12
| | | | | | location information for elaborated types. *sigh* llvm-svn: 126753
* Reinstate r126737, extending the generation of type-source locationDouglas Gregor2011-03-011-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | information for qualifier type names throughout the parser to address several problems. The commit message from r126737: Push nested-name-specifier source location information into elaborated name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind". Aside from the normal changes, this also required some tweaks to the parser. Essentially, when we're looking at a type name (via getTypeName()) specifically for the purpose of creating an annotation token, we pass down the flag that asks for full type-source location information to be stored within the returned type. That way, we retain source-location information involving nested-name-specifiers rather than trying to reconstruct that information later, long after it's been lost in the parser. With this change, test/Index/recursive-cxx-member-calls.cpp is showing much improved results again, since that code has lots of nested-name-specifiers. llvm-svn: 126748
* Revert r126737, the most recent nested-name-specifier location change, for ↵Douglas Gregor2011-03-011-11/+10
| | | | | | buildbot breakage. llvm-svn: 126746
* Push nested-name-specifier source location information into elaboratedDouglas Gregor2011-03-011-10/+11
| | | | | | | | | | | | | | | | | | | name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind". Aside from the normal changes, this also required some tweaks to the parser. Essentially, when we're looking at a type name (via getTypeName()) specifically for the purpose of creating an annotation token, we pass down the flag that asks for full type-source location information to be stored within the returned type. That way, we retain source-location information involving nested-name-specifiers rather than trying to reconstruct that information later, long after it's been lost in the parser. With this change, test/Index/recursive-cxx-member-calls.cpp is showing much improved results again, since that code has lots of nested-name-specifiers. llvm-svn: 126737
* Push nested-name-specifier source location information intoDouglas Gregor2011-03-011-18/+18
| | | | | | | | | | | | DependentNameTypeLoc. Teach the recursive AST visitor and libclang how to walk DependentNameTypeLoc nodes. Also, teach libclang about TypedefDecl source ranges, so that we get those. The massive churn in test/Index/recursive-cxx-member-calls.cpp is a good thing: we're annotating a lot more of this test correctly now. llvm-svn: 126729
* When libclang is walking a member access expression, don't walk intoDouglas Gregor2010-11-171-20/+10
| | | | | | | | 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
* Fix use of an uninitialized SourceLocation because DeclarationNameLoc failed ↵Ted Kremenek2010-11-121-0/+2256
| | | | | | | | | | | to completely zero-initialize itself. Now we explicitly memset all of its values. This bug was uncovered by the 'Index/recursive-cxx-member-calls.cpp', which exhibited an assertion on an i386 darwin build of clang. Adding this test case back since the assertion is now resolved. llvm-svn: 118881
* Temporarily remove this test. It is causing an assertion failure in the ↵Ted Kremenek2010-11-111-2256/+0
| | | | | | builtbot. llvm-svn: 118785
* Annotate tokens in a separate thread to avoid blowing out stack space. ↵Ted Kremenek2010-11-111-0/+2256
While the CursorVisitor is gradually becoming more data recursive, AnnotateTokensVisitor does its own recursive call within the visitor that can still blow out the stack. This can potentially be reworked to avoid this, but for now just do token annotation on a separate thread. llvm-svn: 118783
OpenPOWER on IntegriCloud