summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/TreeTransform.h
Commit message (Collapse)AuthorAgeFilesLines
* Use the real keyword location when rebuilding an elaborated type instead ofJohn McCall2010-11-041-2/+4
| | | | | | making something up. Fixes PR8129. llvm-svn: 118258
* No really, we don't have a retain/release system for statements/expressionsJohn McCall2010-10-261-89/+89
| | | | | | anymore. llvm-svn: 117357
* Improve the tracking of source locations for parentheses in constructor calls.Chandler Carruth2010-10-251-3/+6
| | | | | | | | | | | | This adds them where missing, and traces them through PCH. We fix at least one bug in the extents found by the Index library, and make a lot of refactoring tools which care about the exact formulation of a constructor call easier to write. Also some minor cleanups to more consistently follow the friend pattern instead of the setter pattern when rebuilding a serialized AST. Patch originally by Samuel Benzaquen. llvm-svn: 117254
* Eliminate usage of ObjCSuperExpr used forFariborz Jahanian2010-10-141-14/+32
| | | | | | | 'super' as receiver of property or a setter/getter methods. //rdar: //8525788 llvm-svn: 116483
* Add some infrastructure for dealing with expressions of 'placeholder' type,John McCall2010-10-121-8/+10
| | | | | | | i.e. expressions with an internally-convenient type which should not be appearing in generally valid, complete ASTs. llvm-svn: 116281
* When instantiating a new-expression, force a rebuild if there were defaultJohn McCall2010-10-051-1/+8
| | | | | | | | arguments in either the placement or constructor arguments. This is important if the default arguments refer to a declaration or create a temporary. llvm-svn: 115700
* Implement the C++0x "trailing return type" feature, e.g.,Douglas Gregor2010-10-011-10/+25
| | | | | | | | | | auto f(int) -> int from Daniel Wallin! (With a few minor bug fixes from me). llvm-svn: 115322
* Don't warn for an unused label if it has 'unused' attribute. Fixes ↵Argyrios Kyrtzidis2010-09-281-3/+4
| | | | | | rdar://8483139. llvm-svn: 114954
* When marking the declarations in a default argument expression asDouglas Gregor2010-09-141-0/+11
| | | | | | | | | "used", at the time that the default argument itself is used, also mark destructors that will be called by this expression. This fixes a regression that I introduced in r113700, which broke WebKit, and fixes <rdar://problem/8427926>. llvm-svn: 113883
* Define and implement CXXNoexceptExpr. Create it in Sema.Sebastian Redl2010-09-101-0/+21
| | | | llvm-svn: 113623
* Simplify template instantiation for C++ exception declarations,Douglas Gregor2010-09-091-16/+8
| | | | | | eliminating an unnecessary use of TemporaryBase in the process. llvm-svn: 113500
* Eliminate some unnecessary uses of TreeTransform::TemporaryBase. ThereDouglas Gregor2010-09-091-53/+23
| | | | | | | are still a few (legitimate, unfortunate) uses of this hack around, but at least now there are fewer. llvm-svn: 113498
* Eliminate the comma locations from all of the Sema routines that dealDouglas Gregor2010-09-091-15/+1
| | | | | | | | with comma-separated lists. We never actually used the comma locations, nor did we store them in the AST, but we did manage to waste time during template instantiation to produce fake locations. llvm-svn: 113495
* Add proper type-source information to UnaryTypeTraitExpr, includingDouglas Gregor2010-09-091-16/+7
| | | | | | libclang visitation. llvm-svn: 113492
* Push the range associated with a nested-name-specifier further throughDouglas Gregor2010-09-081-12/+21
| | | | | | | | TreeTransform, since we were getting an empty source range where we shouldn't. Sadly, the test case is Boost.Proto, and isn't worth reducing. llvm-svn: 113446
* Microsoft's __uuidof operator implementation part 1.Francois Pichet2010-09-081-0/+63
| | | | llvm-svn: 113356
* Provide proper type-source location information forDouglas Gregor2010-09-081-77/+41
| | | | | | | | CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the process. llvm-svn: 113319
* Improve source-location information for CXXNewExpr, by hanging on toDouglas Gregor2010-09-071-21/+20
| | | | | | the TypeSourceInfo for the allocated type. Fixes PR7501. llvm-svn: 113291
* Eliminate CXXBindReferenceExpr, which was used in a ton ofDouglas Gregor2010-09-021-10/+0
| | | | | | well-intentioned but completely unused code. llvm-svn: 112868
* When instantiating a function type, instantiate the return type beforeDouglas Gregor2010-08-311-6/+13
| | | | | | | | | | | | | | | | | | | instantiating the parameters. In a perfect world, this wouldn't matter, and compilers are free to instantiate in any order they want. However, every other compiler seems to instantiate the return type first, and some code (in this case, Boost.Polygon) depends on this and SFINAE to avoid instantiating something that shouldn't be instantiated. We could fight this battle, and insist that Clang is allowed to do what it does, but it's not beneficial: it's more predictable to instantiate this way, in source order. When we implement late-specified return types, we'll need to instantiate the return type last when it was late-specified, hence the FIXME. We now compile Boost.Polygon properly. llvm-svn: 112561
* Revert my user-defined literal commits - r1124{58,60,67} pendingAlexis Hunt2010-08-301-6/+0
| | | | | | some issues being sorted out. llvm-svn: 112493
* Implement C++0x user-defined string literals.Alexis Hunt2010-08-291-0/+6
| | | | | | | | | | The extra data stored on user-defined literal Tokens is stored in extra allocated memory, which is managed by the PreprocessorLexer because there isn't a better place to put it that makes sure it gets deallocated, but only after it's used up. My testing has shown no significant slowdown as a result, but independent testing would be appreciated. llvm-svn: 112458
* Fix the memory leak of FloatingLiteral/IntegerLiteral.Argyrios Kyrtzidis2010-08-281-7/+8
| | | | | | | | | | | For large floats/integers, APFloat/APInt will allocate memory from the heap to represent these numbers. Unfortunately, when we use a BumpPtrAllocator to allocate IntegerLiteral/FloatingLiteral nodes the memory associated with the APFloat/APInt values will never get freed. I introduce the class 'APNumericStorage' which uses ASTContext's allocator for memory allocation and is used internally by FloatingLiteral/IntegerLiteral. Fixes rdar://7637185 llvm-svn: 112361
* Continue to instantiate sub-statements in a CompoundStmt as long asJohn McCall2010-08-271-2/+14
| | | | | | | we don't see a DeclStmt (failure to instantiate which generally causes panic). llvm-svn: 112282
* One who seeks knowledge learns something new every day.John McCall2010-08-261-214/+211
| | | | | | | | | One who seeks the Tao unlearns something new every day. Less and less remains until you arrive at non-action. When you arrive at non-action, nothing will be left undone. llvm-svn: 112244
* Split out a header to hold APIs meant for the Sema implementation from Sema.h.John McCall2010-08-251-1/+1
| | | | | | | Clients of Sema don't need to know (for example) the list of diagnostics we support. llvm-svn: 112093
* GCC didn't care for my attempt at API compatibility, so brute-force everythingJohn McCall2010-08-251-7/+6
| | | | | | to the new constants. llvm-svn: 112047
* Split FunctionScopeInfo and BlockScopeInfo into their own header.John McCall2010-08-251-0/+2
| | | | llvm-svn: 112038
* Struggle mightily against header inclusion in Sema.h.John McCall2010-08-241-0/+1
| | | | llvm-svn: 111904
* OwningExprResult -> ExprResult. This patch brought to you byJohn McCall2010-08-241-309/+307
| | | | | | | M-x query-replace-regexp \(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result llvm-svn: 111903
* Abstract out passing around types and kill off ActionBase.John McCall2010-08-241-12/+12
| | | | llvm-svn: 111901
* Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).John McCall2010-08-231-332/+298
| | | | llvm-svn: 111863
* Sundry incremental steps towards killing off Action.John McCall2010-08-231-32/+32
| | | | llvm-svn: 111795
* Preserve the zero-initialization and construction-kind settings whenDouglas Gregor2010-08-221-3/+8
| | | | | | instantiating CXXConstructExpr expressions. llvm-svn: 111780
* DeclPtrTy -> Decl *John McCall2010-08-211-12/+8
| | | | llvm-svn: 111733
* Another step in the process of making the parser depend on Sema:John McCall2010-08-201-2/+2
| | | | | | | | | - move DeclSpec &c into the Sema library - move ParseAST into the Parse library Reflect this change in a thousand different includes. Reflect this change in the link orders. llvm-svn: 111667
* Regularize the API for accessing explicit template arguments.John McCall2010-08-191-5/+5
| | | | llvm-svn: 111584
* Implicit decl ref expressions might not have name locations; don't silentlyJohn McCall2010-08-171-4/+6
| | | | | | fail to instantiate them. llvm-svn: 111293
* Move Sema's headers into include/clang/Sema, renaming a few along the way.Douglas Gregor2010-08-121-2/+2
| | | | llvm-svn: 110945
* Added locations and type source info for DeclarationName.Abramo Bagnara2010-08-111-64/+89
| | | | llvm-svn: 110860
* Eliminate unnecessary uses of TemporaryBase in TreeTransform;Douglas Gregor2010-08-101-19/+10
| | | | | | | transforming TypeSourceInfos already gives us proper (and better) source-location information. llvm-svn: 110678
* Fixed redundant NNS loading.Abramo Bagnara2010-08-101-1/+2
| | | | llvm-svn: 110677
* Added TypeLocs to VAArgExpr node.Abramo Bagnara2010-08-101-11/+11
| | | | llvm-svn: 110666
* Added TypeLocs to TypesCompatibleExpr node.Abramo Bagnara2010-08-101-12/+14
| | | | llvm-svn: 110663
* Preserve calling convention etc. across template instantiations. Eli Friedman2010-08-051-5/+10
| | | | llvm-svn: 110304
* Remove the vast majority of the Destroy methods from the AST library,Douglas Gregor2010-07-251-8/+2
| | | | | | since we aren't going to be calling them ever. llvm-svn: 109377
* More block instantiation stuff. Set variable/param DeclContextFariborz Jahanian2010-07-131-4/+0
| | | | | | to block context when first instantiating them. llvm-svn: 108266
* Downgrade the "when type is in parentheses, array cannot have dynamicDouglas Gregor2010-07-131-3/+3
| | | | | | | | | | | | size" error for code like new (int [size]) to a warning, add a Fix-It to remove the parentheses, and make this diagnostic work properly when it occurs in a template instantiation. <rdar://problem/8018245>. llvm-svn: 108242
* When forming a function call or message send expression, be sure toDouglas Gregor2010-07-131-1/+1
| | | | | | | | | | | | | | | | | strip cv-qualifiers from the expression's type when the language calls for it: in C, that's all the time, while C++ only does it for non-class types. Centralized the computation of the call expression type in QualType::getCallResultType() and some helper functions in other nodes (FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant callers of getResultType() to getCallResultType(). Fixes PR7598 and PR7463, along with a bunch of getResultType() call sites that weren't stripping references off the result type (nothing stripped cv-qualifiers properly before this change). llvm-svn: 108234
* Copy over attributes to instantiated variable.Fariborz Jahanian2010-07-121-5/+0
| | | | llvm-svn: 108195
OpenPOWER on IntegriCloud