summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Expr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* When determining whether a reference to a static data member is anDouglas Gregor2009-11-011-10/+30
| | | | | | | | | integral constant expression, make sure to find where the initializer was provided---inside or outside the class definition---since that can affect whether we have an integral constant expression (and, we need to see the initializer itself). llvm-svn: 85741
* Add a CK_DerivedToBaseMemberPointer cast kind and use it in Sema (Still no ↵Anders Carlsson2009-10-301-0/+2
| | | | | | codegen). llvm-svn: 85552
* Track source information for template arguments and template specializationJohn McCall2009-10-291-10/+10
| | | | | | | types. Preserve it through template instantiation. Preserve it through PCH, although TSTs themselves aren't serializable, so that's pretty much meaningless. llvm-svn: 85500
* Fix overload resolution when calling a member template or taking theDouglas Gregor2009-10-241-0/+12
| | | | | | | address of a member template when explicit template arguments are provided. llvm-svn: 84991
* Eliminate QualifiedDeclRefExpr, which captured the notion of aDouglas Gregor2009-10-231-5/+87
| | | | | | | | | | | | | | | | | | | | | | | | qualified reference to a declaration that is not a non-static data member or non-static member function, e.g., namespace N { int i; } int j = N::i; Instead, extend DeclRefExpr to optionally store the qualifier. Most clients won't see or care about the difference (since QualifierDeclRefExpr inherited DeclRefExpr). However, this reduces the number of top-level expression types that clients need to cope with, brings the implementation of DeclRefExpr into line with MemberExpr, and simplifies and unifies our handling of declaration references. Extended DeclRefExpr to (optionally) store explicitly-specified template arguments. This occurs when naming a declaration via a template-id (which will be stored in a TemplateIdRefExpr) that, following template argument deduction and (possibly) overload resolution, is replaced with a DeclRefExpr that refers to a template specialization but maintains the template arguments as written. llvm-svn: 84962
* PR5218: Replace IdentifierInfo::getName with StringRef version, now that clientsDaniel Dunbar2009-10-181-1/+1
| | | | | | are updated. llvm-svn: 84447
* Add FloatingCast to getCastKindName's list.Benjamin Kramer2009-10-181-0/+2
| | | | llvm-svn: 84427
* Add some more cast kinds.Anders Carlsson2009-10-181-0/+6
| | | | llvm-svn: 84423
* Switch ExtVectorElementExpr::getEncodedElementAccess to use StringRef.Daniel Dunbar2009-10-181-8/+8
| | | | | | - Really this should be simplified by the FIXME above, but I'm too deep in DFS. llvm-svn: 84392
* Add FIXME... maybe Nate will get bored? :)Daniel Dunbar2009-10-181-0/+2
| | | | llvm-svn: 84389
* Simplify ExtVectorElementExpr::containsDuplicateElements().Daniel Dunbar2009-10-171-13/+7
| | | | llvm-svn: 84380
* Add CK_VectorSplat and use it for casting non-pointer scalars to ExtVectors.Anders Carlsson2009-10-161-0/+2
| | | | llvm-svn: 84245
* Add a ToVoid cast kind and start using it.Anders Carlsson2009-10-161-0/+2
| | | | llvm-svn: 84241
* fix test/CodeGen/statements.c on 32-bit hosts.Chris Lattner2009-10-131-0/+7
| | | | llvm-svn: 84039
* Teach sema and codegen about the difference between address of labels,Chris Lattner2009-10-131-2/+11
| | | | | | | | | | which is a common idiom to improve PIC'ness of code using the addr of label extension. This implementation is a gross hack, but the only other alternative would be to teach evalutate about this horrid combination. While GCC allows things like "&&foo - &&bar + 1", people don't use this in practice. This implements PR5131. llvm-svn: 83957
* make the diagnostic in the 'unused result' warning more preciseChris Lattner2009-10-131-13/+14
| | | | | | about the reason, rdar://7186119. llvm-svn: 83940
* Implement [expr.mptr.oper]p6 for '->*' operator.Fariborz Jahanian2009-10-081-2/+12
| | | | llvm-svn: 83562
* Refixed pr5086 by letting Expr::isNullPointerConstantFariborz Jahanian2009-10-061-1/+2
| | | | | | | handle checking for a null pointer for a zero-valued enumerator; moving the test case from CodeGen to Sema. llvm-svn: 83350
* Fix checking for a null pointer constant when the expression itself isDouglas Gregor2009-09-251-7/+19
| | | | | | | | | | | | value-dependent. Audit (and fixed) all calls to Expr::isNullPointerConstant() to provide the correct behavior with value-dependent expressions. Fixes PR5041 and a crash in libstdc++ <locale>. In the same vein, properly compute value- and type-dependence for ChooseExpr. Fixes PR4996. llvm-svn: 82748
* Refactor the representation of qualifiers to bring ExtQualType out of theJohn McCall2009-09-241-4/+4
| | | | | | | | Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our use of qualifiers and fix a few places that weren't dealing with qualifiers quite right; many more remain. llvm-svn: 82705
* Add StringLiteral::getString -> StringRef.Daniel Dunbar2009-09-221-4/+4
| | | | llvm-svn: 82514
* Change all the Type::getAsFoo() methods to specializations of Type::getAs().John McCall2009-09-211-4/+4
| | | | | | | | | | | Several of the existing methods were identical to their respective specializations, and so have been removed entirely. Several more 'leaf' optimizations were introduced. The getAsFoo() methods which imposed extra conditions, like getAsObjCInterfacePointerType(), have been left in place. llvm-svn: 82501
* Disable questionable code for handling isNullPointerConstant on value dependentDaniel Dunbar2009-09-181-2/+2
| | | | | | expression. llvm-svn: 82217
* Fix two crashes on value dependent expressions (shift and null-pointer check).Daniel Dunbar2009-09-171-0/+3
| | | | | | | | - Doug, please check. - PR4940. llvm-svn: 82129
* Remove trailing whitespace.Daniel Dunbar2009-09-171-9/+9
| | | | llvm-svn: 82128
* Do not generate write-barrier in indirect assignment toFariborz Jahanian2009-09-161-2/+4
| | | | | | a weak object. llvm-svn: 82061
* Handle reinterpret_cast between integral types and pointer types.Anders Carlsson2009-09-151-0/+4
| | | | llvm-svn: 81837
* Using the property dot-syntax to invoke a non-eixstingFariborz Jahanian2009-09-141-10/+9
| | | | | | | structure-valued setter should cause a user error instead of crash. llvm-svn: 81769
* Remove unnecessary ASTContext parameter from FunctionDecl::isBuiltinIDDouglas Gregor2009-09-121-1/+1
| | | | llvm-svn: 81590
* Diagnose VLAs as an error in C++.Douglas Gregor2009-09-111-1/+4
| | | | | | | Also, treat the GNU __null as an integral constant expression to match GCC's behavior. llvm-svn: 81490
* Eliminate some "default"s in CheckICE.Douglas Gregor2009-09-101-3/+82
| | | | llvm-svn: 81477
* static_cast, reinterpret_cast, and const_cast can all be used in C++Douglas Gregor2009-09-101-1/+4
| | | | | | | | | | integral constant expressions (for conversions to integer types, naturally). I don't *think* that const_casts will ever get to this point, but I also can't convince myself that they won't... so I've taken the safe route and allowed the ICE checking code to look at const_cast. llvm-svn: 81453
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-123/+122
| | | | llvm-svn: 81346
* More objc GC's API work for array of pointers declaredFariborz Jahanian2009-09-081-6/+3
| | | | | | as __strong. llvm-svn: 81283
* Vastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam ↵Anders Carlsson2009-09-081-0/+77
| | | | | | Weinig! llvm-svn: 81237
* Add CastExpr::getCastKindName and use it in the StmtDumper.Anders Carlsson2009-09-031-0/+32
| | | | llvm-svn: 80862
* Preliminary AST representation and semantic analysis forDouglas Gregor2009-09-011-4/+31
| | | | | | | | | explicitly-specified template argument lists in member reference expressions, e.g., x->f<int>() llvm-svn: 80646
* Eliminate CXXAdornedMemberExpr entirely. Instead, optionally allocateDouglas Gregor2009-08-311-12/+32
| | | | | | | | space within the MemberExpr for the nested-name-specifier and its source range. We'll do the same thing with explicitly-specified template arguments, assuming I don't flip-flop again. llvm-svn: 80642
* Rename CXXQualifiedMemberExpr -> CXXAdornedMemberExpr, since we willDouglas Gregor2009-08-311-3/+11
| | | | | | | also be adding explicit template arguments as an additional "adornment". No functionality change. llvm-svn: 80628
* Get rid of mostly-unused, buggy method.Eli Friedman2009-08-291-38/+0
| | | | llvm-svn: 80432
* When a member reference expression includes a qualifier on the memberDouglas Gregor2009-08-261-3/+7
| | | | | | | | | | | | | | | | | name, e.g., x->Base::f() retain the qualifier (and its source range information) in a new subclass of MemberExpr called CXXQualifiedMemberExpr. Provide construction, transformation, profiling, printing, etc., for this new expression type. When a virtual function is called via a qualified name, don't emit a virtual call. Instead, call that function directly. Mike, could you add a CodeGen test for this, too? llvm-svn: 80167
* Using "ObjCImplicitSetterGetterRefExpr" instead of ↵Fariborz Jahanian2009-08-201-10/+10
| | | | | | | | "ObjCImplctSetterGetterRefExpr". A field rename and more comments. llvm-svn: 79537
* Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.Fariborz Jahanian2009-08-181-13/+19
| | | | | | | | Removed an unnecessary loop to get to setters incoming argument. Added DoxyGen comments. Still more work to do in this area (WIP). llvm-svn: 79365
* fix my previous commit.Chris Lattner2009-08-161-0/+3
| | | | llvm-svn: 79191
* This is an attempt to improve loc info for 'unused result' expressionChris Lattner2009-08-161-0/+12
| | | | | | | warnings, but it fails because we don't have the location of the . and I don't understand ObjCKVCRefExpr. I'll revisit this later. llvm-svn: 79190
* Call MaybeBindToTemporary for overloaded binary and unary operators.Anders Carlsson2009-08-161-0/+3
| | | | llvm-svn: 79173
* Add MaybeBindToTemporary calls for member call expressions.Anders Carlsson2009-08-161-0/+3
| | | | llvm-svn: 79171
* Transition the PCH support for ShuffleVectorExpr over to ASTContext allocationNate Begeman2009-08-121-5/+12
| | | | llvm-svn: 78783
* Warn on use of property dot syntax when unused.Fariborz Jahanian2009-08-121-1/+0
| | | | llvm-svn: 78760
* Fix rdar://7126285: don't warn on unused ObjC property accessChris Lattner2009-08-111-0/+1
| | | | | | that uses "dot syntax" since it might have a side effect. llvm-svn: 78704
OpenPOWER on IntegriCloud