summaryrefslogtreecommitdiffstats
path: root/clang/unittests/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* Take PrintingPolicy::SuppressUnwrittenScope into account when printing theRichard Smith2014-05-302-0/+134
| | | | | | qualified name of a NamedDecl. Patch by Volodymyr Sapsai! llvm-svn: 209924
* Rename SourceManager::createFileIDForMemBuffer()Alp Toker2014-05-162-2/+2
| | | | | | | | It makes more sense to just overload createFileID(). Gardening only. llvm-svn: 209002
* ASTTests//EvaluateAsRValueTest.cpp: Appease *-win32 target to add ↵NAKAMURA Takumi2014-03-151-0/+1
| | | | | | -fno-delayed-template-parsing. llvm-svn: 203991
* Change a raw string literal back to C++98 style to fix freeBSD9.2 builtbotJames Dennett2014-03-141-16/+15
| | | | llvm-svn: 203961
* Fix a crash (assertion failure) in EvaluateAsRValue.James Dennett2014-03-142-0/+113
| | | | | | | | | | | | | | | | Summary: Gracefully fail to evaluate a constant expression if its type is unknown, rather than failing an assertion trying to access the type. Reviewers: klimek Reviewed By: klimek CC: chandlerc, cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3075 llvm-svn: 203950
* Fix use of uninitialized variable in ExternalASTSourceTest.cpp (introduced ↵David Blaikie2014-03-111-1/+1
| | | | | | in 203525) llvm-svn: 203545
* Add a unittest for the ExternalASTSource.Richard Smith2014-03-112-0/+84
| | | | llvm-svn: 203525
* Revert accidentally-committed file.Richard Smith2014-03-081-1/+0
| | | | llvm-svn: 203318
* Module [extern_c] attribute: inherit to submodules, don't write 'extern "C"'Richard Smith2014-03-081-0/+1
| | | | | | blocks when building in C mode, and serialize and deserialize the attribute. llvm-svn: 203317
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-074-4/+6
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* Decl printing: add tests for typedefsDmitri Gribenko2014-03-031-0/+34
| | | | | | Patch by Konrad Kleine. llvm-svn: 202709
* Add a StmtPrinter test for implicit and explicit conversion operator calls.Benjamin Kramer2014-02-262-5/+52
| | | | | | Put back a comment that I removed too aggressively. llvm-svn: 202255
* Pretty Printer: Print constexpr and ref qualifiers. Don't print return types ↵Benjamin Kramer2014-02-251-14/+10
| | | | | | on destructors. llvm-svn: 202181
* Reapply "Pretty Printer: Fix printing of conversion operator decls and calls."Benjamin Kramer2014-02-251-6/+3
| | | | | | There were many additional tests that had the bad behavior baked in. llvm-svn: 202174
* Correctly set brace range for CXXConstructExprs formed by list initialization.Peter Collingbourne2014-02-221-0/+10
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D2711 llvm-svn: 201926
* clang/unittests/AST,ASTMatchers: Remove _MSC_VER.NAKAMURA Takumi2014-02-161-3/+14
| | | | llvm-svn: 201485
* Comment parsing: don't crash while parsing \deprecated in a standalone commentDmitri Gribenko2014-01-271-0/+20
| | | | | | | | | | | (comment without a decl). I think this can not happen during normal compilation with -Wdocumentation, only while using Clang APIs to parse comments outside of a source file. Based on a patch by Olivier Goffart. llvm-svn: 200230
* unittests: explicit stringify StringRefs for conversionSaleem Abdulrasool2014-01-252-6/+8
| | | | | | | | | When clang is built outside of the LLVM tree (against a corresponding version), there is no definition providing for operator<<(std::ostream &, StringRef) which is required for the assertion routines in google-test tests. Avoid the compilation failure by explicitly stringifying the StringRef prior to use. llvm-svn: 200096
* When formatting a C++-only declaration name, enable C++ mode in the formatter'sRichard Smith2014-01-221-1/+1
| | | | | | | | | language options. This is not really ideal -- we should require the right language options to be passed in, or not require language options to format a name -- but it fixes a number of *obviously* wrong formattings. Patch by Olivier Goffart! llvm-svn: 199778
* Switch to ssize_t from size_t to unbreak windows builders.David Majnemer2014-01-141-3/+3
| | | | | | | Builders that have -fms-compatibility on by default define size_t implicitly. Tests that provide conflicting definitions would cause unintended failures. llvm-svn: 199195
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-073-3/+3
| | | | | | | encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well. llvm-svn: 198686
* [CMake] Update target_link_libraries() and LLVM_LINK_COMPONENTS for each ↵NAKAMURA Takumi2013-12-101-1/+9
| | | | | | CMakeLists.txt. llvm-svn: 196916
* Add Distance parameter to ASTNodeKind::isBaseOf.Peter Collingbourne2013-11-231-0/+13
| | | | | | | | This will allow the completer to order results by relevance. Differential Revision: http://llvm-reviews.chandlerc.com/D2209 llvm-svn: 195540
* 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
OpenPOWER on IntegriCloud