summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplateInstantiateStmt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Refactor the instantiation of statements into a generic treeDouglas Gregor2009-08-201-451/+0
| | | | | | transformation. llvm-svn: 79519
* Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema ↵Argyrios Kyrtzidis2009-08-191-0/+1
| | | | | | | | | | | | interfaces. DeclaratorDecl contains a DeclaratorInfo* to keep type source info. Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl. EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo. Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet. llvm-svn: 79392
* Change ActOnReturnStmt to not take a FullExprArg. Instead, Sema will wrap ↵Anders Carlsson2009-08-181-1/+1
| | | | | | the return expr inside a CXXExprWithTemporaries if needed. llvm-svn: 79342
* Get rid of Stmt::Clone now that we can reference count statements instead.Anders Carlsson2009-08-081-3/+3
| | | | llvm-svn: 78452
* Rework the way we track which declarations are "used" duringDouglas Gregor2009-06-221-0/+3
| | | | | | | | | | | | | | | | | | | | | compilation, and (hopefully) introduce RAII objects for changing the "potentially evaluated" state at all of the necessary places within Sema and Parser. Other changes: - Set the unevaluated/potentially-evaluated context appropriately during template instantiation. - We now recognize three different states while parsing or instantiating expressions: unevaluated, potentially evaluated, and potentially potentially evaluated (for C++'s typeid). - When we're in a potentially potentially-evaluated context, queue up MarkDeclarationReferenced calls in a stack. For C++ typeid expressions that are potentially evaluated, we will play back these MarkDeclarationReferenced calls when we exit the corresponding potentially potentially-evaluated context. - Non-type template arguments are now parsed as constant expressions, so they are not potentially-evaluated. llvm-svn: 73899
* add the location of the ')' in a do/while statement to DoStmt.Chris Lattner2009-06-121-1/+1
| | | | | | This fixes a source range problem reported by Olaf Krzikalla. llvm-svn: 73266
* Make sure to call FullExpr before parsing anything else.Anders Carlsson2009-06-041-2/+6
| | | | llvm-svn: 72834
* ActOnReturnStmt should also take a FullExprArg.Anders Carlsson2009-05-301-1/+1
| | | | llvm-svn: 72641
* Reduce the amount of stack space we use in SmallVectors duringDouglas Gregor2009-05-291-1/+1
| | | | | | | template instantiation. This helps reduce our stack footprint when performing deep template instantiations. llvm-svn: 72582
* Reimplement much of the way that we track nested classes in theDouglas Gregor2009-05-271-2/+1
| | | | | | | | | | | | | parser. Rather than placing all of the delayed member function declarations and inline definitions into a single bucket corresponding to the top-level class, we instead mirror the nesting structure of the nested classes and place the delayed member functions into their appropriate place. Then, when we actually parse the delayed member function declarations, set up the scope stack the same way as it was when we originally saw the declaration, so that we can find, e.g., template parameters that are in scope. llvm-svn: 72502
* Merge the ASTVector and ASTOwningVector templates, since they offeredDouglas Gregor2009-05-211-7/+2
| | | | | | | | redundant functionality. The result (ASTOwningVector) lives in clang/Parse/Ownership.h and is used by both the parser and semantic analysis. No intended functionality change. llvm-svn: 72214
* Fix template instantiation for compound statements so that it properlyDouglas Gregor2009-05-201-16/+26
| | | | | | | passes the "isStmtExpr" flag, to suppress warnings about unused expressions. llvm-svn: 72190
* Introduce a new kind of RAII class, ASTOwningVector, which is anDouglas Gregor2009-05-201-21/+10
| | | | | | | | llvm::SmallVector that owns all of the AST nodes inside of it. This RAII class is used to ensure proper destruction of AST nodes when template instantiation fails. llvm-svn: 72186
* Template instantiation for C++ try/catch statements.Douglas Gregor2009-05-181-6/+59
| | | | llvm-svn: 72035
* Include StmtNodes.def to declare Visit methods for all of the knownDouglas Gregor2009-05-181-19/+87
| | | | | | | | kinds of statements (in the instantiation logic). No functionality change, but now we'll get linker errors if we add a statement but forget to introduce its instantiation logic. llvm-svn: 72031
* Make ActOnWhileStmt take a FullExprArg for the condition expr.Anders Carlsson2009-05-171-1/+1
| | | | llvm-svn: 71990
* Fix DISABLE_SMART_POINTERS build.Anders Carlsson2009-05-171-1/+2
| | | | llvm-svn: 71984
* Add the FullExprArg wrapper and use it for if statement conditions.Anders Carlsson2009-05-171-1/+5
| | | | llvm-svn: 71982
* Reflow some comments.Mike Stump2009-05-161-5/+5
| | | | llvm-svn: 71936
* Template instantiation for IndirectGotoStmt. Now my life is complete.Douglas Gregor2009-05-161-0/+12
| | | | llvm-svn: 71917
* Template instantiation for switch statementsDouglas Gregor2009-05-151-0/+69
| | | | llvm-svn: 71916
* Template instantiation for break and continue statements.Douglas Gregor2009-05-151-0/+11
| | | | llvm-svn: 71903
* Template instantiation for "for" loopsDouglas Gregor2009-05-151-0/+27
| | | | llvm-svn: 71901
* Template instantiation for do-while statements.Douglas Gregor2009-05-151-0/+16
| | | | llvm-svn: 71899
* Template instantiation for WhileStmt and CXXConditionDeclExpr.Douglas Gregor2009-05-151-0/+15
| | | | llvm-svn: 71896
* Allow instantiation of NULL expressions and statementsDouglas Gregor2009-05-151-0/+3
| | | | llvm-svn: 71889
* I take it back, InstantiateExpr does not check for null.Anders Carlsson2009-05-151-4/+7
| | | | llvm-svn: 71887
* No need to null check the expr, Sema::SemaRef.InstantiateExpr handles all that.Anders Carlsson2009-05-151-7/+4
| | | | llvm-svn: 71885
* Template instantiation for "if" statements. Also:Douglas Gregor2009-05-151-0/+21
| | | | | | | | - Skip semantic analysis of the "if" condition if it is type-dependent. - Added the location of the "else" keyword into IfStmt, so that we can provide it for type-checking after template instantiation. llvm-svn: 71875
* Move statement instantiation into its own file. No functionality changeDouglas Gregor2009-05-151-0/+150
llvm-svn: 71872
OpenPOWER on IntegriCloud