summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
Commit message (Collapse)AuthorAgeFilesLines
* PR8023: Don't crash on invalid uses of __real__ on class types in C++.Eli Friedman2010-09-051-1/+1
| | | | llvm-svn: 113124
* Devirtualize Sema, kill off DeleteExpr and DeleteStmt, and reformat.John McCall2010-09-031-3/+0
| | | | llvm-svn: 112945
* AST work to support [C++] [IRgen] for ?: with missing LHSFariborz Jahanian2010-08-311-4/+7
| | | | | | | This is also pr7726 and wip. No change in functionality at this time. llvm-svn: 112612
* Revert my user-defined literal commits - r1124{58,60,67} pendingAlexis Hunt2010-08-301-13/+6
| | | | | | some issues being sorted out. llvm-svn: 112493
* Fix an corner-case assertion introduced by the refactoring in r112258;Douglas Gregor2010-08-301-0/+2
| | | | | | | when we're taking the address of a unresolvable value, it might be an implicit member access. Fixes some Boost.Spirit regressions. llvm-svn: 112487
* Add some braces for sanity and GCC silence. These became unbalanced in r112122,Chandler Carruth2010-08-301-1/+2
| | | | | | so please review echristo and let me know if the logic is wrong now. llvm-svn: 112466
* Implement C++0x user-defined string literals.Alexis Hunt2010-08-291-6/+13
| | | | | | | | | | 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-3/+3
| | | | | | | | | | | 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
* perform cheap test firstGabor Greif2010-08-281-1/+1
| | | | llvm-svn: 112346
* fix PR8007Gabor Greif2010-08-281-1/+6
| | | | | | | reordering and redefinition issues still may linger, I plan to nail them next llvm-svn: 112333
* Propagate whether an id-expression is the immediate argument ofJohn McCall2010-08-271-37/+61
| | | | | | | | | | | | | | | | | | | an '&' expression from the second caller of ActOnIdExpression. Teach template argument deduction that an overloaded id-expression doesn't give a valid type for deduction purposes to a non-static member function unless the expression has the correct syntactic form. Teach ActOnIdExpression that it shouldn't try to create implicit member expressions for '&function', because this isn't a permitted form of use for member functions. Teach CheckAddressOfOperand to diagnose these more carefully. Some of these cases aren't reachable right now because earlier diagnostics interrupt them. llvm-svn: 112258
* De-memberify the VarDecl and FunctionDecl StorageClass enums.John McCall2010-08-261-1/+1
| | | | | | This lets us remove Sema.h's dependency on Expr.h and Decl.h. llvm-svn: 112156
* With lax vector conversions (the default) make sure we convert between twoEric Christopher2010-08-261-2/+7
| | | | | | | | | vectors that are the same size. Fix up testcases accordingly and add a new one to make sure we still error if lax vector conversions are disabled. Fixes rdar://8328190 llvm-svn: 112122
* 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-243/+243
| | | | | | to the new constants. llvm-svn: 112047
* Recursive functions should be marked when used from another function. Fixes ↵Argyrios Kyrtzidis2010-08-251-1/+4
| | | | | | http://llvm.org/PR7923. llvm-svn: 112045
* More incremental progress towards not including Expr.h in Sema.h.John McCall2010-08-251-5/+5
| | | | llvm-svn: 112044
* Rename *PendingImplicitInstantiations to *PendingInstantiations. NoChandler Carruth2010-08-251-3/+2
| | | | | | functionality changed. llvm-svn: 112040
* Split FunctionScopeInfo and BlockScopeInfo into their own header.John McCall2010-08-251-2/+4
| | | | llvm-svn: 112038
* Remove AnalysisBasedWarnings.h's dependency on Type.hJohn McCall2010-08-251-3/+4
| | | | llvm-svn: 112027
* When trying to resolve the address of an overloaded expression,John McCall2010-08-241-10/+14
| | | | | | | | only form pointers-to-member if the expression has the appropriate form. This avoids assertions later on on invalid code, but also allows us to properly resolve mixed-staticity overloads. llvm-svn: 111987
* It is not error in c++ to take address ofFariborz Jahanian2010-08-241-1/+4
| | | | | | register variable (c++03 7.1.1P3). radar 8108252. llvm-svn: 111977
* 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-73/+73
| | | | | | | 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-7/+7
| | | | llvm-svn: 111901
* PR7971: Compute the correct type for an address-of expression containing anEli Friedman2010-08-241-1/+1
| | | | | | UnresolvedMemberExpr. llvm-svn: 111899
* Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).John McCall2010-08-231-135/+96
| | | | llvm-svn: 111863
* Relax the construction of a definition for implicit, trivial defaultChandler Carruth2010-08-231-2/+4
| | | | | | | | | | | | | | | constructors. We perform semantic checking when creating the definition, and this isn't needed in certain contexts (value initialization) but is in others (default initialization). This fixes PR7948. We add explicit code to the default initialization path to ensure the definition is both present and valid. Doug, please review. I think this follows your latest suggestion, and it ended up remarkably cleaner than I anticipated. Also let me know if similar logic should be followed for destructors and copy-constructors. llvm-svn: 111802
* Push DeclGroupRefs and TemplateNames in an opaque but type-safe wayJohn McCall2010-08-231-2/+1
| | | | | | through the parser. llvm-svn: 111800
* Sundry incremental steps towards killing off Action.John McCall2010-08-231-4/+4
| | | | llvm-svn: 111795
* Detabify.Eli Friedman2010-08-221-3/+3
| | | | llvm-svn: 111768
* DeclPtrTy -> Decl *John McCall2010-08-211-6/+5
| | | | llvm-svn: 111733
* Add a workaround for PR7947, a crash trying to recover from invalid C++ code.Nick Lewycky2010-08-201-16/+21
| | | | llvm-svn: 111675
* Another step in the process of making the parser depend on Sema:John McCall2010-08-201-4/+4
| | | | | | | | | - 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
* Diagnose assiging to an interface object inFariborz Jahanian2010-08-161-0/+5
| | | | | | | non-fragile abi mode as sizes are not statically known. Fixes radar 8315734. llvm-svn: 111191
* When issuing warning for future conflict resolution,Fariborz Jahanian2010-08-131-0/+3
| | | | | | | | (nonfragile-abi2), do not consider 'ivar' access in class methods. Also, improve on diagnostics. Radar 8304561. llvm-svn: 111023
* Zap unused UnaryOperator::OffsetOf.Eli Friedman2010-08-131-4/+0
| | | | llvm-svn: 110996
* Implement -Wcast-align. The initial design of this diagnostic diverges John McCall2010-08-121-0/+4
| | | | | | | | from GCC's in that we warn on *any* increase in alignment requirements, not just those that are enforced by hardware. Please let us know if this causes major problems for you (which it shouldn't, since it's an optional warning). llvm-svn: 110959
* Move Sema's headers into include/clang/Sema, renaming a few along the way.Douglas Gregor2010-08-121-4/+4
| | | | llvm-svn: 110945
* Added locations and type source info for DeclarationName.Abramo Bagnara2010-08-111-59/+69
| | | | llvm-svn: 110860
* Random temporary string cleanup.Benjamin Kramer2010-08-111-1/+1
| | | | llvm-svn: 110807
* Added TypeLocs to VAArgExpr node.Abramo Bagnara2010-08-101-4/+10
| | | | llvm-svn: 110666
* Added TypeLocs to TypesCompatibleExpr node.Abramo Bagnara2010-08-101-4/+14
| | | | llvm-svn: 110663
* When attempting to recover from a failed unqualified name lookup, makeDouglas Gregor2010-08-091-0/+2
| | | | | | sure to clear out the LookupResult structure after looking into each class. llvm-svn: 110615
* Integral-to-pointer conversions are not always null -> member pointerDouglas Gregor2010-08-071-2/+8
| | | | | | conversions. Fixes PR7443. llvm-svn: 110519
* Store inheritance paths after CastExprs instead of inside them.John McCall2010-08-071-11/+11
| | | | | | | | | | | | | | | 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
* PR7837: For qualified id's, make sure the decl context is complete if notEli Friedman2010-08-061-20/+18
| | | | | | | dependent in ActOnIdExpression. (This issue only shows up with member operators because an operator is never a type.) llvm-svn: 110486
* Introduce implicit conversions between AltiVec vectors and GCCDouglas Gregor2010-08-061-6/+18
| | | | | | vectors, from Anton Yartsev! llvm-svn: 110437
* Flip the switch to use OffsetOfExpr unconditionally; feel free to revert ifEli Friedman2010-08-051-129/+5
| | | | | | | | this breaks something. I'll wait a few days before cleaning out UnaryOperator::OffsetOf. llvm-svn: 110328
* PR7769: Fix references to anonymous structs/unions in base classes inEli Friedman2010-08-051-7/+12
| | | | | | offsetof expressions. llvm-svn: 110327
OpenPOWER on IntegriCloud