summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Expr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Take 2 on AltiVec-style vector initializers. Nate Begeman2009-08-101-0/+28
| | | | | | | | | | | | Fixes PR4704 problems Addresses Eli's patch feedback re: ugly cast code Updates all postfix operators to remove ParenListExprs. While this is awful, no better solution (say, in the parser) is obvious to me. Better solutions welcome. llvm-svn: 78621
* Revert r78535, it is causing a number of failures to build projects.Daniel Dunbar2009-08-101-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | --- Reverse-merging r78535 into '.': D test/Sema/altivec-init.c U include/clang/Basic/DiagnosticSemaKinds.td U include/clang/AST/Expr.h U include/clang/AST/StmtNodes.def U include/clang/Parse/Parser.h U include/clang/Parse/Action.h U tools/clang-cc/clang-cc.cpp U lib/Frontend/PrintParserCallbacks.cpp U lib/CodeGen/CGExprScalar.cpp U lib/Sema/SemaInit.cpp U lib/Sema/Sema.h U lib/Sema/SemaExpr.cpp U lib/Sema/SemaTemplateInstantiateExpr.cpp U lib/AST/StmtProfile.cpp U lib/AST/Expr.cpp U lib/AST/StmtPrinter.cpp U lib/Parse/ParseExpr.cpp U lib/Parse/ParseExprCXX.cpp llvm-svn: 78551
* AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);Nate Begeman2009-08-091-0/+28
| | | | | | | | In addition to being defined by the AltiVec PIM, this is also the vector initializer syntax used by OpenCL, so that vector literals are compatible with macro arguments. llvm-svn: 78535
* Get rid of Stmt::Clone now that we can reference count statements instead.Anders Carlsson2009-08-081-55/+0
| | | | llvm-svn: 78452
* Separate Stmt::Destroy into the entrypoint for destroying a statementDouglas Gregor2009-08-071-8/+7
| | | | | | | or expression (Destroy) from the virtual function used to actually destroy a given expression (DoDestroy). llvm-svn: 78375
OpenPOWER on IntegriCloud