summaryrefslogtreecommitdiffstats
path: root/lib/Frontend/ASTConsumers.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Handle -ast-dump-all when passed as the only option.Aaron Ballman2017-06-151-1/+1
| | | | | | Patch by Don Hinton git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305432 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -cc1 flag -ast-dump-all to perform an AST dump including entities that ↵Richard Smith2017-03-091-13/+26
| | | | | | haven't yet been deserialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297412 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle StaticAssertDecl in DeclContextPrinterAlex Lorenz2017-01-031-0/+4
| | | | | | | | | | | | This commit fixes a crash that occurs when -print-decl-contexts AST consumer tries to print an unhandled declaration. rdar://19467234 Differential Revision: https://reviews.llvm.org/D26964 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290887 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle VarTemplateDecl in DeclContextPrinterAlex Lorenz2017-01-031-0/+4
| | | | | | | | | | | | This commit fixes a crash that occurs when -print-decl-contexts AST consumer tries to print an unhandled declaration. rdar://19467234 Differential Revision: https://reviews.llvm.org/D26964 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290886 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle AccessSpecDecl in DeclContextPrinterAlex Lorenz2017-01-031-0/+4
| | | | | | | | | | | | This commit fixes a crash that occurs when -print-decl-contexts AST consumer tries to print an unhandled declaration. rdar://19467234 Differential Revision: https://reviews.llvm.org/D26964 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290885 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle ClassTemplateSpecializationDecl in DeclContextPrinterAlex Lorenz2017-01-031-1/+22
| | | | | | | | | | | | This commit fixes a crash that occurs when -print-decl-contexts AST consumer tries to print an unhandled declaration. rdar://19467234 Differential Revision: https://reviews.llvm.org/D26964 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290884 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle EmptyDecl in DeclContextPrinterAlex Lorenz2017-01-031-0/+4
| | | | | | | | | | | | This commit fixes a crash that occurs when -print-decl-contexts AST consumer tries to print an unhandled declaration. rdar://19467234 Differential Revision: https://reviews.llvm.org/D26964 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290882 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle UsingDecl and UsingShadowDecl in DeclContextPrinterAlex Lorenz2017-01-031-0/+8
| | | | | | | | | | | | This commit fixes a crash that occurs when -print-decl-contexts AST consumer tries to print an unhandled declaration. rdar://19467234 Differential Revision: https://reviews.llvm.org/D26964 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290881 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle FriendDecl in DeclContextPrinterAlex Lorenz2017-01-031-0/+7
| | | | | | | | | | | | This commit fixes a crash that occurs when -print-decl-contexts AST consumer tries to print an unhandled declaration. rdar://19467234 Differential Revision: https://reviews.llvm.org/D26964 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290880 91177308-0d34-0410-b5e6-96231b3b80d8
* [NFC] Header cleanupMehdi Amini2016-07-181-1/+0
| | | | | | | | | | Summary: Removed unused headers, replaced some headers with forward class declarations Patch by: Eugene <claprix@yandex.ru> Differential Revision: https://reviews.llvm.org/D20100 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275882 91177308-0d34-0410-b5e6-96231b3b80d8
* Frontend: Simplify ownership model for clang's output streams.Peter Collingbourne2016-07-151-5/+8
| | | | | | | | | | | | | | This changes the CompilerInstance::createOutputFile function to return a std::unique_ptr<llvm::raw_ostream>, rather than an llvm::raw_ostream implicitly owned by the CompilerInstance. This in most cases required that I move ownership of the output stream to the relevant ASTConsumer. The motivation for this change is to allow BackendConsumer to be a client of interfaces such as D20268 which take ownership of the output stream. Differential Revision: http://reviews.llvm.org/D21537 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275507 91177308-0d34-0410-b5e6-96231b3b80d8
* Use even more ArrayRefsDavid Majnemer2016-06-241-6/+4
| | | | | | No functional change is intended, just a small refactoring. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273650 91177308-0d34-0410-b5e6-96231b3b80d8
* Use more ArrayRefsDavid Majnemer2016-06-241-1/+1
| | | | | | No functional change is intended, just a small refactoring. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273647 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").Alexander Kornienko2015-06-221-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240353 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-221-1/+1
| | | | | | | | | | | | | | The patch is generated using this command: $ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ work/llvm/tools/clang To reduce churn, not touching namespaces spanning less than 10 lines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240270 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some unused includes of llvm/IR headers from parts of Clang that reallyRichard Smith2015-02-261-1/+0
| | | | | | | shouldn't depend on LLVM IR. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230586 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify behavior of -ast-dump-lookups: if -ast-dump is not also provided, dumpRichard Smith2014-08-111-5/+12
| | | | | | | | | anyway. If -ast-dump *is* also provided, then dump the AST declarations as well as the lookup results. This is invaluable for cross-correlating the lookup information with the declarations actually found. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215393 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommit 213307: unique_ptr-ify ownership of ASTConsumers (reverted in r213325)David Blaikie2014-08-101-11/+14
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215323 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "unique_ptr-ify ownership of ASTConsumers"David Blaikie2014-07-171-14/+11
| | | | | | | | | This reverts commit r213307. Reverting to have some on-list discussion/confirmation about the ongoing direction of smart pointer usage in the LLVM project. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213325 91177308-0d34-0410-b5e6-96231b3b80d8
* unique_ptr-ify ownership of ASTConsumersDavid Blaikie2014-07-171-11/+14
| | | | | | | | | (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) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213307 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Use 'nullptr'. Frontend edition.Craig Topper2014-05-221-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209389 91177308-0d34-0410-b5e6-96231b3b80d8
* De-virtualize a method. It's called through template magic and doesn't ↵Craig Topper2014-03-131-1/+1
| | | | | | override anything. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203764 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-131-5/+5
| | | | | | class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203758 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing DeclBase iterators decls_begin() and decls_end() with ↵Aaron Ballman2014-03-071-17/+16
| | | | | | iterator_range decls(). The same is true for the noload versions of these APIs. Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203278 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing FunctionDecl iterators param_begin() and param_end() with ↵Aaron Ballman2014-03-071-3/+2
| | | | | | iterator_range params(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203248 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove -ast-dump-xml.Richard Smith2013-10-071-20/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192131 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -ast-dump-lookups switch to -cc1 to dump DeclContext lookup maps. Test toRichard Smith2013-06-241-15/+19
| | | | | | | follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184678 91177308-0d34-0410-b5e6-96231b3b80d8
* OpenMP threadprivate directive parsing and semantic analysisAlexey Bataev2013-03-221-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177705 91177308-0d34-0410-b5e6-96231b3b80d8
* Add streamed versions of getQualifiedNameAsString.Benjamin Kramer2013-02-231-1/+2
| | | | | | Move the cold virtual method getNameForDiagnostic out of line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175966 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-1/+1
| | | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate toChandler Carruth2013-01-021-1/+1
| | | | | | | | reflect the migration in r171366. Re-sort the #include lines to reflect the new paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171369 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-4/+4
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
* Use color for -ast-dump-filter only when it is supportedDmitri Gribenko2012-11-211-3/+6
| | | | | | | Patch by Philip Craig. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168420 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for -ast-dump-filterAlexander Kornienko2012-10-311-3/+1
| | | | | | | | | | | | | | | | | Summary: -ast-dump-filter implementation used to stop AST traversal after traversing a NULL Decl node. Added test and fixed. Reviewers: djasper, klimek, rsmith Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D93 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167155 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed crash and added a test and a minor output problemAlexander Kornienko2012-08-171-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162110 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix base type of ASTDeclNodeLister.Michael Han2012-08-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161963 91177308-0d34-0410-b5e6-96231b3b80d8
* Added -ast-list option to dump filterable AST decl node names.Alexander Kornienko2012-07-311-0/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161040 91177308-0d34-0410-b5e6-96231b3b80d8
* Added -ast-dump-filter option to clang -cc1.Alexander Kornienko2012-07-261-17/+59
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160784 91177308-0d34-0410-b5e6-96231b3b80d8
* Change ASTConsumer::HandleTopLevelDecl to return true for the parser to continueArgyrios Kyrtzidis2011-11-181-1/+2
| | | | | | parsing or false to abort parsing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144943 91177308-0d34-0410-b5e6-96231b3b80d8
* Change operator<< for raw_ostream and NamedDecl to take a reference instead ↵Benjamin Kramer2011-10-141-24/+24
| | | | | | | | of a pointer. Passing a pointer was a bad idea as it collides with the overload for void*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141971 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename TagDecl::isDefinition -> isCompleteDefinitionJohn McCall2011-10-071-3/+3
| | | | | | | | | for better self-documenting code, since the semantics are subtly different from getDefinition(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141355 91177308-0d34-0410-b5e6-96231b3b80d8
* When 'bool' is not a built-in type but is defined as a macro, printDouglas Gregor2011-09-271-1/+1
| | | | | | | | 'bool' rather than '_Bool' within types, to make things a bit more readable. Fixes <rdar://problem/10063263>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140650 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
* Add template instantiations to the output of -ast-dump.Richard Trieu2011-07-281-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136306 91177308-0d34-0410-b5e6-96231b3b80d8
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-7/+7
| | | | | | | | | LLVM.h imports them into the clang namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify some deleted function methods to better reflect reality:Sean Hunt2011-05-061-1/+1
| | | | | | | | | | | | | | | | | | | | - New isDefined() function checks for deletedness - isThisDeclarationADefinition checks for deletedness - New doesThisDeclarationHaveABody() does what isThisDeclarationADefinition() used to do - The IsDeleted bit is not propagated across redeclarations - isDeleted() now checks the canoncial declaration - New isDeletedAsWritten() does what it says on the tin. - isUserProvided() now correct (thanks Richard!) This fixes the bug that we weren't catching void foo() = delete; void foo() {} as being a redefinition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131013 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for C++11 (non-template) alias declarations.Richard Smith2011-04-151-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129567 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the AST printer (-ast-print-xml), which is too incomplete andDouglas Gregor2011-03-071-34/+0
| | | | | | | | | | | | | | | | too low-level to actually be useful but is just interesting enough for people to try to use it (which won't actually work beyond toy examples). To bring back the AST printer, it needs to be: - Complete, covering all of C/C++/Objective-C - Documented, with appropriate Schema against which we can validate the output - Designed for C/C++/Objective-C, not Clang's specific ASTs - Stable across Clang versions - Well-tested git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127141 91177308-0d34-0410-b5e6-96231b3b80d8
* handle labeldecls.Chris Lattner2011-02-181-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125806 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the internal command-line option for viewing inheritance in C++ ↵Douglas Gregor2011-02-171-28/+0
| | | | | | classes, since it's only really worked for the trivial cases anyway due to lame pseudo-parsing of the class name. The viewInheritance() function is still available for use in the debugger, where this is far more useful git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125762 91177308-0d34-0410-b5e6-96231b3b80d8