ef8225444452a1486bd721f3285301fe84643b00 |
|
21-Jul-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for rebase to r212749. This also fixes a small issue with arm_neon.h not being generated always. Includes a cherry-pick of: r213450 - fixes mac-specific header issue r213126 - removes a default -Bsymbolic on Android Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/lib/AST/Expr.cpp
|
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 |
|
29-May-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for 3.5 rebase (r209713). Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/AST/Expr.cpp
|
651f13cea278ec967336033dd032faef0e9fc2ec |
|
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/AST/Expr.cpp
|
418220b209ed67a5cc6802d367a9a994d7225e04 |
|
14-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
DR408: If a static data member of incomplete array type is declared in a class template, that member has a dependent type (even if we can see the definition of the member of the primary template), because the array size could change in a member specialization. Patch by Karthik Bhat! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194740 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e0ac9bfbf588e269fefc8758e715ee5804affb18 |
|
12-Nov-2013 |
Reid Kleckner <reid@kleckner.net> |
-fms-compatibility: Use C++98 null pointer constant rules Patch by Will Wilson! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
bafa74f360cb3ec82fa8c688845330f491d167fd |
|
07-Nov-2013 |
David Majnemer <david.majnemer@gmail.com> |
[-fms-extensions] Add support for __FUNCDNAME__ Summary: Similar to __FUNCTION__, MSVC exposes the name of the enclosing mangled function name via __FUNCDNAME__. This implementation is very naive and unoptimized, it is expected that __FUNCDNAME__ would be used rarely in practice. Reviewers: rnk, rsmith, thakis CC: cfe-commits, silvas Differential Revision: http://llvm-reviews.chandlerc.com/D2109 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9b93f206d89dbf86805b610b417bb874f7f446e8 |
|
01-Oct-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Tweak changes in r186464 to avoid a crash. Currently, IR generation can't handle file-scope compound literals with non-constant initializers in C++. Fixes PR17415 (the first crash in the bug). (We should probably change (T){1,2,3} to use the same codepath as T{1,2,3} in C++ eventually, given that the semantics of the latter are actually defined by the standard.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
414a1bdbdaf250e0488589f12865c8961831b65d |
|
18-Sep-2013 |
Hal Finkel <hfinkel@anl.gov> |
Add the intrinsic __builtin_convertvector LLVM supports applying conversion instructions to vectors of the same number of elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to cause such instructions to be generated when using builtin vector types. C-style casting on vectors is already defined in terms of bitcasts, and so cannot be used for these conversions as well (without leading to a very confusing set of semantics). As a result, this adds a __builtin_convertvector intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is intended to aid the creation of vector intrinsic headers that create generic IR instead of target-dependent intrinsics (in other words, this is a generic _mm_cvtepi32_ps). As noted in the documentation, the action of __builtin_convertvector is defined in terms of the action of a C-style cast on each vector element. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
15b2674896371ac2a0fe707b538a1a29dec9d8e4 |
|
26-Aug-2013 |
Wei Pan <wei.pan@intel.com> |
Handle predefined expression for a captured statement - __func__ or __FUNCTION__ returns captured statement's parent function name, not the one compiler generated. Differential Revision: http://llvm-reviews.chandlerc.com/D1491 Reviewed by bkramer git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189219 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9db7a7eb4e23758e041752c9c0c0ec1663d5a0af |
|
22-Aug-2013 |
Craig Topper <craig.topper@gmail.com> |
Constify the ASTContext& passed to Expr creation functions. Also constify the context in couple other functions that are called from creation functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
28bdbf0861fefb33474fddbda1d3c66ee29be2af |
|
21-Aug-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Use the right type for PredefinedExpr when it's in a lambda. 1. We now print the return type of lambdas and return type deduced functions as "auto". Trailing return types with decltype print the underlying type. 2. Use the lambda or block scope for the PredefinedExpr type instead of the parent function. This fixes PR16946, a strange mismatch between type of the expression and the actual result. 3. Verify the type in CodeGen. 4. The type for blocks is still wrong. They are numbered and the name is not known until CodeGen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
05ed1a0587edcf3b8ee84a67d8c8ca76753d1fc1 |
|
18-Aug-2013 |
Craig Topper <craig.topper@gmail.com> |
Make expression allocation methods use a 'const' reference to the ASTContext since the underlying operator new only needs a const reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
cdd4b78583120222b82148626119b3e80ae1d291 |
|
16-Aug-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Properly track l-paren of a CXXFucntionalCastExpr. In addition to storing more useful information in the AST, this fixes a semantic check in template instantiation which checks whether the l-paren location is valid. Fixes PR16903. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
81e4549fede62835235a53c024909c3fab6b73ac |
|
21-Jul-2013 |
Lubos Lunak <l.lunak@suse.cz> |
report unused-value warning also for warn_unused types git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a5e660188a3c654cf0c88ed1093b28207e870b2b |
|
20-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Make IgnoreParens() look through ChooseExprs. This is the same way GenericSelectionExpr works, and it's generally a more consistent approach. A large part of this patch is devoted to caching the value of the condition of a ChooseExpr; it's needed to avoid threading an ASTContext into IgnoreParens(). Fixes <rdar://problem/14438917>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4bdb602d1a70ea432aad909825eb4748a2aca768 |
|
19-Jul-2013 |
Jean-Daniel Dupas <devlists@shadowlab.org> |
Fix another place where clang check objc selector name instead of checking the selector family Summary: In ARC mode, clang emits a warning if the result of an 'init' method is unused but miss cases where the method does not follows the Cocoa naming convention but is properly declared as an init family method. CC: cfe-commits, eli.friedman Differential Revision: http://llvm-reviews.chandlerc.com/D1163 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
21cde050b64eefbb5094af67985752eee42d00e2 |
|
17-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Make Expr::isConstantInitializer match IRGen. Sema needs to be able to accurately determine what will be emitted as a constant initializer and what will not, so we get accurate errors in C and accurate -Wglobal-constructors warnings in C++. This makes Expr::isConstantInitializer match CGExprConstant as closely as possible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d6b698739ab157348acafcec5b06a05d3d35377d |
|
15-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR16263: Implement current direction of core issue 1376. Binding a reference to the result of a cast-to-reference-type lifetime-extends the object to which the reference inside the cast binds. This requires us to look for subobject adjustments on both the inside and the outside of the MaterializeTemporaryExpr when looking for a temporary to lifetime-extend (which we also need for core issue 616, and possibly 1213). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184024 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f050d2445ed75569ccfe0740caa900403d2ce3b3 |
|
13-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement core issue 903: only integer literals with value 0 and prvalues of type std::nullptr_t are null pointer constants from C++11 onwards. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183883 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7c3e615f01e8f9f587315800fdaf2305ed824568 |
|
13-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12086, PR15117 Introduce CXXStdInitializerListExpr node, representing the implicit construction of a std::initializer_list<T> object from its underlying array. The AST representation of such an expression goes from an InitListExpr with a flag set, to a CXXStdInitializerListExpr containing a MaterializeTemporaryExpr containing an InitListExpr (possibly wrapped in a CXXBindTemporaryExpr). This more detailed representation has several advantages, the most important of which is that the new MaterializeTemporaryExpr allows us to directly model lifetime extension of the underlying temporary array. Using that, this patch *drastically* simplifies the IR generation of this construct, provides IR generation support for nested global initializer_list objects, fixes several bugs where the destructors for the underlying array would accidentally not get invoked, and provides constant expression evaluation support for std::initializer_list objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d1b55dcf6bd61d4350b01e15590bde9bb5a334bb |
|
03-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Do not walk through member-accesses on bitfields when looking for the object which is lifetime-extended by a reference binding. An additional temporary is created for such a bitfield access (although we have no explicit AST representation for it). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4e43dec4df9d7dd8e07b47bb15967f1b733a9bc6 |
|
03-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix handling of pointers-to-members and comma expressions when lifetime-extending temporaries in reference bindings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7247c88d1e41514a41085f83ebf03dd5220e054a |
|
15-May-2013 |
David Blaikie <dblaikie@gmail.com> |
Use only explicit bool conversion operator The most common (non-buggy) case are where such objects are used as return expressions in bool-returning functions or as boolean function arguments. In those cases I've used (& added if necessary) a named function to provide the equivalent (or sometimes negative, depending on convenient wording) test. DiagnosticBuilder kept its implicit conversion operator owing to the prevalent use of it in return statements. One bug was found in ExprConstant.cpp involving a comparison of two PointerUnions (PointerUnion did not previously have an operator==, so instead both operands were converted to bool & then compared). A test is included in test/SemaCXX/constant-expression-cxx1y.cpp for the fix (adding operator== to PointerUnion in LLVM). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2ad77cdd028b3c96f21d7bc6daee8fde6cf0cd86 |
|
10-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Allocate memory for the new number of subexpressions. Fixup for r181572 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
27365ee830cec7cf52c088b400867ff67b0b3b23 |
|
10-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
ArrayRef'ize ShuffleVectorExpr::setExprs But ShuffleVectorExpr should be tail-allocating the storage for expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181572 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
993f43f24d7a45a5cd4678a3316b0852261fc5d4 |
|
06-May-2013 |
John McCall <rjmccall@apple.com> |
Grab-bag of bit-field fixes: - References to ObjC bit-field ivars are bit-field lvalues; fixes rdar://13794269, which got me started down this. - Introduce Expr::refersToBitField, switch a couple users to it where semantically important, and comment the difference between this and the existing API. - Discourage Expr::getBitField by making it a bit longer and less general-sounding. - Lock down on const_casts of bit-field gl-values until we hear back from the committee as to whether they're allowed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a10b97898ee6339c3110e6ca33f178ff52f05238 |
|
22-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++1y constexpr extensions, round 1: Allow most forms of declaration and statement in constexpr functions. Everything which doesn't require variable mutation is also allowed as an extension in C++11. 'void' becomes a literal type to support constexpr functions which return 'void'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c3bf52ced9652f555aa0767bb822ec4c64546212 |
|
21-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++1y: Allow aggregates to have default initializers. Add a CXXDefaultInitExpr, analogous to CXXDefaultArgExpr, and use it both in CXXCtorInitializers and in InitListExprs to represent a default initializer. There's an additional complication here: because the default initializer can refer to the initialized object via its 'this' pointer, we need to make sure that 'this' points to the right thing within the evaluation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
76da55d3a49e1805f51b1ced7c5da5bcd7f759d8 |
|
16-Apr-2013 |
John McCall <rjmccall@apple.com> |
Basic support for Microsoft property declarations and references thereto. Patch by Tong Shen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b063ef0222a99ee168631afa7b5a882d494b8fde |
|
23-Feb-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add streamed versions of getQualifiedNameAsString. Move the cold virtual method getNameForDiagnostic out of line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3f6f51e28231f65de9c2dd150a2d757b2162cfa3 |
|
08-Feb-2013 |
Jordan Rose <jordan_rose@apple.com> |
Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h. Nearly all of these changes are one-to-one replacements; the few that aren't have to do with custom identifier validation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ae54121c15cdd38f415f6fdda48215ab5e4dcee1 |
|
01-Feb-2013 |
Alexander Kornienko <alexfh@google.com> |
Use const visitors in ASTDumper. http://llvm-reviews.chandlerc.com/D355 Patch by Philip Craig! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d615f88e3c24f91a65c25a4f7e66e0f97b18cc15 |
|
26-Jan-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Constify some getters of DesignatedInitExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173574 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9ec55f24b8f848bb37a9971100cf2fca379d5572 |
|
22-Jan-2013 |
Tim Northover <Tim.Northover@arm.com> |
Switch to APFloat constructor taking fltSemantics. This change also makes the serialisation store the required semantics, fixing an issue where PPC128 was always assumed when re-reading a 128-bit value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e6b9d802fb7b16d93474c4f1c179ab36202e8a8b |
|
20-Jan-2013 |
Guy Benyei <guy.benyei@intel.com> |
Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ba57183965f117279342903edec19766e478c9a8 |
|
18-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Some builtins do not evaluate their arguments. Teach EvaluatedExprVisitor not to visit them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
87b73ba920f523ef13f2420cbdb958a281aa6f33 |
|
17-Jan-2013 |
Matt Beaumont-Gay <matthewbg@google.com> |
Suppress all -Wunused-value warnings from macro body expansions. This is inspired by a number of false positives in real code, including PR14968. I've added test cases reduced from these false positives to test/Sema/unused-expr.c, as well as corresponding test cases that pass the offending expressions as arguments to a no-op macro to ensure that we do warn there. This also removes my previous tweak from r166522/r166534, so that we warn on unused cast expressions in macro arguments. There were several test cases that were using -Wunused-value to test general diagnostic emission features; I changed those to use other warnings or warn on a macro argument expression. I stared at the test case for PR14399 for a while with Richard Smith and we believe the new test case exercises the same codepaths as before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
cfa88f893915ceb8ae4ce2f17c46c24a4d67502f |
|
12-Jan-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Remove useless 'llvm::' qualifier from names like StringRef and others that are brought into 'clang' namespace by clang/Basic/LLVM.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4e24f0f711e2c9fde79f19fa1c80deaab3f3b356 |
|
02-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
s/CXX0X/CXX11/g, except for __GNU_EXPERIMENTAL_CXX0X__, and update a few nearby 'C++0x' comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
80ad52f327b532bded5c5b0ee38779d841c6cd35 |
|
02-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
s/CPlusPlus0x/CPlusPlus11/g git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
65d78312ce026092cb6e7b1d4d06f05e18d02aa0 |
|
25-Dec-2012 |
Erik Verbruggen <erikjv@me.com> |
Fix for PR12222. Changed getLocStart() and getLocEnd() to be required for Stmts, and make getSourceRange() optional. The default implementation for getSourceRange() is build the range by calling getLocStart() and getLocEnd(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171067 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4ae711b5ef292378d5b88cede3d4b708174053e2 |
|
14-Dec-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't hit an assertion failure when calculating the __PRETTY_FUNCTION__ of a member function with parenthesized declarator. Like this test case: class Foo { const char *(baz)() { return __PRETTY_FUNCTION__; } }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170233 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2fa67efeaf66a9332c30a026dc1c21bef6c33a6c |
|
01-Dec-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't pull in all the generated Attr code. Required to pull some functions out of line, but this shouldn't have a perf impact. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
23700f083fb72f5c6792e253f203a43aba3cef86 |
|
08-Nov-2012 |
Abramo Bagnara <abramo.bagnara@bugseng.com> |
Allow to pass from syntactic form of InitListExpr to semantic form (just as viceversa). No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
13fd684ee2c7578177b7c741e8eeec91ae628fcf |
|
08-Nov-2012 |
Abramo Bagnara <abramo.bagnara@bugseng.com> |
Fixed range of implicit MemberExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ef4b666e841e3917385892713612888ec6c3a056 |
|
01-Nov-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix an incorrect assert, the LHS can be an LValue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167232 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e4a990f34904eb572c8d6aa1deef19465214359c |
|
01-Nov-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Introduce clang_Cursor_getReceiverType which returns the CXType for the receiver of an ObjC message expression. rdar://12578643 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0a7dd835184343ec9149277b668ecdc5d49fe8b0 |
|
27-Oct-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Move two helper functions to AST so that sema can use them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6d919fb67bf6aa3db09608fb2948b558977c6929 |
|
24-Oct-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Address feedback from Eli Friedman on r166522. In particular, we do want to warn on some unused cast subexpressions within macros. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c7db84d0146a6f22b19949fb0128e2148aa92467 |
|
24-Oct-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Don't emit -Wunused-value warnings from macro expansions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
84c3b9745f813a784b5d8ce77f2785750523d9eb |
|
23-Oct-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Fix -Wunused-value to not warn on expressions that have unresolved lookups due to dependent arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0bea86307eb8c16339315a1e261fc490eb505c5b |
|
08-Oct-2012 |
David Blaikie <dblaikie@gmail.com> |
StringRef-ify Binary/UnaryOperator::getOpcodeStr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
bbff82f302a1dd67589f65912351978905f0c5a7 |
|
01-Oct-2012 |
Anna Zaks <ganna@apple.com> |
Move isObjCSelf into Expr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6319917b5021e9602389b49ca4f245d235e9b90a |
|
25-Sep-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Handle C++ functional casts in a similar way to C-style casts in unused expression warnings. <rdar://problem/12359208>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164569 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
66dfef17b8da7c89e20f32d4f0f4a04691b79768 |
|
14-Sep-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In StringLiteral::setString make sure that we copy the number of bytes of the buffer and not the size of the string, otherwise we may overwrite the buffer if there is a mismatch between the size of the string and the CharByteWidth, and assertions are disabled. The bug where this could occur was fixed in r163931. Related to rdar://12069503 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9a4db032ecd991626d236a502e770126db32bd31 |
|
12-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13811: Add a FunctionParmPackExpr node to handle references to function parameter packs where the reference is not being expanded but the pack has been. Previously, Clang would segfault in such cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a6c66cedc022c9e5d45a937d6b8cff491a6bf81b |
|
31-Aug-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Change the representation of builtin functions in the AST (__builtin_* etc.) so that it isn't possible to take their address. Specifically, introduce a new type to represent a reference to a builtin function, and a new cast kind to convert it to a function pointer in the operand of a call. Fixes PR13195. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3b6bef9a213249c6ab6d67c07b1ac6380961be3e |
|
24-Aug-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Push ArrayRef through the Expr hierarchy. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162552 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f0a26499c0ef62c7940b596be092315922a46ab7 |
|
20-Aug-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix InitListExpr::isStringLiteralInit so it handles various edge cases correctly. PR13643. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0d729105ecb50a7e3cbe6e57c29149edfa5cf05a |
|
13-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Factor out computation of whether a typeid's expression is potentially evaluated into a CXXTypeid member function. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4ef832ffc1147ce2f9777f9fad650cb3139a1d00 |
|
10-Aug-2012 |
David Blaikie <dblaikie@gmail.com> |
Provide isConst/Volatile on CXXMethodDecl. This also provides isConst/Volatile/Restrict on FunctionTypes to coalesce the implementation with other callers (& update those other callers). Patch contributed by Sam Panzer (panzer@google.com). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161647 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
50800fc551ac6b8a95cca662223e7f061bbd169a |
|
08-Aug-2012 |
David Blaikie <dblaikie@gmail.com> |
Implement warning for integral null pointer constants other than the literal 0. This is effectively a warning for code that violates core issue 903 & thus will become standard error in the future, hopefully. It catches strange null pointers such as: '\0', 1 - 1, const int null = 0; etc... There's currently a flaw in this warning (& the warning for 'false' as a null pointer literal as well) where it doesn't trigger on comparisons (ptr == '\0' for example). Fix to come in a future patch. Also, due to this only being a warning, not an error, it triggers quite frequently on gtest code which tests expressions for null-pointer-ness in a SFINAE context (so it wouldn't be a problem if this was an error as in an actual implementation of core issue 903). To workaround this for now, the diagnostic does not fire in unevaluated contexts. Review by Sean Silva and Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
60b70388e43d146d968a1cc0705b30cb2d7263fe |
|
07-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Update documentation of HasSideEffects to match its callers' expectations, and update implementation to match. An elidable, non-trivial constructor call is a side-effect under this definition, but wasn't under the old one, because we are not required to evaluate it even though it may have an effect. Also rationalize checking for volatile reads: just look for lvalue-to-rvalue conversions on volatile glvalues, and ignore whether a DeclRefExpr etc is for a volatile variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
8ae4ec28451a16a57718286da3e476fc2f495c3f |
|
07-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Teach Expr::HasSideEffects about all the Expr types, and fix a bug where it was mistakenly classifying dynamic_casts which might throw as having no side effects. Switch it from a visitor to a switch, so it is kept up-to-date as future Expr nodes are added. Move it from ExprConstant.cpp to Expr.cpp, since it's not really related to constant expression evaluation. Since we use HasSideEffect to determine whether to emit an unused global with internal linkage, this has the effect of suppressing emission of globals in some cases. I've left many of the Objective-C cases conservatively assuming that the expression has side-effects. I'll leave it to someone with better knowledge of Objective-C than mine to improve them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
251c449b280eb845017a6c022ed7189d17c63d49 |
|
17-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Handle the case where the base type is not dependent, but the derived one is. Fixes pr13353.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
478851c3ed6bd784e7377dffd8e57b200c1b9ba9 |
|
04-Jul-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Drop the ASTContext.h include from Stmt.h and fix up transitive users. This required moving the ctors for IntegerLiteral and FloatingLiteral out of line which shouldn't change anything as they are usually called through Create methods that are already out of line. ASTContext::Deallocate has been a nop for a long time, drop it from ASTVector and make it independent from ASTContext.h Pass the StorageAllocator directly to AccessedEntity so it doesn't need to have a definition of ASTContext around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
632fbaa22fbed7c090eb83775731bfff786c2198 |
|
28-Jun-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix another issue with devirtualizing calls to final methods by passing them the correct this pointer. There is some potential for sharing a bit more code with canDevirtualizeMemberFunctionCalls, but that can be done in an independent patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
8d852e35adb46e0799538dfc9c80d44f27cd3597 |
|
27-Jun-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Implement John McCall's review of r159212 other than the this pointer not being updated. Will fix that in a second. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159280 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0b4fe503ef00d9f8ea330850d3e3b303e9c7c876 |
|
26-Jun-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
During codegen of a virtual call we would extract any casts in the expression to see if we had an underlying final class or method, but we would then use the cast type to do the call, resulting in a direct call to the wrong method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
32f498a675df990901e6659d610dc740f9423228 |
|
16-Jun-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make the ".*" operator work correctly when the base is a prvalue and the field has a non-trivial copy constructor. PR13097. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
8ab09da1faaa33b9fa78de59cc4e191bfe9907b5 |
|
13-Jun-2012 |
Richard Trieu <rtrieu@google.com> |
Moved the StringLiteral printing code from StmtPrinter into the StringLiteral class and have StmtPrinter and StmtDumper refer to it. This fixes an assertion failure when dumping wchar string literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
df9ef1bc8c3780307ab2ed81bf5e31c23310b936 |
|
13-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13099: Teach -Wformat about raw string literals, UTF-8 strings and Unicode escape sequences. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ceeb53af1f0f651de124d8e5a1b13b184a480afc |
|
12-Jun-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Remove unused variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158343 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4059da87fa2fe9f415c9656dc63e75d5d4a489ef |
|
24-May-2012 |
Eli Friedman <eli.friedman@gmail.com> |
A minor tweak to the new volatile lvalue warning: don't warn on "(void)x", where "x" refers to a local variable. This should silence a useless warning in compiler-rt and other places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157414 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a6115068cde719142eb394db88612c185cabd05b |
|
24-May-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add a warning to diagnose statements in C++ like "*(volatile int*)x;". Conceptually, this is part of -Wunused-value, but I added a separate flag -Wunused-volatile-lvalue so it doesn't get turned off by accident with -Wno-unused-value. I also made a few minor improvements to existing unused value warnings in the process. <rdar://problem/11516811>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
df8755884e039d3f313ee0fea42b955257b5e240 |
|
11-May-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
The Lexer constructor expects a source location at the start of the file buffer, not at the start of lexing. Fixes assertion hit in format diagnostics. rdar://11418366 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156647 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7ad5c996e9519ed4e9afd1f0166be1cd2be8415a |
|
05-May-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use raw_ostream in TypePrinter and eliminate uses of temporary std::strings. Part of rdar://10796159 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e6975e9b0985ad7f7ff9187e38d95bfe9ac4181b |
|
17-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement DR1330 in C++11 mode, to support libstdc++4.7 which uses it. We have a new flavor of exception specification, EST_Uninstantiated. A function type with this exception specification carries a pointer to a FunctionDecl, and the exception specification for that FunctionDecl is instantiated (if needed) and used in the place of the function type's exception specification. When a function template declaration with a non-trivial exception specification is instantiated, the specialization's exception specification is set to this new 'uninstantiated' kind rather than being instantiated immediately. Expr::CanThrow has migrated onto Sema, so it can instantiate exception specs on-demand. Also, any odr-use of a function triggers the instantiation of its exception specification (the exception specification could be needed by IRGen). In passing, fix two places where a DeclRefExpr was created but the corresponding function was not actually marked odr-used. We used to get away with this, but don't any more. Also fix a bug where instantiating an exception specification which refers to function parameters resulted in a crash. We still have the same bug in default arguments, which I'll be looking into next. This, plus a tiny patch to fix libstdc++'s common_type, is enough for clang to parse (and, in very limited testing, support) all of libstdc++4.7's standard headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
fe587201feaebc69e6d18858bea85c77926b6ecf |
|
15-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12226: don't generate wrong code if a braced string literal is used to initialize an array of unsigned char. Outside C++11 mode, this bug was benign, and just resulted in us emitting a constant which was double the required length, padded with 0s. In C++11, it resulted in us generating an array whose first element was something like i8 ptrtoint ([n x i8]* @str to i8). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
51b92401c9f95023a2ef27064fd5a60fd99175f5 |
|
13-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement __atomic_fetch_nand and __atomic_nand_fetch to complete our set of GNU __atomic builtins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ff34d401ff385ef7173ca612432b4ea717fff690 |
|
12-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement support for 18 of the GNU-compatible __atomic builtins. This is not quite sufficient for libstdc++'s <atomic>: we still need __atomic_test_and_set and __atomic_clear, and may need a more complete __atomic_is_lock_free implementation. We are also missing an implementation of __atomic_always_lock_free, __atomic_nand_fetch, and __atomic_fetch_nand, but those aren't needed for libstdc++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e1b2abc2ed3f2c98985b06b4ad01c977bd584020 |
|
11-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
AtomicExpr: make ASTStmtReader a friend and remove setters. Also fix saving of an uninitialized Stmt* in serialization of __atomic_init and add a test of atomics serialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
abf65ce5ddfb8db0d34280d30a91253930732f4f |
|
10-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Improve the printing of __PRETTY_FUNCTION__ more provide more information and more closely match GCC's, from Nikola Smiljanic! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d8b5ca14277e142506daed181ecff9151dfae32c |
|
12-Mar-2012 |
Jordy Rose <jediknil@belkadan.com> |
ObjCBoolLiterals (__objc_yes/__objc_no) behave like C++ booleans (true/false). They are NOT objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d |
|
11-Mar-2012 |
David Blaikie <dblaikie@gmail.com> |
Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f4b88a45902af1802a1cb42ba48b1c474474f228 |
|
10-Mar-2012 |
John McCall <rjmccall@apple.com> |
Remove BlockDeclRefExpr and introduce a bit on DeclRefExpr to track whether the referenced declaration comes from an enclosing local context. I'm amenable to suggestions about the exact meaning of this bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
8fbc6d23d61213750ba1fdcb0b4b9d3d54bbc32f |
|
09-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
[AST] Define a few more key getLocStart() implementations. - This cuts the # of getSourceRange calls by 60% on OGF/NSBezierPath-OAExtensions.m. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
90e25a8b2cc5d006e4ced052bcdb40c8af999456 |
|
09-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
[AST] Reimplement Stmt::getLoc{Start,End} to dispatch to subclass overloads. - getSourceRange() can be very expensive, we should try to avoid it if at all possible. In conjunction with the previous commit I measured a ~2% speedup on 403.gcc/combine.c and a 3% speedup on OmniGroupFrameworks/NSBezierPath-OAExtensions.m. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
396ec676b7a39665fa3a3f86f8e0520f8d7e93a8 |
|
09-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
[AST] Add {DeclRefExpr,MemberExpr,ImplicitCastExpr}::{getLocStart,getLocEnd} methods. - There are probably a lot more of these worth adding, but these are a start at hitting some of the exprs for which getSourceRange().getBegin() is a poor substitute for getLocStart(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3d13c5a1e72ed8f8be9c083791d30643d1b1ec43 |
|
09-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
[AST] Reduce Decl::getASTContext() calls. - This function is not at all free; pass it around along some hot paths instead of recomputing it deep inside various VarDecl methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9fcce65e7e1307b5b8da9be13e4092d6bb94dc1d |
|
07-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
AST representation for user-defined literals, plus just enough of semantic analysis to make the AST representation testable. They are represented by a new UserDefinedLiteral AST node, which is a sugared CallExpr. All semantic properties, including full CodeGen support, are achieved for free by this representation. UserDefinedLiterals can never be dependent, so no custom instantiation behavior is required. They are mangled as if they were direct calls to the underlying literal operator. This matches g++'s apparent behavior (but not its actual mangling, which is broken for literal-operator-ids). User-defined *string* literals are now fully-operational, but the semantic analysis is quite hacky and needs more work. No other forms of user-defined literal are created yet, but the AST support for them is present. This patch committed after midnight because we had already hit the quota for new kinds of literal yesterday. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ebcb57a8d298862c65043e88b2429591ab3c58d3 |
|
06-Mar-2012 |
Ted Kremenek <kremenek@apple.com> |
Add clang support for new Objective-C literal syntax for NSDictionary, NSArray, NSNumber, and boolean literals. This includes both Sema and Codegen support. Included is also support for new Objective-C container subscripting. My apologies for the large patch. It was very difficult to break apart. The patch introduces changes to the driver as well to cause clang to link in additional runtime support when needed to support the new language features. Docs are forthcoming to document the implementation and behavior of these features. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
fd819783aafa39b3bfdfcc095270352074ef4734 |
|
29-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a couple -Wuninitialized warnings from gcc. Reported by David Greene. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151754 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
13a140caba448a66ffcc5ff0d32a87d6e4f4ad3f |
|
25-Feb-2012 |
Ahmed Charles <ace2001ac@gmail.com> |
ArrayRef'ize various functions in the AST/Parser/Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0fd7f4db69ea75bde3d5fd7365165c6f43d78be5 |
|
24-Feb-2012 |
Nick Lewycky <nicholas@mxc.ca> |
Revert r151357. That unreachable is reachable... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
770dc0342c21f444b878d74ee5e1f4d25b5913a5 |
|
24-Feb-2012 |
Nick Lewycky <nicholas@mxc.ca> |
Silence gcc warnings pointing out that CharByteWidth could be used uninitialized. While there, restyle this function! No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4ca8ac2e61c37ddadf37024af86f3e1019af8532 |
|
24-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement a new type trait __is_trivially_constructible(T, Args...) that provides the behavior of the C++11 library trait std::is_trivially_constructible<T, Args...>, which can't be implemented purely as a library. Since __is_trivially_constructible can have zero or more arguments, I needed to add Yet Another Type Trait Expression Class, this one handling arbitrary arguments. The next step will be to migrate UnaryTypeTrait and BinaryTypeTrait over to this new, more general TypeTrait class. Fixes the Clang side of <rdar://problem/10895483> / PR12038. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b11e52540166a2958439cfe562c25931e4460759 |
|
23-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Seriously, are injected-class-names that hard? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
25d0a0f67d9e949ffbfc57bf487012f5cbfd886e |
|
23-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Provide the __is_trivially_assignable type trait, which provides compiler support for the std::is_trivially_assignable library type trait. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ac1303eca6cbe3e623fb5ec6fe7ec184ef4b0dfa |
|
22-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Generate an AST for the conversion from a lambda closure type to a block pointer that returns a block literal which captures (by copy) the lambda closure itself. Some aspects of the block literal are left unspecified, namely the capture variable (which doesn't actually exist) and the body (which will be filled in by IRgen because it can't be written as an AST). Because we're switching to this model, this patch also eliminates tracking the copy-initialization expression for the block capture of the conversion function, since that information is now embedded in the synthesized block literal. -1 side tables FTW. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
19562c97669532084a71895197f4444305dd432a |
|
20-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
ObjCMessageExpr: Don't leave SelLocsKind uninitialized when the send is implicit. Fixes PR11929. Found by valgrind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
32cf1f27ae8620e7b79bb4e81a067187c0aab7ae |
|
17-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Basic code generation support for std::initializer_list. We now generate temporary arrays to back std::initializer_list objects initialized with braces. The initializer_list is then made to point at the array. We support both ptr+size and start+end forms, although the latter is untested. Array lifetime is correct for temporary std::initializer_lists (e.g. call arguments) and local variables. It is untested for new expressions and member initializers. Things left to do: Massively increase the amount of testing. I need to write tests for start+end init lists, temporary objects created as a side effect of initializing init list objects, new expressions, member initialization, creation of temporary objects (e.g. std::vector) for initializer lists, and probably more. Get lifetime "right" for member initializers and new expressions. Not that either are very useful. Implement list-initialization of array new expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150803 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a345edb668380691fc92d4e4aa0a5ffec366ca6a |
|
17-Feb-2012 |
John McCall <rjmccall@apple.com> |
Block expressions always have a prototyped function type; expose this in the AST accessor and micro-optimize it very slightly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2aed8b88613863f3c439cdfb205bdf8b608fb205 |
|
16-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Revert "Revert "Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself."" This reintroduces commit r150682 with a fix for the Bullet benchmark crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1548d14f4092a817f7d90ad3e7a65266dc85fbc5 |
|
16-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Revert "Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself." It leads to a compiler crash in the Bullet benchmark. This reverts commit r12014. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
5f688f4b15d02aa7ad159c46b1f78fe59d412f12 |
|
16-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself. Holding the constructor directly makes no sense when list-initialized arrays come into play. The constructor is now held in a CXXConstructExpr, if construction is what is done. The new design can also distinguish properly between list-initialization and direct-initialization, as well as implicit default-initialization constructors and explicit value-initialization constructors. Finally, doing it this way removes redundance from the AST because CXXNewExpr doesn't try to handle both the allocation and the initialization responsibilities. This breaks the static analysis of new expressions. I've filed PR12014 to track this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4d4e5c1ae83f4510caa486b3ad19de13048f9f04 |
|
15-Feb-2012 |
John McCall <rjmccall@apple.com> |
Split reinterpret_casts of member pointers out from CK_BitCast; this is general goodness because representations of member pointers are not always equivalent across member pointer types on all ABIs (even though this isn't really standard-endorsed). Take advantage of the new information to teach IR-generation how to do these reinterprets in constant initializers. Make sure this works when intermingled with hierarchy conversions (although this is not part of our motivating use case). Doing this in the constant-evaluator would probably have been better, but that would require a *lot* of extra structure in the representation of constant member pointers: you'd really have to track an arbitrary chain of hierarchy conversions and reinterpretations in order to get this right. Ultimately, this seems less complex. I also wasn't quite sure how to extend the constant evaluator to handle foldings that we don't actually want to treat as extended constant expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
70488e201ccd94d4bb1ef0868cc13cca2b7d4ff6 |
|
14-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Pending clear answer from WG21 on whether core issue 903 is intended to apply to C++11 or just C++17, restrict the set of null pointer constants in C++11 mode back to those which were considered null in C++98. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
5b9cc5df25c2198f270dd1d5c438fdce70d4051d |
|
12-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Represent C++ direct initializers as ParenListExprs before semantic analysis instead of having a special-purpose function. - ActOnCXXDirectInitializer, which was mostly duplication of AddInitializerToDecl (leading e.g. to PR10620, which Eli fixed a few days ago), is dropped completely. - MultiInitializer, which was an ugly hack I added, is dropped again. - We now have the infrastructure in place to distinguish between int x = {1}; int x({1}); int x{1}; -- VarDecl now has getInitStyle(), which indicates which of the above was used. -- CXXConstructExpr now has a flag to indicate that it represents list- initialization, although this is not yet used. - InstantiateInitializer was renamed to SubstInitializer and simplified. - ActOnParenOrParenListExpr has been replaced by ActOnParenListExpr, which always produces a ParenListExpr. Placed that so far failed to convert that back to a ParenExpr containing comma operators have been fixed. I'm pretty sure I could have made a crashing test case before this. The end result is a (I hope) considerably cleaner design of initializers. More importantly, the fact that I can now distinguish between the various initialization kinds means that I can get the tricky generalized initializer test cases Johannes Schaub supplied to work. (This is not yet done.) This commit passed self-host, with the resulting compiler passing the tests. I hope it doesn't break more complicated code. It's a pretty big change, but one that I feel is necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f978059b82db8c0d849c5f992036210b5ca53200 |
|
07-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Switch the ObjC*Decl raw_stream overloads to take a reference, for consistency with NamedDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
01d08018b7cf5ce1601707cfd7a84d22015fc04e |
|
07-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce basic ASTs for lambda expressions. This covers: - Capturing variables by-reference and by-copy within a lambda - The representation of lambda captures - The creation of the non-static data members in the lambda class that store the captured variables - The initialization of the non-static data members from the captured variables - Pretty-printing lambda expressions There are a number of FIXMEs, both explicit and implied, including: - Creating a field for a capture of 'this' - Improved diagnostics for initialization failures when capturing variables by copy - Dealing with temporaries created during said initialization - Template instantiation - AST (de-)serialization - Binding and returning the lambda expression; turning it into a proper temporary - Lots and lots of semantic constraints - Parameter pack captures git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f7ccbad5d9949e7ddd1cbef43d482553b811e026 |
|
05-Feb-2012 |
Dylan Noblesmith <nobled@dreamwidth.org> |
Basic: import SmallString<> into clang namespace (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
56e68b712931e66612b01ecf0af27a05e5d12648 |
|
31-Jan-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Pacify gcc's -Wreturn-type. A separate unreachable message will make it easier to debug if either of the unreachables is reached. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c9674be201cf17d8e1c1c9f8b2c8c3a4474a43db |
|
31-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Clean up switch in Expr::CanThrow. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e4b92761b43ced611c417ae478568610f1ad7b1e |
|
27-Jan-2012 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added source location for the template keyword in AST template-id expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3026348bd4c13a0f83b59839f64065e0fcbea253 |
|
20-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
More dead code removal (using -Wunreachable-code) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
561d3abc881033776ece385a01a510e1cbc1fa92 |
|
17-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
Remove unnecessary default cases in switches over enums. This allows -Wswitch-enum to find switches that need updating when these enums are modified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7a7ee3033e44b45630981355460ef89efa0bdcc4 |
|
16-Jan-2012 |
David Chisnall <csdavec@swan.ac.uk> |
Some improvements to the handling of C11 atomic types: - Add atomic-to/from-nonatomic cast types - Emit atomic operations for arithmetic on atomic types - Emit non-atomic stores for initialisation of atomic types, but atomic stores and loads for every other store / load - Add a __atomic_init() intrinsic which does a non-atomic store to an _Atomic() type. This is needed for the corresponding C11 stdatomic.h function. - Enables the relevant __has_feature() checks. The feature isn't 100% complete yet, but it's done enough that we want people testing it. Still to do: - Make the arithmetic operations on atomic types (e.g. Atomic(int) foo = 1; foo++;) use the correct LLVM intrinsic if one exists, not a loop with a cmpxchg. - Add a signal fence builtin - Properly set the fenv state in atomic operations on floating point values - Correctly handle things like _Atomic(_Complex double) which are too large for an atomic cmpxchg on some platforms (this requires working out what 'correctly' means in this context) - Fix the many remaining corner cases git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0c6b8e3fa718a0a67292340e5cff6fe7cbd15c14 |
|
12-Jan-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
If an ObjCMessageExpr is implicit, there are no source locations for the selector identifiers. It was difficult to form a test case for it unfortunately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
746f5bcbfde5b25269169c63c66492311673b67d |
|
12-Jan-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add IsImplicit field in ObjCMessageExpr that is true when the message was constructed, e.g. for a property access. This allows the selector identifier locations machinery for ObjCMessageExpr to function correctly, in that there are not real locations to handle/report for such a message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
31dfd642d5ac33c4ee0cfe1d7a1d4da455dcc7a4 |
|
10-Jan-2012 |
Akira Hatanaka <ahatanaka@mips.com> |
Add field IsIEEE in FloatingLiteral to distinguish between different 128-bit floating point formats. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d97927d69b277120f8d403580c44acd84907d7b4 |
|
06-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Revert r147664; it's breaking clang regression tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2d5f0952a93dae4b648f2b33bab621ad6e932d9a |
|
06-Jan-2012 |
Jakub Staszak <kubastaszak@gmail.com> |
Silence GCC warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
65639284118d54ddf2e51a05d2ffccda567fe246 |
|
05-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add an APValue representation for the difference between two address-of-label expressions. Add support to Evaluate and CGExprConstant for generating/handling them. Remove the special-case for such differences in Expr::isConstantInitializer. With that done, remove a bunch of buggy code from CGExprConstant for handling scalar expressions which is no longer necessary. Fixes PR11705. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6bd9719fd97abac1b8126eae866e96db88be4ac8 |
|
21-Dec-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a case where Expr::isConstantInitializer would return true for an expression we can't support. In a slightly amusing twist, the case in question was already in the clang regression tests marked as a valid construct. <rdar://problem/10020074> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4ec4089b302d4ab2ec3deac089c7834d27aa39ee |
|
09-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Teach isConstantInitializer that numeric literals are constants, rather than having it evaluate them. No change in functionality, but a speed up of about 5% on some translation units in SPEC 445.gobmk. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d62ca370b03b8c6ad58002d3399383baf744e32b |
|
06-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Move vector bitcast handling in constant expressions from the expression evaluator into constant initializer handling / IRGen. The practical consequence of this is that the bitcast now lives in the constant's definition, rather than in its uses. The code in the constant expression evaluator was producing vectors of the wrong type and size (and possibly of the wrong value for a big-endian int-to-vector bitcast). We were getting away with this only because we don't yet support constant-folding of any expressions which inspect vector values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
180f47959a066795cc0f409433023af448bb0328 |
|
10-Nov-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Constant expression evaluation: support for evaluation of structs and unions of literal types, as well as derived-to-base casts for lvalues and derived-to-virtual-base casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
db1822c6de43ff4aa5fa00234bf8222f6f4816e8 |
|
08-Nov-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix a cluster of related issues involving value-dependence and constant expression evaluation: - When folding a non-value-dependent expression, we may try to use the initializer of a value-dependent variable. If that happens, give up. - In C++98, actually check that a const, non-volatile DeclRefExpr inside an ICE is of integral or enumeration type (a reference isn't OK!) - In C++11, DeclRefExprs for objects of const literal type initialized with value-dependent expressions are themselves value-dependent. - So are references initialized with value-dependent expressions (though this case is missing from the C++11 standard, along with many others). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7864435ef2bce200224120bd1df3aed98ea5b99a |
|
07-Nov-2011 |
John McCall <rjmccall@apple.com> |
Rip out CK_GetObjCProperty. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4b9c2d235fb9449e249d74f48ecfec601650de93 |
|
06-Nov-2011 |
John McCall <rjmccall@apple.com> |
Change the AST representation of operations on Objective-C property references to use a new PseudoObjectExpr expression which pairs a syntactic form of the expression with a set of semantic expressions implementing it. This should significantly reduce the complexity required elsewhere in the compiler to deal with these kinds of expressions (e.g. IR generation's special l-value kind, the static analyzer's Message abstraction), at the lower cost of specifically dealing with the odd AST structure of these expressions. It should also greatly simplify efforts to implement similar language features in the future, most notably Managed C++'s properties and indexed properties. Most of the effort here is in dealing with the various clients of the AST. I've gone ahead and simplified the ObjC rewriter's use of properties; other clients, like IR-gen and the static analyzer, have all the old complexity *and* all the new complexity, at least temporarily. Many thanks to Ted for writing and advising on the necessary changes to the static analyzer. I've xfailed a small diagnostics regression in the static analyzer at Ted's request. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
64f45a24b19eb89ff88f7c3ff0df9be8e861ac97 |
|
01-Nov-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Fix the representation of wide strings in the AST and IR so that it uses the native representation of integers for the elements. This fixes a bunch of nastiness involving treating wide strings as a series of bytes. Patch by Seth Cantrell. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
21f77cd0c3da8a1dbaf6245cae43baf4c0b80ea4 |
|
22-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't try to set the "array filler" in a InitListExpr twice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e0a22d06888c13989b3f72db319f1d498bf69153 |
|
18-Oct-2011 |
John McCall <rjmccall@apple.com> |
Macro metaprogramming for builtin types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
dfa64ba45922e1c28e36341bdf34785fea74659b |
|
15-Oct-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Add template instantiation support for AtomicExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b8989f27f116ff2400e92a52c067a69846119eb5 |
|
14-Oct-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Change operator<< for raw_ostream and NamedDecl to take a reference instead of a pointer. Passing a pointer was a bad idea as it collides with the overload for void*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
276b061970939293f1abaf694bd3ef05b2cbda79 |
|
11-Oct-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Initial implementation of __atomic_* (everything except __atomic_is_lock_free). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a6b8b2c09610b8bc4330e948ece8b940c2386406 |
|
10-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Constant expression evaluation refactoring: - Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions, and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert behaviour. - Factor out evaluation of bitfield bit widths. - Fix a few places which would evaluate an expression twice: once to determine whether it is a constant expression, then again to get the value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b8da98a2182d2c69c72136b9a9ebabd4694f3d6b |
|
10-Oct-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Another case of HadMultipleCandidates being used uninitialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b994e6c7d57b00e3e0f69d152065e2cf85d1de33 |
|
03-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Move field in ObjCMessageExpr to avoid padding. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
207180802c836fda8acbedb47a92f9d2bdca59c3 |
|
03-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Allow getting all source locations of selector identifiers in a ObjCMessageExpr. Instead of always storing all source locations for the selector identifiers we check whether all the identifiers are in a "standard" position; "standard" position is -Immediately before the arguments: [foo first:1 second:2] -With a space between the arguments: [foo first: 1 second: 2] -For nullary selectors, immediately before ']': [foo release] In such cases we infer the locations instead of storing them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
8d9ed7980405e91a12e33338a78fb99620adf553 |
|
03-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
ArrayRef'ize ObjCMessageExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
04fb8ef41ed2bd9533ba9392b4db1a7379752c16 |
|
03-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add an assertion that we don't overflow the bitfield ObjCMessageExpr::NumArgs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
951376242c076c3f62dd78bf672909fc011991db |
|
03-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Pass all the locations of the selector identifiers for a message expression from the parser. They are not kept in the AST yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
eb2d1f1c88836bd5382e5d7aa8f6b85148a88b27 |
|
23-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Removing a bunch of dead returns/breaks after llvm_unreachables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e3f834950801f1334f1b3f3f7e9a34062905fe1d |
|
23-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-gc: Fix a corner case where clang fails to generate GC write barrier with captured pointer to object. // rdar://10150823 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 |
|
23-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Switch assert(0/false) llvm_unreachable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
71a7605977113c795edd44fcbd2302ad49506653 |
|
22-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't use TemplateArgumentListInfo inside AST nodes because it may leak. Use ASTTemplateArgumentListInfo instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b0c3e0909bb04af0bfb82ad01ab6909649d68cca |
|
22-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Rename ExplicitTemplateArgumentList -> ASTTemplateArgumentListInfo, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6e5218367c513fe02d1c7210023d40739ecb1572 |
|
19-Sep-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Fix a QoI bug with overloaded operators inside macros. We were failing to set source locations and ranges in isUnusedResultAWarning for CXXOperatorCallExprs, leading to an "expression result unused" warning with absolutely no context if the expression was inside a macro. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e8683d6d389def2fce229325435ba3c2b3f75492 |
|
14-Sep-2011 |
John McCall <rjmccall@apple.com> |
In general, don't look through explicit casts when trying to find the called declaration. Explicit casts can radically change the semantics of a call, and it's no longer really a builtin call any more than it would be a builtin call if you stored the function pointer into a variable and called that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
33e56f3273457bfa22c7c50bc46cf5a18216863d |
|
10-Sep-2011 |
John McCall <rjmccall@apple.com> |
Rename the ARC cast kinds to start with "ARC". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
dc05b11c67331016473fbc7909827b1b89c9616b |
|
10-Sep-2011 |
John McCall <rjmccall@apple.com> |
When converting a block pointer to an Objective-C pointer type, extend the lifetime of the block by copying it to the heap, or else we'll get a dangling reference because the code working with the non-block-typed object will not know it needs to copy. There is some danger here, e.g. with assigning a block literal to an unsafe variable, but, well, it's an unsafe variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1d9b3b25f7ac0d0195bba6b507a684fe5e7943ee |
|
09-Sep-2011 |
John McCall <rjmccall@apple.com> |
Give conversions of block pointers to ObjC pointers a different cast kind than conversions of C pointers to ObjC pointers. In order to ensure that we've caught every case, add asserts to CastExpr that strictly determine which cast kind is used for which kind of bit cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c0244c5c351db18c6c35c1594872dde072b90df9 |
|
08-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Look through SubstNonTypeTemplateParmExpr nodes in the various Expr::Ignore* methods that also look through implicit casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139303 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1ddc9c4674b7c737ec65241a531df8c64e40b0a9 |
|
06-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
When extracting the callee declaration from a call expression, be sure to look through SubstNonTypeTemplateParmExprs. Then, update the IR generation of CallExprs to actually use CallExpr::getCalleeDecl() rather than attempting to mimick its behavior (badly). Fixes <rdar://problem/10063539>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9b10683a3f222d8dc6e139073ca96b97b439747b |
|
17-Aug-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Whitelist operator== and operator!= as valid for unused value warnings, even when overloaded and user-defined. These operators are both more valuable to warn on (due to likely typos) and extremely unlikely to be reasonable for use to trigger side-effects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
5cee1195584fa8672253139c86e922daeda69b9e |
|
27-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Add support for C++0x unicode string and character literals, from Craig Topper! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
5f9e272e632e951b1efe824cd16acb4d96077930 |
|
23-Jul-2011 |
Chris Lattner <sabre@nondot.org> |
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports them into the clang namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
42068e9d420889014ee26894e421fead336b239d |
|
13-Jul-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Silliness with commas, as reported at http://blog.regehr.org/archives/558 . As it turns out, this is my fault for not noticing this was an issue when I was looking at this a long time ago. :( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7e5e5f4cc36fe50f46ad76dca7a266434c94f475 |
|
07-Jul-2011 |
John McCall <rjmccall@apple.com> |
In ARC, reclaim all return values of retainable type, not just those where we have an immediate need of a retained value. As an exception, don't do this when the call is made as the immediate operand of a __bridge retain. This is more in the way of a workaround than an actual guarantee, so it's acceptable to be brittle here. rdar://problem/9504800 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
561f81243f665cf2001caadc45df505f826b72d6 |
|
01-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce the notion of instantiation dependence into Clang's AST. A type/expression/template argument/etc. is instantiation-dependent if it somehow involves a template parameter, even if it doesn't meet the requirements for the more common kinds of dependence (dependent type, type-dependent expression, value-dependent expression). When we see an instantiation-dependent type, we know we always need to perform substitution into that instantiation-dependent type. This keeps us from short-circuiting evaluation in places where we shouldn't, and lets us properly implement C++0x [temp.type]p2. In theory, this would also allow us to properly mangle instantiation-dependent-but-not-dependent decltype types per the Itanium C++ ABI, but we aren't quite there because we still mangle based on the canonical type in cases like, e.g., template<unsigned> struct A { }; template<typename T> void f(A<sizeof(sizeof(decltype(T() + T())))>) { } template void f<int>(A<sizeof(sizeof(int))>); and therefore get the wrong answer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
935a70c1e76d78985f20d422940280161b941299 |
|
30-Jun-2011 |
Hans Wennborg <hans@hanshq.net> |
Fix off-by-one error in StringLiteral::getLocationOfByte. This fixes PR10223. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0d9106fc97cde979a995e26b18bcd2643f8afb55 |
|
22-Jun-2011 |
Manuel Klimek <klimek@google.com> |
Changes ParenListExpr to always require a type. Removes dead code found in the process. Adds a test to verify that ParenListExprs do not have NULL types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0b5810882bd34183c2b764676cafa4c2ce324740 |
|
21-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
A few tweaks to MaterializeTemporaryExpr suggested by John. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
14d251cd62942bf7d56bb87a267ba2ca2f7fae3e |
|
21-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a crash when a pointer-to-member function is called in the condition expression of '?:'. Add a test case for this pattern, and also test the code that led to the crash in a "working" case as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
03e80030515c800d1ab44125b9052dfffd1bd04c |
|
21-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new AST node describing reference binding to temporaries. MaterializeTemporaryExpr captures a reference binding to a temporary value, making explicit that the temporary value (a prvalue) needs to be materialized into memory so that its address can be used. The intended AST invariant here is that a reference will always bind to a glvalue, and MaterializeTemporaryExpr will be used to convert prvalues into glvalues for that binding to happen. For example, given const int& r = 1.0; The initializer of "r" will be a MaterializeTemporaryExpr whose subexpression is an implicit conversion from the double literal "1.0" to an integer value. IR generation benefits most from this new node, since it was previously guessing (badly) when to materialize temporaries for the purposes of reference binding. There are likely more refactoring and cleanups we could perform there, but the introduction of MaterializeTemporaryExpr fixes PR9565, a case where IR generation would effectively bind a const reference directly to a bitfield in a struct. Addresses <rdar://problem/9552231>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
65aa6885818d4b4eea2e5a9d12085b2398148662 |
|
21-Jun-2011 |
Jay Foad <jay.foad@gmail.com> |
Make more use of llvm::StringRef in various APIs. In particular, don't use the deprecated forms of llvm::StringMap::GetOrCreateValue(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b11382497a923b0d7009e85a1d8eb7bf93ec6d0d |
|
16-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Make the Stmt::Profile method const, and the StmtProfile visitor a ConstStmtVisitor. This also required adding some const iteration support for designated initializers and making some of the getters on the designators const. It also made the formatting of StmtProfile.cpp rather awkward. I'm happy to adjust any of the formatting if folks have suggestions. I've at least fitted it all within 80 columns. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133152 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f85e193739c953358c865005855253af4f68a497 |
|
16-Jun-2011 |
John McCall <rjmccall@apple.com> |
Automatic Reference Counting. Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7a614d8380297fcd2bc23986241905d97222948c |
|
11-Jun-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement support for C++11 in-class initialization of non-static data members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2f072b442879b8bba8c5dea11d7c61bedb1924ae |
|
09-Jun-2011 |
Hans Wennborg <hans@hanshq.net> |
Handle overloaded operators in ?: precedence warning This is a follow-up to r132565, and should address the rest of PR9969: Warn about cases such as int foo(A a, bool b) { return a + b ? 1 : 2; // user probably meant a + (b ? 1 : 2); } also when + is an overloaded operator call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ebc93e176dad36fa8a28dd3a36c5b3dc7630d87d |
|
12-May-2011 |
Eli Friedman <eli.friedman@gmail.com> |
PR9899: handle pseudo-destructors correctly in noexcept() expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131220 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
be57cf41fb55b48e3f889787960b3ac2eb5e4dbd |
|
11-May-2011 |
Eli Friedman <eli.friedman@gmail.com> |
PR9882: Fix noexcept to deal with dependent new, delete, calls, and dynamic_cast correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7f00f842aaf628c1b02c471a233184024511fedd |
|
02-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
I updated this constructor's interface, and didn't have to fix any callers. Shockingly enough, *there are none*! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3aa8140bde5b9bedf13e46ec0a668daa54814196 |
|
02-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Add an optional field attached to a DeclRefExpr which points back to the Decl actually found via name lookup & overload resolution when that Decl is different from the ValueDecl which is actually referenced by the expression. This can be used by AST consumers to correctly attribute references to the spelling location of a using declaration, and otherwise gain insight into the name resolution performed by Clang. The public interface to DRE is kept as narrow as possible: we provide a getFoundDecl() which always returns a NamedDecl, either the ValueDecl referenced or the new, more precise NamedDecl if present. This way AST clients can code against getFoundDecl without know when exactly the AST has a split representation. For an example of the data this provides consider: % cat x.cc namespace N1 { struct S {}; void f(const S&); } void test(N1::S s) { f(s); using N1::f; f(s); } % ./bin/clang -fsyntax-only -Xclang -ast-dump x.cc [...] void test(N1::S s) (CompoundStmt 0x5b02010 <x.cc:5:20, line:9:1> (CallExpr 0x5b01df0 <line:6:3, col:6> 'void' (ImplicitCastExpr 0x5b01dd8 <col:3> 'void (*)(const struct N1::S &)' <FunctionToPointerDecay> (DeclRefExpr 0x5b01d80 <col:3> 'void (const struct N1::S &)' lvalue Function 0x5b01a20 'f' 'void (const struct N1::S &)')) (ImplicitCastExpr 0x5b01e20 <col:5> 'const struct N1::S' lvalue <NoOp> (DeclRefExpr 0x5b01d58 <col:5> 'N1::S':'struct N1::S' lvalue ParmVar 0x5b01b60 's' 'N1::S':'struct N1::S'))) (DeclStmt 0x5b01ee0 <line:7:3, col:14> 0x5b01e40 "UsingN1::;") (CallExpr 0x5b01fc8 <line:8:3, col:6> 'void' (ImplicitCastExpr 0x5b01fb0 <col:3> 'void (*)(const struct N1::S &)' <FunctionToPointerDecay> (DeclRefExpr 0x5b01f80 <col:3> 'void (const struct N1::S &)' lvalue Function 0x5b01a20 'f' 'void (const struct N1::S &)' (UsingShadow 0x5b01ea0 'f'))) (ImplicitCastExpr 0x5b01ff8 <col:5> 'const struct N1::S' lvalue <NoOp> (DeclRefExpr 0x5b01f58 <col:5> 'N1::S':'struct N1::S' lvalue ParmVar 0x5b01b60 's' 'N1::S':'struct N1::S')))) Now we can tell that the second call is 'using' (no pun intended) the using declaration, and *which* using declaration it sees. Without this, we can mistake calls that go through using declarations for ADL calls, and have no way to attribute names looked up with using declarations to the appropriate UsingDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130670 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6857c3e12c86fd0271eb46baab5b18756a94f4cb |
|
02-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Remove the NameQualifier struct, which was just a wrapper around NestedNameSpecifierLoc. It predates when we had such an object. Reference the NNSLoc directly in DREs, and embed it directly into the MemberNameQualifier struct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7e740bd36772aae16b5cc5e605998ccc5eaf26db |
|
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Several cosmetic changes, no functionality changed. Mostly trailing whitespace so that me editor nuking it doesn't muddy the waters of subsequent commits that do change functionality. Also nukes a stray statement that was harmless but redundant that I introduced in r130666. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
cb66cff8fdf641f57f85dedb515a5f3240e3a9bb |
|
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Move the state bits in DeclRefExpr out of the pointer union and into a bitfield in the base class. DREs weren't using any bits here past the normal Expr bits, so we have plenty of room. This makes the common case of getting a Decl out of a DRE no longer need to do any masking etc. Also, while here, clean up code to use the accessor methods rather than directly poking these bits, and provide a nice comment for DREs that includes the information previously attached to the bits going into the pointer union. No functionality changed here, but DREs should be a tad faster now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
864c041e118155c2b1ce0ba36942a3da5a4a055e |
|
26-Apr-2011 |
John McCall <rjmccall@apple.com> |
Make yet another placeholder type, this one marking that an expression is a bound member function, i.e. something of the form 'x.f' where 'f' is a non-static member function. Diagnose this in the general case. Some of the new diagnostics are probably worse than the old ones, but we now get this right much more universally, and there's certainly room for improvement in the diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3e8dc2ac8926dfbebd8f2f6b74ceba4befccd4d2 |
|
21-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use the ArrayFiller to fill out "holes" in the array initializer due to designated initializers, avoiding to create separate Exprs for each one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4423ac0282acb8ba801eb05b38712438dc0c1e3e |
|
21-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
For double data[20000000] = {0}; we would blow out the memory by creating 20M Exprs to fill out the initializer. To fix this, if the initializer list initializes an array with more elements than there are initializers in the list, have InitListExpr store a single 'ArrayFiller' expression that specifies an expression to be used for value initialization of the rest of the elements. Fixes rdar://9275920. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f111d935722ed488144600cea5ed03a6b5069e8f |
|
15-Apr-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
C1X: implement generic selections As an extension, generic selection support has been added for all supported languages. The syntax is the same as for C1X. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3e2193ce5feb2feb092e5ae615e85148e06e9fd2 |
|
14-Apr-2011 |
Anders Carlsson <andersca@mac.com> |
Add a flag to StringLiteral to keep track of whether the string is a pascal string or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
755d8497e39071aa24acc173ff07083e3256b8f8 |
|
12-Apr-2011 |
John McCall <rjmccall@apple.com> |
After some discussion with Doug, we decided that it made a lot more sense for __unknown_anytype resolution to destructively modify the AST. So that's what it does now, which significantly simplifies some of the implementation. Normal member calls work pretty cleanly now, and I added support for propagating unknown-ness through &. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
379b5155b4566f63679e1da6b0ceb5fdfa2aec6d |
|
11-Apr-2011 |
John McCall <rjmccall@apple.com> |
More __unknown_anytype work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
575b374fdbfc2c2224fd3047ac11ffc4b8db9ae5 |
|
11-Apr-2011 |
Anders Carlsson <andersca@mac.com> |
Remove CK_DynamicToNull. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7d99bc37e77157523e3bfbc6c077842b74e6690f |
|
10-Apr-2011 |
Anders Carlsson <andersca@mac.com> |
As a first step towards fixing PR9641, add a CK_DynamicToNull cast kind which represents a dynamic cast where we know that the result is always null. For example: struct A { virtual ~A(); }; struct B final : A { }; struct C { }; bool f(B* b) { return dynamic_cast<C*>(b); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129256 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1de4d4e8cb2e9c88809fea8092bc6e835a5473d2 |
|
07-Apr-2011 |
John McCall <rjmccall@apple.com> |
Basic, untested implementation for an "unknown any" type requested by LLDB. The idea is that you can create a VarDecl with an unknown type, or a FunctionDecl with an unknown return type, and it will still be valid to access that object as long as you explicitly cast it at every use. I'm still going back and forth about how I want to test this effectively, but I wanted to go ahead and provide a skeletal implementation for the LLDB folks' benefit and because it also improves some diagnostic goodness for placeholder expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
24f4674e697fb53587f0e8485e9c6592f7021ef2 |
|
16-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added missing methods to get Designators source range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
8026f6d82f7fa544bc0453714fe94bca62a1196e |
|
13-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Instead of storing an ASTContext* in FunctionProtoTypes with computed noexcept specifiers, unique FunctionProtoTypes with a ContextualFoldingSet, as suggested by John McCall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
60618fa7f88d5162bb5b40988b6b38d4d75d6fc6 |
|
12-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Propagate the new exception information to FunctionProtoType. Change the interface to expose the new information and deal with the enormous fallout. Introduce the new ExceptionSpecificationType value EST_DynamicNone to more easily deal with empty throw specifications. Update the tests for noexcept and fix the various bugs uncovered, such as lack of tentative parsing support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f4e3cfbe8abd124be6341ef5d714819b4fbd9082 |
|
11-Mar-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Add support for the OpenCL vec_step operator, by generalising and extending the existing support for sizeof and alignof. Original patch by Guy Benyei. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
75e85048e73fcde2ce9d8a48dfdb1220e132eb59 |
|
02-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix the source range for a member access expression that includes a nested-name-specifier and improve the detection of implicit 'this' bases. Fixes <rdar://problem/8750392>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
fb7cb35fa0a8131853b1b049ca7be77980e144f5 |
|
01-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Don't warn about unused values in ternary ?: expressions unless both the LHS and RHS are "unused" (side-effect free). Patch by Justin Bogner! Fixes PR 8282. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
40d96a69c0e1e8c10f92d450c305a7aae696ca9c |
|
28-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Push nested-name-specifier location information into DeclRefExpr and MemberExpr, the last of the expressions with qualifiers! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2882eca5a184c78f793188083f6ce539740a5cf2 |
|
21-Feb-2011 |
John McCall <rjmccall@apple.com> |
Pseudo-revirtualize CallExpr::getSourceRange by making it follow the logic from CXXMemberCallExpr and by making it check for CXXOperatorCallExpr in order to defer. This is not really an awesome solution, but I don't have a better idea. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
82214a80c0163e01e4d8dec1426023c89277dbb4 |
|
19-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Initial steps to improve diagnostics when there is a NULL and a non-pointer on the two sides of a conditional expression. Patch by Stephen Hines and Mihai Rusu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
56ca35d396d8692c384c785f9aeebcf22563fe1e |
|
17-Feb-2011 |
John McCall <rjmccall@apple.com> |
Change the representation of GNU ?: expressions to use a different expression class and to bind the shared value using OpaqueValueExpr. This fixes an unnoticed problem with deserialization of these expressions where the deserialized form would lose the vital pointer-equality trait; or rather, it fixes it because this patch also does the right thing for deserializing OVEs. Change OVEs to not be a "temporary object" in the sense that copy elision is permitted. This new representation is not totally unawkward to work with, but I think that's really part and parcel with the semantics we're modelling here. In particular, it's much easier to fix things like the copy elision bug and to make the CFG look right. I've tried to update the analyzer to deal with this in at least some obvious cases, and I think we get a much better CFG out, but the printing of OpaqueValueExprs probably needs some work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e996ffd240f20a1048179d7727a6ee3227261921 |
|
16-Feb-2011 |
John McCall <rjmccall@apple.com> |
Save a copy expression for non-trivial copy constructions of catch variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7502c1d3ce8bb97bcc4f7bebef507040bd93b26f |
|
13-Feb-2011 |
John McCall <rjmccall@apple.com> |
Give some convenient idiomatic accessors to Stmt::child_range and Stmt::const_child_range, then make a bunch of places use them instead of the individual iterator accessors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
63c00d7f35fa060c0a446c9df3a4402d9c7757fe |
|
09-Feb-2011 |
John McCall <rjmccall@apple.com> |
Remove vtables from the Stmt hierarchy; this was pretty easy as there were only three virtual methods of any significance. The primary way to grab child iterators now is with Stmt::child_range children(); Stmt::const_child_range children() const; where a child_range is just a std::pair of iterators suitable for being llvm::tie'd to some locals. I've left the old child_begin() and child_end() accessors in place, but it's probably a substantial penalty to grab the iterators individually now, since the switch-based dispatch is kindof inherently slower than vtable dispatch. Grabbing them together is probably a slight win over the status quo, although of course we could've achieved that with vtables, too. I also reclassified SwitchCase (correctly) as an abstract Stmt class, which (as the first such class that wasn't an Expr subclass) required some fiddling in a few places. There are somewhat gross metaprogramming hooks in place to ensure that new statements/expressions continue to implement getSourceRange() and children(). I had to work around a recent clang bug; dgregor actually fixed it already, but I didn't want to introduce a selfhosting dependency on ToT. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
cc324ad80ab940efca006b0064f7ca70a6181816 |
|
08-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
AST: support for pre-arg expressions on CallExpr subclasses git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6b5a61b6dc400027fd793dcadceeb9da944a37ea |
|
07-Feb-2011 |
John McCall <rjmccall@apple.com> |
A few more tweaks to the blocks AST representation: - BlockDeclRefExprs always store VarDecls - BDREs no longer store copy expressions - BlockDecls now store a list of captured variables, information about how they're captured, and a copy expression if necessary With that in hand, change IR generation to use the captures data in blocks instead of walking the block independently. Additionally, optimize block layout by emitting fields in descending alignment order, with a heuristic for filling in words when alignment of the end of the block header is insufficient for the most aligned field. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
def0354384d9c4431f7b58b664b59896d4623028 |
|
04-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement proper (de-)serialization for explicit template argument lists with zero template arguments. Fixes some seriously scary crashers in C++ PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b608b987718c6d841115464f79ab2d1820a63e17 |
|
28-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Give OpaqueValueExpr a source location, because its source location might be queried in places where we absolutely require a valid location (e.g., for template instantiation). Fixes some major brokenness in the use of __is_convertible_to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ee8a6cafe8b69c316dd4fa5f6ea4838ffe15621c |
|
25-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In a ObjCMessageExpr with the super class as receiver, 'super' is actually a ObjCInterfaceType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d967e31ee796efff24b84b704a063634f6b55627 |
|
19-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Refactor the dependence computation for DeclRefExpr so that we can reuse it for BlockDeclRefExpr. Do so, fixing the dependence calculate for BlockDeclRefExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a779d9ca2fdf1247f65de0e6acf2870d8be53ccd |
|
19-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement basic support for the use of variadic templates and blocks together. In particular: - Handle the use of captured parameter pack names within blocks (BlockDeclRefExpr understands parameter packs now) - Handle the declaration and expansion of parameter packs within a block's parameter list, e.g., ^(Args ...args) { ... }) - Handle instantiation of blocks where the return type was not explicitly specified. (unrelated, but necessary for my tests). Together, these fixes should make blocks and variadic templates work reasonably well together. Note that BlockDeclRefExpr is still broken w.r.t. its computation of type and value dependence, which will still cause problems for blocks in templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f4c7371fb1d3cebcfb40abad4537bb82515704ea |
|
19-Jan-2011 |
John McCall <rjmccall@apple.com> |
Change QualType::getTypePtr() to return a const pointer, then change a thousand other things which were (generally inadvertantly) relying on that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4ba2a17694148e16eaa8d3917f657ffcd3667be4 |
|
12-Jan-2011 |
Jay Foad <jay.foad@gmail.com> |
PR3558: mark "logically const" accessor methods in ASTContext as const, and mark the fields they use as mutable. This allows us to remove a few const_casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1fe85ea697fb5c85acded3ac0ddbc19f89c2e181 |
|
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Add Decl::isParameterPack(), which covers both function and template parameter packs, along with ParmVarDecl::isParameterPack(), which looks for function parameter packs. Use these routines to fix some obvious FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
aa165f8458b51c546bebff947343e1a36f3594cb |
|
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Refactor the tree transform's many loops over sets of expressions (transforming each in turn) into calls into one central routine (TransformExprs) that transforms a list of expressions. This refactoring is preparatory work for pack expansions whose in an expression-list. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
10738d36b150aa65206890c1c845cdba076e4200 |
|
24-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Add an AST representation for non-type template parameter packs, e.g., template<typename T, unsigned ...Dims> struct multi_array; along with semantic analysis support for finding unexpanded non-type template parameter packs in types, expressions, and so on. Template instantiation involving non-type template parameter packs probably doesn't work yet. That'll come soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
bebbe0d9b7568ce43a464286bee49429489ef483 |
|
15-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Variadic templates: extend the Expr class with a bit that specifies whether the expression contains an unexpanded parameter pack, in the same vein as the changes to the Type hierarchy. Compute this bit within all of the Expr subclasses. This change required a bunch of reshuffling of dependency calculations, mainly to consolidate them inside the constructors and to fuse multiple loops that iterate over arguments to determine type dependence, value dependence, and (now) containment of unexpanded parameter packs. Again, testing is painfully sparse, because all of the diagnostics will change and it is more important to test the to-be-written visitor that collects unexpanded parameter packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e005d19456e6fb73ace33f25e02ac10e22dd063f |
|
10-Dec-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce ObjCMessageExpr::getReceiverRange() to get the source range of the receiver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f40f0d5a382395e0301d7dcbeaa2b8e90b8973b1 |
|
10-Dec-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Keep the source location of the selector in ObjCMessageExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f187237d916afa97c491ac32fe98be7d335c5b63 |
|
08-Dec-2010 |
Francois Pichet <pichet2000@gmail.com> |
Remove the TypesCompatibleExprClass AST node. Merge its functionality into BinaryTypeTraitExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4765fa05b5652fcc4356371c2f481d0ea9a1b007 |
|
06-Dec-2010 |
John McCall <rjmccall@apple.com> |
Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoretical reason this is limited to C++, and it's certainly not limited to temporaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9c5d70cee1fab3f988f9cd40316071b088a3f19d |
|
04-Dec-2010 |
John McCall <rjmccall@apple.com> |
Make IgnoreParenLValueCasts skip __extension__ nodes like IgnoreParens(). Abramo noticed this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f6a1648197562e0b133440d612d9af297d0a86cc |
|
04-Dec-2010 |
John McCall <rjmccall@apple.com> |
Although we currently have explicit lvalue-to-rvalue conversions, they're not actually frequently used, because ImpCastExprToType only creates a node if the types differ. So explicitly create an ICE in the lvalue-to-rvalue conversion code in DefaultFunctionArrayLvalueConversion() as well as several other new places, and consistently deal with the consequences throughout the compiler. In addition, introduce a new cast kind for loading an ObjCProperty l-value, and make sure we emit those nodes whenever an ObjCProperty l-value appears that's not on the LHS of an assignment operator. This breaks a couple of rewriter tests, which I've x-failed until future development occurs on the rewriter. Ted Kremenek kindly contributed the analyzer workarounds in this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
12f78a6741a4cb3d904340f8d3d2714568b50e7a |
|
02-Dec-2010 |
John McCall <rjmccall@apple.com> |
Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ObjCPropertyRefExpr into the latter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0ae287a498b8cec2086fe6b7e753cbb3df63e74a |
|
01-Dec-2010 |
John McCall <rjmccall@apple.com> |
Restore the lvalue-to-rvalue conversion patch with a minimal fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120555 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
20fbe7c4772d537c1f779b1ff89cbb57d1d9afff |
|
30-Nov-2010 |
John McCall <rjmccall@apple.com> |
L-value to r-value conversion is not ready for prime-time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7e4857931bfe27bb355275bc7ec1eaa44612dfff |
|
30-Nov-2010 |
John McCall <rjmccall@apple.com> |
Introduce an r-value to l-value cast kind. I'm not promising anything about the reliability of this yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f8b3015060096a946d91578d0f3b65d3097a4ebb |
|
28-Nov-2010 |
Anders Carlsson <andersca@mac.com> |
Look through parentheses when deciding whether an expr is a temporary object. Fixes PR8683. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120247 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7eb0a9eb0cde8444b97f9c5b713d9be7a6f1e607 |
|
24-Nov-2010 |
John McCall <rjmccall@apple.com> |
Switch a lot of call-sites over to using the new value-kind calculations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f89e55ab1bfb3ea997f8b02997c611a02254eb2d |
|
18-Nov-2010 |
John McCall <rjmccall@apple.com> |
Calculate the value kind of an expression when it's created and store it on the expression node. Also store an "object kind", which distinguishes ordinary "addressed" l-values (like variable references and pointer dereferences) and bitfield, @property, and vector-component l-values. Currently we're not using these for much, but I aim to switch pretty much everything calculating l-valueness over to them. For now they shouldn't necessarily be trusted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
08f92e3a5dead1f1ee656678a7f06e43279d6e50 |
|
17-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
a metric ton of refactoring later, Sema::getLocationOfStringLiteralByte no longer depends on Preprocessor, so we can move it out of Sema into a nice new StringLiteral::getLocationOfByte method that can be used by any AST client. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e2b768877b77fa4e00171ee6e6443722e0f3d111 |
|
16-Nov-2010 |
John McCall <rjmccall@apple.com> |
Kill CK_Unknown and flesh out the documentation for the existing CastKinds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7cd7d1ad33fdf49eef83942e8855fe20d95aa1b9 |
|
16-Nov-2010 |
John McCall <rjmccall@apple.com> |
Add a new expression kind, OpaqueValueExpr, which is useful for certain internal type-checking procedures as well as for representing certain implicitly-generated operations. Uses to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
daa8e4e888758d55a7a759dd4a91b83921cef222 |
|
15-Nov-2010 |
John McCall <rjmccall@apple.com> |
Assorted work leading towards the elimination of CK_Unknown. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f3ea8cfe6b1c2ef0702efe130561e9e66708d799 |
|
14-Nov-2010 |
John McCall <rjmccall@apple.com> |
Add a few more complex-related cast kinds that arise due to arbitrary implicit conversions; the last batch was specific to promotions. I think this is the full set we need. I do think dividing the cast kinds into floating and integral is probably a good idea. Annotate a *lot* more C casts with useful cast kinds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2bb5d00fcf71a7b4d478d478be778fff0494aff6 |
|
13-Nov-2010 |
John McCall <rjmccall@apple.com> |
Introduce five new cast kinds for various conversions into and between complex types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
404cd1669c3ba138a9ae0a619bd689cce5aae271 |
|
13-Nov-2010 |
John McCall <rjmccall@apple.com> |
Introduce a null-to-pointer implicit cast kind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c4ba51f365a3cd3374b3ef87272a9b3e517cd5d3 |
|
09-Nov-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix InitListExpr::getSourceRange() to work in the case of no locations for '(' and ')'. This can happen in the case of transparent unions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
11ab79030938209f50691acae0ddb65e72a58ca9 |
|
01-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Emit error when using a bound member function for something other than calling it. Also avoids IRGen crashes due to accepting invalid code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0f279e756e3df69f9e071c572805e5d3e89123a2 |
|
30-Oct-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Emit an error when trying to form a pointer-to-member to a bitfield. As a bonus, avoids a crash on the IRGen side due to accepting invalid code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3248854a5d16e1de17c58e05f726bdef9f042df2 |
|
30-Oct-2010 |
Chris Lattner <sabre@nondot.org> |
Rename alignof -> alignOf to avoid irritating C++'0x compilers, PR8423 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117775 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
8e6285af719adc6f86d6faa235d22a08eb68ee3a |
|
26-Oct-2010 |
John McCall <rjmccall@apple.com> |
Optimize field space usage in CompoundStmt, LabelStmt, Expr, and CastExpr. There's probably still significant padding waste on x86-64 UNIXen, but the difference in 32-bit compiles should be significant. There are a lot of Expr nodes left that could lose a word this way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b9eb35ced8369c8c8479efc17712faaf34e16c56 |
|
15-Oct-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Treat __extension__ like ParenExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116569 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
8ac2d449820fd0df00fcbde5bf82165c1f49854d |
|
14-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Eliminate usage of ObjCSuperExpr used for 'super' as receiver of property or a setter/getter methods. //rdar: //8525788 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116483 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ff3a078d2a67db9ae6ff4cc0f799a209f85a4e91 |
|
28-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to support transparent_union arguments passed to nonnull attributed functions. Implements radar 6857843. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114917 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
db148be93c9af45da1f3aa9302c577618a56e6ea |
|
27-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Copying result of object property reference expression into a temporary is elidable as well. (Finishes up radar 8291337). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
5cadfab3f2e7660453211eb0e00314bd40d93014 |
|
27-Sep-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed isConstantInitializer for __builtin_choose_expr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d2827af6f96d441d72315dbe6d8505c3be0f2aa6 |
|
19-Sep-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Warn when an expression result in a LabelStmt is unused. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
19e60ad937af50843a653fa19c8be6a83a64f24f |
|
16-Sep-2010 |
John McCall <rjmccall@apple.com> |
Right, there are *two* cases of pr-value class-type expressions that don't derive from temporaries of the same type. Black-list member expressions as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
58277b57f9492d0234748be89bcad48b322c5cf7 |
|
15-Sep-2010 |
John McCall <rjmccall@apple.com> |
Tweak comment as suggested by Sebastian. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
558d2abc7f9fd6801cc7677200992313ae90b5d8 |
|
15-Sep-2010 |
John McCall <rjmccall@apple.com> |
one piece of code is responsible for the lifetime of every aggregate slot. The easiest way to do that was to bundle up the information we care about for aggregate slots into a new structure which demands that its creators at least consider the question. I could probably be convinced that the ObjC 'needs GC' bit should be rolled into this structure. Implement generalized copy elision. The main obstacle here is that IR-generation must be much more careful about making sure that exactly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0b34cf7399e61ef33dc5a3af405351822eeb5f3e |
|
11-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Test destructors in delete expressions and of temporaries for throwing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
5221d8f2da008689f7ff9476e6522bb2b63ec1a3 |
|
11-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Address Doug's comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
295995c9c3196416372c9cd35d9cedb6da37bd3d |
|
10-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
First version of a testcase, plus fixes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
369e51fa400aeb5835bb9af4634ea516c11429a7 |
|
10-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement Expr::CanThrow, a function that applies the noexcept operator rules to expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
200121569dc6cff10a1fb6ed7500098770b9dd25 |
|
10-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make CallExpr::getCalleeDecl look through pointer derefs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9996a7f06a3c5b4554692e7177930cf4e8ef09af |
|
28-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix the memory leak of FloatingLiteral/IntegerLiteral. 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112361 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2de56d1d0c3a504ad1529de2677628bdfbb95cd4 |
|
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
GCC didn't care for my attempt at API compatibility, so brute-force everything to the new constants. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112047 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
5baba9d98364a3525d6afa15a04cdad82fd6dd30 |
|
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
More incremental progress towards not including Expr.h in Sema.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
096832c5ed5b9106fa177ebc148489760c3bc496 |
|
20-Aug-2010 |
John McCall <rjmccall@apple.com> |
Regularize the API for accessing explicit template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
de7e66256b1bdfcf6526994825a8c8fced52a31c |
|
13-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Zap unused UnaryOperator::OffsetOf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2577743c5650c646fb705df01403707e94f2df04 |
|
12-Aug-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added locations and type source info for DeclarationName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
569c3166874324c24011f8ade6978421f0d39b3c |
|
07-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Allow reference binding of a reference of Objective-C object type to an lvalue of another, compatible Objective-C object type (e.g., a subclass). Introduce a new initialization sequence step kind to describe this binding, along with a new cast kind. Fixes PR7741. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110513 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f871d0cc377a1367b519a6cce26be74607566eba |
|
07-Aug-2010 |
John McCall <rjmccall@apple.com> |
Store inheritance paths after CastExprs instead of inside them. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4204f07fc8bffe6d320b2de95fea274ccf37a17b |
|
02-Aug-2010 |
John McCall <rjmccall@apple.com> |
Further adjustments to -Wglobal-constructors; works for references and direct initializations now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110063 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b4b9b15c597a923a03ad0a33cdc49b67e5cc4450 |
|
01-Aug-2010 |
John McCall <rjmccall@apple.com> |
Kill off RequiresGlobalConstructor in favor of isConstantInitializer. Note some obvious false positives in the test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ff331c15729f7d4439d253c97f4d60f2a7ffd0c6 |
|
25-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove the vast majority of the Destroy methods from the AST library, since we aren't going to be calling them ever. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
906082edf2aea1c6de2926f93a8d7121e49d2a54 |
|
20-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Update ImplicitCastExpr to be able to represent an XValue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e39a3894513349908cdb3beba2614e53cb288e6c |
|
14-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new cast kind for an "lvalue bitcast", which handles reinterpret_casts (possibly indirectly via C-style/functional casts) on values, e.g., int i; reinterpret_cast<short&>(i); The IR generated for this is essentially the same as for *reinterpret_cast<short*>(&i). Fixes PR6437, PR7593, and PR7344. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
5291c3cec0dbe8ad1d8e7e67e93af2b1586d5400 |
|
13-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
When forming a function call or message send expression, be sure to 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
663e380d7b2de2bbf20e886e05371195bea9adc4 |
|
08-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Read/write the C++ parts of DeclRefExpr and MemberExpr for PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
25973455aed1cdc9c40b208c792b5db4f8f1297d |
|
30-Jun-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix rdar://8139785 "implement warning on dead expression in comma operator" As a bonus, fix the warning for || and && operators; it was emitted even if one of the operands had side effects, e.g: x || test_logical_foo1(); emitted a bogus "expression result unused" for 'x'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2111c855343a0530e236bf0862358ec8d67b28f3 |
|
28-Jun-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Introduce Expr::Classify and Expr::ClassifyModifiable, which determine the classification of an expression under the C++0x taxology (value category). Reimplement isLvalue and isModifiableLvalue using these functions. No regressions in the test suite from this, and my rough performance check doesn't show any regressions either. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
8dfbd8b252ba4e6cf4b7a3422f6ef0ca21312dfe |
|
24-Jun-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Support a couple more C++ Exprs for PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
949bd4b611f4be575d63da36c94c3662dfa4d459 |
|
17-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Do not treat @selector as lvalue (unlike g++). Patch by Nico Weber (pr7390). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
03b2960c14aede6ac82bdef32247094ebb72fa69 |
|
17-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-c++ IRGen. Support for @selector expression as an lvalue. Fixes PR7390. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9d3347a5887d2d25afe8b0bd35783a72ec86cce2 |
|
16-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Give Type::isIntegralType() an ASTContext parameter, so that it provides C "integer type" semantics in C and C++ "integral type" semantics in C++. Note that I still need to update isIntegerType (and possibly other predicates) using the same approach I've taken for isIntegralType(). The two should have the same meaning, but currently don't (!). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2ade35e2cfd554e49d35a52047cea98a82787af9 |
|
16-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce Type::isIntegralOrEnumerationType(), to cover those places in C++ that involve both integral and enumeration types. Convert all of the callers to Type::isIntegralType() that are meant to work with both integral and enumeration types over to Type::isIntegralOrEnumerationType(), to prepare to eliminate enumeration types as integral types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6907fbe758d23e1aec4c0a67e7b633d1d855feb4 |
|
12-Jun-2010 |
John McCall <rjmccall@apple.com> |
When deciding whether an expression has the boolean nature, don't look through explicit casts. Fixes PR7359. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c12c5bba6ceb6acd4e51e7a0fc03257da9cfd44e |
|
15-May-2010 |
John McCall <rjmccall@apple.com> |
Substantially alter the design of the Objective C type AST by introducing ObjCObjectType, which is basically just a pair of one of {primitive-id, primitive-Class, user-defined @class} with a list of protocols. An ObjCObjectPointerType is therefore just a pointer which always points to one of these types (possibly sugared). ObjCInterfaceType is now just a kind of ObjCObjectType which happens to not carry any protocols. Alter a rather large number of use sites to use ObjCObjectType instead of ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather than hashing them in a FoldingSet. Remove some number of methods that are no longer used, at least after this patch. By simplifying ObjCObjectPointerType, we are now able to easily remove and apply pointers to Objective-C types, which is crucial for a certain kind of ObjC++ metaprogramming common in WebKit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
bef0efd11bc4430a3ee437a3213cec5c18af855a |
|
13-May-2010 |
Chris Lattner <sabre@nondot.org> |
add a couple of key functions for classes without them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
85bcd9920582f4d3879d8fbbaf4ca4fe09690160 |
|
11-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Static data members intialized in-class that have constant values are value-dependent if their initializers are value-dependent; my recent tweak to these dependent rules overstepped by taking away this value-dependents. Fixes a Boost.GIL regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7ed5bd3e27a6f2b37ee0449aa818116cbd03306e |
|
11-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix indentation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
bb6e73fcf60fa5a4cc36c14744dc366b658443b5 |
|
11-May-2010 |
Douglas Gregor <dgregor@apple.com> |
A DeclRefExpr that refers to a member function or a static data member of the current instantiation is value-dependent. The C++ standard fails to enumerate this case and, therefore, we missed it. Chandler did all of the hard work of reducing the last remaining Boost.PtrContainer failure (which had to do with static initialization in the Serialization library) down to this simple little test. While I'm at it, clean up the dependence rules for template arguments that are declarations, and implement the dependence rules for template argument packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c6dfe194f623b02c123759f235b504d4850fc178 |
|
09-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't complain about an __builtin_va_arg expression's result being unused, since the operation has side effects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d905f5ad540c415d1a21b4f8b7bd715bfb7bb920 |
|
07-May-2010 |
John McCall <rjmccall@apple.com> |
Move CheckICE and isIntegerConstantExpr to ExprConstant.cpp because it seemed like a good idea at the time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2fc46bf1a9bc31d50f82de37c70ea257d3cded27 |
|
06-May-2010 |
John McCall <rjmccall@apple.com> |
Add IgnoreParenImpCasts() to Expr, which is basically like IgnoreParenCasts except it only skips implicit casts. Also fix ObjCImplicitGetterSetterRefExpr's child_begin to skip the base expression if it's actually a type reference (which you get with static property references). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103132 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4bfe1968410ea8ffe3b4f629addd7c4bcf484765 |
|
05-May-2010 |
Sean Hunt <rideau3@gmail.com> |
Reapplying patch to change StmtNodes.def to StmtNodes.td, this time with no whitespace. This will allow statements to be referred to in attribute TableGen files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c302113179a1c2b1254224ea9b6f5316ceeb375c |
|
05-May-2010 |
Sean Hunt <rideau3@gmail.com> |
Revert r103072; I accidentally ended up deleting a bunch of trailing whitespace which makes this patch unreadable. Will recommit without the whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9d90d62e1661720d9cf533290b4227c4fde780a4 |
|
05-May-2010 |
Sean Hunt <rideau3@gmail.com> |
Change StmtNodes.def to StmtNodes.td in anticipation of a rewrite of attributes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
72be24f39c162448e53dd73cf57cc6357114361e |
|
30-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a thinko that caused us not to compute __builtin_offset as a constant expression in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ad4e02f1711e5e90f4e653397b626e0d1929002c |
|
29-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When determining a standard conversion sequence involves resolving the address of an overloaded function (or function template), perform that resolution prior to determining the implicit conversion sequence. This resolution is not part of the implicit conversion sequence itself. Previously, we would always consider this resolution to be a function pointer decay, which was a lie: there might be an explicit & in the expression, in which case decay should not occur. This caused the CodeGen assertion in PR6973 (where we created a pointer to a pointer to a function when we should have had a pointer to a function), but it's likely that there are corner cases of overload resolution where this would have failed. Cleaned up the code involved in determining the type that will produced afer resolving the overloaded function reference, and added an assertion to make sure the result is correct. Fixes PR6973. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
8ecdb65716cd7914ffb2eeee993fa9039fcd31e8 |
|
29-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Completely reimplement __builtin_offsetof, based on a patch by Roberto Amadini. This change introduces a new expression node type, OffsetOfExpr, that describes __builtin_offsetof. Previously, __builtin_offsetof was implemented using a unary operator whose subexpression involved various synthesized array-subscript and member-reference expressions, which was ugly and made it very hard to instantiate as a template. OffsetOfExpr represents the AST more faithfully, with proper type source information and a more compact representation. OffsetOfExpr also has support for dependent __builtin_offsetof expressions; it can be value-dependent, but will never be type-dependent (like sizeof or alignof). This commit introduces template instantiation for __builtin_offsetof as well. There are two major caveats to this patch: 1) CodeGen cannot handle the case where __builtin_offsetof is not a constant expression, so it produces an error. So, to avoid regressing in C, we retain the old UnaryOperator-based __builtin_offsetof implementation in C while using the shiny new OffsetOfExpr implementation in C++. The old implementation can go away once we have proper CodeGen support for this case, which we expect won't cause much trouble in C++. 2) __builtin_offsetof doesn't work well with non-POD class types, particularly when the designated field is found within a base class. I will address this in a subsequent patch. Fixes PR5880 and a bunch of assertions when building Boost.Python tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
049c51eadcfed8ae8636f9591f4c4c020399eacd |
|
27-Apr-2010 |
Enea Zaffanella <zaffanella@cs.unipr.it> |
Wrap a couple of long lines. (Test commit.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f1b48b7014992155286d58bb1676f9f51031d18b |
|
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
CastExpr should not hold a pointer to the base path. More cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7ab9d574d27ecee1f130e5755aa403e5ab529b6b |
|
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Rename InheritancePath to BasePath, rename CastExpr::CXXBaseVector to CXXBaseSpecifierArray. More to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102245 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a3bddeda81ca784bed5501d79e1e7c53befaa91d |
|
23-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Destroy the inheritance path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
92e986e0adb79e8a47f738bd608e6c97c547641d |
|
22-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for Objective-C++ message sends. We support dependent receivers for class and instance messages, along with dependent message arguments (of course), and check as much as we can at template definition time. This commit also deals with a subtle aspect of template instantiation in Objective-C++, where the type 'T *' can morph from a dependent PointerType into a non-dependent ObjCObjectPointer type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d8383d45e41ba2316610e5d638d2872e37b67cfb |
|
21-Apr-2010 |
Zhongxing Xu <xuzhongxing@gmail.com> |
CXXNamedCastExpr is actually an abstract expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
04badcf84c8d504d8491c7c7e29b58f52cb16640 |
|
21-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Overhaul the AST representation of Objective-C message send expressions, to improve source-location information, clarify the actual receiver of the message, and pave the way for proper C++ support. The ObjCMessageExpr node represents four different kinds of message sends in a single AST node: 1) Send to a object instance described by an expression (e.g., [x method:5]) 2) Send to a class described by the class name (e.g., [NSString method:5]) 3) Send to a superclass class (e.g, [super method:5] in class method) 4) Send to a superclass instance (e.g., [super method:5] in instance method) Previously these four cases where tangled together. Now, they have more distinct representations. Specific changes: 1) Unchanged; the object instance is represented by an Expr*. 2) Previously stored the ObjCInterfaceDecl* referring to the class receiving the message. Now stores a TypeSourceInfo* so that we know how the class was spelled. This both maintains typedef information and opens the door for more complicated C++ types (e.g., dependent types). There was an alternative, unused representation of these sends by naming the class via an IdentifierInfo *. In practice, we either had an ObjCInterfaceDecl *, from which we would get the IdentifierInfo *, or we fell into the case below... 3) Previously represented by a class message whose IdentifierInfo * referred to "super". Sema and CodeGen would use isStr("super") to determine if they had a send to super. Now represented as a "class super" send, where we have both the location of the "super" keyword and the ObjCInterfaceDecl* of the superclass we're targetting (statically). 4) Previously represented by an instance message whose receiver is a an ObjCSuperExpr, which Sema and CodeGen would check for via isa<ObjCSuperExpr>(). Now represented as an "instance super" send, where we have both the location of the "super" keyword and the ObjCInterfaceDecl* of the superclass we're targetting (statically). Note that ObjCSuperExpr only has one remaining use in the AST, which is for "super.prop" references. The new representation of ObjCMessageExpr is 2 pointers smaller than the old one, since it combines more storage. It also eliminates a leak when we loaded message-send expressions from a precompiled header. The representation also feels much cleaner to me; comments welcome! This patch attempts to maintain the same semantics we previously had with Objective-C message sends. In several places, there are massive changes that boil down to simply replacing a nested-if structure such as: if (message has a receiver expression) { // instance message if (isa<ObjCSuperExpr>(...)) { // send to super } else { // send to an object } } else { // class message if (name->isStr("super")) { // class send to super } else { // send to class } } with a switch switch (E->getReceiverKind()) { case ObjCMessageExpr::SuperInstance: ... case ObjCMessageExpr::Instance: ... case ObjCMessageExpr::SuperClass: ... case ObjCMessageExpr::Class:... } There are quite a few places (particularly in the checkers) where send-to-super is effectively ignored. I've placed FIXMEs in most of them, and attempted to address send-to-super in a reasonable way. This could use some review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
900fc6388e803868a34b9483510c345e9b49d7eb |
|
17-Apr-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream. The next step is to print the name directly into the stream, avoiding a temporary std::string copy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2b334bb3126a67895813e49e6228dad4aec0b4d6 |
|
17-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
make our existing "switch on bool" warning work for C. Since the result of comparisons are 'int' in C, it doesn't work to test just the result type of the expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
709210feee317b8d6690dd1d15c2b74cfe55e261 |
|
14-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Use ASTVector instead of std::vector for the Exprs in InitListExpr. Performance measurements of '-fsyntax-only' on combine.c (403.gcc) shows no real performance change, but now the vector isn't leaked. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c46a246f5fb00bf8448a1081e7d7e73bb6dbfbf5 |
|
07-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Don't emit an 'unused expression' warning for '||' and '&&' expressions that contain assignments or similar side-effects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
161755a09898c95d21bfff33707da9ca41cd53c5 |
|
06-Apr-2010 |
John McCall <rjmccall@apple.com> |
Implement the protected access restriction ([class.protected]), which requires that protected members be used on objects of types which derive from the naming class of the lookup. My first N attempts at this were poorly-founded, largely because the standard is very badly worded here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2f59979a7cc7929f53c9984423b0abeb83113442 |
|
02-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Rework our handling of copy construction of temporaries, which was a poor (and wrong) approximation of the actual rules governing when to build a copy and when it can be elided. The correct implementation is actually simpler than the approximation. When we only enumerate constructors as part of initialization (e.g., for direct initialization or when we're copying from a class type or one of its derived classes), we don't create a copy. When we enumerate all conversion functions, we do create a copy. Before, we created some extra copies and missed some others. The new test copy-initialization.cpp shows a case where we missed creating a (required, non-elidable) copy as part of a user-defined conversion, which resulted in a miscompile. This commit also fixes PR6757, where the missing copy made us reject well-formed code in the ternary operator. This commit also cleans up our handling of copy elision in the case where we create an extra copy of a temporary object, which became necessary now that we produce the right copies. The code that seeks to find the temporary object being copied has moved into Expr::getTemporaryObject(); it used to have two different not-quite-the-same implementations, one in Sema and one in CodeGen. Note that we still do not attempt to perform the named return value optimization, so we miss copy elisions for return values and throw expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100196 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
db2eb5abf4c082d1f0c5c45e39d8cd0300f81e38 |
|
31-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove the AST statistics tracking I added yesterday; it didn't pan out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
23cba801e11b03929c44f8cf54578305963a3476 |
|
31-Mar-2010 |
John McCall <rjmccall@apple.com> |
Introduce a new kind of derived-to-base cast which bypasses the need for null checks, and make sure we elide null checks when accessing base class members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6bb8017bb9e828d118e15e59d71c66bba323c364 |
|
30-Mar-2010 |
John McCall <rjmccall@apple.com> |
Propagate the "found declaration" (i.e. the using declaration instead of the underlying/instantiated decl) through a lot of API, including "intermediate" MemberExprs required for (e.g.) template instantiation. This is necessary because of the access semantics of member accesses to using declarations: only the base class *containing the using decl* need be accessible from the naming class. This allows us to complete an access-controlled selfhost, if there are no recent regressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f540305c5d834ad9412b41805b81a74249b7c5af |
|
30-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce new AST statistics that keep track of the number of isa (or dyn_cast) invocations for C++ and Objective-C types, declarations, expressions, and statements. The statistics will be printed when -print-stats is provided to Clang -cc1, with results such as: 277073 clang - Number of checks for C++ declaration nodes 13311 clang - Number of checks for C++ expression nodes 18 clang - Number of checks for C++ statement nodes 174182 clang - Number of checks for C++ type nodes 92300 clang - Number of checks for Objective-C declaration nodes 9800 clang - Number of checks for Objective-C expression nodes 7 clang - Number of checks for Objective-C statement nodes 65733 clang - Number of checks for Objective-C type nodes The statistics are only gathered when NDEBUG is not defined, since they introduce potentially-expensive operations into very low-level routines (isa). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f031774aa2638b4d3f487e7e44180c1f89b867ef |
|
30-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Add Support for 'warn_unused_result" attribute on objective-c methods. (radar 7418262). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b03d33edaf24af2893a50caee4d2c99839242c44 |
|
18-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Make PredefinedExpr::ComputeName() more robust to incorrect code when we are printing the name of an Objective-C method whose class has not been declared. Fixes <rdar://problem/7495713>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98874 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
90c71268f04369328e8f579007b8b4f1da9feea0 |
|
18-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Some cleanup, change diagnostic when assigning to a property which is not lvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0faede6f31b07bcec7b776f2b420c3ea9bb3e58c |
|
12-Mar-2010 |
John McCall <rjmccall@apple.com> |
Improve the unused-value check to look into comma expressions and filter out voids in sub-expressions. Patch by Mike M! Fixes PR4806. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7c2342dd4c9947806842e5aca3d2bb2e542853c9 |
|
10-Mar-2010 |
John McCall <rjmccall@apple.com> |
When pretty-printing tag types, only print the tag if we're in C (and therefore not creating ElaboratedTypes, which are still pretty-printed with the written tag). Most of these testcase changes were done by script, so don't feel too sorry for my fingers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c2350e553b853ad00914faf23fa731e5fc4a8a5c |
|
08-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Extend ObjCMessageExpr for class method sends with the source location of the class name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f604a5648d201d2350e1631a755121e9b837f9f2 |
|
24-Feb-2010 |
John McCall <rjmccall@apple.com> |
References to const int parameters with ICE default arguments are not ICEs. Fixes PR6373. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ba7bc5584b8d46f4e8deb3a9d363256908fa86ea |
|
19-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Revert: "Change InitListExpr to allocate the array for holding references" This was causing buildbot breakage. This reverts commit d46e952cc8cb8d9eed8657d9a0b267910a0f745a. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9f9269e810bfe9aea0a57b09250be215808fc1a2 |
|
19-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Change InitListExpr to allocate the array for holding references to initializer expressions in an array allocated using ASTContext. This plugs a memory leak when ASTContext uses a BumpPtrAllocator to allocate memory for AST nodes. In my mind this isn't an ideal solution; it would be nice to have a general "vector"-like class that allocates memory using ASTContext, but whose guts could be separated from the methods of InitListExpr itself. I haven't gone and taken this approach yet because it isn't clear yet if we'll eventually want an alternate solution for recylcing memory using by InitListExprs as we are constructing the ASTs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e873fb74219f48407ae0b8fa083aa7f0b6ff1427 |
|
16-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new kind of failed result for isLvalue/isModifiableLvalue which describes temporary objects of class type in C++. Use this to provide a more-specific, remappable diagnostic when takin the address of such a temporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
bf0ee354163f87623a4b60412544243911332343 |
|
16-Feb-2010 |
John McCall <rjmccall@apple.com> |
White-list comma expressions with the literal 0 as their RHS against unused-value warnings. This is a common macro idiom. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2d901df3940ec1e63a0f9e846f5db3152698b6fb |
|
12-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't error when setting a sub-structure variable via objc properties in objective-c++ mode (do it for objective-c only). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
eb3b324800598cc3d5385fbad95ae5cff2c79113 |
|
11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Allocate the SubExprs array in ObjCMessageExpr using the allocator associated with ASTContext. This fixes yet another leak (<rdar://problem/7639260>). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
848fa64143fbe5ae62a601ad61277f741e54dfab |
|
11-Feb-2010 |
Anders Carlsson <andersca@mac.com> |
More vtable layout dumper improvements. Handle destructors, dump the complete function type of the member functions (using PredefinedExpr::ComputeName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e9ff443040cb571ae2c5c2626c4dc9a9a812d84a |
|
11-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose when user provided getter is being used as lvalue using property dot-syntax. Fixes radar 7628953. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1f1b3b3bdec84e2204f18732e3241f6907a17309 |
|
06-Feb-2010 |
John McCall <rjmccall@apple.com> |
Per discussion, remove the explicit restriction on static const data members with out-of-line initializers as integer constant expressions. Fixes PR6206. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6d5a1c28593443f3973ef38f8fa042d59182412d |
|
03-Feb-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert "Numerous changes to selector handling:", this breaks a whole bunch of working code, for no apparent reason. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a8fa96e366ab36145a5500dd4fbea717c217f131 |
|
03-Feb-2010 |
David Chisnall <csdavec@swan.ac.uk> |
Numerous changes to selector handling: - Don't use GlobalAliases with non-0 GEPs (GNU runtime) - this was unsupported and LLVM will be generating errors if you do it soon. This also simplifies the code generated by the GNU runtime a bit. - Make GetSelector() return a constant (GNU runtime), not a load of a store of a constant. - Recognise @selector() expressions as valid static initialisers (as GCC does). - Add methods to GCObjCRuntime to emit selectors as constants (needed for using @selector() expressions as constants. These need implementing for the Mac runtimes - I couldn't figure out how to do this, they seem to require a load. - Store an ObjCMethodDecl in an ObjCSelectorExpr so that we can get at the type information for the selector. This is needed for generating typed selectors from @selector() expressions (as GCC does). Ideally, this information should be stored in the Selector, but that would be an invasive change. We should eventually add checks for common uses of @selector() expressions. Possibly adding an attribute that can be applied to method args providing the types of a selector so, for example, you'd do something like this: - (id)performSelector: __attribute__((selector_types(id, SEL, id)))(SEL) withObject: (id)object; Then, any @selector() expressions passed to the method will be check to ensure that it conforms to this signature. We do this at run time on the GNU runtime already, but it would be nice to do it at compile time on all runtimes. - Made @selector() expressions emit type info if available and the runtime supports it. Someone more familiar with the Mac runtime needs to implement the GetConstantSelector() function in CGObjCMac. This currently just assert()s. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
09cc141c89a5e9f305c17d7a88298647df16cedd |
|
03-Feb-2010 |
John McCall <rjmccall@apple.com> |
Remove abstract expression kinds from the StmtClass enum. Update a few users appropriately. Call out a few missing cases in the expression mangler. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
31310a21fb2a9f13950f864f681c86080b05d5b2 |
|
01-Feb-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
In C++, an initializer on a variable doesn't necessarily mean it's the definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
093802675b1548f2a5f44c29938d65cce00d58bb |
|
31-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Diagnose binding a non-const reference to a vector element. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
de4b1d86bf48bc2a84bddf6b188f6da53eaea845 |
|
29-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix reference binding of const lvalue references to bit-fields, which requires a temporary. Previously, we were building an initialization sequence that bound to the bit-field as if it were a real lvalue. Note that we previously (and still) diagnose binding of non-const references to bit-fields, as we should. There's no real way to test that this code is correct, since reference binding does not *currently* have any representation in the AST. This fix should make it easier for that to happen, so I've verified this fix with... Added InitializationSequence::dump(), to print an initialization sequence for debugging purposes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
eb60edffa147e061278c436e513b0df9b4c4e7f6 |
|
29-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Add an CXXBindReferenceExpr (not used just yet). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
501edb6a54524555ad27fbf41a7920dc756b08c6 |
|
15-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When determining whether a DeclRefExpr is value-dependent when it references a const variable of integral type, the initializer may be in a different declaration than the one that name-lookup saw. Find the initializer anyway. Fixes PR6045. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
319d57f21600dd2c4d52ccc27bd12ce260b174e7 |
|
07-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Move the allocation of designators in DesignatedInitExpr to the ASTContext. Fixes <rdar://problem/7495428>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2333f7727f97018d6742e1e0938133bcfad967ab |
|
30-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure to explicitly pass type/value dependence to Expr constructor. This caught several cases where we were not doing the right thing. I'm not completely sure all cases are being handled correctly, but this should be an improvement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4eadcc569223135e13353c9381b448986e3f7053 |
|
27-Dec-2009 |
Sam Weinig <sam.weinig@gmail.com> |
Fix for PR5872. Add static specifier and const/volatile qualifiers to member functions in __PRETTY_FUNCTION__ predefined expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
cb1c77f90d4e747b83a0d0cc125dc01567378f82 |
|
24-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
support the warn_unused_result in C++ class methods git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
caabf9bf331156e96dacb072385901fdfa057ec1 |
|
21-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
indentation fix git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d20254f2875d0004c57ee766f258dbcee29f4841 |
|
21-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix PR4010: add support for the warn_unused_result for function pointers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91803 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2d48e7811216b2a2d15dcf7e4be8f73ad48cc60a |
|
19-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
A CXXExprWithTemporaries expression is an lvalue if its subexpression is an lvalue. Fixes PR5787. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2514a309204341798f96912ce7a90841bea59727 |
|
16-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose attempting to assign to a sub-structure of an ivar using objective-c property. (fixes radar 7449707) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6eef519fc8a97bb7ca6066f23d35e10f06b2c1b5 |
|
14-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve template instantiation for object constructions in several ways: - During instantiation, drop default arguments from constructor and call expressions; they'll be recomputed anyway, and we don't want to instantiate them twice. - Rewrote the instantiation of variable initializers to cope with non-dependent forms properly. Together, these fix a handful of problems I introduced with the switch to always rebuild expressions from the source code "as written." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9f61aa9e280adea9fbf3365f0e4f6ed568c9885a |
|
12-Dec-2009 |
Jeffrey Yasskin <jyasskin@google.com> |
Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave no extra safety anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3b27f1a80e4e433b503efd344c909eeafaa9033c |
|
11-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to allow C-style cast from 'void *' to block pointer type. (fixes radar 7465023). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
820bca41c3899374775d2a1dfc2ef2e22aaf1c7b |
|
10-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Code gen for ObjCIsaExpr AST used as lvalue. (fixes radar 7457534). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4cbf9d43cc47bb7a070c5c5026521d7d6a8f73c7 |
|
09-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Added a missing case to a switch statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
dbd872f273a8dbf22e089b3def6c09f0a460965d |
|
08-Dec-2009 |
John McCall <rjmccall@apple.com> |
DeclRefExpr stores a ValueDecl internally. Template instantiation can re-use DeclRefExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3a1ce1ed0f5686384e712837bad28c576622e442 |
|
07-Dec-2009 |
Sam Weinig <sam.weinig@gmail.com> |
Don't print a void return type for C++ constructors and destructors when generating a predefined expr for them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90725 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f595cc41c4d95fe323f8a2b209523de9956f874d |
|
04-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make the type of the Decl referred to by a MemberExpr a bit more precise. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c013118155077cf8bdaef743c5dbce760114eed3 |
|
03-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add recursion guards to ice-checking and evaluation for declrefs, so we don't infinitely recurse for cases we can't evaluate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
51fa86f738a9768fac4e1cad7bdde53774b5b322 |
|
02-Dec-2009 |
John McCall <rjmccall@apple.com> |
r90313, in which OverloadedFunctionDecl is removed and never spoken of again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
129e2df52ed7e0434b3f1cf1867fd6a5cb083ff6 |
|
30-Nov-2009 |
John McCall <rjmccall@apple.com> |
Eliminate the use of OverloadedFunctionDecl in member expressions. Create a new UnresolvedMemberExpr for these lookups. Assorted hackery around qualified member expressions; this will all go away when we implement the correct (i.e. extremely delayed) implicit-member semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
99e9b4d172f6877e6ba5ebe75bb8238721f5e01c |
|
25-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate CXXConditionDeclExpr with extreme prejudice. All statements that involve conditions can now hold on to a separate condition declaration (a VarDecl), and will use a DeclRefExpr referring to that VarDecl for the condition expression. ForStmts now have such a VarDecl (I'd missed those in previous commits). Also, since this change reworks the Action interface for if/while/switch/for, use FullExprArg for the full expressions in those expressions, to ensure that we're emitting Note that we are (still) not generating the right cleanups for condition variables in for statements. That will be a follow-on commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f7a1a744eba4b29ceb0f20af8f34515d892fdd64 |
|
24-Nov-2009 |
John McCall <rjmccall@apple.com> |
Rip out TemplateIdRefExpr and make UnresolvedLookupExpr and DependentScopeDeclRefExpr support storing templateids. Unite the common code paths between ActOnDeclarationNameExpr and ActOnTemplateIdExpr. This gets us to a point where we don't need to store function templates in the AST using TemplateNames, which is critical to ripping out OverloadedFunction. Also resolves a few FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
bc0e0781da778bd5eb41a810419912893ae20448 |
|
23-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Handle converting member pointers to bool. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0da76df9218d7c27b471b0a4d83a5b29fe24e5b4 |
|
23-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Centralize and complete the computation of value- and type-dependence for DeclRefExprs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d5532b6cfff2977e0c59fa6ead7f7973984a620d |
|
23-Nov-2009 |
John McCall <rjmccall@apple.com> |
Encapsulate "an array of TemplateArgumentLocs and two angle bracket locations" into a new class. Use it pervasively throughout Sema. My fingers hurt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ba13543329afac4a0d01304ec2ec4924d99306a6 |
|
21-Nov-2009 |
John McCall <rjmccall@apple.com> |
"Incremental" progress on using expressions, by which I mean totally ripping into pretty much everything about overload resolution in order to wean BuildDeclarationNameExpr off LookupResult::getAsSingleDecl(). Replace UnresolvedFunctionNameExpr with UnresolvedLookupExpr, which generalizes the idea of a non-member lookup that we haven't totally resolved yet, whether by overloading, argument-dependent lookup, or (eventually) the presence of a function template in the lookup results. Incidentally fixes a problem with argument-dependent lookup where we were still performing ADL even when the lookup results contained something from a block scope. Incidentally improves a diagnostic when using an ObjC ivar from a class method. This just fell out from rewriting BuildDeclarationNameExpr's interaction with lookup, and I'm too apathetic to break it out. The only remaining uses of OverloadedFunctionDecl that I know of are in TemplateName and MemberExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
73460a32bc5299a5927d23d2e464d72af796eabf |
|
20-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Deduce a ConstantArrayType from a value-dependent initializer list rather than punting to a DependentSizedArrayType, tightening up our type checking for template definitions. Thanks, John! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
865d447ac6a4721ab58e898d014a21f2eff74b06 |
|
19-Nov-2009 |
John McCall <rjmccall@apple.com> |
Draw a brighter line between "unresolved" expressions, where we have done the appropriate lookup and simply can't resolve the referrent yet, and "dependent scope" expressions, where we can't do the lookup yet because the entity we need to look into is a dependent type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
58beed91d468863b8c85bce43425422703838d27 |
|
17-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Fix PR5531. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89106 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
11de6de25a0110cd7be97eef761ef3b189781da6 |
|
12-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Add a CK_BaseToDerived cast kind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
df317bf71653eeb235da8337b1e8e790f9653aa4 |
|
04-Nov-2009 |
Mike Stump <mrs@apple.com> |
Refine volatile handling, specifically, we must have the canonical type to look at the volatile specifier. I found these all from just hand auditing the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
cf3293eaeb3853d12cff47e648bbe835004e929f |
|
01-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When determining whether a reference to a static data member is an 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1a31a18db9d657751f38c724adc0d62e86852bd7 |
|
30-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Add a CK_DerivedToBaseMemberPointer cast kind and use it in Sema (Still no codegen). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85552 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
833ca991c1bfc967f0995974ca86f66ba1f666b5 |
|
29-Oct-2009 |
John McCall <rjmccall@apple.com> |
Track source information for template arguments and template specialization types. Preserve it through template instantiation. Preserve it through PCH, although TSTs themselves aren't serializable, so that's pretty much meaningless. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3eefb1c4bd2c562e43f25e0dba657bb32361dd14 |
|
24-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix overload resolution when calling a member template or taking the address of a member template when explicit template arguments are provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a2813cec2605ce7878d1b13471d685f689b251af |
|
23-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate QualifiedDeclRefExpr, which captured the notion of a 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
01eb9b9683535d8a65c704ad2c545903409e2d36 |
|
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients are updated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c6b29163557d02da5d2a4a06f986f0480291f51f |
|
18-Oct-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add FloatingCast to getCastKindName's list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
82debc7d282e723e58d183bfa89ddc2500a8daaf |
|
18-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Add some more cast kinds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84423 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4b55b24410a2739c589c4b9e84a364161c9a17e5 |
|
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Switch ExtVectorElementExpr::getEncodedElementAccess to use StringRef. - Really this should be simplified by the FIXME above, but I'm too deep in DFS. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a2b34eb7d19d1d199a244da20afe12353e3593ac |
|
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add FIXME... maybe Nate will get bored? :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84389 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
150274299b0bc2efda45783f99bef3f9f6e807ac |
|
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Simplify ExtVectorElementExpr::containsDuplicateElements(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
16a8904f3f5ed19158657e1da95e5902fbee66f7 |
|
16-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Add CK_VectorSplat and use it for casting non-pointer scalars to ExtVectors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84245 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ebeaf2031c968143c531bfe232d7507f20c57347 |
|
16-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Add a ToVoid cast kind and start using it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
430656e1c392dcd9f17fe91a495421d69fca1bc8 |
|
14-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
fix test/CodeGen/statements.c on 32-bit hosts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3ae9f48ae0d07a5aa352bf03c944f557a5ac4c95 |
|
13-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
Teach sema and codegen about the difference between address of labels, 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
bc8d42c6f1565c0b2f93ad524edebfd7a4e6cac6 |
|
13-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
make the diagnostic in the 'unused result' warning more precise about the reason, rdar://7186119. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
27d4be5b3f455275ff6b6afe5ce155d6435081d7 |
|
08-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Implement [expr.mptr.oper]p6 for '->*' operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
56fc0d18caf9c829647a5e3ce35197f0d7e0feee |
|
06-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Refixed pr5086 by letting Expr::isNullPointerConstant handle checking for a null pointer for a zero-valued enumerator; moving the test case from CodeGen to Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ce94049b69f75b44c18584fe79cd238978b6b0d5 |
|
25-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix checking for a null pointer constant when the expression itself is 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0953e767ff7817f97b3ab20896b229891eeff45b |
|
24-Sep-2009 |
John McCall <rjmccall@apple.com> |
Refactor the representation of qualifiers to bring ExtQualType out of the 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b648023da23e8b227cdda57a241db4c6f368726b |
|
22-Sep-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add StringLiteral::getString -> StringRef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
183700f494ec9b6701b6efe82bcb25f4c79ba561 |
|
22-Sep-2009 |
John McCall <rjmccall@apple.com> |
Change all the Type::getAsFoo() methods to specializations of Type::getAs(). 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f515b2268f829adfbfdb751f54d102b53ed0285c |
|
18-Sep-2009 |
Daniel Dunbar <daniel@zuster.org> |
Disable questionable code for handling isNullPointerConstant on value dependent expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3f180c618970d1369726b9229c0370617e05c7cb |
|
17-Sep-2009 |
Daniel Dunbar <daniel@zuster.org> |
Fix two crashes on value dependent expressions (shift and null-pointer check). - Doug, please check. - PR4940. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7e88a60d38b36695520e4f8d9279766ef111a662 |
|
17-Sep-2009 |
Daniel Dunbar <daniel@zuster.org> |
Remove trailing whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
59a53fa3f8ea73bae52ea36d0038f76e9f10729c |
|
16-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Do not generate write-barrier in indirect assignment to a weak object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7f9e646b7ed47bc8e9a60031ad0c2b55031e2077 |
|
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Handle reinterpret_cast between integral types and pointer types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c3f48cd3f08c384de50a3eeceaa79f4800a35f19 |
|
14-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Using the property dot-syntax to invoke a non-eixsting structure-valued setter should cause a user error instead of crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7814e6d6645d587891293d59ecf6576defcfac92 |
|
12-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove unnecessary ASTContext parameter from FunctionDecl::isBuiltinID git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
043cad21b78c6b02597cdc7b6ead32388e27ebc7 |
|
11-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Diagnose VLAs as an error in C++. Also, treat the GNU __null as an integral constant expression to match GCC's behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f299124fe491879fed48f611f6f299382d114dd4 |
|
11-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate some "default"s in CheckICE. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
59600d80b7e34e819cd25dd67f661aa1f3d9099d |
|
10-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
static_cast, reinterpret_cast, and const_cast can all be used in C++ 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1eb4433ac451dc16f4133a88af2d002ac26c58ef |
|
09-Sep-2009 |
Mike Stump <mrs@apple.com> |
Remove tabs, and whitespace cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7f4f86a2167abc116275e49c81350fc3225485e5 |
|
09-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More objc GC's API work for array of pointers declared as __strong. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3a082d81006e7a2e01a6e431a22e21c78490ff8f |
|
08-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Vastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam Weinig! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f8ec55a104e55961f8666f773dce99bbc628298f |
|
03-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Add CastExpr::getCastKindName and use it in the StmtDumper. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c4bf26fbdff42967d660f505a83f75a4df2cc752 |
|
01-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Preliminary AST representation and semantic analysis for explicitly-specified template argument lists in member reference expressions, e.g., x->f<int>() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80646 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
83f6faf37d9bf58986bedc9bc0ea897a56b4dbad |
|
01-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate CXXAdornedMemberExpr entirely. Instead, optionally allocate 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0979c805475d1ba49b5d6ef93c4d2ce6d2eab6ed |
|
31-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Rename CXXQualifiedMemberExpr -> CXXAdornedMemberExpr, since we will also be adding explicit template arguments as an additional "adornment". No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d933a0198f3ccce9c73bf2951625315b911d37bf |
|
29-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Get rid of mostly-unused, buggy method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
bd4c4aebe6035e7a7125470cc9f0f92511230ee3 |
|
27-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
When a member reference expression includes a qualifier on the member 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? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
09105f52b1f28cbb1374c27c3c70f5517e2c465d |
|
20-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Using "ObjCImplicitSetterGetterRefExpr" instead of "ObjCImplctSetterGetterRefExpr". A field rename and more comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
154440e6a8fa6ac5bca395876d79b530b39a2c1c |
|
18-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr. Removed an unnecessary loop to get to setters incoming argument. Added DoxyGen comments. Still more work to do in this area (WIP). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
5e94a0d82b1f49be41c35a73106b219e3f588c8c |
|
16-Aug-2009 |
Chris Lattner <sabre@nondot.org> |
fix my previous commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a50089ec68a583d13718107c1b0c898f0903709e |
|
16-Aug-2009 |
Chris Lattner <sabre@nondot.org> |
This is an attempt to improve loc info for 'unused result' expression warnings, but it fails because we don't have the location of the . and I don't understand ObjCKVCRefExpr. I'll revisit this later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2d46eb21eb2c904831b0e9f75ab3523384c70e66 |
|
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Call MaybeBindToTemporary for overloaded binary and unary operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6f68027af2b6ce294a2706f23a1d3cb7ca1b8d37 |
|
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add MaybeBindToTemporary calls for member call expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
888376a2bbcfc2f047902249f8455918e2489ae1 |
|
12-Aug-2009 |
Nate Begeman <natebegeman@mac.com> |
Transition the PCH support for ShuffleVectorExpr over to ASTContext allocation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6cc670e2eb6d5bae0e41a8ab8be4f02c4a0c72cf |
|
12-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Warn on use of property dot syntax when unused. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ab0e8873c37bfcd292a17dafc61d6baff7caf30d |
|
11-Aug-2009 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://7126285: don't warn on unused ObjC property access that uses "dot syntax" since it might have a side effect. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2ef13e5abef0570a9f567b4671367275c05d4d34 |
|
11-Aug-2009 |
Nate Begeman <natebegeman@mac.com> |
Take 2 on AltiVec-style vector initializers. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1df5109f475bcbc528eb1fb9fdb179dcadbb33a6 |
|
10-Aug-2009 |
Daniel Dunbar <daniel@zuster.org> |
Revert r78535, it is causing a number of failures to build projects. --- 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
25b4fdb9d63095448e6cbc97b8865b36b0c8cbb6 |
|
09-Aug-2009 |
Nate Begeman <natebegeman@mac.com> |
AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d); 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d497206844a894a0557e927adf29b34fe960dffd |
|
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Get rid of Stmt::Clone now that we can reference count statements instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
42602bb40aefcc2751d4078ba88aacf4d965c9bd |
|
07-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Separate Stmt::Destroy into the entrypoint for destroying a statement or expression (Destroy) from the virtual function used to actually destroy a given expression (DoDestroy). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6217b80b7a1379b74cced1c076338262c3c980b3 |
|
29-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Change uses of: Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsRecordType() -> Type::getAs<RecordType>() Type::getAsPointerType() -> Type::getAs<PointerType>() Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>() Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>() Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>() Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>() Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsTagType() -> Type::getAs<TagType>() And remove Type::getAsReferenceType(), etc. This change is similar to one I made a couple weeks ago, but that was partly reverted pending some additional design discussion. With Doug's pending smart pointer changes for Types, it seemed natural to take this approach. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
fb84664349ca6f37f5ec4df440f6c362cca62470 |
|
28-Jul-2009 |
Chris Lattner <sabre@nondot.org> |
fix PR4633: cast to void should silence the 'unused expression' warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
68a049cab6015a7437bec5661601b7d37d23c70c |
|
28-Jul-2009 |
Daniel Dunbar <daniel@zuster.org> |
CallExpr's SubExprs sometimes were allocated in the wrong place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77302 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f242b1b0c4e998911cb96b2ba7e27ab4a5abaed3 |
|
24-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Allow front-end 'isa' access on object's of type 'id'. Enhance test case to cover 'isa' access on interface types (clang produces an error, GCC produces a warning). Still need back-end CodeGen for ObjCIsaExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
19cc4abea06a9b49e0e16a50d335c064cd723572 |
|
18-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Revert r75641. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
35366a67baa970c287c714c957cf78a4131cf60d |
|
17-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methods until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6346f963145ed18b6edf50a78753b47db505e912 |
|
17-Jul-2009 |
Chris Lattner <sabre@nondot.org> |
objc methods can't be an operand to callexpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a00425414e8c209cabc25d1826b200aeb94259af |
|
17-Jul-2009 |
Zhongxing Xu <xuzhongxing@gmail.com> |
Refactor code into a new CallExpr::getDirectCallee() method. Simplify some code with the new method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
5cad1f74469d4d8b4fc51fe53a7837778aeb6107 |
|
17-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1a1a6e2bd4c5aefd7fd643cf25915f9623a02e59 |
|
16-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Add member template 'Type::getAs<T>', which converts a Type* to a respective T*. This method is intended to eventually replace the individual Type::getAsXXXType<> methods. The motivation behind this change is twofold: 1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of them are basically copy-and-paste. 2) By centralizing the implementation of the getAs<Type> logic we can more smoothly move over to Doug Gregor's proposed canonical type smart pointer scheme. Along with this patch: a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>. b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f49545602089be5b1f744e04326b8a566f6d8773 |
|
16-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Remove ASTContext::isObjCObjectPointerType(). Convert all clients to use the new predicate on Type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3d598a5ab3c8aabce0a03a2f5dea65eee643e5ac |
|
14-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Rename RecordLayout.h to ASTRecordLayout.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75641 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ba0a9006dbc4814e1e35f82812cb5a1dad65e8b8 |
|
14-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Read/write a CXXOperatorCallExpr from/to PCH files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
14108da7f7fc059772711e4ffee1322a27b152a7 |
|
11-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
This patch includes a conceptually simple, but very intrusive/pervasive change. The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches. This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic. By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
83314aa1cf61ed2458a8a20c83b2d4708192d5dc |
|
08-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template argument deduction when taking the address of a function template. Most of the change here is in factoring out the common bits used for template argument deduction from a function call and when taking the address of a function template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6f4a69a3107e7ff1569c747f7c6bdf7cff8cbf55 |
|
06-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix bitfield promotion in the presence of explicit casts, from Abrama Bagnara. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
40b598eea1310ec9ed554d56ce3e25b34c585458 |
|
30-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove the ASTContext parameter from the attribute-related methods of Decl. The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
001d64dd2947c1ce06e3eac257a9a21c65ae4ff3 |
|
29-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Fix the FloatingLiteral API to take the isexact flag by value instead of by pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
131f4658249b2a7d2d7e30fe07e84c484f79ef99 |
|
25-Jun-2009 |
Nate Begeman <natebegeman@mac.com> |
OpenCL 1.0 Support, patch 1/N: upper case swizzle operator and hex element index. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
262f9cf85294a1a0713420abc79d40f64aef7240 |
|
21-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Renamed Protocol as TheProtocol so people can use clang header for building obj-c++ clients. "Protocol" is a class name in Cocoa.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
68584ed35ad819a1668e3f527ba7f5dd4ae6a333 |
|
18-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1b63e4f732dbc73d90abf886b4d21f8e3a165f6d |
|
14-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Sink the BuiltinInfo object from ASTContext into the preprocessor and initialize it early in clang-cc. This ensures that __has_builtin works in all modes, not just when ASTContext is around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
02d95baf23cbb29ea4ca58b3e8f54f92f845b900 |
|
07-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Instantiation support for more Obj-C expressions, string literals, @selector and @protocol expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
102e390bcb5a1fb1a8fdbc8505e6dfd905374bbd |
|
01-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
A corner case of objc2 gc's write-barrier generation for the Next runtime. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
78d1583d0b36b7d6d8d10234cdc19ab94adf765a |
|
26-May-2009 |
Douglas Gregor <dgregor@apple.com> |
When evaluating a VarDecl as a constant or determining whether it is an integral constant expression, maintain a cache of the value and the is-an-ICE flag within the VarDecl itself. This eliminates exponential-time behavior of the Fibonacci template metaprogram. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6dde78f744382a5627a04f984a97049e0c4b5e73 |
|
26-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add a new CallExpr::getCallReturnType and use it in Expr::isLvalueInternal. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
5e5783180acb42c9d9b1be2838370ea5930a2a8b |
|
26-May-2009 |
Anders Carlsson <andersca@mac.com> |
A block that returns a reference is an lvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72409 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9ea62768fca25d829d80199cf4f8cf0f4dd39251 |
|
22-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for C99 designated initializers, because we can. Also, delay semantic analysis of initialization for value-dependent as well as type-dependent expressions, since we can't always properly type-check a value-dependent expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72233 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d5f3a0fde43bca9f3738aed931b0f13ca73a9f11 |
|
19-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix handling of the GNU "t ? : f" extension to the conditional operator in C++, and verify that template instantiation for the condition operator does the right thing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d8ac436c8c10c52c937ba323db582259ceb06197 |
|
19-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for imaginary literals, because they were next in Expr.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6b1d283fe879fb11d7ce7a69feecf66e77b0eaf3 |
|
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Make ActOnExprStmt take a FullExprArg. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
8b0b475b3464b0f70b91ba7d679d23c424677d5e |
|
16-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement instantiation of a few boring, simple expressions. I don't think these are testable yet, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ffce2df6ae280d354d51371282a579df1eb86876 |
|
16-May-2009 |
Anders Carlsson <andersca@mac.com> |
Basic support for member exprs where the base expr type is dependent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6e8ed16ffef02b82995a90bdcf10ffff7d63839a |
|
10-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement C++0x nullptr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71405 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
06b89124a9a5971a0528cc9da6817740bac43164 |
|
06-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a bug for objc2's gc in the presense of type-casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71041 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
53202857c60214d80950a975e6e52aebf30bd16a |
|
04-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR2524: downgrade taking address of expression of type 'void' to an extension warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
33bbbc5ec8269bc2cde5b84f970fa49319a30267 |
|
02-May-2009 |
Douglas Gregor <dgregor@apple.com> |
When determining whether an expression refers to a bit-field, look into the left-hand side of an assignment expression. This completes most of PR3500; the only remaining part is to deal with the GCC-specific implementation-defined behavior for "unsigned long" (and other) bit-fields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
852871abbff45f1c1d3787755a27fce08365b166 |
|
29-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR4103: Silence bogus unused expression warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9a901bb63990574ff0bcc12ff851d7a71cff8ddb |
|
26-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Remove getIntegerConstantExprValue in favor of using EvaluateAsInt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0389e6bd0159bfdd08f7c50a37543b6e3adf0c33 |
|
26-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
implement PCH support for the rest of ExprObjC.h, including the missing bits of ObjCMessageExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
09de1767990d4828bcaf0dd22033a5dddeecbe08 |
|
26-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Change isNullPointerConstant to be strict; hopefully this won't cause any issues now that we have our own tgmath.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
81045d8dcd967def69d8e0945566214a9fe9ffcc |
|
21-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Fix PR4027 + rdar://6808859, we were rejecting implicit casts of aggregates even though we already accept explicit ones. Easy fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7297134f128423fce2e88f92421ed135bded7d4e |
|
18-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
FunctionDecl::getBody() is getting an ASTContext argument for use in lazy PCH deserialization. Propagate that argument wherever it needs to be. No functionality change, except that I've tightened up a few PCH tests in preparation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
88c9a46f0b84f1ee83e01917825346551ee540d0 |
|
17-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix two embarrassing PCH bugs: 1) Accidentally used delete [] on an array of statements that was allocated with ASTContext's allocator 2) Deserialization of names with multiple declarations (e.g., a struct and a function) used the wrong mangling constant, causing it to view declaration IDs as Decl*s. 403.gcc builds and links properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
76458501a8963fa11b91c9337a487de6871169b4 |
|
17-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement lvalue test for conditional expressions. Add a few commented lines to the test case that point out things that don't work yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3aaa482ea5b8d20b705f6ac8573b539be88d273a |
|
16-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6765383> clang-6: clang does not appear to support declaring a static Block 'const'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d077d759d0c7fceee98f4e77b6423a3f11cfc849 |
|
16-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
PCH support for InitListExpr, DesignatedInitExpr, and ImplicitValueInitExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
94cd5d1397bb1a8bcd109602aa38dd787b164c22 |
|
16-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
PCH support for ShuffleVectorExpr and BlockDeclRefExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d3c98a02c73417689deaaa6671ea6df7f2a8a73c |
|
16-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
PCH support for ExtVectorElementExpr and VAArgExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1f0d0133b0e8d1f01f63951ee04927796b34740d |
|
15-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
PCH support for MemberExpr and CallExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
673ecd6a4a9f7c12fb6f76f84f654dbdcdc89e76 |
|
15-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
PCH support for string literals git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69172 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ffb4b6e299069139908540ce97be4462e16b53a4 |
|
15-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement support for designated initializers that refer to members of anonymous structs or unions. Fixes PR3778. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
44e35f7b2b5da1eb338639e46bf0b5522e75c5f3 |
|
15-Apr-2009 |
Daniel Dunbar <daniel@zuster.org> |
Improve "assignment to cast" diagnostic. - Strip off extra parens when looking for casts. - Change the location info to point at the cast (instead of the assignment). For example, on int *b; #define a ((void*) b) void f0() { a = 10; } we now emit: /tmp/t.c:4:3: error: assignment to cast is illegal, lvalue casts are not supported a = 10; ^ ~ /tmp/t.c:2:12: note: instantiated from: #define a ((void*) b) ~^~~~~~~~~~ instead of: /tmp/t.c:4:5: error: expression is not assignable a = 10; ~ ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
5717daef564a1071c34549150e7333025ea46fa2 |
|
15-Apr-2009 |
Daniel Dunbar <daniel@zuster.org> |
Strip paren expressions when trying to diagnose "cast as lvalue" extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
eeae8f072748affce25ab4064982626361293390 |
|
28-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Make our diagnostics about the obsolete GNU designated-initializer syntax into extension warnings, and provide code-modification hints showing how to fix the problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7fd0995e993438a3a1f5408d8549b3af0009ff30 |
|
23-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
use isa<> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
04831aa3271edc5f00a651bf7152c2902981d7c3 |
|
23-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Adjust isModifiableLvalue to give a slightly more useful diagnostic for attempting to illegally modify a BlockDeclRefExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b7beee9f2b52f34a3b0800a5f0038f0e4295b260 |
|
22-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
fix some warnings in release-assert mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67456 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
fa2192042f223b5122a9e17719930f77634fd31f |
|
21-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
When building the structured initializer list, pre-allocate storage in its vectors based on the subobject type we're initializing and the (unstructured) initializer list. This eliminates some malloc thrashing when parsing initializers (from 117 vector reallocations down to 0 when parsing Cocoa.h). We can't always pre-allocate the right amount of storage, since designated initializers can cause us to initialize in non-predictable patterns. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67421 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
068636800594844c53fba0bc871c579745757d0e |
|
21-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Destroy expressions properly when resizing an initializer list git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7c80bd64032e610c0dbd74fc0ef6ea334447f2fd |
|
17-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a135fb43eb94524a6529768596a4533eed9aa70d |
|
15-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Add the ability to clone integer and string literals. Use it when instantiating template expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67030 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c3082413e4207173b32c118e922d63149df6261f |
|
14-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Handle dependent types/exprs in static_assert expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
bc736fceca6f0bca31d16003a7587857190408fb |
|
14-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for the prefix unary operators. As always, refactored the existing logic to tease apart the parser action and the semantic analysis shared by the parser and template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
063daf6e196c51f162e0485478355d8e280eef5c |
|
13-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor the way we handle operator overloading and template instantiation for binary operators. This change moves most of the operator-overloading code from the parser action ActOnBinOp to a new, parser-independent semantic checking routine CreateOverloadedBinOp. Of particular importance is the fact that CreateOverloadedBinOp does *not* perform any name lookup based on the current parsing context (it doesn't take a Scope*), since it has to be usable during template instantiation, when there is no scope information. Rather, it takes a pre-computed set of functions that are visible from the context or via argument-dependent lookup, and adds to that set any member operators and built-in operator candidates. The set of functions is computed in the parser action ActOnBinOp based on the current context (both operator name lookup and argument-dependent lookup). Within a template, the set computed by ActOnBinOp is saved within the type-dependent AST node and is augmented with the results of argument-dependent name lookup at instantiation time (see TemplateExprInstantiator::VisitCXXOperatorCallExpr). Sadly, we can't fully test this yet. I'll follow up with template instantiation for sizeof so that the real fun can begin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ecdd84147c0765caa999ddc22dde25b42712bb4d |
|
13-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
add a helper function to strip noop casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66909 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
baf534875ed0a55c6342636ff3f4602b8ac22b69 |
|
12-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate some unused default cases in switches on the binary operator kind git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2d2e9cfdc1dbb6e4a22f8c0b1abcd30437e3795d |
|
11-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate CXXClassVarDecl. It doesn't add anything git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7976932a1c256d447316ffac58e9821417725e34 |
|
04-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Minor cleanup for choose expressions: add a helper that returns the chosen sub-expression, rather than just evaluating the condition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
35183aca180a2b9b2c637cd625a40a7e147d6a32 |
|
27-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Change the AST generated for offsetof a bit so that it looks like a normal expression, and change Evaluate and IRGen to evaluate it like a normal expression. This simplifies the code significantly, and fixes PR3396. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
60ce9635b969d17ff1bbe269deff5ec3c6b1bc06 |
|
27-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make isICE assert when Evaluate can't evaluate an ICE, as suggested by Daniel. Some minor fixes/cleanup. Allow __builtin_choose_expr, __real__, and __imag__ in ICEs, following gcc's example. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
befbcf4e02756f252d1263774ef2249f0921c1c9 |
|
27-Feb-2009 |
Mike Stump <mrs@apple.com> |
The middle operand in ?: is optional, really. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e28d7195aad595154130ac8d03cc6c6513ece1bf |
|
26-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Rewrite of isIntegerConstantExpr to be centered around Evaluate. This is a rather big change, but I think this is the direction we want to go; the code is significantly shorter now, and it doesn't duplicate Evaluate code. There shouldn't be any visible changes as far as I know. There has been some movement towards putting ICE handling into Evaluate (for example, VerifyIntegerConstantExpression uses Evaluate instead of isICE). This patch is sort of the opposite of the approach, making ICE handling work without Evaluate being aware of it. I think this approach is better because it separates the code that does the constant evaluation from code that's calculating a rather arbitrary predicate. The one thing I don't really like about this patch is that the handling of commas in C99 complicates it signficantly. (Seriously, what was the standards committee thinking when they wrote that part?) I think I've come up with a decent approach, but it doesn't feel ideal. I might add some way to check for evaluated commas from Evaluate in a subsequent patch; that said, it might not be worth bothering. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
eaf2bb89eb2aad3b80673de30febe52df43c10ec |
|
24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
first wave of fixes for @encode sema support. This is part of PR3648. The big difference here is that (like string literal) @encode has array type, not pointer type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
207c5210eb0ac7b632609f0c006eb97ef2738948 |
|
23-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
We should not generate __weak write barrier on indirect reference of a pointer to object; This patch does this odd behavior according to gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
44baa8abba2a1552b6b50bf750a8750ab9da9f76 |
|
22-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More objc gc work. Match gcc's treatment of ivar access true a local pointer to objective-c object in generating write barriers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
dcdafb6a701aa9d81edcb088915f58933315dc05 |
|
22-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Improvements to ASTContext::getDeclAlignInBytes; fixes the testcase in PR3254 and part of PR3433. The isICE changes are necessary to keep the computed results consistent with Evaluate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1f4a6db271f389d6ab3cb1bc28cb5c23a7828602 |
|
20-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
A few small tweaks to isConstantInitializer. (No test because this isn't getting used by Sema or CodeGen at the moment...) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1e4db7c468c002c58f07e059ff7925384f053e85 |
|
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
rip out __builtin_overload git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c6c16af963eddc3e9b75b5d2614d069e1162fe27 |
|
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
teach child iterators to walk into the child string of an ObjCStringLiteral, so it shows up in -ast-dump. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2085fd6cd22ec5c268175251db10d7c60caf7aaa |
|
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
privatize all of the string literal memory allocation/creation stuff behind a private static function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
726e168dc09fb23f53c7b004f8e919421ee91806 |
|
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
change the StringLiteral AST node to track all of the SourceLocations of the various PPTokens that are pasted together to make it. In the course of working on this, I discovered ParseObjCStringLiteral which needs some work. I'll tackle it next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2d6744ff04c1690a1485178d550d2fab84a0270b |
|
18-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
isICE was evaluating ?: incorrectly with missing-gcc-LHS extension. Add assert to isICE that, on success, result must be the same as EvaluateAsInt()... this enforces a minimum level of sanity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a135975d4257ccc83f13b607b29d882bb00c80b6 |
|
18-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Convert isIntegerConstantExpr to use ASTContext::MakeIntValue. - This idiom ensures that the result will have the right width and type. - Tested on most of x86_64/llvm-test to satisfy my paranoia. - This fixes at least the following bugs: o UnaryTypeTraitExpr wasn't setting the width correctly. o Arithmetic on _Bool wasn't setting the width correctly. And probably a number more. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c87a282e7b80c055088fc51bdbe8fc73da64d4f8 |
|
18-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Rename UnaryTypeTraitExpr::Evaluate to EvaluateTrait to not collide with Expr::Evaluate(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f592c929bd1f083abcc8199b24bb825fdd28df1c |
|
16-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Unbreak clang. Doug: please verify that it is expected that LastIdx can be less that NumInits. And perhaps add a comment so that Chris doesn't break your code. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d603eaa682cecac2c10771a700cb83aa301653b4 |
|
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fix long lines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2140e904dbe53657339cb5b1cc13de563ca0d1fc |
|
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
introduce and use a new ExtVectorElementExpr::isArrow method, at Eli's suggestion git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3c385e5f8d9008fff18597ca302be19fa86e51f6 |
|
14-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Add hook to add attributes to function declarations that we know about, whether they are builtins or not. Use this to add the appropriate "format" attribute to NSLog, NSLogv, asprintf, and vasprintf, and to translate builtin attributes (from Builtins.def) into actual attributes on the function declaration. Use the "printf" format attribute on function declarations to determine whether we should do format string checking, rather than looking at an ad hoc list of builtins and "known" function names. Be a bit more careful about when we consider a function a "builtin" in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
026dc96ac6ece60da5e1b98e2a71bd0ff0939fd8 |
|
14-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Several related changes: 1) implement parser and sema support for reading and verifying attribute(warnunusedresult). 2) rename hasLocalSideEffect to isUnusedResultAWarning, inverting the sense of its result. 3) extend isUnusedResultAWarning to directly return the loc and range info that should be reported to the user. Make it substantially more precise in some cases than what was previously reported. 4) teach isUnusedResultAWarning about CallExpr to decls that are pure/const/warnunusedresult, fixing a fixme. 5) change warn_attribute_wrong_decl_type to not pass in english strings, instead, pass in integers and use %select. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3e41d60eb627dc227c770f1c1c87d06909cf05fd |
|
14-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Implicitly declare certain C library functions (malloc, strcpy, memmove, etc.) when we perform name lookup on them. This ensures that we produce the correct signature for these functions, which has two practical impacts: 1) When we're supporting the "implicit function declaration" feature of C99, these functions will be implicitly declared with the right signature rather than as a function returning "int" with no prototype. See PR3541 for the reason why this is important (hint: GCC always predeclares these functions). 2) If users attempt to redeclare one of these library functions with an incompatible signature, we produce a hard error. This patch does a little bit of work to give reasonable error messages. For example, when we hit case #1 we complain that we're implicitly declaring this function with a specific signature, and then we give a note that asks the user to include the appropriate header (e.g., "please include <stdlib.h> or explicitly declare 'malloc'"). In case #2, we show the type of the implicit builtin that was incorrectly declared, so the user can see the problem. We could do better here: for example, when displaying this latter error message we say something like: 'strcpy' was implicitly declared here with type 'char *(char *, char const *)' but we should really print out a fake code line showing the declaration, like this: 'strcpy' was implicitly declared here as: char *strcpy(char *, char const *) This would also be good for printing built-in candidates with C++ operator overloading. The set of C library functions supported by this patch includes all functions from the C99 specification's <stdlib.h> and <string.h> that (a) are predefined by GCC and (b) have signatures that could cause codegen issues if they are treated as functions with no prototype returning and int. Future work could extend this set of functions to other C library functions that we know about. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
adadd8db2aba32f689e7057d8b7ce004be30685b |
|
12-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Fix va_arg bug noticed by Eli, __builtin_va_arg is not an l-value designating an object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
668bf91d31265b6ea8c3eb854ba450857701f269 |
|
09-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
CallExpr now uses ASTContext's allocate to allocate/delete its array of subexpressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
353ffceafc6bcebd5592cb9d93ea3f9242e5370a |
|
09-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
Deallocate the StringLiteral itself in StringLiteral::Destroy() and deallocate the string data before running StringLiteral's destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64146 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
fb7413f12636cefa9ebec9abf95804f82c305b11 |
|
09-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
Allocate the subexpression array for OberloadExpr from ASTContext's allocator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4a4251b9e719415f30db0f5170abf31296a62225 |
|
07-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make const-initialized const integral variables I-C-Es in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
8189cde56b4f6f938cd65f53c932fe1860d0204c |
|
07-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
Overhaul of Stmt allocation: - Made allocation of Stmt objects using vanilla new/delete a *compiler error* by making this new/delete "protected" within class Stmt. - Now the only way to allocate Stmt objects is by using the new operator that takes ASTContext& as an argument. This ensures that all Stmt nodes are allocated from the same (pool) allocator. - Naturally, these two changes required that *all* creation sites for AST nodes use new (ASTContext&). This is a large patch, but the majority of the changes are just this mechanical adjustment. - The above changes also mean that AST nodes can no longer be deallocated using 'delete'. Instead, one most do StmtObject->Destroy(ASTContext&) or do ASTContextObject.Deallocate(StmtObject) (the latter not running the 'Destroy' method). Along the way I also... - Made CompoundStmt allocate its array of Stmt* using the allocator in ASTContext (previously it used std::vector). There are a whole bunch of other Stmt classes that need to be similarly changed to ensure that all memory allocated for ASTs comes from the allocator in ASTContext. - Added a new smart pointer ExprOwningPtr to Sema.h. This replaces the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used 'delete' to free memory instead of a Stmt's 'Destroy' method. Big thanks to Doug Gregor for helping with the acrobatics of making 'new/delete' private and the new smart pointer ExprOwningPtr! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
224605064a4ef87d1c3d35ad1cb363f8b534012b |
|
07-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement dereferencing of pointers-to-member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6e94ef5696cfb005d3fc7bbac8dcf7690b64f0a5 |
|
06-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
Move StringLiteral to allocate its internal string data using the allocator in ASTContext. This required changing all clients to pass in the ASTContext& to the constructor of StringLiteral. I also changed all allocations of StringLiteral to use new(ASTContext&). Along the way, I updated a bunch of new()'s in StmtSerialization.cpp to use the allocator from ASTContext& (not complete). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
aaba5e346dffdbad5d1c42765a89e4a7afb0da67 |
|
04-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Basic representation of C++ class templates, from Andrew Sutton. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a9c878086036de36482cc21e35a33cabe9699b0a |
|
29-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Make CodeGen produce an error if we come across a non-constant initializer list that involves the GNU array-range designator extension git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3498bdb9e9cb300de74c7b51c92608e2902b2348 |
|
29-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new expression node, ImplicitValueInitExpr, that represents an implicit value-initialization of a subobject of a particular type. This replaces the (ab)use of CXXZeroValueInitExpr within initializer lists for the "holes" that occur due to the use of C99 designated initializers. The new test case is currently XFAIL'd, because CodeGen's ConstExprEmitter (in lib/CodeGen/CGExprConstant.cpp) needs to be taught to value-initialize when it sees ImplicitValueInitExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0bb76897bedb8b747efc6523efb432fc24966118 |
|
29-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Clean up designated initialization of unions, so that CodeGen doesn't have to try to guess which member is being initialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
54f0728c2ab0f967e976300478b2f5cdfed78415 |
|
29-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove Expr::hasSideEffects. It doesn't work anyway git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4c67834407ca6ab344dcf44fc599ad4938cfa96d |
|
28-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Code generation support for C99 designated initializers. The approach I've taken in this patch is relatively straightforward, although the code itself is non-trivial. Essentially, as we process an initializer list we build up a fully-explicit representation of the initializer list, where each of the subobject initializations occurs in order. Designators serve to "fill in" subobject initializations in a non-linear way. The fully-explicit representation makes initializer lists (both with and without designators) easy to grok for codegen and later semantic analyses. We keep the syntactic form of the initializer list linked into the AST for those clients interested in exactly what the user wrote. Known limitations: - Designating a member of a union that isn't the first member may result in bogus initialization (we warn about this) - GNU array-range designators are not supported (we warn about this) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c0ac4923f08b25ae973a8ee7942cf3eb89da57b7 |
|
28-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Finish making AST BumpPtrAllocation runtime configurable (based on -disable-free). snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m 0.179u 0.051s 0:00.23 95.6% 0+0k 0+0io 0pf+0w snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m -disable-free 0.169u 0.052s 0:00.22 95.4% 0+0k 0+0io 0pf+0w git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4e716e07d90a18ac83dd94d157ec676530bc78f9 |
|
25-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix compile error from r62953. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
32a311e276cd4bcafddd38db679aff9804e66bd4 |
|
25-Jan-2009 |
Eli Friedman <eli.friedman@gmail.com> |
One more case for Expr::isConstantInitializer; I think this covers everything that we aren't intending to implement in Expr::Evaluate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c39dc9a25a9d74a5302e8567a4d3fc008212024c |
|
25-Jan-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Enhancements to Expr::isConstantInitializer to deal with a few cases it couldn't deal with before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c9e8f606787b0bc0c3b08e566b87cc1751694168 |
|
25-Jan-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Rename Expr::isConstantExpr to Expr::isConstantInitializer; this more accurately states what the function is trying to do and how it is different from Expr::isEvaluatable. Also get rid of a parameter that is both unused and inaccurate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
05c13a3411782108d65aab3c77b1a231a4963bc0 |
|
22-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial implementation of semantic analysis and ASTs for C99 designated initializers. This implementation should cover all of the constraints in C99 6.7.8, including long, complex designations and computing the size of incomplete array types initialized with a designated initializer. Please see the new test-case and holler if you find cases where this doesn't work. There are still some wrinkles with GNU's anonymous structs and anonymous unions (it isn't clear how these should work; we'll just follow GCC's lead) and with designated initializers for the members of a union. I'll tackle those very soon. CodeGen is still nonexistent, and there's some leftover code in the parser's representation of designators that I'll also need to clean up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
59b5da6d853b4368b984700315adf7b37de05764 |
|
18-Jan-2009 |
Nate Begeman <natebegeman@mac.com> |
Support evaluation of vector constant expressions, and codegen of same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
190d6a25393995b42e32086949a68285ee423fb9 |
|
18-Jan-2009 |
Nate Begeman <natebegeman@mac.com> |
A couple more vector component access fixes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
353417af9d254d4fd0eb7d0a3ff71c4d8594ac58 |
|
18-Jan-2009 |
Nate Begeman <natebegeman@mac.com> |
Update support for vector component access on ExtVectors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d1fa6449e9dbdd667466e9e1e971aa17c9793e8a |
|
12-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to supprt case of readonly property being assigned to when it has user declared setter method defined in the class implementation (but no declaration in the class itself). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1a49af9681c350fef58e677f85ccb9a77e8e9d0a |
|
06-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Add QualifiedDeclRefExpr, which retains additional source-location information for declarations that were referenced via a qualified-id, e.g., N::C::value. We keep track of the location of the start of the nested-name-specifier. Note that the difference between QualifiedDeclRefExpr and DeclRefExpr does have an effect on the semantics of function calls in two ways: 1) The use of a qualified-id instead of an unqualified-id suppresses argument-dependent lookup 2) If the name refers to a virtual function, the qualified-id version will call the function determined statically while the unqualified-id version will call the function determined dynamically (by looking up the appropriate function in the vtable). Neither of these features is implemented yet, but we do print out qualified names for QualifiedDeclRefExprs as part of the AST printing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
64b45f7e0d3167f040841ac2920aead7f080730d |
|
05-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
PODness and Type Traits Make C++ classes track the POD property (C++ [class]p4) Track the existence of a copy assignment operator. Implicitly declare the copy assignment operator if none is provided. Implement most of the parsing job for the G++ type traits extension. Fully implement the low-hanging fruit of the type traits: __is_pod: Whether a type is a POD. __is_class: Whether a type is a (non-union) class. __is_union: Whether a type is a union. __is_enum: Whether a type is an enum. __is_polymorphic: Whether a type is polymorphic (C++ [class.virtual]p1). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
88a3514f36de96b19cdf50141c640df1a5f13f6c |
|
22-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Add support for calls to overloaded member functions. Things to note: - Overloading has to cope with having both static and non-static member functions in the overload set. - The call may or may not have an implicit object argument, depending on the syntax (x.f() vs. f()) and the context (static vs. non-static member function). - We now generate MemberExprs for implicit member access expression. - We now cope with mutable whenever we're building MemberExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61329 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
86f194083504938df72135b5b66bf0c5cafd9498 |
|
21-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Add support for member references (E1.E2, E1->E2) with C++ semantics, which can refer to static data members, enumerators, and member functions as well as to non-static data members. Implement correct lvalue computation for member references in C++. Compute the result type of non-static data members of reference type properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1c0cfd4599e816cfd7a8f348286bf0ad79652ffc |
|
19-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Get rid of the old Expr::Evaluate variant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
42b83dde7c700b34f9435ad746984169888ae705 |
|
12-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
Implement the final (hopefully) wrinkle to i-c-e + builtin_constant_p processing: it allows arbitrary foldable constants as the operand of ?: when builtin_constant_p is the condition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60954 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1f64805512decc6106cd7dc28f5af5a4d9c81781 |
|
12-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
add a fixme. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
28daa53db73341b7ee7f269924ccfca1c6d179ac |
|
12-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
implement rdar://6091492 - ?: with __builtin_constant_p as the operand is an i-c-e. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
670a62cd1d51042ea076cda5e93f26a1d8327fb3 |
|
12-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6095061 - gcc allows __builtin_choose_expr as an lvalue git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
44b4321feab46299d3f5cfd404680884752a0fcf |
|
11-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Unifies the name-lookup mechanisms used in various parts of the AST and separates lexical name lookup from qualified name lookup. In particular: * Make DeclContext the central data structure for storing and looking up declarations within existing declarations, e.g., members of structs/unions/classes, enumerators in C++0x enums, members of C++ namespaces, and (later) members of Objective-C interfaces/implementations. DeclContext uses a lazily-constructed data structure optimized for fast lookup (array for small contexts, hash table for larger contexts). * Implement C++ qualified name lookup in terms of lookup into DeclContext. * Implement C++ unqualified name lookup in terms of qualified+unqualified name lookup (since unqualified lookup is not purely lexical in C++!) * Limit the use of the chains of declarations stored in IdentifierInfo to those names declared lexically. * Eliminate CXXFieldDecl, collapsing its behavior into FieldDecl. (FieldDecl is now a ScopedDecl). * Make RecordDecl into a DeclContext and eliminates its Members/NumMembers fields (since one can just iterate through the DeclContext to get the fields). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
898574e7496ba8fd76290079d3a9d06954992734 |
|
06-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Introduce basic support for dependent types, type-dependent expressions, and value-dependent expressions. This permits us to parse some template definitions. This is not a complete solution; we're missing type- and value-dependent computations for most of the expression types, and we're missing checks for dependent types and type-dependent expressions throughout Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
72c3f314d92d65c050ee1c07b7753623c044d6c7 |
|
05-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Representation of template type parameters and non-type template parameters, with some semantic analysis: - Template parameters are introduced into template parameter scope - Complain about template parameter shadowing (except in Microsoft mode) Note that we leak template parameter declarations like crazy, a problem we'll remedy once we actually create proper declarations for templates. Next up: dependent types and value-dependent/type-dependent expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d457589fc69dc7a9c80cd74d317c0b81a35a27c9 |
|
04-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix some type punning errors in SizeOfAlignOf and Typeid AST nodes. This should satisfy compilers and language lawyers alike. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60511 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d26527708b2b2f3b1d747f570efd10149d48364e |
|
01-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Revert change that made isNullPointerConstant start emitting warnings. We don't want that :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
07b5cc0f4047761acb32550c4463a68a2ceca6d7 |
|
01-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Remove dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
efa9b3877ef298bcb792600ac33521827e1f7faf |
|
01-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Add a new variant of isNullConstantExpr that returns an EvalResult. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2d8b273470684a9cd47f0ce24743cc1f71ef7cbc |
|
29-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Implement the GNU __null extension git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
31afbf02a381ae9c77d225aa54f972d152838b3a |
|
25-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Refactored checking on readonly property into a method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6669db9d80d77d10f101aa9f8e488bbd2d98f76c |
|
25-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to allow over-riding of readonly property to a writable property in one of its category. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60035 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c9ad94e12aaf667e02c7297a663fc93090e1d2cb |
|
25-Nov-2008 |
Anders Carlsson <andersca@mac.com> |
Remove more #ifdeffed code git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e8a32b855ce4e8580a191f8d29d2f3f459834302 |
|
24-Nov-2008 |
Anders Carlsson <andersca@mac.com> |
Reimplement Expr::isConstantExpr in terms of Expr::Evaluate. This fixes PR2832. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ba8d2d684e74a20bef03828c21c991d222c7e9e5 |
|
22-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Support for implicit property assignment. Error assigning to 'implicit' property with no 'setter'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
5daf570d0ce027e18ed5f9d66e6b2a14a40b720d |
|
22-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
New AST node to access "implicit" setter/getter using property dor syntax. Issuing diagnostics when assigning to read-only properties. This is work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59874 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4c5d320a7581f4b80b151630c91cea5727fa9923 |
|
21-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implementation of new and delete parsing and sema. This version uses VLAs to represent arrays. I'll try an alternative way next, but I want this safe first. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4fcd399a52ae45ed8ebfdd3a25e01cfb76fa366d |
|
21-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Enable some more operator overloading tests, and don't look into an identifier for functions that might not have one git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
92e62b02226410bcad8584541b8f1ff4d35ebab9 |
|
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Rename IdentifierInfo::isName to ::isStr. Use a nifty trick from Sebastian to enforce that a literal string is passed in, and use this to avoid having to call strlen on it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59706 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
337c6b9f5d502dc1c5acea628bf7bf9e828efc0e |
|
19-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Support overloading of the subscript operator[], including support for built-in operator candidates. Test overloading of '&' and ','. In C++, a comma expression is an lvalue if its right-hand subexpression is an lvalue. Update Expr::isLvalue accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
74253736184c0717a0649922551bf9d8b6815651 |
|
19-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Added operator overloading for unary operators, post-increment, and post-decrement, including support for generating all of the built-in operator candidates for these operators. C++ and C have different rules for the arguments to the builtin unary '+' and '-'. Implemented both variants in Sema::ActOnUnaryOp. In C++, pre-increment and pre-decrement return lvalues. Update Expr::isLvalue accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7e3e9b152e06edf329ceb32190d3255f248d4d5f |
|
19-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
simplify some code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ca354faa7e9b99af17070c82b9662a5fca76422c |
|
17-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Implement rdar://6319320: give a good diagnostic for cases where people are trying to use the old GCC "casts as lvalue" extension. We don't and will hopefully never support this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6ee7aa154e8bbb21a21254293410b944f78b0bfe |
|
16-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
rename Expr::tryEvaluate to Expr::Evaluate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b4609806e9232593ece09ce08b630836e825865c |
|
14-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Add a new expression node, CXXOperatorCallExpr, which expresses a function call created in response to the use of operator syntax that resolves to an overloaded operator in C++, e.g., "str1 + str2" that resolves to std::operator+(str1, str2)". We now build a CXXOperatorCallExpr in C++ when we pick an overloaded operator. (But only for binary operators, where we actually implement overloading) I decided *not* to refactor the current CallExpr to make it abstract (with FunctionCallExpr and CXXOperatorCallExpr as derived classes). Doing so would allow us to make CXXOperatorCallExpr a little bit smaller, at the cost of making the argument and callee accessors virtual. We won't know if this is going to be a win until we can parse lots of C++ code to determine how much memory we'll save by making this change vs. the performance penalty due to the extra virtual calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
bf3af056289893f58d37b05a2c80970708781d61 |
|
13-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Some cleanup for the implementation of built-in operator candidates. Thanks to Chris for the review! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a6afa768aa7bd3102a2807aa720917e4a1771e4e |
|
13-Nov-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for crash issues with comma operators with a void first operand, and some more bullet-proofing/enhancements for tryEvaluate. This shouldn't cause any behavior changes except for handling cases where we were crashing before and being able to evaluate a few more cases in tryEvaluate. This should settle the minor mess surrounding r59196. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b11e77836dd0867955c5abf32baf1c3e6c7f81e1 |
|
13-Nov-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Backout of r59196, plus a new ICE test. Sorry if this is a little rude; I figure it's cleaner to just back this out now so it doesn't get forgotten or mixed up with other checkins. The modification to isICE is simply wrong; I've added a test that the change to isICE breaks. I'm pretty sure the modification to tryEvaluate is also wrong. At the very least, there's some serious miscommunication going on here, as this is going in exactly the opposite direction of r59105. My understanding is that tryEvaluate is not supposed to care about side effects. That said, a lot of the clients to tryEvaluate are expecting it to enforce a no-side-effects policy, so we probably need another method that provides that guarantee. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
dd2b12a0329fee69ac2c26c2a3a355fb722e1e54 |
|
13-Nov-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix bug in constant evaluation exposed by 176.gcc. - Evaluation of , operator used bogus assumption that LHS could be evaluated as an integral expression even though its type is unspecified. This change is making isICE very permissive of the LHS in non-evaluated contexts because it is not clear what predicate we would use to reject code here. The standard didn't offer me any guidance; opinions? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59196 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
eb8f3063257a392f15aea48d42fb73ec51afc548 |
|
12-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Implement support for operator overloading using candidate operator functions for built-in operators, e.g., the builtin bool operator==(int const*, int const*) can be used for the expression "x1 == x2" given: struct X { operator int const*(); } x1, x2; The scheme for handling these built-in operators is relatively simple: for each candidate required by the standard, create a special kind of candidate function for the built-in. If overload resolution picks the built-in operator, we perform the appropriate conversions on the arguments and then let the normal built-in operator take care of it. There may be some optimization opportunity left: if we can reduce the number of built-in operator overloads we generate, overload resolution for these cases will go faster. However, one must be careful when doing this: GCC generates too few operator overloads in our little test program, and fails to compile it because none of the overloads it generates match. Note that we only support operator overload for non-member binary operators at the moment. The other operators will follow. As part of this change, ImplicitCastExpr can now be an lvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0518999d3adcc289997bd974dce90cc97f5c1c44 |
|
11-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof expressions, both of values and types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c42e1183846228a7fa5143ad76507d6d60f5c6f3 |
|
11-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement C++ 'typeid' parsing and sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
cd9b46e5442a3ef17f83f75177d8545cb5b3e2b9 |
|
04-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Add a new expression class, ObjCSuperExpr, to handle the Objective-C 'super'. Remove ObjCThis from PredefinedExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
796da18402f286b897782a298ae3b20c459c102e |
|
04-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Create a new expression class, CXXThisExpr, to handle the C++ 'this' primary expression. Remove CXXThis from PredefinedExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6215dee86c0e715b9f2b0d401ab2a5fcf629f1af |
|
04-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Trivial style fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0777972d38a3125efed962b045704c30ae6965cf |
|
31-Oct-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement semantic checking of static_cast and dynamic_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
27c8dc06f65d7abcf6a7e7f64a7960c9a150ca01 |
|
29-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Implement initialization of a reference (C++ [dcl.init.ref]) as part of copy initialization. Other pieces of the puzzle: - Try/Perform-ImplicitConversion now handles implicit conversions that don't involve references. - Try/Perform-CopyInitialization uses CheckSingleAssignmentConstraints for C. PerformCopyInitialization is now used for all argument passing and returning values from a function. - Diagnose errors with declaring references and const values without an initializer. (Uses a new Action callback, ActOnUninitializedDecl). We do not yet have implicit conversion sequences for reference binding, which means that we don't have any overloading support for reference parameters yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
6eec8e883de118b431e3ead5b1e604a6ac68ff6b |
|
28-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Rename ExplicitCCastExpr to CStyleCastExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3c3281742da8eef5027b9614c6f3802a05ec4244 |
|
28-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Replace a dyn_cast with a cast when we know the exact type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9d293dfc0ad7c44ae0b5eb9517f1ed8c8d8b7ff7 |
|
28-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of (C++) references within Clang. Specifically: - Do not allow expressions to ever have reference type - Extend Expr::isLvalue to handle more cases where having written a reference into the source implies that the expression is an lvalue (e.g., function calls, C++ casts). - Make GRExprEngine::VisitCall treat the call arguments as lvalues when they are being bound to a reference parameter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
49badde06e066d058d6c7fcf4e628a72999b65a9 |
|
27-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Refactor the expression class hierarchy for casts. Most importantly: - CastExpr is the root of all casts - ImplicitCastExpr is (still) used for all explicit casts - ExplicitCastExpr is now the root of all *explicit* casts - ExplicitCCastExpr (new name needed!?) is a C-style cast in C or C++ - CXXFunctionalCastExpr inherits from ExplicitCastExpr - CXXNamedCastExpr inherits from ExplicitCastExpr and is the root of all of the C++ named cast expression types (static_cast, dynamic_cast, etc.) - Added classes CXXStaticCastExpr, CXXDynamicCastExpr, CXXReinterpretCastExpr, and CXXConstCastExpr to Also, fixed returned-stack-addr.cpp, which broke once when we fixed reinterpret_cast to diagnose double->int* conversions and again when we eliminated implicit conversions to reference types. The fix is in both testcase and SemaChecking.cpp. Most of this patch is simply support for the renaming. There's very little actual change in semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ce2fc3a343ea6098a96d587071cee7299f11957a |
|
27-Oct-2008 |
Ted Kremenek <kremenek@apple.com> |
- Move ExprIterator to Stmt.h so that it can be used by classes defined in Stmt.h - Implement child_begin() and child_end() for AsmStmt. Previously these had stub implementations that did not iterate over the input/output operands of an inline assembly statement. - Use ExprIterator for performing iteration over input/output operands. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
418f6c7d142e5ff4607f70cd8431d008442bafe9 |
|
27-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
Remember whether an initlist had a designator in the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ac620decb68aad1a2cf6c0c191b56d78981d9aaa |
|
24-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
PR2919: __builtin_types_compatible_p strips CRV qualifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
90b7bc67518a408d397f2400ff6c40e5465b45e4 |
|
22-Oct-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Now that DeclRefExpr accepts a NamedDecl, use a DeclRefExpr for when a CXXFieldDecl is referenced inside a method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ba7e210a999275695f58be03ef402758cfec3635 |
|
22-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
QualType::isMoreQualifiedThan and isAtLeastAsQualifiedAs assert that we aren't trying to compare with address-space qualifiers (for now). Clean up handing of DeclRefExprs in Expr::isLvalue and refactor part of the check into a static DeclCanBeLvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ae8d467e75a4e72b19e1eca199bf93dfaab47acf |
|
22-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Functions can be lvalues in C++, but not modifiable lvalues git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
98cd599ee8a9b259ed7388ee2921a20d97658864 |
|
22-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Initial step toward supporting qualification conversions (C++ 4.4). Changes: - Sema::IsQualificationConversion determines whether we have a qualification conversion. - Sema::CheckSingleAssignment constraints now follows the C++ rules in C++, performing an implicit conversion from the right-hand side to the type of the left-hand side rather than checking based on the C notion of "compatibility". We now rely on the implicit-conversion code to determine whether the conversion can happen or not. Sema::TryCopyInitialization has an ugly reference-related hack to cope with the initialization of references, for now. - When building DeclRefExprs, strip away the reference type, since there are no expressions whose type is a reference. We'll need to do this throughout Sema. - Expr::isLvalue now permits functions to be lvalues in C++ (but not in C). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ee5a700af3fe9ae1a639c271f093f40677dddc04 |
|
10-Oct-2008 |
Dale Johannesen <dalej@apple.com> |
Adjust calls to APFloat conversion for new interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
56ee6896f2efebffb4a2cce5a7610cdf1eddbbbe |
|
08-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
- Add BlockDecl AST node. - Modify BlockExpr to reference the BlockDecl. This is "cleanup" necessary to improve our lookup semantics for blocks (to fix <rdar://problem/6272905> clang block rewriter: parameter to function not imported into block?). Still some follow-up work to finish this (forthcoming). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
8a213de1a86e5f347c6b591f52712c2fd6177cce |
|
08-Oct-2008 |
Ted Kremenek <kremenek@apple.com> |
A little more tweaking with StmtIterator and SizeOfAlignofExpr. A recent commit actually introduced a regression, not fixed a bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57282 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b84887d99d97e332c11af4ca57b48a8976655183 |
|
08-Oct-2008 |
Ted Kremenek <kremenek@apple.com> |
Fixed a masked bug when iterating over the child expressions of SizeOfAlignOfTypeExpr. This bug was unmasked by recent changes to StmtIterator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
45b6b9d080ac56917337d73d8f1cd6374b27b05d |
|
06-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
Add a Expr::isEvaluatable method, eliminate isBuiltinConstantExpr which is checking for something that can be inconsistent with what we can constant fold. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a4d55d89c8076b402bb168e3edeef0c2cd2a78c3 |
|
06-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
Move folding of __builtin_classify_type out of the CallExpr interface into the constant folding interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
019f4e858e78587f2241ff1a76c747d7bcd7578c |
|
06-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
Add a comment that describes tryEvaluate. Make tryEvaluate fold __builtin_constant_p properly, and add some scaffolding for FloatExprEvaluator to eventually handle huge_val and inf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57152 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
cb888967400a03504c88acedd5248d6778a82f46 |
|
06-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
add a new CallExpr::isBuiltinCall() method, and use it to simplify some existing code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57151 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a62a03b282dd996f6cc1ff498b7ff306ad3959f8 |
|
06-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
a more efficient test for __builtin_classify_type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ae3f4919e4805f59c554d39cb9cd3a601809b2cb |
|
03-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add Builtins.def attribute for "can be a constant expression". - Enabled for builtins which are always constant expressions (__builtin_huge_val*, __builtin_inf*, __builtin_constant_p, __builtin_classify_type, __builtin___CFStringMakeConstantString). Added Builtin::Context::isConstantExpr. - Currently overly simply interface which only works for builtins whose constantexprness does not depend on their arguments. CallExpr::isBuiltinConstantExpr now takes an ASTContext argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9da13f9ddb2567e36f4bbee7b3c32f54aeb76d5b |
|
27-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Internally store the body of a BlockExpr using a Stmt* instead of a CompoundStmt*, and use the getBody() method to do the appropriate checking. This both removes the type-punning warnings in Expr.cpp and also makes BlockExpr have more consistency checks against modifications to its body (via StmtIterator). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4f6a7d7ead09b439216c32f2de806a998aeb222a |
|
26-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Tweak Expr::isModifiableLvalue() and Expr::isLvalue() to better deal with BlockDeclRef exprs. This fixes <rdar://problem/6248392> clang: Error when using address of stack variable inside block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e1226d24d23510e422160eb2413d9bb90de9b144 |
|
23-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Bug fix, result of isIntegerConstantExpr could be of incorrect width for type. - PR2817 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9c3c902835ef7d37300463ad47176ec21a67dc8b |
|
17-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Remove BlockStmtExpr. Block literals are now represented by the concrete BlockExpr class. This is cleanup (removes a FIXME). No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
17dab4f616db7be6800c1f0505f4888d2e8ad7a2 |
|
17-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Remove support for BlockExprExpr. For example... ^(expression) or ^(int arg1, float arg2)(expression) ...is no longer supported. All block literals now require a compound statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
24b41fa8239c63b9eb570d3e83c4a82840656a65 |
|
11-Sep-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
CXXConditionDeclExpr expression node is an lvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
dd972f20dc2bd3609d833893e5c6544ac09b59a9 |
|
06-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
More type checking for blocks. Still incomplete (will hopefully finish up this weekend). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
bfdcae678d44906293e21c0cddc6537f3ee8b5a4 |
|
04-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix a handful of typos (closure->block) to avoid confusion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4eb206bebcdab28ababe8df55c6185cec2cdc071 |
|
03-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Add semantic analysis for "blocks". Highlights... - 4 new AST nodes, BlockExpr, BlockStmtExpr, BlockExprExpr, BlockDeclRefExpr. - Sema::ActOnBlockStart(), ActOnBlockError(), ActOnBlockStmtExpr(), ActOnBlockExprExpr(), ActOnBlockReturnStmt(). Next steps... - hack Sema::ActOnIdentifierExpr() to deal with block decl refs. - add attribute handler for byref decls. - add test cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
aa1f9f1d50adf294674b74510b62e863b68572bc |
|
28-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix isIntegerConstantExpr eval of __builtin_offsetof to return result with correct width. - PR2728. Also, fix PR2727 test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9048891ff983d0681c116c6e8f1073aa31bdd6e8 |
|
28-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix double-free error with sizeof applied to VLA types. - PR2727. Also, fix warning in CodeGenTypes for new BlockPointer type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
2ea2b5e2b044739f4f5840bc1271abfa15a3101d |
|
25-Aug-2008 |
Anders Carlsson <andersca@mac.com> |
Handle emitting __builtin_huge_valf as a constant expr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
b88d45ea7eb835d36c4a4b3ea84b1260b120dd0a |
|
23-Aug-2008 |
Anders Carlsson <andersca@mac.com> |
treat bool literals as constatnt expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7267f7832e5f0c7f951765e201c5a2650eb1637b |
|
23-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add CodeGen support for CXXZeroInitValueExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
15425f9d2d92e2a5f99b09b8e2fc00025631e593 |
|
23-Aug-2008 |
Anders Carlsson <andersca@mac.com> |
Handle AddrLabelExprs in Expr::isConstantExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55245 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
987a14bf5883ef6e5d07f1c83eb6d41a8212a78c |
|
22-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add support for C++'s "type-specifier ( expression-list )" expression: -The Parser calls a new "ActOnCXXTypeConstructExpr" action. -Sema, depending on the type and expressions number: -If the type is a class, it will treat it as a class constructor. [TODO] -If there's only one expression (i.e. "int(0.5)" ), creates a new "CXXFunctionalCastExpr" Expr node -If there are no expressions (i.e "int()" ), creates a new "CXXZeroInitValueExpr" Expr node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
0835a3cdeefe714b4959d31127ea155e56393125 |
|
19-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add ExplicitCastExpr to replace the current CastExpr, and have ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr): Expr -> CastExpr -> ExplicitCastExpr -> ImplicitCastExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
32442bbc98bafa512fa42d46fedf60ed7d79f574 |
|
14-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Update some isIntegerConstantExpr uses to use getIntegerConstantExprValue where appropriate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
acc5f3e42334525bf28c86471551f83dfce222d5 |
|
11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
More #include cleaning - Kill unnecessary #includes in .cpp files. This is an automatic sweep so some things removed are actually used, but happen to be included by a previous header. I tried to get rid of the obvious examples and this was the easiest way to trim the #includes in one fell swoop. - We now return to regularly scheduled development. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c4a1dea2dc56bd1357ec91b829a0b9e68229a13e |
|
11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
More #include cleaning - Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h - Moved Sema::getCurMethodDecl() out of line (dependent on ObjCMethodDecl via dyn_cast). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e91593ef084479340582b2ba177b44be50a717b7 |
|
11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
More #include cleaning - Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and SourceLocation.h) - Move ASTContext constructor into implementation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
76de9d7a32b16246e2acd0d1ecd7355faceb4901 |
|
10-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
Cleanup ObjCSuperRefExpr (remove last usage and AST node:-). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54617 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d9f6910f4ef37c0e8eeee2a01287d9572c3176ef |
|
10-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
rename PreDefinedExpr -> PredefinedExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
355aba8d7ca0a27a2870f5bdeacc9dcf873eef77 |
|
10-Aug-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Remove the ICE pointer cast hack; the issue this was working around is now fixed in an alternate way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c63a1f276f7b324fd9a4be82098b1c8f7bf30733 |
|
04-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
Finally fix PR2189. This makes a fairly invasive but important change to move getAsArrayType into ASTContext instead of being a method on type. This is required because getAsArrayType(const AT), where AT is a typedef for "int[10]" needs to return ArrayType(const int, 10). Fixing this greatly simplifies getArrayDecayedType, which is a good sign. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
28be73f74c9e241a23ea24fe5756623de6bf1084 |
|
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
convert more code to use ASTContext to get canonical types instead of doing it directly. This is required for PR2189. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
611b2eccaf3869f32de51ecc02985426d1c0aaef |
|
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
fix some problems handling stmtexprs with labels (PR2374), and improve 'expression unused' diagnostics for stmtexprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
7c4a191d8be7eac565a64369de072b2a52bf6749 |
|
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
fix 80 col violation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
baf0d6678418e0dd9309438c3e50274253cfc7b2 |
|
25-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Add support for __extension__ as an lvalue. rdar://6097308 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
5a56ac30d04e8f0431a08980885662a47a6308aa |
|
24-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Added UnaryOperator::isPrefix(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
5f6b632391e24b08ead3e62ba2e2765e770382ed |
|
08-Jul-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
revert my bogus attempt to fix the comment. sorry for the noise. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
9a979c327c442597c6a9cee961336530460fed04 |
|
07-Jul-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix CheckForConstantInitializer() for Compound Literals also fix the correspondent test (it was expecting more errors than it should. please confirm my fix is correct (at least gcc agrees with me) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c44eec6dd29ee9415cbd38a35deff4c8b67abb6a |
|
03-Jul-2008 |
Anders Carlsson <andersca@mac.com> |
Shuffle things around in preparation for integrating Eli's constant evaluator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
07952324dda0e758c17f8bc3015793c65c51c48c |
|
01-Jul-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add Sema support for C++ classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4df728e368fa1f65ffc57572fed613dcca5b4fe8 |
|
24-Jun-2008 |
Ted Kremenek <kremenek@apple.com> |
ObjCMessageExpr objects that represent messages to class methods now can contain the ObjCInterfaceDecl* of the target class if it was available when the ObjCMessageExpr object was constructed. The original interfaces of the class has been preserved (requiring no functionality changes from clients), but now a "getClasSInfo" method returns both the ObjCInterfaceDecl* and IdentifierInfo* of the target class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4111024be81e7c0525e42dadcc126d27e5bf2425 |
|
17-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl. Patch by David Chisnall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
5549976193e34417d4474a5f4a514268ef6666c7 |
|
17-Jun-2008 |
Ted Kremenek <kremenek@apple.com> |
This patch is motivated by numerous strict-aliasing warnings when compiling clang as a Release build. The big change is that all AST nodes (subclasses of Stmt) whose children are Expr* store their children as Stmt* or arrays of Stmt*. This is to remove strict-aliasing warnings when using StmtIterator. None of the interfaces of any of the classes have changed (except those with arg_iterators, see below), as the accessor methods introduce the needed casts (via cast<>). While this extra casting may seem cumbersome, it actually adds some important sanity checks throughout the codebase, as clients using StmtIterator can potentially overwrite children that are expected to be Expr* with Stmt* (that aren't Expr*). The casts provide extra sanity checks that are operational in debug builds to catch invariant violations such as these. For classes that have arg_iterators (e.g., CallExpr), the definition of arg_iterator has been replaced. Instead of it being Expr**, it is an actual class (called ExprIterator) that wraps a Stmt**, and provides the necessary operators for iteration. The nice thing about this class is that it also uses cast<> to type-checking, which introduces extra sanity checks throughout the codebase that are useful for debugging. A few of the CodeGen functions that use arg_iterator (especially from OverloadExpr) have been modified to take begin and end iterators instead of a base Expr** and the number of arguments. This matches more with the abstraction of iteration. This still needs to be cleaned up a little bit, as clients expect that ExprIterator is a RandomAccessIterator (which we may or may not wish to allow for efficiency of representation). This is a fairly large patch. It passes the tests (except CodeGen/bitfield.c, which was already broken) on both a Debug and Release build, but it should obviously be reviewed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
da8249e57f3badecf925571881fe57243935c6c1 |
|
08-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
Fix ast dumping to work with long double literals, e.g. we dump: long double X() { return 1.0L; } as: long double X() (CompoundStmt 0xb06a00 <t.c:2:17, col:32> (ReturnStmt 0xb068d0 <col:19, col:26> (FloatingLiteral 0xb02cf0 <col:26> 'long double' 1.000000))) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52080 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c793808539b2ed6ec3324ff9ba0f57aa54e027ca |
|
04-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Put back my temporary hack until Eli addresses this in a more complete fashion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1b76ada683bcec33799fd0eb114aaad3e1d04ca9 |
|
03-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Re-fix r51907 in a way which doesn't affect valid code. This essentially moves the check for the invalid construct to a point where it doesn't affect other uses of isIntegerConstantExpr, and we can warn properly when the extension is used. This makes it a bit more complicated, but it's a lot cleaner. Steve, please tell me if this check is sufficient to handle the relevant system header. I know it's enough to handle the testcase, but I don't know what exactly the original looks like. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
a2ac06e9647bbac5e910201a570ed623e61b00e2 |
|
03-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Change Expr::isIntegerConstantExpr() to allow for pointer types (for GCC compatibility). Note FIXME. Fix <rdar://problem/5977870> clang on xcode: error: arrays with static storage duration must have constant integer length git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e3e9add4fd788927df6f545570e7838db59c01d7 |
|
03-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/5979875> clang on xcode: error: use of undeclared identifier 'super' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
799a6a6850af625946bb8d88ca960bb6604e3858 |
|
31-May-2008 |
Steve Naroff <snaroff@apple.com> |
Teach Expr::isLvalue() about ObjC properties. For now, all properties are writable. Added a FIXME for another day. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ae7840776d6cd31b4d7a4a345b61bcbb3744df6c |
|
30-May-2008 |
Steve Naroff <snaroff@apple.com> |
Add basic support for properties references (a missing feature). While it is far from complete, it does fix the following <rdar://problem/5967199> clang on xcode: error: member reference is not to a structure or union git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
f494b579b22f9950f5af021f0bf9879a91bb8b41 |
|
29-May-2008 |
Steve Naroff <snaroff@apple.com> |
- Move ObjC Expresssion AST's from Expr.h => ExprObjC.h - #include ExprObjC.h in many places git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
211f6adf1301a1461015fb6cb08a05f0a35b65f3 |
|
27-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Assume statement expressions have side effects; this gets rid of a lot of extra warnings in the Python source. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4f8d123e3e2c260de3377208106ddba87cee28b4 |
|
22-May-2008 |
Dan Gohman <gohman@apple.com> |
Move getAccessedFieldNo out of lib/AST/Expr.cpp into lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to use its own enum for visibility types instead of using llvm::GlobalValue::VisibilityTypes. These changes eliminate dependencies in the AST library on LLVM's VMCore library. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51398 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
e1b6d5084ecf8c81c315dece1d203acdb6eb8fb5 |
|
21-May-2008 |
Dan Gohman <gohman@apple.com> |
Remove the unneeded #include of VMCore header "llvm/DerivedTypes.h". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
4be1f47de20525ad90f02ba8682a7e2cbd3205d1 |
|
19-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Make the unused expression warning a bit less aggressive (found in PHP code). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
861dc46e3c53d64d8685fd9a0f95faac710b61c6 |
|
16-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Minor cleanup to isBuiltinConstantExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
774e4af13a0b7683563a22c6b99e4dda45334cc8 |
|
15-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Removed bogus "return true" in Expr::isConstantExpr that returned true for all expressions. This appears to be a regression introduced in r51113 that caused many test cases to fail (there is still a test case in the Analysis directory that is failing): http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080512/005706.html git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
d38617c8a50f9729c254ab76cd359af797c6739b |
|
14-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Implementation of __builtin_shufflevector, a portable builtin capable of expressing the full flexibility of the LLVM shufflevector instruction. The expected immediate usage is in *mmintrin.h, so that they don't depend on the mess of gcc-inherited (and not completely implemented) shuffle builtins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
3b8d116703db8018f855cbb4733ace426422623b |
|
13-May-2008 |
Nate Begeman <natebegeman@mac.com> |
Remove AST dependency on VMCore by switching ExtVectorElementExpr off Constant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
8a99764f9b778a54e7440b1ee06a1e48f25d76d8 |
|
09-May-2008 |
Nate Begeman <natebegeman@mac.com> |
Extend vector member references to include {.hi, .lo, .e, .o} which return a vector of the same element type and half the width, with the high, low, even, and odd elements respectively. Allow member references to member references, so that .hi.hi gives you the high quarter of a vector. This is fairly convenient syntax for some insert/extract operations. Remove some unnecessary methods/types in the ExtVectorElementExpr class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
1a42a2550a2db937ab3df863b771f13be34b66d6 |
|
07-May-2008 |
Steve Naroff <snaroff@apple.com> |
Fixup InitListExpr::child_begin/end. Thanks to Ted for catching the regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
81e72e4c231a47633e36a6c2f3ded83630963b3f |
|
07-May-2008 |
Steve Naroff <snaroff@apple.com> |
Fix off-by-one error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
92261971835f822e6bcee7baadf2c34b482dfe96 |
|
02-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Fixed bug in ObjCIVarExpr: the child iterator now iterates over the Base expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
ea958e57a370b641c5a69347b75e9f8e3b5a41a2 |
|
01-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Use pointer swizziling to unify in ObjCMessageExpr the receiver and classname "fields". This saves us a pointer. Implemented serialization for ObjCMessageExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
c5ae899b4bbf65488445316c63168079177db0ed |
|
01-May-2008 |
Steve Naroff <snaroff@apple.com> |
Extend InitListExpr API/IMPL to support arbitrary add/remove (in support of the initializer rewrite I am doing). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50511 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
213541a68a3e137d11d2cefb612c6cdb410d7e8e |
|
19-Apr-2008 |
Nate Begeman <natebegeman@mac.com> |
OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49942 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
8123a95c33b792d35c2e4992ba6e27882748fb0d |
|
10-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Several improvements from Doug Gregor related to default argument handling. I'll fix up the c89 (void) thing next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
04421087832a031c90bd58f128c7c0e741db8dd2 |
|
08-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Add support for C++ default arguments, and rework Parse-Sema interaction for function parameters, fixing PR2046. Patch by Doug Gregor! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
63f067f5a75ae97b53dc7a6a6530e2c72c8bb7f8 |
|
04-Apr-2008 |
Seo Sanghyeon <sanxiyn@gmail.com> |
PR1963: Address of function is a constant expression git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|
bda0b626e74513950405c27525af87e214e605e2 |
|
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Make a major restructuring of the clang tree: introduce a top-level lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Expr.cpp
|