summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclPrinter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Unify the way destructor epilogues are generated for synthesized and regular ↵Anders Carlsson2009-11-171-31/+0
| | | | | | destructors. Also fix PR5529. llvm-svn: 89034
* Rename FunctionDecl::isInline/setInline toDouglas Gregor2009-10-271-1/+1
| | | | | | FunctionDecl::isInlineSpecified/setInlineSpecified. llvm-svn: 85305
* Remove OriginalTypeParmDecl; the original type is the one specifiedJohn McCall2009-10-231-6/+1
| | | | | | | | | | | | | in the DeclaratorInfo, if one is present. Preserve source information through template instantiation. This is made more complicated by the possibility that ParmVarDecls don't have DIs, which is possibly worth fixing in the future. Also preserve source information for function parameters in ObjC method declarations. llvm-svn: 84971
* Make Decl::dump const.Anders Carlsson2009-09-261-4/+4
| | | | llvm-svn: 82878
* Change all the Type::getAsFoo() methods to specializations of Type::getAs().John McCall2009-09-211-3/+3
| | | | | | | | | | | Several of the existing methods were identical to their respective specializations, and so have been removed entirely. Several more 'leaf' optimizations were introduced. The getAsFoo() methods which imposed extra conditions, like getAsObjCInterfacePointerType(), have been left in place. llvm-svn: 82501
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-63/+62
| | | | llvm-svn: 81346
* Ensure that the tag decls of friend decls aren't added to the friending class'sJohn McCall2009-09-021-3/+1
| | | | | | | decl list, and remove some workarounds that were due to this. Thanks to Eli for pointing this out and providing the test case. llvm-svn: 80745
* Add a workaround for decls that come from friend decls pointing to ↵Anders Carlsson2009-08-291-1/+4
| | | | | | undeclared classes. llvm-svn: 80438
* In DeclPrinter, assert when asked to print AS_None.Anders Carlsson2009-08-291-4/+4
| | | | llvm-svn: 80437
* Add printing of access specifiers to DeclPrinter. The formatting is pretty ↵Anders Carlsson2009-08-281-8/+25
| | | | | | bad but it works :) llvm-svn: 80402
* Improve support for using decls in the decl printer.Anders Carlsson2009-08-281-0/+16
| | | | llvm-svn: 80386
* Replace cerr with errs().Benjamin Kramer2009-08-231-1/+0
| | | | llvm-svn: 79854
* Change uses of:Ted Kremenek2009-07-291-3/+3
| | | | | | | | | | | | | | | | | | | | Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsRecordType() -> Type::getAs<RecordType>() Type::getAsPointerType() -> Type::getAs<PointerType>() Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>() Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>() Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>() Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>() Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsTagType() -> Type::getAs<TagType>() And remove Type::getAsReferenceType(), etc. This change is similar to one I made a couple weeks ago, but that was partly reverted pending some additional design discussion. With Doug's pending smart pointer changes for Types, it seemed natural to take this approach. llvm-svn: 77510
* Add builtin knowledge about longjmp being noreturn. Add printing forMike Stump2009-07-271-0/+2
| | | | | | the noreturn attribute. llvm-svn: 77253
* More work toward initialization of objectsFariborz Jahanian2009-07-241-6/+7
| | | | | | in constructors. llvm-svn: 76980
* Patch to accomodate Doug's comment on defaultFariborz Jahanian2009-07-211-9/+10
| | | | | | destruction of base/members for each destructor AST. llvm-svn: 76663
* Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methodsTed Kremenek2009-07-171-3/+3
| | | | | | | | | until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. llvm-svn: 76193
* Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), ↵Ted Kremenek2009-07-171-2/+2
| | | | | | Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents. llvm-svn: 76139
* Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.Ted Kremenek2009-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | This method is intended to eventually replace the individual Type::getAsXXXType<> methods. The motivation behind this change is twofold: 1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of them are basically copy-and-paste. 2) By centralizing the implementation of the getAs<Type> logic we can more smoothly move over to Doug Gregor's proposed canonical type smart pointer scheme. Along with this patch: a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>. b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>. llvm-svn: 76098
* Fixed a stinko which caused an ast-print test failure.Fariborz Jahanian2009-07-151-2/+0
| | | | llvm-svn: 75861
* #ifdef'ed out -ast-print of destructors which causedFariborz Jahanian2009-07-151-0/+2
| | | | | | a test failure, until figuring out what caused the failure. llvm-svn: 75855
* Added ASTs to destructor decl AST for default destruction of object'sFariborz Jahanian2009-07-151-0/+30
| | | | | | base/members. llvm-svn: 75849
* Added a FIXME and prevent crash when listingFariborz Jahanian2009-07-141-5/+6
| | | | | | a dependent type in the ctor initializer-list. llvm-svn: 75712
* Fixes a minor bug in pretty printing of ctor defs.Fariborz Jahanian2009-07-131-3/+2
| | | | llvm-svn: 75549
* Added pretty-printing support for constructor definition.Fariborz Jahanian2009-07-131-1/+41
| | | | llvm-svn: 75487
* Look through vector types when determining the base type of a type for ↵Douglas Gregor2009-07-011-0/+2
| | | | | | declarator printing. Bug found via the PCH tester llvm-svn: 74672
* De-ASTContext-ify DeclContext.Argyrios Kyrtzidis2009-06-301-3/+2
| | | | | | | Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating". Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit. llvm-svn: 74506
* Remove the ASTContext parameter from the getBody() methods of Decl and ↵Argyrios Kyrtzidis2009-06-301-1/+1
| | | | | | | | subclasses. Timings showed no significant difference before and after the commit. llvm-svn: 74504
* Remove the ASTContext parameter from the printing related methods of Decl.Argyrios Kyrtzidis2009-06-301-15/+12
| | | | llvm-svn: 74503
* Keep track of whether a type parameter is actually a type parameter pack.Anders Carlsson2009-06-121-0/+3
| | | | llvm-svn: 73261
* Minor improvements to template parameter writing.Anders Carlsson2009-06-041-2/+44
| | | | llvm-svn: 72848
* Add a little FIXME for C++ class printingDouglas Gregor2009-05-311-0/+1
| | | | llvm-svn: 72660
* AST printing for C++ base classesDouglas Gregor2009-05-301-8/+46
| | | | llvm-svn: 72617
* Pretty printing and improved representation for namespace alias declarationsDouglas Gregor2009-05-301-0/+8
| | | | llvm-svn: 72616
* Add a hack to prevent us from printing out the __builtin_va_list Eli Friedman2009-05-301-0/+5
| | | | | | declaration in -ast-print mode. llvm-svn: 72615
* Printing for using directives, e.g.,Douglas Gregor2009-05-301-1/+20
| | | | | | | | | using namespace std::debug; Extended UsingDirectiveDecl to store the nested-name-specifier that precedes the nominated namespace. llvm-svn: 72614
* Never suppress specifiers when printing the parameters of a functionDouglas Gregor2009-05-301-3/+6
| | | | | | declaration. llvm-svn: 72613
* Add a Stmt::printPretty overload which takes an ASTContext; start Eli Friedman2009-05-301-6/+11
| | | | | | transitioning callers over to pass one in. llvm-svn: 72609
* Expose an API to print a group of decls (like "int a,b;"). Eli Friedman2009-05-301-14/+129
| | | | | | | | | | | | | | | | | Make StmtPrinter use DeclPrinter to print all declarations. Merge declarations in the limited case of an unnamed TagDecl followed by one or more declarations using that TagDecl directly. Change SuppressTypeSpecifiers to the more general SuppressSpecifiers, and use it to suppress stuff like "typedef" and "extern". Replace OwnedTag with SuppressTag, since it's more convenient to print declarations from DeclPrinter at the moment. improvements to declaration printing. Fix pretty-printing for K&R function definitions and __builtin_va_arg. We're now to the point where the pretty-printing output for non-trivial programs can actually be piped back into clang. llvm-svn: 72608
* Clean up printing for Objective-C, designated initializers.Douglas Gregor2009-05-301-30/+28
| | | | llvm-svn: 72602
* Refactor and clean up the AST printer, so that it uses a DeclVisitor,Douglas Gregor2009-05-301-0/+530
walks through DeclContexts properly, and prints more of the information available in the AST. The functionality is still available via -ast-print, -ast-dump, etc., and also via the new member functions Decl::dump() and Decl::print(). llvm-svn: 72597
OpenPOWER on IntegriCloud