summaryrefslogtreecommitdiffstats
path: root/clang/unittests/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-241-2/+3
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. Take 3. llvm-svn: 230305
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-211-3/+2
| | | | | | | | This reverts commit 230099. The Linux configure+make build variant still needs some work. llvm-svn: 230103
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-201-2/+3
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. Take 2. llvm-svn: 230089
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-201-3/+2
| | | | | | | | This reverts commit r230067. Investigating another batch of problems found by the bots. llvm-svn: 230073
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-201-2/+3
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. llvm-svn: 230067
* [cleanup] Re-sort the #include lines using llvm/utils/sort_includes.pyChandler Carruth2015-01-142-6/+3
| | | | | | | No functionality changed, this is a purely mechanical cleanup to ensure the #include order remains consistent across the project. llvm-svn: 225975
* Fix bug in DynTypedMatcher::constructVariadic() that would cause false ↵Samuel Benzaquen2014-10-061-0/+39
| | | | | | | | | | | | | | | | | | | negatives. Summary: DynTypedMatcher::constructVariadic() where the restrict kind of the different matchers are not related causes the matcher to have a "None" restrict kind. This causes false negatives for anyOf and eachOf. Change the logic to get a common ancestor if there is one. Also added regression tests that fail without the fix. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D5580 llvm-svn: 219118
* unique_ptrify SourceManager::createFileIDDavid Blaikie2014-08-292-2/+2
| | | | llvm-svn: 216715
* Update for LLVM api change.Rafael Espindola2014-08-273-5/+5
| | | | llvm-svn: 216585
* Switching from std::vector to llvm::ArrayRef per post-commit review suggestion.Aaron Ballman2014-08-261-3/+1
| | | | llvm-svn: 216463
* Some versions of MSVC do not support initializer list construction of ↵Aaron Ballman2014-08-261-1/+2
| | | | | | vectors, so this fixes a broken build from r216385. llvm-svn: 216457
* ASTVector: Fix return value of various insert() methods.Will Dietz2014-08-251-3/+73
| | | | | | | | | Error caught using -fsanitize=pointer-overflow. Expand ASTVectorTest to verify basic behavior, test fails without functionality in this patch. llvm-svn: 216385
* Recommit 213307: unique_ptr-ify ownership of ASTConsumers (reverted in r213325)David Blaikie2014-08-103-8/+9
| | | | | | | | After post-commit review and community discussion, this seems like a reasonable direction to continue, making ownership semantics explicit in the source using the type system. llvm-svn: 215323
* Add missing header guards.Benjamin Kramer2014-08-081-0/+5
| | | | llvm-svn: 215202
* Obective-C. Patch to fix the incorrect ObjcMessageExpr argument source ranges, Fariborz Jahanian2014-07-312-1/+24
| | | | | | | when arguments are structures or classes. PR16392. patch by Karlis Senko llvm-svn: 214409
* AST printer: fix double space before base class with no access specifier.Richard Smith2014-07-231-6/+6
| | | | llvm-svn: 213719
* When pretty-printing a declaration of a pack, put the ellipsis before the nameRichard Smith2014-07-231-12/+11
| | | | | | | | being declared, not at the end. When pretty-printing a non-type template parameter, put the name of the parameter in the middle of the type, not at the end. llvm-svn: 213718
* Revert "unique_ptr-ify ownership of ASTConsumers"David Blaikie2014-07-173-9/+8
| | | | | | | | | This reverts commit r213307. Reverting to have some on-list discussion/confirmation about the ongoing direction of smart pointer usage in the LLVM project. llvm-svn: 213325
* unique_ptr-ify ownership of ASTConsumersDavid Blaikie2014-07-173-8/+9
| | | | | | | | | (after fixing a bug in MultiplexConsumer I noticed the ownership of the nested consumers was implemented with raw pointers - so this fixes that... and follows the source back to its origin pushing unique_ptr ownership up through there too) llvm-svn: 213307
* Fix FriendDecl source location and range for class templates and function ↵Nikola Smiljanic2014-07-171-4/+136
| | | | | | declarations that don't start with 'friend' keyword. Add more unittests. llvm-svn: 213220
* Make clang's rewrite engine a core featureAlp Toker2014-07-161-1/+1
| | | | | | | | | | | | | | | The rewrite facility's footprint is small so it's not worth going to these lengths to support disabling at configure time, particularly since key compiler features now depend on it. Meanwhile the Objective-C rewriters have been moved under the ENABLE_CLANG_ARCMT umbrella for now as they're comparatively heavy and still potentially worth excluding from lightweight builds. Tests are now passing with any combination of feature flags. The flags historically haven't been tested by LLVM's build servers so caveat emptor. llvm-svn: 213171
* Lex: Use the correct types for MS integer suffixesDavid Majnemer2014-06-211-2/+4
| | | | | | | | | | | | | | | | Something went wrong with r211426, it is an older version of this code and should not have been committed. It was reverted with r211434. Original commit message: We didn't properly implement support for the sized integer suffixes. Suffixes like i16 were essentially ignored instead of mapping them to the appropriately sized integer type. This fixes PR20008. Differential Revision: http://reviews.llvm.org/D4132 llvm-svn: 211441
* Revert "Lex: Use the correct types for MS integer suffixes"Rafael Espindola2014-06-211-4/+2
| | | | | | | | | This reverts commit r211426. This broke the arm bots. The crash can be reproduced on X86 by running. ./bin/clang -cc1 -fsyntax-only -verify -fms-extensions ~/llvm/clang/test/Lexer/ms-extensions.c -triple arm-linux llvm-svn: 211434
* Lex: Use the correct types for MS integer suffixesDavid Majnemer2014-06-211-2/+4
| | | | | | | | | | | | We didn't properly implement support for the sized integer suffixes. Suffixes like i16 were essentially ignored instead of mapping them to the appropriately sized integer type. This fixes PR20008. Differential Revision: http://reviews.llvm.org/D4132 llvm-svn: 211426
* Removing an "if (this == nullptr)" check from two print methods. The conditionRichard Trieu2014-06-091-0/+1
| | | | | | | will never be true in a well-defined context. The checking for null pointers has been moved into the caller logic so it does not rely on undefined behavior. llvm-svn: 210498
* [C++11] Use 'nullptr'. Unittests edition.Craig Topper2014-06-083-4/+4
| | | | llvm-svn: 210423
* Add first set of tests for FriendDecl source range and location.Nikola Smiljanic2014-06-061-0/+78
| | | | llvm-svn: 210306
* 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
OpenPOWER on IntegriCloud