summaryrefslogtreecommitdiffstats
path: root/clang/unittests/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* More unit-test fixesDouglas Gregor2012-10-232-0/+2
| | | | llvm-svn: 166511
* Fixup unit tests for DiagnosticOptions changeDouglas Gregor2012-10-232-2/+2
| | | | llvm-svn: 166509
* [doc parsing] use getParamName to access parameter Fariborz Jahanian2012-10-181-2/+2
| | | | | | | for current(rewritten) comment and getParamNameAsWritten to access param name coming with \param marker. llvm-svn: 166231
* Patch for decl printer test of objective-c methods.Fariborz Jahanian2012-10-181-6/+36
| | | | | | Patch by Dmitri Gribenko. llvm-svn: 166209
* structured document comment: patch to provide comment for overriding functionFariborz Jahanian2012-10-151-1/+1
| | | | | | | template when comment is comming from overridden declaration. // rdar://12378793 llvm-svn: 165953
* [Doc parsing] This patch searches overridden objc/c++Fariborz Jahanian2012-10-101-1/+1
| | | | | | | | | | methods looking for documentation on a particular base class inherited by any method that overrides the base class. In case of redeclaration, as when objc method is defined in the implementation, it also looks up for documentation in class/class extension being redeclared. llvm-svn: 165643
* Move the 'find macro by spelling' infrastructure to the Preprocessor class andDmitri Gribenko2012-09-291-1/+1
| | | | | | | use it to suggest appropriate macro for __attribute__((deprecated)) in -Wdocumentation-deprecated-sync. llvm-svn: 164892
* unittests/AST/StmtPrinterTest.cpp: Suppress a LP64-assumed test, ↵NAKAMURA Takumi2012-09-241-2/+0
| | | | | | | | "0x100000000i128 => 4294967296L", for now. LONG_MAX is 2147483647L on common 32 bit and LLP64 (Windows x64). llvm-svn: 164478
* As a followup for r164303, add some tests for printing literals that testDmitri Gribenko2012-09-232-0/+175
| | | | | | printing directly rather than through a complicated machinery of ObjC rewriter. llvm-svn: 164477
* Comment parsing: don't parse comment marker followed by a digit as a commandDmitri Gribenko2012-09-141-3/+31
| | | | | | since no Doxygen command starts with a digit. llvm-svn: 163909
* Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.Dmitri Gribenko2012-09-102-89/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we have a list of all commands. This is a good thing in itself, but it also enables us to easily implement typo correction for command names. With this change we have objects that contain information about each command, so it makes sense to resolve command name just once during lexing (currently we store command names as strings and do a linear search every time some property value is needed). Thus comment token and AST nodes were changed to contain a command ID -- index into a tables of builtin and registered commands. Unknown commands are registered during parsing and thus are also uniformly assigned an ID. Using an ID instead of a StringRef is also a nice memory optimization since ID is a small integer that fits into a common bitfield in Comment class. This change implies that to get any information about a command (even a command name) we need a CommandTraits object to resolve the command ID to CommandInfo*. Currently a fresh temporary CommandTraits object is created whenever it is needed since it does not have any state. But with this change it has state -- new commands can be registered, so a CommandTraits object was added to ASTContext. Also, in libclang CXComment has to be expanded to include a CXTranslationUnit so that all functions working on comment AST nodes can get a CommandTraits object. This breaks binary compatibility of CXComment APIs. Now clang_FullComment_getAsXML(CXTranslationUnit TU, CXComment CXC) doesn't need TU parameter anymore, so it was removed. This is a source-incompatible change for this C API. llvm-svn: 163540
* Split library clangRewrite into clangRewriteCore and clangRewriteFrontend.Ted Kremenek2012-09-011-1/+2
| | | | | | | This is similar to how we divide up the StaticAnalyzer libraries to separate core functionality to what is clearly associated with Frontend actions. llvm-svn: 163050
* Remove the useless CommentOptions class.Dmitri Gribenko2012-08-312-2/+2
| | | | llvm-svn: 162986
* DeclPrinter tests: simplify the code by using the new runToolOnCodeWithArgsDmitri Gribenko2012-08-311-27/+10
| | | | | | function from Tooling. llvm-svn: 162976
* DeclPrinter tests: since now some platforms use C++11 by default, make itDmitri Gribenko2012-08-311-105/+97
| | | | | | explicitly visible in test cases which language variant is used. llvm-svn: 162974
* Reland r160052: Default to -std=c++11 on Windows.Nico Weber2012-08-301-0/+2
| | | | | | Also update the tests that rely on c++98 to explicitly mention that. llvm-svn: 162890
* ASTTests: Suppress TestCXXConstructorDecl11 on msvc for now. It seems ↵NAKAMURA Takumi2012-08-251-1/+2
| | | | | | incompatible. llvm-svn: 162631
* Use LLVM's plugin registry to enable registering new compilationDaniel Jasper2012-08-241-1/+1
| | | | | | | databases. Move JSONCompilationDatabase.h to its own files and register it as plugin. llvm-svn: 162541
* Rename the ASTMatchers to better match AST nodes. Now, allDaniel Jasper2012-08-241-46/+46
| | | | | | | | | ASTMatchers have the same name as the corresponding AST nodes but are lower case. The only exceptions are the "CXX" prefixes which are not copied over to the matcher names as the goal is to actually remove these prefixes from the AST node names. llvm-svn: 162536
* DeclPrinter tests: mark test case we get wrong currently with WRONG.Dmitri Gribenko2012-08-241-1/+1
| | | | llvm-svn: 162512
* DeclPrinter tests: add two more tests.Dmitri Gribenko2012-08-241-0/+23
| | | | llvm-svn: 162511
* Comment parsing: parse "<blah" as an HTML tag only if "blah" is a known tagDmitri Gribenko2012-08-221-78/+94
| | | | | | | | | | name. This should reduce the amount of warning false positives about bad HTML in comments when the comment author intended to put a reference to a template. This change will also enable us parse the comment as intended in these cases. Fixes part 1 of PR13374. llvm-svn: 162407
* DeclPrinter, terse mode: don't print function bodiesDmitri Gribenko2012-08-211-17/+34
| | | | llvm-svn: 162294
* Rename PrintingPolicy::DontRecurseInDeclContext to PrintingPolicy::TerseOutputDmitri Gribenko2012-08-211-1/+1
| | | | | | to reflect the intention, not the implementation. llvm-svn: 162293
* DeclPrinter: add terse output mode and lots of testsDmitri Gribenko2012-08-203-3/+1207
| | | | | | | | | | | | | | Add a flag PrintingPolicy::DontRecurseInDeclContext to provide "terse" output from DeclPrinter. The motivation is to use DeclPrinter to print declarations in user-friendly format, without overwhelming user with inner detail of the declaration being printed. Also add many tests for DeclPrinter. There are quite a few things that we print incorrectly: search for WRONG in DeclPrinterTest.cpp -- and these tests check our output against incorrect output, so that we can fix/refactor/rewrite the DeclPrinter later. llvm-svn: 162245
* Comment parsing: extract TableGen'able pieces into new CommandTraits class.Dmitri Gribenko2012-08-092-4/+8
| | | | llvm-svn: 161548
* Comment parsing: fix crash on \tparam followed immediately by another blockDmitri Gribenko2012-08-061-8/+56
| | | | | | command, for example: \tparam\brief. llvm-svn: 161361
OpenPOWER on IntegriCloud