summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclPrinter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* OpenMP threadprivate with qualified names.Alexey Bataev2013-05-131-2/+2
| | | | llvm-svn: 181683
* In VarDecl nodes, store the thread storage class specifier as written.Enea Zaffanella2013-05-041-4/+7
| | | | llvm-svn: 181113
* [documenting declaration]: Remove arc liftime qualifiersFariborz Jahanian2013-05-011-8/+8
| | | | | | | when doccumenting declrations in comments. // rdar://13757500 llvm-svn: 180880
* [ObjC declaration documentation] declaration of Fariborz Jahanian2013-05-011-8/+15
| | | | | | | | types involving Objective-C pointers must have their arc qualifiers elided as they don't add any additional info. // rdar://13757500. llvm-svn: 180860
* C++1y: Allow aggregates to have default initializers.Richard Smith2013-04-201-1/+1
| | | | | | | | | | | Add a CXXDefaultInitExpr, analogous to CXXDefaultArgExpr, and use it both in CXXCtorInitializers and in InitListExprs to represent a default initializer. There's an additional complication here: because the default initializer can refer to the initialized object via its 'this' pointer, we need to make sure that 'this' points to the right thing within the evaluation. llvm-svn: 179958
* Annotate flavor of TLS variable (statically or dynamically initialized) onto ↵Richard Smith2013-04-131-7/+18
| | | | | | the AST. llvm-svn: 179447
* Add 178663 back.Rafael Espindola2013-04-031-4/+4
| | | | | | | | | | | http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb went back green before it processed the reverted 178663, so it could not have been the culprit. Revert "Revert 178663." This reverts commit 4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41. llvm-svn: 178682
* Revert 178663.Rafael Espindola2013-04-031-4/+4
| | | | | | | | | | Looks like it broke http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb Revert "Don't compute a patched/semantic storage class." This reverts commit 8f187f62cb0487d31bc4afdfcd47e11fe9a51d05. llvm-svn: 178681
* Don't compute a patched/semantic storage class.Rafael Espindola2013-04-031-4/+4
| | | | | | | | | | | For variables and functions clang used to store two storage classes. The one "as written" in the code and a patched one, which, for example, propagates static to the following decls. This apparently is from the days clang lacked linkage computation. It is now redundant and this patch removes it. llvm-svn: 178663
* OpenMP threadprivate directive parsing and semantic analysisAlexey Bataev2013-03-221-2/+19
| | | | llvm-svn: 177705
* Fix empty declaration printing.Michael Han2013-02-251-1/+0
| | | | | | | Don't print the semicolon when visiting an empty declaration because the semicolon will be printed as a terminator later. llvm-svn: 176035
* [Sema] Semantic analysis for empty-declaration and attribute-declaration.Michael Han2013-02-221-0/+6
| | | | | | | | Introduce a new AST Decl node "EmptyDecl" to model empty-declaration. Have attributes from attribute-declaration appertain to the EmptyDecl node by creating the AST representations of these attributes and attach them to the EmptyDecl node so these attributes can be sema checked just as attributes attached to "normal" declarations. llvm-svn: 175900
* Teach -ast-print how to print trailing-return-types.Richard Smith2013-02-221-2/+6
| | | | llvm-svn: 175864
* DeclPrinter: fix CXXConstructExpr printing with implicit default argumentDmitri Gribenko2013-02-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | This is an improvement of r173630, that handles the following case: struct VirualDestrClass { VirualDestrClass(int arg); virtual ~VirualDestrClass(); }; struct ConstrWithCleanupsClass { ConstrWithCleanupsClass(const VirualDestrClass& cplx = VirualDestrClass(42)); }; ConstrWithCleanupsClass cwcNoArg; That was printed as: ConstrWithCleanupsClass cwcNoArg(); llvm-svn: 174296
* Added outer template parameter lists to friend type AST nodes.Enea Zaffanella2013-01-311-3/+6
| | | | llvm-svn: 174050
* Decl printer: fix CXXConstructExpr with implicit default argumentDmitri Gribenko2013-01-271-3/+7
| | | | | | Patch by Will Wilson. llvm-svn: 173630
* Fixes couple of friend declaration -ast-print bugFariborz Jahanian2012-12-211-5/+3
| | | | | | | | | found by running -ast-print on all-std-headers.cpp which caused it to go into infinite loop. Now -ast-print prints all declarations found in all-std-headers.cpp. llvm-svn: 170928
* Implement AST dumper for Decls.Alexander Kornienko2012-12-201-23/+13
| | | | | | | | http://llvm-reviews.chandlerc.com/D52 Patch by Philip Craig! llvm-svn: 170634
* Audit DeclPrinter with -ast-dump on Cocoa.h andFariborz Jahanian2012-12-191-10/+25
| | | | | | | | | 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/+3
| | | | | | | | | | 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
* Use @import rather than @__experimental_modules_import, since theDouglas Gregor2012-12-111-1/+1
| | | | | | latter is rather a mess to type. llvm-svn: 169919
* More C++ testing of declarations embedded inFariborz Jahanian2012-12-061-1/+1
| | | | | | | | <declaration> tag of Comment XML and fixing DeclPrint of templates along the way - wip. //rdar://12378714 llvm-svn: 169453
* In DeclPrint add printing of '= default'Fariborz Jahanian2012-12-051-0/+2
| | | | | | in constructors. llvm-svn: 169440
* In DeclPrint add printing of 'explicit'Fariborz Jahanian2012-12-051-1/+4
| | | | | | constructors. llvm-svn: 169435
* Testing C++ declarations embedded inFariborz Jahanian2012-12-051-0/+2
| | | | | | | | | <declaration> tag of Comment XML. Added DeclPrint support for constructors and fix tests accordingly. This is wip. // rdar://12378714 llvm-svn: 169412
* Testing C++ declarations embedded inFariborz Jahanian2012-12-051-0/+25
| | | | | | | | <declaration> tag of Comment XML and added support for friend declaration printing. This is wip. // rdar://12378714 llvm-svn: 169346
* objective-c blocks: Consider padding due to alignmentFariborz Jahanian2012-12-041-0/+11
| | | | | | | after the fixed size block header when generating captured block variable info. // rdar://12773256 llvm-svn: 169285
* Testing objective-C declarations embedded inFariborz Jahanian2012-12-041-1/+11
| | | | | | | | <declaration> tag of Comment XML and fixed a missing declaration of ivars private to @implementation as result of the testing. // rdar://12378714 llvm-svn: 169193
* Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't ↵Benjamin Kramer2012-12-011-1/+2
| | | | | | | | | pull in all the generated Attr code. Required to pull some functions out of line, but this shouldn't have a perf impact. No functionality change. llvm-svn: 169092
* Pretty-print a ParenListExpr in a variable initializer correctly. Patch by ↵Eli Friedman2012-10-191-2/+2
| | | | | | Grzegorz Jablonski. llvm-svn: 166311
* [Doc parsing]: This patch adds <Declaration> tag to Fariborz Jahanian2012-10-171-1/+4
| | | | | | | | | | | XML comment for declarations which pretty-prints declaration. I had to XFAIL one test annotate-comments.cpp. This test is currently unmaintainable as written. Dmitri G., can you see what we can do about this test. We should change this test such that adding a new tag does not wreck havoc to the test. llvm-svn: 166130
* Teach GetBaseType() about BlockPointerTypes.Ted Kremenek2012-10-111-0/+2
| | | | llvm-svn: 165742
* Remove redundant semicolons which are null statements.Dmitri Gribenko2012-09-101-1/+1
| | | | llvm-svn: 163546
* DeclPrinter, terse mode: don't print function bodiesDmitri Gribenko2012-08-211-1/+1
| | | | 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-201-0/+3
| | | | | | | | | | | | | | 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
* Store SourceManager pointer on PrintingPolicy in the case where we're dumping,Richard Smith2012-08-161-26/+22
| | | | | | | | | and remove ASTContext reference (which was frequently bound to a dereferenced null pointer) from the recursive lump of printPretty functions. In so doing, fix (at least) one case where we intended to use the 'dump' mode, but that failed because a null ASTContext reference had been passed in. llvm-svn: 162011
* Don't constant-fold when pretty-printing alignment attribute. This fixes aRichard Smith2012-08-161-2/+2
| | | | | | potential crasher -- Context is sometimes a null reference (!!) here. llvm-svn: 162007
* Do NOT use inline functions with LLVM_ATTRIBUTE_USED.Benjamin Kramer2012-08-141-0/+4
| | | | | | The function will be emitted into every single TU including the header! llvm-svn: 161872
* Provide isConst/Volatile on CXXMethodDecl.David Blaikie2012-08-101-5/+4
| | | | | | | | | This also provides isConst/Volatile/Restrict on FunctionTypes to coalesce the implementation with other callers (& update those other callers). Patch contributed by Sam Panzer (panzer@google.com). llvm-svn: 161647
* Fix a -ast-dump crash.Eli Friedman2012-08-081-0/+2
| | | | llvm-svn: 161472
* Added -ast-dump-filter option to clang -cc1.Alexander Kornienko2012-07-261-2/+4
| | | | llvm-svn: 160784
* PR13064: Store whether an in-class initializer uses direct or copyRichard Smith2012-06-101-1/+4
| | | | | | | initialization, and use that information to produce the right kind of initialization during template instantiation. llvm-svn: 158288
* Revert Decl's iterators back to pointer value_type rather than reference ↵David Blaikie2012-06-061-1/+1
| | | | | | | | | | | | | | value_type In addition, I've made the pointer and reference typedef 'void' rather than T* just so they can't get misused. I would've omitted them entirely but std::distance likes them to be there even if it doesn't use them. This rolls back r155808 and r155869. Review by Doug Gregor incorporating feedback from Chandler Carruth. llvm-svn: 158104
* Use raw_ostream in TypePrinter and eliminate uses of temporary std::strings.Argyrios Kyrtzidis2012-05-051-20/+8
| | | | | | Part of rdar://10796159 llvm-svn: 156228
* Print inline for inline namespaces, from Faisal ValiDouglas Gregor2012-05-011-0/+2
| | | | llvm-svn: 155875
* Remove the ref/value inconsistency in filter_decl_iterator.David Blaikie2012-04-301-1/+1
| | | | | | | | | | | | | filter_decl_iterator had a weird mismatch where both op* and op-> returned T* making it difficult to generalize this filtering behavior into a reusable library of any kind. This change errs on the side of value, making op-> return T* and op* return T&. (reviewed by Richard Smith) llvm-svn: 155808
* Change @import to @__experimental_modules_import. We are not ready to ↵Ted Kremenek2012-03-011-1/+1
| | | | | | | | commit to a particular syntax for modules, and don't have time to push it forward in the near future. llvm-svn: 151841
* Represent C++ direct initializers as ParenListExprs before semantic analysisSebastian Redl2012-02-111-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of having a special-purpose function. - ActOnCXXDirectInitializer, which was mostly duplication of AddInitializerToDecl (leading e.g. to PR10620, which Eli fixed a few days ago), is dropped completely. - MultiInitializer, which was an ugly hack I added, is dropped again. - We now have the infrastructure in place to distinguish between int x = {1}; int x({1}); int x{1}; -- VarDecl now has getInitStyle(), which indicates which of the above was used. -- CXXConstructExpr now has a flag to indicate that it represents list- initialization, although this is not yet used. - InstantiateInitializer was renamed to SubstInitializer and simplified. - ActOnParenOrParenListExpr has been replaced by ActOnParenListExpr, which always produces a ParenListExpr. Placed that so far failed to convert that back to a ParenExpr containing comma operators have been fixed. I'm pretty sure I could have made a crashing test case before this. The end result is a (I hope) considerably cleaner design of initializers. More importantly, the fact that I can now distinguish between the various initialization kinds means that I can get the tricky generalized initializer test cases Johannes Schaub supplied to work. (This is not yet done.) This commit passed self-host, with the resulting compiler passing the tests. I hope it doesn't break more complicated code. It's a pretty big change, but one that I feel is necessary. llvm-svn: 150318
* Print NamedDecls directly to a raw_ostream where possible.Benjamin Kramer2012-02-071-4/+3
| | | | llvm-svn: 149982
OpenPOWER on IntegriCloud