summaryrefslogtreecommitdiffstats
path: root/clang/unittests/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* Introduce DynTypedNode::print, dump and getSourceRange.Peter Collingbourne2013-11-062-0/+120
| | | | | | | | | These functions can generally be applied to multiple kinds of AST node, so it makes sense to add them to DynTypedNode. Differential Revision: http://llvm-reviews.chandlerc.com/D2096 llvm-svn: 194113
* Fix missing source location in CXXTemporaryObjectExpr nodes.Enea Zaffanella2013-09-071-0/+9
| | | | | | | | For clarity, renamed (get/set)ParenRange as (get/set)ParenOrBraceRange in CXXConstructExpr nodes. Added testcase. llvm-svn: 190239
* Comment parsing: fix a bug where a line with whitespace between two paragraphsDmitri Gribenko2013-08-231-5/+30
| | | | | | | | | | would cause us to concatenate these paragraphs into a single one. The no-op whitespace churn in test/Index test happened because these tests don't use the correct approach for testing and are more strict than required for they are testing. llvm-svn: 189126
* Fix source range of implicitly instantiated friend declaration.Enea Zaffanella2013-07-191-0/+13
| | | | llvm-svn: 186702
* Fixed source range of C++03 access declarations.Enea Zaffanella2013-07-171-0/+20
| | | | llvm-svn: 186522
* Revert "Revert "PR16540: ASTVector::insert(Context, Iter, Element) doesn't ↵David Blaikie2013-07-132-0/+25
| | | | | | | | | | | compile"" This reverts commit b18b043a5a37f76803d89467e46bcac286c0ecae. Reapply with fix for the configure+make build (missing include of ASTContext.h). llvm-svn: 186257
* Revert "PR16540: ASTVector::insert(Context, Iter, Element) doesn't compile"David Blaikie2013-07-132-27/+0
| | | | | | | | | This reverts commit r186253. This is failing to link under Configure+Make on the buildbots for reasons I don't immediately understand. llvm-svn: 186255
* PR16540: ASTVector::insert(Context, Iter, Element) doesn't compileDavid Blaikie2013-07-132-0/+27
| | | | | | | | | Fix some uninstantiable code in ASTVector::insert. I've added a cheap-and-dirty compile test for this, because I don't have the time to figure out a nice way to get a real ASTContext to implement executable tests - but we probably should have them for this ADT. llvm-svn: 186253
* Fixed testcase failing under MS by adding "-fno-delayed-template-parsing",Enea Zaffanella2013-07-082-10/+18
| | | | | | | as suggested by Takumi. To this end, added a MatchVerifier::match() overload accepting a vector of invocation arguments. llvm-svn: 185827
* AST/SourceLocationTest.cpp: Appease MS hosts to suppress ↵NAKAMURA Takumi2013-07-081-0/+5
| | | | | | | CXXUnresolvedConstructExpr.SourceRange, for now. FIXME: It could pass if MS-compatible mode were disabled with Args.push_back("-fno-delayed-template-parsing"). llvm-svn: 185795
* Fixed source range for functional cast and unresolved construct expr nodes.Enea Zaffanella2013-07-072-1/+26
| | | | | | Added testcases. llvm-svn: 185773
* Fixed source location info for UnaryTransformTypeLoc nodes.Enea Zaffanella2013-07-061-0/+21
| | | | llvm-svn: 185765
* Enhancements for the DynTypedNodeSamuel Benzaquen2013-06-192-0/+63
| | | | | | | | | | Added ASTNodeKind as a standalone way to represent node kinds and their hierarchy. This change is to support ongoing work on D815. Reviewers: klimek CC: cfe-commits llvm-svn: 184331
* Fix source range of CXXNewExpr with parentheses around the type. PR15569.Eli Friedman2013-06-171-0/+6
| | | | llvm-svn: 184139
* [Driver] Refactor clang driver to use LLVM's Option libraryReid Kleckner2013-06-141-1/+1
| | | | | | | | | | | | | | | | | | The big changes are: - Deleting Driver/(Arg|Opt)* - Rewriting includes to llvm/Option/ and re-sorting - 'using namespace llvm::opt' in clang::driver - Fixing the autoconf build by adding option everywhere As discussed in the review, this change includes using directives in header files. I'll make follow up changes to remove those in favor of name specifiers. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D975 llvm-svn: 183989
* Re-commit r183466 with a fix to make the TypeLoc casting machinery workEli Friedman2013-06-071-1/+1
| | | | | | | | | correctly in the presence of qualified types. (I had to change the unittest because it was trying to cast a QualifiedTypeLoc to TemplateSpecializationTypeLoc.) llvm-svn: 183563
* Adds a test that verifies angle bracket locations.Manuel Klimek2013-06-071-0/+19
| | | | | | | Regression test to make sure TemplateSpecializationTypeLocs have the correct locations for angle brackets. llvm-svn: 183514
* ASTTests/DeclTest.cpp: Tweak on msvc target to add "-fno-ms-extensions".NAKAMURA Takumi2013-06-051-0/+1
| | | | | | MS extensions don't prefer imaginary suffix even with -std=c++11. llvm-svn: 183301
* __uint128_t is only available on 64 bit platforms, only test it when it's ↵Benjamin Kramer2013-06-031-0/+2
| | | | | | around. llvm-svn: 183146
* Fix memory leak for APValues that do memory allocation.Manuel Klimek2013-06-032-0/+57
| | | | | | | | | This patch ensures that APValues are deallocated with the ASTContext by registering a deallocation function for APValues to the ASTContext. Original version of the patch by James Dennett. llvm-svn: 183101
* [Doc parsing] Provide diagnostics for unknown documentation Fariborz Jahanian2013-05-032-2/+2
| | | | | | commands. // rdar://12381408 llvm-svn: 181071
* Add an error to check that all program scope variables are in the constant ↵Tanya Lattner2013-04-051-4/+4
| | | | | | address space in OpenCL. llvm-svn: 178906
* Comment parsing: refactor handling of command markers in ASTDmitri Gribenko2013-03-041-15/+64
| | | | | | | | | | | | | | | * Use the term 'command marker', because the semantics of 'backslash' and 'at' commands are the same. (Talking about 'at commands' makes them look like a special entity.) * Sink the flag down into bitfields, reducing the size of AST nodes. * Change the flag into an enum for clarity. Boolean function parameters are not very clear. * Add unittests for new tok::at_command tokens. llvm-svn: 176461
* Some refactoring in my patch on documentFariborz Jahanian2013-03-021-10/+10
| | | | | | command source fidelity. // rdar://13066276 llvm-svn: 176401
* First step towards adding a parent map to the ASTContext.Manuel Klimek2013-02-283-1/+73
| | | | | | | | | | | | This does not yet implement the LimitNode approach discussed. The impact of this is an O(n) in the number of nodes in the AST reduction of complexity for certain kinds of matchers (as otherwise the parent map gets recreated for every new MatchFinder). See FIXMEs in the comments for the direction of future work. llvm-svn: 176251
* Comment parsing: add CommentOptions to allow specifying custom comment block ↵Dmitri Gribenko2013-02-222-2/+74
| | | | | | | | | | | | | | | | commands Add an ability to specify custom documentation block comment commands via a new class CommentOptions. The intention is that this class will hold future customizations for comment parsing, including defining documentation comments with specific numbers of parameters, etc. CommentOptions instance is a member of LangOptions. CommentOptions is controlled by a new command-line parameter -fcomment-block-commands=Foo,Bar,Baz. llvm-svn: 175892
* PR15095: Use more correct source locations for the InitListExpr we fake up forRichard Smith2013-02-052-1/+36
| | | | | | vector initialization. Patch by John Stratton! llvm-svn: 174339
* Move commonly useful code for AST testing into MatchVerfier.h.Manuel Klimek2013-01-312-165/+196
| | | | llvm-svn: 174057
* Comment parsing: add more tests for html character referencesDmitri Gribenko2013-01-191-1/+2
| | | | llvm-svn: 172923
* fix the unit tests too.Chris Lattner2013-01-191-1/+1
| | | | llvm-svn: 172907
* Provide couple of DeclPrint tests for my last patch.Fariborz Jahanian2012-12-201-0/+18
| | | | llvm-svn: 170635
* Audit DeclPrinter with -ast-dump on Cocoa.h andFariborz Jahanian2012-12-191-1/+1
| | | | | | | | | fix any bad objectiveC syntax coming out of DeclPrinter. This is on going. Also, introduce a new PrintPolicy and use it as needed when declaration tag is to be produced via DeclPrinter. llvm-svn: 170606
* This is the libclang patch providing minimal API toFariborz Jahanian2012-12-181-1/+1
| | | | | | | | | | use clang's formatter. Currently, formatter is used to format declaration tags for xml comments. Since formatter is in flux and its change will break several of the clang comment tests, only a single tests is formatted using this facility. Doug has reviewed and approved it for check-in. llvm-svn: 170467
* PR14558: Compute triviality of special members (etc) at the end of the classRichard Smith2012-12-111-2/+1
| | | | | | | | | definition, rather than at the end of the definition of the set of nested classes. We still defer checking of the user-specified exception specification to the end of the nesting -- we can't check that until we've parsed the in-class initializers for non-static data members. llvm-svn: 169805
* In DeclPrint add printing of '= default'Fariborz Jahanian2012-12-051-2/+2
| | | | | | in constructors. llvm-svn: 169440
* In DeclPrint add printing of 'explicit'Fariborz Jahanian2012-12-051-2/+1
| | | | | | constructors. llvm-svn: 169435
* fix comment.Fariborz Jahanian2012-12-051-1/+1
| | | | llvm-svn: 169413
* Testing C++ declarations embedded inFariborz Jahanian2012-12-051-18/+11
| | | | | | | | | <declaration> tag of Comment XML. Added DeclPrint support for constructors and fix tests accordingly. This is wip. // rdar://12378714 llvm-svn: 169412
* Really sort the #include lines in unittests/...Chandler Carruth2012-12-042-2/+2
| | | | | | I forgot to re-sort after fixing main module headers. llvm-svn: 169244
* Sort the #include lines for unittests/...Chandler Carruth2012-12-043-13/+11
| | | | | | I've tried to place sensible headers at the top as main-module headers. llvm-svn: 169243
* ASTTests, ASTMatchersTests: Move clangEdit before clangAst in USEDLIB.NAKAMURA Takumi2012-12-041-1/+1
| | | | llvm-svn: 169236
* Untabify (in USEDLIBS, Makefile(s)).NAKAMURA Takumi2012-12-041-1/+1
| | | | llvm-svn: 169235
* Remove out-of-date comment.Richard Smith2012-11-291-3/+0
| | | | llvm-svn: 168957
* ASTTests/StmtPrinterTest/StmtPrinter.TestMSIntegerLiteral: Remove i128 ↵NAKAMURA Takumi2012-11-291-14/+2
| | | | | | stuff. Conditioning-out in macro argument was not accepted on MS cl.exe. llvm-svn: 168867
* ASTTests/StmtPrinterTest/StmtPrinter.TestMSIntegerLiteral: Suppress i128 ↵NAKAMURA Takumi2012-11-291-4/+12
| | | | | | | | | according to r168856, for now. I think "i128", that I conditioned out, could be completely removed. MS Compiler doesn't accept i128. We can assume no one would use i128. llvm-svn: 168865
* Fix a source range regression in C++ new expressions with call initializers.David Blaikie2012-11-081-0/+6
| | | | | | Introduced in r167507, discovered in review by Abramo Bagnara. llvm-svn: 167597
* Fixed converted ConstantArrayTypeLoc range. Added a missing testcase for ↵Abramo Bagnara2012-11-081-1/+18
| | | | | | ConstructorDecl source range. llvm-svn: 167583
* Fixed range of implicit MemberExpr.Abramo Bagnara2012-11-081-0/+8
| | | | llvm-svn: 167581
* Test for source location range of new expressions fixed in r167507.David Blaikie2012-11-071-0/+6
| | | | | | Patch by Philip Craig. llvm-svn: 167538
* Add unit tests for source locations of AST nodes.Manuel Klimek2012-11-062-0/+253
| | | | | | Patch by Philip Craig. llvm-svn: 167470
OpenPOWER on IntegriCloud