summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Have __has_nothrow_copy use Sema's lookup routines. This fixes the problem ↵Sebastian Redl2010-09-131-1/+1
| | | | | | with not finding implicitly declared copy constructors, part of PR8107. llvm-svn: 113784
* Eagerly evaluate type traits in Sema instead of lazily in AST. They actually ↵Sebastian Redl2010-09-131-8/+209
| | | | | | need Sema access to be correct, fixes coming up. llvm-svn: 113782
* When applying 'delete' on a pointer-to-array type match GCC and EDG behavior ↵Argyrios Kyrtzidis2010-09-131-2/+11
| | | | | | | | and treat it as 'delete[]'. Also offer a fix-it hint adding '[]'. llvm-svn: 113778
* Eli helped me understand how evaluation contexts work.Sebastian Redl2010-09-101-5/+0
| | | | llvm-svn: 113642
* Define and implement CXXNoexceptExpr. Create it in Sema.Sebastian Redl2010-09-101-4/+10
| | | | llvm-svn: 113623
* Parse the noexcept operator and stub out sema.Sebastian Redl2010-09-101-0/+11
| | | | llvm-svn: 113622
* Eliminate the comma locations from all of the Sema routines that dealDouglas Gregor2010-09-091-2/+0
| | | | | | | | 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-6/+17
| | | | | | libclang visitation. llvm-svn: 113492
* Fix a few minor issues with parsing and semantic analysis of C++Douglas Gregor2010-09-081-13/+15
| | | | | | | | typeid expressions: - make sure we have a proper source location for the closing ')' - cache the declaration of std::type_info once we've found it llvm-svn: 113441
* Use the new-initialization code for initializing scalars with aDouglas Gregor2010-09-081-35/+11
| | | | | | | | function-style cast. Previously, we had a (redundant, incorrect) semantic-checking path for non-class types, which allowed value-initialization of a reference type and then crashed. llvm-svn: 113415
* Microsoft's __uuidof operator implementation part 1.Francois Pichet2010-09-081-0/+56
| | | | llvm-svn: 113356
* Allow (cv) void and incomplete arrays to be passed to the type traits.Sebastian Redl2010-09-081-2/+6
| | | | | | Fixes PR8110, and thus PR8109, PR8097, and parts of PR8101, PR8105 and PR8107. Only a few traits have tests for incomplete arrays, since I'm not yet clear what the result for them should be; Howards wants to file a DR to change the standard. llvm-svn: 113326
* Provide proper type-source location information forDouglas Gregor2010-09-081-18/+31
| | | | | | | | 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-10/+11
| | | | | | the TypeSourceInfo for the allocated type. Fixes PR7501. llvm-svn: 113291
* Revert my user-defined literal commits - r1124{58,60,67} pendingAlexis Hunt2010-08-301-58/+0
| | | | | | some issues being sorted out. llvm-svn: 112493
* Implement C++0x user-defined string literals.Alexis Hunt2010-08-291-0/+58
| | | | | | | | | | 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-4/+4
| | | | | | | | | | | 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
* One who seeks knowledge learns something new every day.John McCall2010-08-261-6/+5
| | | | | | | | | 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
* De-memberify the VarDecl and FunctionDecl StorageClass enums.John McCall2010-08-261-4/+4
| | | | | | This lets us remove Sema.h's dependency on Expr.h and Decl.h. llvm-svn: 112156
* Fix miscompilation. The custom new[]/delete[] methods were not getting ↵Argyrios Kyrtzidis2010-08-251-5/+8
| | | | | | called for arrays with more than 1 dimension. llvm-svn: 112107
* 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-37/+37
| | | | | | to the new constants. llvm-svn: 112047
* More incremental progress towards not including Expr.h in Sema.h.John McCall2010-08-251-9/+8
| | | | llvm-svn: 112044
* Move more stuff out of Sema.h.John McCall2010-08-251-2/+4
| | | | llvm-svn: 112026
* Move some of SemaOverload's API to various places in Overload.h, and killJohn McCall2010-08-241-6/+6
| | | | | | some of it off completely. llvm-svn: 111957
* More header elimination. The goal of all this is to allow Parser toJohn McCall2010-08-241-1/+1
| | | | | | | #include Sema.h while keeping all the AST declarations opaque. That may not be reasonably attainable, though. llvm-svn: 111907
* Remove a header dependency from Sema.h at the cost of some type safety.John McCall2010-08-241-3/+8
| | | | | | If someone wants to fix this some other way.... llvm-svn: 111905
* 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-39/+39
| | | | | | | 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-32/+35
| | | | llvm-svn: 111901
* Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).John McCall2010-08-231-83/+53
| | | | llvm-svn: 111863
* Push DeclGroupRefs and TemplateNames in an opaque but type-safe wayJohn McCall2010-08-231-2/+2
| | | | | | through the parser. llvm-svn: 111800
* Sundry incremental steps towards killing off Action.John McCall2010-08-231-11/+11
| | | | llvm-svn: 111795
* 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
* Generate Attr subclasses with TableGen.Alexis Hunt2010-08-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Now all classes derived from Attr are generated from TableGen. Additionally, Attr* is no longer its own linked list; SmallVectors or Attr* are used. The accompanying LLVM commit contains the updates to TableGen necessary for this. Some other notes about newly-generated attribute classes: - The constructor arguments are a SourceLocation and a Context&, followed by the attributes arguments in the order that they were defined in Attr.td - Every argument in Attr.td has an appropriate accessor named getFoo, and there are sometimes a few extra ones (such as to get the length of a variadic argument). Additionally, specific_attr_iterator has been introduced, which will iterate over an AttrVec, but only over attributes of a certain type. It can be accessed through either Decl::specific_attr_begin/end or the global functions of the same name. llvm-svn: 111455
* Make sure to add MallocAttr to explicitly-declared operator new/new[]Douglas Gregor2010-08-181-1/+4
| | | | | | when -fassume-sane-operator-new. Patch by Tom Jablin! llvm-svn: 111363
* Emit an error if an array is too large. We're slightly more strictDouglas Gregor2010-08-181-1/+13
| | | | | | | | | | | | | than GCC 4.2 here when building 32-bit (where GCC will allow allocation of an array for which we can't get a valid past-the-end pointer), and emulate its odd behavior in 64-bit where it only allows 63 bits worth of storage in the array. The former is a correctness issue; the latter is harmless in practice (you wouldn't be able to use such an array anyway) and helps us pass a GCC DejaGNU test. Fixes <rdar://problem/8212293>. llvm-svn: 111338
* Move Sema's headers into include/clang/Sema, renaming a few along the way.Douglas Gregor2010-08-121-3/+3
| | | | llvm-svn: 110945
* Bail out of MaybeBindToTemporary if the record type is invalid. Test caseJohn McCall2010-08-121-1/+1
| | | | | | is 8.5MB, sorry. llvm-svn: 110901
* Added locations and type source info for DeclarationName.Abramo Bagnara2010-08-111-1/+1
| | | | llvm-svn: 110860
* Fix a crash on template delete operators.Chandler Carruth2010-08-081-2/+8
| | | | llvm-svn: 110542
* Store inheritance paths after CastExprs instead of inside them.John McCall2010-08-071-13/+14
| | | | | | | | | | | | | | | This takes some trickery since CastExpr has subclasses (and indeed, is abstract). Also, smoosh the CastKind into the bitfield from Expr. Drops two words of storage from Expr in the common case of expressions which don't need inheritance paths. Avoids a separate allocation and another word of overhead in cases needing inheritance paths. Also has the advantage of not leaking memory, since destructors for AST nodes are never run. llvm-svn: 110507
* Get rid of isObjectType; when C++ says "object type", it generallyEli Friedman2010-08-051-1/+1
| | | | | | | just means "not a function type", not "not a function type or void". This changes behavior slightly, but generally in a way which accepts more code. llvm-svn: 110303
* Look through using declarations when deciding whether to use an operatorJohn McCall2010-08-041-11/+26
| | | | | | | | delete for a virtual destructor. Diagnose ambiguities. Fixes PR7803. llvm-svn: 110173
* Read/write in PCH Sema's StdNamespace and StdBadAlloc and use a LazyDeclPtr ↵Argyrios Kyrtzidis2010-08-021-3/+3
| | | | | | for them that will deserialize them when needed. llvm-svn: 110031
* Rename getStdNamespace -> getOrCreateStdNamespace, to better reflect its ↵Argyrios Kyrtzidis2010-08-021-1/+1
| | | | | | | | functionality. No functionality change. llvm-svn: 110030
* When deleting a value of class type, make sure that type is completeDouglas Gregor2010-07-291-0/+4
| | | | | | before looking for conversions to pointer type. Fixes <rdar://problem/8248780>. llvm-svn: 109749
* Remove the vast majority of the Destroy methods from the AST library,Douglas Gregor2010-07-251-3/+1
| | | | | | since we aren't going to be calling them ever. llvm-svn: 109377
* Update ImplicitCastExpr to be able to represent an XValue.Sebastian Redl2010-07-201-19/+20
| | | | llvm-svn: 108807
* When checking whether to bind an expression to a temporary, don't bind Obj-C ↵Anders Carlsson2010-07-161-20/+8
| | | | | | message send expressions who call methods that return references. llvm-svn: 108559
OpenPOWER on IntegriCloud