summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* Pretty printing and improved representation for namespace alias declarationsDouglas Gregor2009-05-302-2/+12
| | | | 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-302-3/+24
| | | | | | | | | 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
* Pass an ASTContext into Stmt::printPretty.Eli Friedman2009-05-301-1/+1
| | | | llvm-svn: 72612
* Add a Stmt::printPretty overload which takes an ASTContext; start Eli Friedman2009-05-302-14/+22
| | | | | | 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-303-200/+141
| | | | | | | | | | | | | | | | | 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
* Improve __builtin_nanf support; we now can deal with them as constants.Mike Stump2009-05-301-3/+14
| | | | llvm-svn: 72607
* Fix some test failures involving -ast-print.Eli Friedman2009-05-302-0/+15
| | | | llvm-svn: 72605
* Clean up printing for Objective-C, designated initializers.Douglas Gregor2009-05-302-30/+33
| | | | llvm-svn: 72602
* Some enhancements to DeclStmt printing. Some of this should Eli Friedman2009-05-301-24/+141
| | | | | | | move to DeclPrinter.cpp, but I haven't quite worked out how best to do that. llvm-svn: 72599
* Add support for PrintingPolicy::SuppressTypeSpecifiers to type printing. Eli Friedman2009-05-301-2/+20
| | | | | | (I have a work-in-progress patch which uses this.) llvm-svn: 72598
* Refactor and clean up the AST printer, so that it uses a DeclVisitor,Douglas Gregor2009-05-303-2/+546
| | | | | | | | | 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
* Add code for emitting C++ destructors. Not used yet.Anders Carlsson2009-05-291-0/+17
| | | | llvm-svn: 72591
* Create a new PrintingPolicy class, which we pass down through the ASTDouglas Gregor2009-05-298-130/+166
| | | | | | | | | printing logic to help customize the output. For now, we use this rather than a special flag to suppress the "struct" when printing "struct X" and to print the Boolean type as "bool" in C++ but "_Bool" in C. llvm-svn: 72590
* Add an assertion so that we don't accidentally build constant arrays of Eli Friedman2009-05-291-0/+3
| | | | | | VLAs. llvm-svn: 72587
* Introduced DeclContext::isDependentContext, which determines whether aDouglas Gregor2009-05-282-13/+15
| | | | | | | | | | | | | | | | | | | given DeclContext is dependent on type parameters. Use this to properly determine whether a TagDecl is dependent; previously, we were missing the case where the TagDecl is a local class of a member function of a class template (phew!). Also, make sure that, when we instantiate declarations within a member function of a class template (or a function template, eventually), that we add those declarations to the "instantiated locals" map so that they can be found when instantiating declaration references. Unfortunately, I was not able to write a useful test for this change, although the assert() that fires when uncommenting the FIXME'd line in test/SemaTemplate/instantiate-declref.cpp tells the "experienced user" that we're now doing the right thing. llvm-svn: 72526
* Reintroduce the home for exception specs, and make Sema fill it. However, ↵Sebastian Redl2009-05-272-13/+34
| | | | | | keep the spec out of the canonical type this time. Net effect is currently nothing, because the spec isn't checked anywhere. llvm-svn: 72498
* Add a big test case for I-C-Es in C++, and a fix to make it work. The fix ↵Sebastian Redl2009-05-271-1/+2
| | | | | | might not be the right way to do it. llvm-svn: 72490
* Convert ObjC qualified type clients over to using iterators.Steve Naroff2009-05-272-10/+9
| | | | | | | | This allows me to remove some API that I don't want to carry over to ObjCObjectPointerType. No functionality change. llvm-svn: 72475
* Fix up constant expression handling to deal with the address Eli Friedman2009-05-271-3/+12
| | | | | | of a reference correctly. llvm-svn: 72463
* When evaluating a VarDecl as a constant or determining whether it isDouglas Gregor2009-05-264-7/+43
| | | | | | | | an integral constant expression, maintain a cache of the value and the is-an-ICE flag within the VarDecl itself. This eliminates exponential-time behavior of the Fibonacci template metaprogram. llvm-svn: 72428
* Simplify printing of the statistics for types.Douglas Gregor2009-05-262-95/+19
| | | | llvm-svn: 72415
* Add a new CallExpr::getCallReturnType and use it in Expr::isLvalueInternal. ↵Anders Carlsson2009-05-261-9/+13
| | | | | | No intended functionality change. llvm-svn: 72410
* A block that returns a reference is an lvalue.Anders Carlsson2009-05-261-0/+3
| | | | llvm-svn: 72409
* Extend getPreferredTypeAlign to handle _Complex double and long long Eli Friedman2009-05-251-5/+8
| | | | | | correctly. llvm-svn: 72401
* Representation of and template instantiation for memberDouglas Gregor2009-05-222-0/+14
| | | | | | | | | | | | expressions. This change introduces another AST node, CXXUnresolvedMemberExpr, that captures member references (x->m, x.m) when the base of the expression (the "x") is type-dependent, and we therefore cannot resolve the member reference yet. Note that our parsing of member references for C++ is still quite poor, e.g., we don't handle x->Base::m or x->operator int. llvm-svn: 72281
* (Next runtime only) check to see if class implements forwardInvocation method Fariborz Jahanian2009-05-221-0/+14
| | | | | | | | | and objects of this class are derived from 'NSProxy'. Under such conditions, which means that every method possible is implemented in the class, we should not issue "Method definition not found" warnings. llvm-svn: 72267
* Parse typeof-specifier the same way as sizeof/alignof are parsed.Argyrios Kyrtzidis2009-05-221-1/+1
| | | | | | | | -Makes typeof consistent with sizeof/alignof -Fixes a bug when '>' is in a typeof expression, inside a template type param: A<typeof(x>1)> a; llvm-svn: 72255
* Template instantiation for C99 designated initializers, because weDouglas Gregor2009-05-211-28/+49
| | | | | | | | can. Also, delay semantic analysis of initialization for value-dependent as well as type-dependent expressions, since we can't always properly type-check a value-dependent expression. llvm-svn: 72233
* Fix CMake build for AST XML dumperDouglas Gregor2009-05-211-2/+0
| | | | llvm-svn: 72228
* AST XML dump, from Olaf Krzikalla!Douglas Gregor2009-05-211-0/+2
| | | | llvm-svn: 72224
* Use v.data() instead of &v[0] when SmallVector v might be empty.Jay Foad2009-05-212-2/+2
| | | | llvm-svn: 72210
* Template instantiation for the various kinds of AST nodes that occurDouglas Gregor2009-05-201-0/+4
| | | | | | due to C++ type construction of the form T(a1, a2, ..., aN). llvm-svn: 72183
* Introduce a new expression type, CXXUnresolvedConstructExpr, toDouglas Gregor2009-05-202-0/+54
| | | | | | | | | | | | | | | | | | describe the construction of a value of a given type using function syntax, e.g., T(a1, a2, ..., aN) when the type or any of its arguments are type-dependent. In this case, we don't know what kind of type-construction this will be: it might construct a temporary of type 'T' (which might be a class or non-class type) or might perform a conversion to type 'T'. Also, implement printing of and template instantiation for this new expression type. Due to the change in Sema::ActOnCXXTypeConstructExpr, our existing tests cover template instantiation of this new expression node. llvm-svn: 72176
* Fix handling of the GNU "t ? : f" extension to the conditionalDouglas Gregor2009-05-191-4/+4
| | | | | | | operator in C++, and verify that template instantiation for the condition operator does the right thing. llvm-svn: 72127
* Template instantiation for call expressions.Douglas Gregor2009-05-191-0/+5
| | | | llvm-svn: 72081
* Template instantiation for imaginary literals, because they were next in Expr.hDouglas Gregor2009-05-181-0/+10
| | | | llvm-svn: 72058
* Template instantiation for C++ try/catch statements.Douglas Gregor2009-05-181-1/+1
| | | | llvm-svn: 72035
* When instantiating the definition of a member function of a classDouglas Gregor2009-05-181-1/+9
| | | | | | | | | | | | | | template, introduce that member function into the template instantiation stack. Also, add diagnostics showing the member function within the instantiation stack and clean up the qualified-name printing so that we get something like: note: in instantiation of member function 'Switch1<int, 2, 2>::f' requested here in the template instantiation backtrace. llvm-svn: 72015
* Make ActOnExprStmt take a FullExprArg.Anders Carlsson2009-05-171-0/+3
| | | | llvm-svn: 71989
* Use the Itanium ABI for member pointers. Add a missing 'break' statement and ↵Anders Carlsson2009-05-171-9/+9
| | | | | | a test case llvm-svn: 71972
* A couple of tweaks to make -ast-print produce code that's closer to Eli Friedman2009-05-171-2/+2
| | | | | | valid C code. llvm-svn: 71971
* Add setters/getters to CXXMethodDecl so it can keep track of which virtual ↵Anders Carlsson2009-05-161-0/+41
| | | | | | member functions it overrides (if any) llvm-svn: 71968
* Implement instantiation of a few boring, simple expressions. I don't think ↵Sebastian Redl2009-05-162-0/+29
| | | | | | these are testable yet, though. llvm-svn: 71953
* Basic support for member exprs where the base expr type is dependent.Anders Carlsson2009-05-151-0/+5
| | | | llvm-svn: 71907
* Template instantiation for break and continue statements.Douglas Gregor2009-05-151-0/+8
| | | | llvm-svn: 71903
* Make sure that we use the canonical type for the names of instantiatedDouglas Gregor2009-05-151-1/+2
| | | | | | | | | | constructors and destructors. This is a requirement of DeclarationNameTable::getCXXSpecialName that we weren't assert()'ing, so it should have been caught much earlier :( Big thanks to Anders for the test case. llvm-svn: 71895
* Make sure that the type associated with a class template is dependent.Douglas Gregor2009-05-151-2/+4
| | | | llvm-svn: 71878
* Add NullStmt::Clone and use itAnders Carlsson2009-05-151-0/+4
| | | | llvm-svn: 71823
OpenPOWER on IntegriCloud