History log of /external/clang/include/clang/AST/Expr.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/include/clang/AST/Expr.h
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/include/clang/AST/Expr.h
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
0004329758b99d2b92096b353e35c427ebbee622 05-Nov-2013 Richard Smith <richard-llvm@metafoo.co.uk> Simplify: we don't care why constant evaluation might have failed when we're
checking an expression for constant overflow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
063820655db8121f0022a7c51458463c7250324c 20-Oct-2013 Benjamin Kramer <benny.kra@googlemail.com> Miscellaneous speling fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
877e6a6fb05660a3cc3fc24bcbef4df5e4702423 08-Oct-2013 Reid Kleckner <reid@kleckner.net> Explicitly request unsigned enum types when desired

This fixes repeated -Wmicrosoft warnings when self-hosting clang on
Windows, and gets us real unsigned enum types with MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
4e49952712ff9b1b1696cb07580b2b24a3ca99e1 03-Oct-2013 Matthew Curtis <mcurtis@codeaurora.org> Gracefully (and correctly) handle init of multiple union members

We now emit warnings when doing so and code generation is consistent
with GCC. Note that the C99 spec is unclear as to the precise
behavior.

See also ...
Bug:
http://llvm.org/bugs/show_bug.cgi?id=16644 and

cfe-dev discussion:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-September/031918.html



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
60288600131c3f91bfc8ba512df9f2dd588e3308 18-Sep-2013 Hal Finkel <hfinkel@anl.gov> Remove unnecessary comment regarding AsTypeExpr base class

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
a1ec2b0dbfd33cc3b4b7ac003a390995fc2305c6 13-Sep-2013 Jordan Rose <jordan_rose@apple.com> Fix two incorrect comments.

Patch by Jared Grubb!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
32b5a1e82f535d43e94332183cd330f4a39b2dbd 22-Aug-2013 Craig Topper <craig.topper@gmail.com> Constify more uses of ASTContext&. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
6f4f8083931a92f9959168d4430da7ddf9183100 03-Aug-2013 Craig Topper <craig.topper@gmail.com> Add support for passing -1 to __builtin_shufflevector to signify an undefined element value to match IR capabilities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
642038d7c5855b54afbca298631da93b7889d4a5 27-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Delete dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
a2338bc4c2887937478d302901fb41a53e14e6d6 25-Apr-2013 Anna Zaks <ganna@apple.com> Fix a possible null pointer dereference found by the analyzer.

When computing the other parameters, ‘op’ is checked for being null before it’s dereferenced.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
58b65d953e67251bfce28a5251bb3b496490f343 02-Apr-2013 Stefanus Du Toit <stefanus.du.toit@intel.com> Update assertion string to new name of ArithAssignBinaryOperator

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178572 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
8569281fb7ce9b5ca164a0528b876acbb45eb989 23-Mar-2013 Jordan Rose <jordan_rose@apple.com> Add reverseComparisonOp and negateComparisonOp to BinaryOperator.

...and adopt them in the analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
e462c60ac3365d3302b7d0a566c5cb7dbe0e5ae3 15-Mar-2013 Eric Christopher <echristo@gmail.com> Silence anonymous type in anonymous union warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177133 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
223f0ff6a9a5d0eaf63b98b3aa92888b4c088868 09-Feb-2013 Jordan Rose <jordan_rose@apple.com> Remove some stray uses of <ctype.h> functions.

These are causing assertions on some MSVC builds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
5846720f08a6b225484bfe663599c2b057a99bc8 05-Feb-2013 Ted Kremenek <kremenek@apple.com> Change subexpressions to be visited in the CFG from left-to-right.

This is a more natural order of evaluation, and it is very important
for visualization in the static analyzer. Within Xcode, the arrows
will not jump from right to left, which looks very visually jarring.
It also provides a more natural location for dataflow-based diagnostics.

Along the way, we found a case in the analyzer diagnostics where we
needed to indicate that a variable was "captured" by a block.

-fsyntax-only timings on sqlite3.c show no visible performance change,
although this is just one test case.

Fixes <rdar://problem/13016513>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
ad48a500596d7d678b99c7f94326cfa856c3b49f 24-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> Patch to check for integer overflow. It has been
commented on and approved by Richard Smith.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
a18e70b25c85d7e653e642b5e6e58d6063af3d83 10-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> Issue warning when case value is too large to fit
in case condition type. // rdar://11577384.
Test is conditionalized on x86_64-apple triple as
I am not sure if the INT_MAX/LONG_MAX values in the test
will pass this test for other hosts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
30a2e16f6c27f888dd11eba6bbbae1e980078fcb 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort #include lines for all files under include/...

This is a simpler sort, entirely automatic with the help of
llvm/utils/sort_includes.py -- no manual edits here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
9852f58f50b4fc20914fbce5b4454135a42343f4 01-Dec-2012 Benjamin Kramer <benny.kra@googlemail.com> Don't include Type.h in DeclarationName.h.

Recursively prune some includes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
2a82ca255b0f99f6201a75ed52b91fc024f6e9cf 28-Nov-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce ASTUnresolvedSet, an UnresolvedSet-like class, whose contents are
allocated using the allocator associated with an ASTContext.

Use this inside CXXRecordDecl::DefinitionData instead of an UnresolvedSet to
avoid a potential memory leak.

rdar://12761275

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
b43d87b0646aa04951056c7e0d1ab9a58eb09f66 12-Oct-2012 Sean Silva <silvas@purdue.edu> Remove pointless classof()'s.

Updates to llvm/Support/Casting.h have rendered these classof()'s
irrelevant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165770 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
be9af1288881110e406b87914162eaa59f1e5918 02-Oct-2012 Lang Hames <lhames@gmail.com> Add FP_CONTRACT support for clang.

Clang will now honor the FP_CONTRACT pragma and emit LLVM
fmuladd intrinsics for expressions of the form A * B + C (when they occur in a
single statement).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
f56faa01936b9cf909623d7f06e3c2569ca4a78e 15-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
88920d1a84dc63a3722b1f2b1fb5926c44bd81ab 23-Aug-2012 Roman Divacky <rdivacky@freebsd.org> Mark these const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
ad0fe03b897f9486191e75c8d90c3ffa9b4fd6a5 23-Aug-2012 Ted Kremenek <kremenek@apple.com> Fix an assortment of doxygen comment issues found by -Wdocumentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
132283beb1b032e0acd09bdfb45dceadeea0026e 26-Jul-2012 Jordan Rose <jordan_rose@apple.com> Add a const version of Expr::IgnoreImplicit. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
28ad063b279378b19cb0704f977429df366a151e 23-Jun-2012 Nico Weber <nicolasweber@gmx.de> Support L__FUNCTION__ in microsoft mode, PR11789

Heavily based on a patch from
Aaron Wishnick <aaron.s.wishnick@gmail.com>.

I'll clean up the duplicated function in CodeGen as
a follow-up, later today or tomorrow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
0982205bade2fb4fc984c27b2ab401e683963b10 15-Jun-2012 James Dennett <jdennett@google.com> Ongoing documentation cleanup: fixed Doxygen markup errors, added \brief
annotations in many places where it involved little change, fixed some
examples and marked code examples with \code...\endcode, and changed a few
nearby mentions of C++0x to refer to C++11.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
36d02af300a207242f0486b4255420d8be796b21 05-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> Add a warning for when an array-to-pointer decay is performed on an array
temporary or an array subobject of a class temporary, and the resulting value
is used to initialize a pointer which outlives the temporary. Such a pointer
is always left dangling after the initialization completes and the array's
lifetime ends.

In order to detect this situation, this change also adds an
LValueClassification of LV_ArrayTemporary for temporaries of array type which
aren't subobjects of class temporaries. These occur in C++11 T{...} and GNU C++
(T){...} expressions, when T is an array type. Previously we treated the former
as a generic prvalue and the latter as a class temporary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
78dae24600a877f52dbb6e58bfd5778754a00974 13-Mar-2012 John McCall <rjmccall@apple.com> Alternate fix to PR12248: put Sema in charge of special-casing
the diagnostic for assigning to a copied block capture. This has
the pleasant side-effect of letting us special-case the diagnostic
for assigning to a copied lambda capture as well, without introducing
a new non-modifiable enumerator for it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
f9ff5876289d5228c299b57416a62c8c3b848287 09-Mar-2012 Daniel Dunbar <daniel@zuster.org> [AST] Mark Expr::Ignore*() functions as LLVM_READONLY.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
4f311183be3d923da9fbe8702c453688b4c426a9 09-Mar-2012 Daniel Dunbar <daniel@zuster.org> [AST] Mark Expr::getExprLoc() as LLVM_READONLY.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152429 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
aa49a7d70e58dac2aeb40664ba16d2ea571b8c95 09-Mar-2012 Daniel Dunbar <daniel@zuster.org> [AST/etc] Mark {getSourceRange(),getStartLoc(),getEndLoc()} as LLVM_READONLY.
- The theory here is that we have these functions sprinkled in all over the
place. This should allow the optimizer to at least realize it can still do
load CSE across these calls.
- I blindly marked all instances as such, even though the optimizer can infer
this attribute in some instances (some of the inline ones) as that was easier
and also, when given the choice between thinking and not thinking, I prefer
the latter.

You might think this is mere frivolity, but actually this is good for a .7 -
1.1% speedup on 403.gcc/combine.c, JSC/Interpreter.cpp,
OGF/NSBezierPath-OAExtensions.m.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
c112b9ce0aa54607c3bbad6db1c21da6bb786b58 06-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move clang/Basic/UsuallyTinyPtrVector.h to llvm/ADT/UsuallyTinyPtrVector.h.

Depends on llvm commit r152090.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
792777c9028e5fc583a83fb3620c2f9e4f7ed1f9 06-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move include/clang/AST/UsuallyTinyPtrVector.h -> include/clang/Basic/UsuallyTinyPtrVector.h
and add an erase method to it.

Patch by Andrew Craik!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
bb8a897f350f46475f36140480e82289f6baa020 26-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Move CharacterLiteral, FloatingLiteral and UnaryExprOrTypeTraitExpr flags over into Stmt.

Apply the inheritance-padding trick to FloatingLiteral.
Shrinks CharacterLiteral from 32 to 24 bytes and the other two from 40 to 32 bytes (x86_64).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
91219326471798c7d3b02dc48691581580338969 26-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Make clever use of padding to shrink IntegerLiterals.

Inheritance allows us to use padding across classes.
40 -> 32 bytes on x86_64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151499 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
0840f2378e9b5764755c5dffd27d7878c7606a0c 26-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Bit pack StringLiteral.

48 -> 40 bytes on x86_64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
bbf4b22b3166e5065f4475006d83678e3e1d00a3 26-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Reduce padding in MemberExpr.

56 -> 48 bytes on x86_64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
3654c6993697a30af0c5a472963fe8c03e622b98 26-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> CompoundLiteralExpr: Pair a bool with a pointer.

48 -> 40 bytes on x86_64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151496 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
a72c352e4950cb487942427550777378b68dc078 26-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Shuffle members of DesignatedInitExpr to avoid padding.

40 -> 32 bytes on x86_64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
ec79d877c1998366480d97a7a6c94e15c053edd8 24-Feb-2012 Douglas Gregor <dgregor@apple.com> Two minor, related fixes for template instantiation with blocks:
- Make sure that the block expression is instantiation-dependent if the
block is in a dependent context
- Make sure that the C++ 'this' expression gets captured even if we
don't rebuild the AST node during template instantiation. This would
also have manifested as a bug for lambdas.

Fixes <rdar://problem/10832617>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
97df54e0c075bc8d6a869597e771dad0c11a2180 23-Feb-2012 Douglas Gregor <dgregor@apple.com> Pull the OpaqueValueExpr's source expression into its constructor, so
that we can correctly compute value-dependence of the OVE.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
e91e0ae772004912285ccc3848b27208da8c045b 07-Feb-2012 Chris Lattner <sabre@nondot.org> tidy up code, make the common case (1-byte strings) come first


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149942 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
282e7e66748cc6dd14d6f7f2cb52e5373c531e61 04-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> In C++11 mode, when an integral constant expression is desired and we have a
value of class type, look for a unique conversion operator converting to
integral or unscoped enumeration type and use that. Implements [expr.const]p5.

Sema::VerifyIntegerConstantExpression now performs the conversion and returns
the converted result. Some important callers of Expr::isIntegralConstantExpr
have been switched over to using it (including all of those required for C++11
conformance); this switch brings a side-benefit of improved diagnostics and, in
several cases, simpler code. However, some language extensions and attributes
have not been moved across and will not perform implicit conversions on
constant expressions of literal class type where an ICE is required.

In passing, fix static_assert to perform a contextual conversion to bool on its
argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
745f5147e065900267c85a5568785a1991d4838f 27-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> constexpr: Implement the [dcl.constexpr]p5 check for whether a constexpr
function definition can produce a constant expression. This also provides the
last few checks for [dcl.constexpr]p3 and [dcl.constexpr]p4.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
4c3fc9b38d3723f73e4ded594cebf38c76f91d93 18-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> Move narrowing conversion detection code from SemaInit to SemaOverload, ready
for it to be used in converted constant expression checking, and fix a couple
of issues:
- Conversion operators implicitly invoked prior to the narrowing conversion
were not being correctly handled when determining whether a constant value
was narrowed.
- For conversions from floating-point to integral types, the diagnostic text
incorrectly always claimed that the source expression was not a constant
expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
80d4b55db94db2172a04617d1a80feca6bbcea5c 28-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> Small refactoring and simplification of constant evaluation and some of its
clients. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
ffbe9b9c64ab2e94b9d48ec56e511f75826fc80a 23-Dec-2011 Benjamin Kramer <benny.kra@googlemail.com> Mass rename C1x references to C11. The name hasn't proliferated like "C++0x" so this patch is surprisingly small.

Also drop -Wc1x-extensions in favor of -Wc11-extensions. I don't think we need to keep this around for compatibility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
099e7f647ccda915513f2b2ec53352dc756082d3 19-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> constexpr handling improvements. Produce detailed diagnostics when a 'constexpr'
variable is initialized by a non-constant expression, and pass in the variable
being declared so that earlier-initialized fields' values can be used.

Rearrange VarDecl init evaluation to make this possible, and in so doing fix a
long-standing issue in our C++ constant expression handling, where we would
mishandle cases like:

extern const int a;
const int n = a;
const int a = 5;
int arr[n];

Here, n is not initialized by a constant expression, so can't be used in an ICE,
even though the initialization expression would be an ICE if it appeared later
in the TU. This requires computing whether the initializer is an ICE eagerly,
and saving that information in PCH files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
dd1f29b6d686899bfd033f26e16cb1621e5549e8 12-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> Prepare constant expression infrastructure for the generation of richer
diagnostics. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
f48fdb0937e67f691393f9ffdf75653e5128ea13 09-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> C++11 constant expressions: Don't use CheckICE in C++11; instead, determine
whether an expression is a (core) constant expression as a side-effect of
evaluation. This takes us from accepting far too few expressions as ICEs to
accepting slightly too many -- fixes for the remaining cases are coming next.

The diagnostics produced when an expression is found to be non-constant are
currently quite poor (with generic wording but reasonable source locations),
and will be improved in subsequent commits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
2def77399ab3088106a2d61372344f5b7104e1a2 09-Dec-2011 David Blaikie <dblaikie@gmail.com> Add notes for suppressing and (if it's a zero-arg function returning bool) fixing the function-to-bool conversion warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146280 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
0e35b4ecee380c2b4c33d75da6bc2fb6f6bc7df3 07-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> DeadStoresChecker: when whitelisting dead initializations with constants, look
for a foldable constant rather than an IR-level constant. This is still far too
liberal, but is a step in the right direction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
b92e5d0acbb21e57498fcc4157e108a50c82b857 06-Dec-2011 John McCall <rjmccall@apple.com> Fix an extremely stupid bug causing terrible miscompilations
of &= on pseudo-objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
ba243b59a1074e0962f6abfa3bb9aa984eac1245 09-Nov-2011 David Blaikie <dblaikie@gmail.com> Fixing 80 col violations (& removing any trailing whitespace on files I was touching anyway)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
9a17a680c74ef661bf3d864029adf7e74d9cb5b8 07-Nov-2011 Richard Smith <richard-llvm@metafoo.co.uk> Constant expression evaluation: preserve subobject designator when flattening a
core constant value down to an APValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143909 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
51f4708c00110940ca3f337961915f2ca1668375 29-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Rename Expr::Evaluate to Expr::EvaluateAsRValue to make it clear that it will
implicitly perform an lvalue-to-rvalue conversion if used on an lvalue
expression. Also improve the documentation of Expr::Evaluate* to indicate which
of them will accept expressions with side-effects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
d0dcceae2a8ca0e37b5dd471a704de8583d49c95 29-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Initial support for C++11 constexpr function invocation substitution. Using
constexpr function arguments outside of their function (passing or returning
them by reference) does not work correctly yet.

Calling constexpr function templates does not work yet, since the bodies are not
instantiated until the end of the translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
c49bd11f96c2378969822f1f1b814ffa8f2bfee4 28-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Reinstate r142844 (reverted in r142872) now that lvalue-to-rvalue conversions
are present in all the necessary places:

In constant expression evaluation, evaluate lvalues as lvalues and rvalues as
rvalues. Remove special case for caching reference initialization and fix a
cyclic initialization crash in the process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
3c3b7f90a863af43fa63043d396553ecf205351c 25-Oct-2011 John McCall <rjmccall@apple.com> Restore r142914 and r142915, now with missing file and apparent
GCC compiler workaround.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
327a50f46449c946c42d50d97689bcb30e2af7d9 25-Oct-2011 NAKAMURA Takumi <geek4civic@gmail.com> Revert r142914 and r142915, due to possibly missing file.

r142914: "Introduce a placeholder type for "pseudo object""
r142915: "Pull the pseudo-object stuff into its own file."

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
a1b852f8e1bee5ed3604ee483803cef39ce57a20 25-Oct-2011 John McCall <rjmccall@apple.com> Introduce a placeholder type for "pseudo object"
expressions: expressions which refer to a logical rather
than a physical l-value, where the logical object is
actually accessed via custom getter/setter code.
A subsequent patch will generalize the AST for these
so that arbitrary "implementing" sub-expressions can
be provided.

Right now the only client is ObjC properties, but
this should be generalizable to similar language
features, e.g. Managed C++'s __property methods.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
436c8898cd1c93c5bacd3fcc4ac586bc5cd77062 25-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Revert r142844, it broke selfhost. The problem appears to be a missing
lvalue-to-rvalue conversion on the LHS operand of '->'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
41bf4f38348561a0f12c10d34f1673cd19a6eb04 24-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Constant expression evaluation: evaluate lvalues as lvalues, and rvalues as
rvalues, as C++11 constant evaluation semantics require. DeclRefs referring to
references can now use the normal initialization-caching codepath, which
incidentally fixes a crash in cyclic initialization of references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142844 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
85def357129b6cdfd69a66ad0e6994506418a2a9 18-Oct-2011 John McCall <rjmccall@apple.com> In hasPlaceholderType(Kind) and isSpecificPlaceholderType(Kind), assert
that the parameter is actually a placeholder type kind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
4919dfd54e2296ca997e3d1c9dab85976bba8e95 17-Oct-2011 John McCall <rjmccall@apple.com> Add a helper function for determining whether an expression
has placeholder type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
1e12c59e8f9bb76c23628c4e0d0a1dfced0b1fa0 16-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Split apart the state accumulated during constant expression evaluation and the
end result. Use this split to propagate state information and diagnostics
through more of constant expression evaluation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
7cc58b4c927fca539d43eaa58e00dca95946eb7c 05-Oct-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Added a flag to identify resolved overloaded function references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
ec5bc81fd55bfcc26fc4bde6d5e33113d94c2209 22-Aug-2011 Zhongxing Xu <xuzhongxing@foxmail.com> Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
686775deca8b8685eb90801495880e3abdd844c2 20-Jul-2011 Chris Lattner <sabre@nondot.org> now that we have a centralized place to do so, add some using declarations for
some common llvm types: stringref and smallvector. This cleans up the codebase
quite a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
5b8968cc599eb6100bb73ae87be9d6cd2577ac9e 15-Jul-2011 Douglas Gregor <dgregor@apple.com> Store bracket locations for array subscript expressions, from Erik Verbruggen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
379010addb0e84fd0fbc37c829baf658958521bd 15-Jul-2011 John McCall <rjmccall@apple.com> Fix the definition of AsTypeExpr. I'm still not sure this
is right --- shouldn't there be a TypeLoc in here somewhere? ---
but at least it doesn't have a redundant QualType and a broken
children() method.

Noticed this while doing things in serialization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
91a5755ad73c5dc1dfb167e448fdd74e75a6df56 15-Jul-2011 John McCall <rjmccall@apple.com> Create a new expression node, SubstNonTypeTemplateParmExpr,
to represent a fully-substituted non-type template parameter.
This should improve source fidelity, as well as being generically
useful for diagnostics and such.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
7b33c2b3908b178511ccaace8cacb5e5b14552a9 04-Jun-2011 Nick Lewycky <nicholas@mxc.ca> Remove extraneous "virtual" keyword and non-virtual destructor. Caught by
-Wnon-virtual-dtor!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
61eee0ca33b29e102f11bab77c8b74cc00e2392b 04-Jun-2011 Tanya Lattner <tonic@nondot.org> Add support for builtin astype:
__builtin_astype(): Used to reinterpreted as another data type of the same size using for both scalar and vector data types.
Added test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
8cad3046be06ea73ff8892d947697a21d7a440d3 13-May-2011 Peter Collingbourne <peter@pcc.me.uk> Refactoring of constant expression evaluator

This introduces a generic base class for the expression evaluator
classes, which handles a few common expression types which were
previously handled separately in each class. Also, the expression
evaluator now uses ConstStmtVisitor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
1dd986dff9ddfbec687975700770bb377988e9ed 03-May-2011 Richard Trieu <rtrieu@google.com> Added an assert to IntegerLiteral to ensure that the integer type passed in has the same size as the APInt passed in. Also, updated the comments around IntegerLiteral.

Changed the integer type that range-based for-loops used. Switched to pointer difference type, which satisfies the new assert in IntegerLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
654f6b2b53af2c950c62ef0161fa021648accbcb 30-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add a couple of assertions to make sure the bitfields can fit the value assigned to them. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
c69a505cfa318d571ce8a0cd038c8d958585a735 23-Apr-2011 Jay Foad <jay.foad@gmail.com> Remove unused STL header includes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
1c860d5640e8eebb11a5d515a761242b66761b0b 19-Apr-2011 Peter Collingbourne <peter@pcc.me.uk> Add a new expression classification, CL_AddressableVoid

CL_AddressableVoid is the expression classification used for void
expressions whose address can be taken, i.e. the result of [], *
or void variable references in C, as opposed to things like the
result of a void function call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
fc8f0e14ad142ed811e90fbd9a30e419e301c717 15-Apr-2011 Chris Lattner <sabre@nondot.org> fix a bunch of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
077f490d0a514dcc448475f33f799934252b85a7 26-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> More coherent diagnostic attempting to assign to a member of a const object returned
from an objective-c message: // rdar://9005189


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
06dec892b5300b43263d25c5476b506c9d6cfbad 12-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Renamed OffsetOfNode::getRange to getSourceRange for uniformity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
ad8dcf4a9df0e24051dc31bf9e6f3cd138a34298 17-Feb-2011 Chris Lattner <sabre@nondot.org> Step #1/N of implementing support for __label__: split labels into
LabelDecl and LabelStmt. There is a 1-1 correspondence between the
two, but this simplifies a bunch of code by itself. This is because
labels are the only place where we previously had references to random
other statements, causing grief for AST serialization and other stuff.

This does cause one regression (attr(unused) doesn't silence unused
label warnings) which I'll address next.

This does fix some minor bugs:
1. "The only valid attribute " diagnostic was capitalized.
2. Various diagnostics printed as ''labelname'' instead of 'labelname'
3. This reduces duplication of label checking between functions and blocks.

Review appreciated, particularly for the cindex and template bits.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
469a1eb996e1cb0be54f9b210f836afbddcbb2cc 02-Feb-2011 John McCall <rjmccall@apple.com> An insomniac stab at making block declarations list the variables they close
on, as well as more reliably limiting invalid references to locals from
nested scopes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
2c9a03f3b249e4d9d76eadf758a33142adc4d0a4 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Rvalue references for *this: implement the implicit conversion rules
for the implicit object argument to a non-static member function with
a ref-qualifier (C++0x [over.match.funcs]p4).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124311 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
403ba3522d1b1c97ae5fad81c1a2c4b3a754e1c1 19-Dec-2010 Nick Lewycky <nicholas@mxc.ca> Add missing standard includes. Patch by Joerg Sonnenberger!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122194 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
d0937224f383c7cc72c947119380f9713a070c73 13-Dec-2010 Douglas Gregor <dgregor@apple.com> Variadic templates: extend Type, NestedNameSpecifier, TemplateName,
and TemplateArgument with an operation that determines whether there
are any unexpanded parameter packs within that construct. Use this
information to diagnose the appearance of the names of parameter packs
that have not been expanded (C++ [temp.variadic]p5). Since this
property is checked often (every declaration, ever expression
statement, etc.), we extend Type and Expr with a bit storing the
result of this computation, rather than walking the AST each time to
determine whether any unexpanded parameter packs occur.

This commit is deficient in several ways, which will be remedied with
future commits:
- Expr has a bit to store the presence of an unexpanded parameter
pack, but it is never set.
- The error messages don't point out where the unexpanded parameter
packs were named in the type/expression, but they should.
- We don't check for unexpanded parameter packs in all of the places
where we should.
- Testing is sparse, pending the resolution of the above three
issues.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
0e800c9c20d1a658a91096c756c4a4a9e90264fc 04-Dec-2010 John McCall <rjmccall@apple.com> Remove some defensive calls to EmitLoadOfPropertyRefLValue that shouldn't
be required, and then fix up some missing loads on overloaded-operator
paths which that exposed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
cc7bd10c0de9449b795bda3c5dcc6d83cc48436b 23-Nov-2010 Zhanyong Wan <wan@google.com> Fix a typo in a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
0943168ac126b8047f30f6bd215fbe7db14d61ba 18-Nov-2010 John McCall <rjmccall@apple.com> Add an assertion, fix a whole bunch of bugs, comment the assertion
out because there are still bugs left.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
cdba6595a61a7bd31f504260abf63c900a759d0f 18-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: switch remaining expressions over
to the data-recursion algorithm. CursorVisitor
now no longer subclasses StmtVisitor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
9dc84c9455df2a77195147d0210c915dc1775a88 16-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Handle member initializer in C++ ctor.
- Add a new Kind of ProgramPoint: PostInitializer.
- Still use GRStmtNodeBuilder. But special handling PostInitializer in
GRStmtNodeBuilder::GenerateAutoTransition().
- Someday we should clean up the interface of GRStmtNodeBuilder.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
5082d34e4107a44ac7f07b62f7a6c917e0e6e71e 16-Nov-2010 John McCall <rjmccall@apple.com> Add another case to the whitelist of cast kinds that can convert to bool.
Fixes PR8608.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
3fa5cae9b3812cab9fab6c042c3329bb70a3d046 26-Oct-2010 John McCall <rjmccall@apple.com> No really, we don't have a retain/release system for statements/expressions
anymore.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
4045107b7384fd68eed5e3e2f06fc2a47e7be0a6 15-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write to/from PCH DeclarationNameLocs, DeclarationNameInfos and QualifierInfos (rdar://8513756).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
16c5dea6c2d3e4cf529de9d9b37f6a40441acb2c 10-Oct-2010 Chris Lattner <sabre@nondot.org> fix PR8217, a silent miscompilation of invalid code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
138d6a6890c171068ac60430431eaadb3fcef9ab 30-Sep-2010 Gabor Greif <ggreif@gmail.com> typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
af9b96828f9126d993c3e155b8453be62013b735 17-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to add IRgen support for Gnu's conditional operator
extension when missing LHS. This patch covers scalar
conditionals only. Others are wip.
(pr7726, radar 8353567).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114182 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
4d3175c1e5a44251ea97b0c81e80f060629d9c08 09-Sep-2010 Ted Kremenek <kremenek@apple.com> Static analyzer fix: <rdar://problem/5880430> Switch on enum should not consider default case live if all enum values are covered

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
f9b949fecf339a2c9bd97dd11a272c4878f85ce4 31-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> AST work to support [C++] [IRgen] for ?: with missing LHS
This is also pr7726 and wip. No change in functionality
at this time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
ae2777cfe7d21f73e5a4155082fe20197cec62bd 28-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Fix copy+paste error in comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
993cdca0fed7deb646e4654dfb2607227a497faa 25-Aug-2010 Benjamin Kramer <benny.kra@googlemail.com> Silence a GCC warning saying that unsigned >= UO_PostInc is always true.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
0799c53fc2bb7acf937c8a8e165033dba1a5aba3 25-Aug-2010 John McCall <rjmccall@apple.com> Random space optimization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
60adf4acf40b72227740bf966fb87eebddff3f37 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename PCHStmtReader -> ASTStmtReader.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
3397c5570369f19b2d6c52e898f708d75ceede1f 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Do the PCH->AST rename for ASTWriter's implementation parts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
2f4eaef37476ae6891ede8ba215d0f6fd093629b 17-Aug-2010 Benjamin Kramer <benny.kra@googlemail.com> Convert all uses of StringLiteral::getStrData() to StringLiteral::getString()
and remove getStrData(). Patch by Peter Davies (with some tweaks).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
2cad900202561cdda18ea6cc51ddbf3e20e3c23a 10-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added TypeLocs to VAArgExpr node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
3fcb73dae91be42b071cf0dde9222b7ec362146d 10-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added TypeLocs to TypesCompatibleExpr node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
e8a126ba9a8a2f53098d388d04ec555b758f0c67 29-Jul-2010 Eli Friedman <eli.friedman@gmail.com> PR7736: Make sure to mark &Class::Member correctly as being type-dependent
inside a template class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
a84c02d0f4d63975a1c52b9bb8308d88e9d79352 27-Jul-2010 Ted Kremenek <kremenek@apple.com> Add non-static version of BinaryOperator::getOpcodeStr().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
7cb6bd70f9436f630a508ba017414ca2466eeb35 25-Jul-2010 Douglas Gregor <dgregor@apple.com> Remove a bunch of trivial destructors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109382 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
8111a6150cb68a238d55a31f9f4f90869a43f988 20-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add const iterator to InitListExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108810 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
84ca008a462b515f63871253f494d53c9190363c 12-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Compute Type dependent-ness of BlockDeclRefExpr
on the fly when constructing it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
52bc56a296b11b4fc6bf5ddf4ded5262f6484bdb 12-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Move setting of Dependent Type to BlockDeclRefExpr's
constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
9705752be3a52d72e9ad1c7c8d8e59082e40a4f1 08-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove unused protected constructor of DeclRefExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
0745d0a648b75bd304045309276c70a755adaafb 03-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write CastExpr's CXXBaseSpecifierArray for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
37bdfe284ad365f753741d1d89c078c148b3f4af 30-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support ParenListExpr for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
ba0f61cf5363f80e3241dc754235dfb246afe320 19-Jun-2010 Jordy Rose <jediknil@belkadan.com> Fold additive constants, and support comparsions of the form $sym+const1 <> const2


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
89f9d3a7651d1225f3f56ae3387c83b98a26da00 04-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Added a field to BlockDeclRefExpr for future use.
No functionality change yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
e17a6436b429e4b18a5e157061fb13bbc677b3b0 14-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added Expr::EvaluateAsAnyLValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
42c8f87eb60958170c46767273bf93e6c96125bf 11-May-2010 John McCall <rjmccall@apple.com> Refactor the constant-evaluator so that it only supports a single form
of constant-evaluation. Formerly you could control whether it accepted
local l-values or not; now it always evaluates local l-values in the core
routines, but filters them out where consumed by the top-level routines.
This will make it much easier to cache evaluability.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103444 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
cc8a5d5f90bbbbcb46f342117b851b7e07ec34f1 29-Apr-2010 Douglas Gregor <dgregor@apple.com> Teach __builtin_offsetof to compute the offsets of members of base
classes, since we only warn (not error) on offsetof() for non-POD
types. We store the base path within the OffsetOfExpr itself, then
evaluate the offsets within the constant evaluator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
fc89c31a329eb6b36c6dbd8b7cb945d1a831650e 24-Apr-2010 Anders Carlsson <andersca@mac.com> Convert more call sites over to the new GetAddressOfBaseClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
f9d68e1dd015972318b2448f75115ff4fc3d5008 24-Apr-2010 Anders Carlsson <andersca@mac.com> Add base paths for CK_BaseToDerived and CK_BaseToDerivedMemberPointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
cee22421929c91b481f4d1bb85cd48c0f6b7510b 24-Apr-2010 Anders Carlsson <andersca@mac.com> Add base paths to CK_UncheckedDerivedToBase and CK_DerivedToBaseMemberPointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
5cf86ba6b5a724bf91cb52feade1158f1fbeb605 24-Apr-2010 Anders Carlsson <andersca@mac.com> Actually produce base paths for CastExprs of kind CK_DerivedToBase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
41b2dcd465f1e438502c420effc9d0c747f9db8f 24-Apr-2010 Anders Carlsson <andersca@mac.com> Add BasePath arguments to all cast expr constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
88465d3e996e627bbaa11099b039ddab66d5af2c 24-Apr-2010 Anders Carlsson <andersca@mac.com> Add an InheritancePath parameter to the ImplicitCastExpr constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
409c99edb8b623403fade6f3a9e9c86acda74455 23-Apr-2010 Anders Carlsson <andersca@mac.com> Add an inheritance path member variable to CastExpr. For now it's always null but for derived-to-base and base-to-derived cast expressions it will contain the full base path. This is needed to avoid ambiguities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
74626d6ef2e194fcc911e071556660ff331eb4a8 07-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100604 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
1d7d8d66eff7ed0f3e957d330930cc9ab8047add 19-Jan-2010 John McCall <rjmccall@apple.com> The type of a compound literal expression is not necessarily the same as the
type which was syntactically written. Fixes PR 6080.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
42f56b50062cd3b3c6b23fdb9053578ae9145664 18-Jan-2010 John McCall <rjmccall@apple.com> Preserve type source information in compound literal expressions.
Patch by Enea Zaffanella!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
9d125033a9853f3b572a4c9e2f9e2d4e5e346973 15-Jan-2010 John McCall <rjmccall@apple.com> Preserve type source information in explicit cast expressions.
Patch by Enea Zaffanella.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
cd7a445c6b46c5585580dfb652300c8483c0cb6b 06-Jan-2010 John McCall <rjmccall@apple.com> Add Expr::EvaluateAsBooleanCondition(), which does unprincipled folding to
try to evaluate an expression as a constant boolean condition. This has
the same intended semantics as used in folding conditional operators.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
92ef5d75720c032808181133e4d7c5f82230237e 09-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> More detailed analysis of typecast to an objective-c pointer
in objective-c++ mode without being too lenient.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
a93c934af4fbf97cbe8e649d82e68ccacfe57c95 07-Dec-2009 John McCall <rjmccall@apple.com> DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated variables,
but the results are imperfect.

For posterity, I did:

cat <<EOF > $cmdfile
s/DeclaratorInfo/TypeSourceInfo/g
s/DInfo/TInfo/g
s/TypeTypeSourceInfo/TypeSourceInfo/g
s/SourceTypeSourceInfo/TypeSourceInfo/g
EOF

find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \;
find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \;
find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
19a9edb5dd7ab2c63249b28f45f16781a5577874 07-Dec-2009 Sam Weinig <sam.weinig@gmail.com> Remove a now out of date and out of place comment about predefined exprs from the FloatingLiteral class declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
905d11d53aeb6b26744f44fedc2b2820c7a62df6 17-Nov-2009 Douglas Gregor <dgregor@apple.com> Make sure, for sure this time, that expressions do not have reference type

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
6ddf4784a22b994b954ed74c6061d4603d474639 05-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Adds doxygen comment for HasSideEffects method.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
393c247fe025ccb5f914e37e948192ea86faef8c 05-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Added support for static variables which require
initialization before main. Fixes pr5396.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
5ab75172051a6d2ea71a80a79e81c65519fd3462 04-Nov-2009 John McCall <rjmccall@apple.com> Preserve type source information in sizeof/alignof expressions, and pass it
through to indexing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
aee3c9375f97a49edef2a36f15df6abd9748e2a1 27-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement Chris's suggestions for the precendence warnings. Reformat the code a bit. Test the fixits.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
660e6f79a138a30a437c02142f23e7ef4eb21b2e 27-Oct-2009 Mike Stump <mrs@apple.com> __builtin_object_size refinements. Also handle stack based objects. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
2cf719c3c3d805f630dfc6b1255e52647820888e 23-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Fix operator precedence in Doug's most recent commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
f67cea84bac1d3417f0baaf1fcbc86ee126e2d87 19-Oct-2009 Anders Carlsson <andersca@mac.com> Fix tyop noticed by Sean Hunt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84449 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
40a5ef90ac8d3f29bc8fe4ff80e00eaf3ef5b79f 16-Oct-2009 Ted Kremenek <kremenek@apple.com> Provide 'static' version of BinaryOperator::isShiftOp().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
c0a2fd8f092722c8f78b566ac4506a21437040e9 15-Sep-2009 Anders Carlsson <andersca@mac.com> Get rid of the CastInfo struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81839 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
b2f295c8050fb8c141bf2cf38eed0a56e99d0092 13-Sep-2009 Eli Friedman <eli.friedman@gmail.com> Add utility to evaluate lvalues which are an offset relative to a stack
location. Patch by Enea Zaffanella.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
773f3973cf5e2b6b8788e895967dcb3c1e6ffe79 11-Sep-2009 Anders Carlsson <andersca@mac.com> Instantiate PredefinedExprs correctly. Patch by Sam Weinig!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
e6585a7d71510be00a625686153f48d496d3bbf1 04-Sep-2009 Douglas Gregor <dgregor@apple.com> Actually initialize HasQualifier and HasExplicitTemplateArgumentList in the EmptyShell constructor for MemberExpr. Should clear up some valgrind failures in PCH reading

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
b633c4ee622df81d4572ef57dac54ebed69bb9bf 01-Sep-2009 Anders Carlsson <andersca@mac.com> Add a CK_FunctionToPointerDecay cast kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
7fe5d72fbc8605b60d42d32394248ea76cf763a0 29-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> path to ir-gen 12.3.1 Conversion by constructor



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80398 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
83ddad3ab513f5d73698cf9fbeb4ed3f011bc3b9 26-Aug-2009 Douglas Gregor <dgregor@apple.com> Implement support for C++ direct initializers that involve dependent
types or type-dependent expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
58d3f1af9b4efa426826816a16894986b78b2692 26-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80136 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
9099ff0cf91ac9e0b2d5a142807fa384ce842fc4 26-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> AST for conversion by conversion functions. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
47e1f7c68bf375cac470fdb2b599ddbb395aeb52 26-Aug-2009 Douglas Gregor <dgregor@apple.com> Source location information for ? and : in a ConditionalOperator, from Enea Zaffanella

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
018d8e0596dd57401eeddcf11ac84ff0a065fbbe 24-Aug-2009 Chris Lattner <sabre@nondot.org> normalize the CharacterLiteral::getLocation method name, patch
by Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
27a5b9b9babd1e4f8a19c5c9c0736c4b311c79b2 23-Aug-2009 Anders Carlsson <andersca@mac.com> Add CK_NullToMemberPointer and CK_BaseToDerivedMemberPointer cast kinds. Make -ast-dump print out the cast kinds of cast expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
a88dc3079bedf70a5cfc39791727e43a10383006 12-Aug-2009 Nate Begeman <natebegeman@mac.com> Fix a fixme by allocating ShuffleVectorExprs in the Context


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
bd0fb30fa2a039439d1a30a83ea896801394d780 10-Aug-2009 Anders Carlsson <andersca@mac.com> Add a CastInfo struct that will be used for cast information when constructing cast expressions. Right now it only stores the cast kind, but in the future it might store conversion functions and constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
43d9d9243329b1b75d1a6efdad9f16d6fb386b8e 08-Aug-2009 Douglas Gregor <dgregor@apple.com> Introduce reference counting for statements and expressions, using it
to allow sharing of nodes. Simplifies some aspects of template
instantiation, and fixes both PR3444 and <rdar://problem/6757457>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
112a0a8ddf23f6d25e0920002d5d4c1df0515f86 08-Aug-2009 Anders Carlsson <andersca@mac.com> Add a CK_ArrayToPointerDecay cast kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
4d8673b645ad86e496b886a0f80b60763f67071d 08-Aug-2009 Anders Carlsson <andersca@mac.com> Add CK_ToUnion and use it for aggregate expression codegen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78429 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
714179b179a31a0c3769a968ee18ba87b901b13f 02-Aug-2009 Anders Carlsson <andersca@mac.com> Use the correct cast kind for dynamic_cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
3503d041ca8a3535a1c1a30005a6b18ae7aed5db 31-Jul-2009 Anders Carlsson <andersca@mac.com> Add CK_DerivedToBase and use it PerformObjectMemberConversion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
cdef2b75aa60cde1ca00e0aa3f89139ac89c6ae4 31-Jul-2009 Anders Carlsson <andersca@mac.com> Add a CastKind enum to CastExpr. Right now it's not used for much but it will be :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
41ef0c3472a3d09c29bc1792f3d26842f2b8a695 28-Jul-2009 Douglas Gregor <dgregor@apple.com> Add a Profile function for statements so that we can (eventually) determine
when statements and expressions are equivalent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
a4e70568ae8902d48aad215c16b0fc8b40308106 23-Jul-2009 Ted Kremenek <kremenek@apple.com> Add instance predicate method to match static method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
6fb0aee4f9dc261bbec72e1283ad8dc0557a6d96 30-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the ASTContext parameter from the getBody() methods of Decl and subclasses.

Timings showed no significant difference before and after the commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
7d5c74ecbbd8719436c071f38657bc8e97ee4a24 20-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Use QualType to represent block's implicit return type as
to not lose its 'const/volatile' qualifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
e9263729b701cb02201907c6942cada72d5eefbf 26-May-2009 Anders Carlsson <andersca@mac.com> Remove a bunch of unused constructors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
38d068e8f13a119b89a3b8b0f79f35cab1ffd09a 20-May-2009 Anders Carlsson <andersca@mac.com> Create a temporary if the lvalue is a bitfield. Reported by Eli.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
dc241b42c7588f99027b035a09b71557a6db219e 19-May-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for __builtin_types_compatible_p.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
72527137c521ad9330ecb81ccd841159719dc8cd 29-Apr-2009 Eli Friedman <eli.friedman@gmail.com> PR4103: improve source location information for members of the current
class. This isn't perfect, but it's a big improvement over not having
any location information.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
4863db4266d066617a1e5ad7c0f3f28c7995c61b 23-Apr-2009 Chris Lattner <sabre@nondot.org> fix a problem producing debug info with global blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
b5437d238752dc297e42410e98d38d5250fe0463 23-Apr-2009 Chris Lattner <sabre@nondot.org> the logic for computing __func__ and friends is really broken:
the type assigned by sema (and is visible with sizeof(__func__) for
example) has nothing to do with what codegen ends up producing.
We should eventually add a method on PredefinedExpr to handle this.
In the meantime, just set up some framework and add some fixme's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
370187c8a3e96517c943329f2511737a04b85450 22-Apr-2009 Douglas Gregor <dgregor@apple.com> Remove the serialization code that predates precompiled
headers. Future approaches to (de-)serializing ASTs will be based on
the PCH infrastructure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
5b54b88c4082bb81b8b341b622fda9a85cbd5fad 22-Apr-2009 Chris Lattner <sabre@nondot.org> this is a warning now, return a well formed ast.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69731 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
84af7c27cdc615ff917a501d61256b4049383c97 17-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for blocks

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
6a2dd55b0b3ae376d449a4b07bbb6b2d30b26330 17-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for GNU statement expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
7d5c2f241c74e5f8d9ec492e8f9f268e5e9ae41f 17-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for indirect gotos and address-of-label expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
ba6d7e7fa5f79959d3eef39adb5620d845ba5198 16-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for CompoundLiteralExpr. This is the last C expression
that does not require PCH support for statements. Only AddrLabelExpr,
StmtExpr, and BlockExpr remain (for C).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
44cae0c8669cdf83618cbe7fd36ea7a8e51cf97f 16-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for TypesCompatibleExpr, ChooseExpr, and GNUNullExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
ad90e96fb7eed26d5217dd06ba50ecbbbebb59e6 16-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for CompoundAssignOperator and ConditionalOperator

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
cb2ca73c1d7e76cc1358ce51457d2d5837d84f9b 16-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for ImaginaryLiteral and ArraySubscriptExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69233 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
0b0b77fa29c74c99a77548ed86ca8a04f7cf6b02 15-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for UnaryOperator, SizeOfAlignOfExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
711997184366d584c9c437102cae1e9d9927b986 15-Apr-2009 Douglas Gregor <dgregor@apple.com> Switch designated-initializer checking from using designator iterators
to using designator indices. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
db600c330a37b1c3ab4533310729910ee188f900 15-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for CStyleCastExpr and BinaryOperator expression kinds.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69119 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
c04db4feefa2b0dbbc6876cb4eeeee108aa6791d 15-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for ParenExpr


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69106 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
087fd536809ebe754d91c641a98917e02dd7452d 15-Apr-2009 Douglas Gregor <dgregor@apple.com> Add PCH support for ImplicitCastExprs. This is the first expression
kind PCH handles that has an expression as an operand, so most of this
work is in the infrastructure to rebuild expression trees from the
serialized representation. We now store expressions in post-order
(e.g., Reverse Polish Notation), so that we can easily rebuild the
appropriate expression tree.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
17fc223395d51be582fc666bb6ea21bd1dff26dc 14-Apr-2009 Douglas Gregor <dgregor@apple.com> Add PCH support for PredefinedExpr and FloatingLiteral expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
0b7489194f9f89fac39d57211c1e7953ae50251f 14-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for a few very, very simple kinds of expressions. Hook up
expression (de-)serialization for VLAs, variable initializers,
enum constant initializers, and bitfield widths.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
1b78276a75a5a0f496a82429c1ff9604d622a76d 10-Apr-2009 Anders Carlsson <andersca@mac.com> Add Expr::EvaluateAsLValue which will (believe it or not) try to evaluate an Expr as an LValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
8d4141f83d9de379547cf05bd75d4c6cf894b189 01-Apr-2009 Steve Naroff <snaroff@apple.com> More "prep" work for handling UTF16 CFString.

Patch by Jean-Daniel Dupas. Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
33fdb738a6c125f4c788733897021b7c1a062b0c 31-Mar-2009 Steve Naroff <snaroff@apple.com> Some "prep" work for handling ObjC @-string constants that contain UTF-8. No functionality change.

Changed GenerateConstantString() to take an ObjCStringLiteral (instead of a std::string). While this isn't strictly necessary, it seems cleaner and allows us to cache to "containsNonAscii" if necessary (to avoid checking in both Sema and CodeGen).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
ab3a852ae713189444dcbf75e70accf1e8c2b7f2 28-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Change compound assignment operators to keep track of both the promoted
LHS type and the computation result type; this encodes information into
the AST which is otherwise non-obvious. Fix Sema to always come up with the
right answer for both of these types. Fix IRGen and the analyzer to
account for these changes. This fixes PR2601. The approach is inspired
by PR2601 comment 2.

Note that this changes real *= complex in CodeGen from a silent
miscompilation to an explicit error.

I'm not really sure that the analyzer changes are correct, or how to
test them... someone more familiar with the analyzer should check those
changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
57e8b05fe9ba03d410db9c161e032cb79c9ab5ba 20-Mar-2009 Douglas Gregor <dgregor@apple.com> Improve documentation for MemberExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
ba49817c5b9f502602672861cf369fd0e53966e8 13-Mar-2009 Douglas Gregor <dgregor@apple.com> Implement template instantiation for several more kinds of expressions:
- C++ function casts, e.g., T(foo)
- sizeof(), alignof()

More importantly, this allows us to verify that we're performing
overload resolution during template instantiation, with
argument-dependent lookup and the "cached" results of name lookup from
the template definition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
3fd95ce225393fe4a3623e429766a8c3f487ff9d 13-Mar-2009 Douglas Gregor <dgregor@apple.com> Improve the representation of operator expressions like "x + y" within
C++ templates. In particular, keep track of the overloaded operators
that are visible from the template definition, so that they can be
merged with those operators visible via argument-dependent lookup at
instantiation time.

Refactored the lookup routines for argument-dependent lookup and for
operator name lookup, so they can be called without immediately adding
the results to an overload set.

Instantiation of these expressions is completely wrong. I'll work on
that next.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
313a81dd820c9b2c0203bdcd974c781a81e4f0cf 12-Mar-2009 Douglas Gregor <dgregor@apple.com> Use StmtVisitor to handle the decoding of expressions for
instantiation. This is roughly the structure we want to expression
instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
ddca44e86281bb7dcf5fdcaf1563434c524e3861 08-Mar-2009 Chris Lattner <sabre@nondot.org> improve comments for MemberExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
2850784bda09416fc7e9d57f5baa36c9351c757c 26-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Make more AST nodes and semantic checkers dependent-expression-aware.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65529 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
c4a09c189981b4561428e4b56fd250718e2717bb 24-Feb-2009 Chris Lattner <sabre@nondot.org> improve comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
b83d287bc7f47d36fb0751a481e2ef9308b37252 19-Feb-2009 Mike Stump <mrs@apple.com> Add enough checking to ensure that non-constant block literals don't
appear to be constant. I'll probably redo this and throw it all away
later once we have codegen for BlockDeclRefExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65070 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
8bea7c0ee44c71c817de7dc2be932b73bec90c9f 19-Feb-2009 Chris Lattner <sabre@nondot.org> fix a typo gabor noticed


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
60800081361b0ffc114877b8abbc81cb57b4edf6 18-Feb-2009 Chris Lattner <sabre@nondot.org> Start improving diagnostics that relate to subcharacters of string literals.
First step, handle diagnostics in StringLiteral's that are due to token pasting.

For example, we now handle:
id str2 = @"foo"
"bar"
@"baz"
" b\0larg"; // expected-warning {{literal contains NUL character}}

Correctly:

test/SemaObjC/exprs.m:17:15: warning: CFString literal contains NUL character
" b\0larg"; // expected-warning {{literal contains NUL character}}
~~~^~~~~~~

There are several other related issues still to be done.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
b137299ce5bb6c36fbba651858600857fda4dd50 18-Feb-2009 Chris Lattner <sabre@nondot.org> add iterators for string token locations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
690398188ea5b428f06aa13c7d4ce6eb741ad4f9 18-Feb-2009 Chris Lattner <sabre@nondot.org> rename CheckBuiltinCFStringArgument -> CheckObjCString


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
73525de7fd9bdd534382dc89a24f1f76db3e04b9 16-Feb-2009 Chris Lattner <sabre@nondot.org> enhance ExtVectorElementExpr to allow V->xxyy to work like (*V).xxyy


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
d5cab5435371b8cc74a9e05ebd40b5995ebad149 12-Feb-2009 Anders Carlsson <andersca@mac.com> Add a very basic implemenation of global blocks. This needs to be cleaned up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64387 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
1a51b4a11b7db25cac2134249711ecaaf9d1c0a8 09-Feb-2009 Douglas Gregor <dgregor@apple.com> Make Sema::getTypeName return the opaque pointer of a QualType rather
than a Decl, which gives us some more flexibility to express the
results with the type system. There are no clients using this
flexibility yet, but it's meant to be able to describe qualified names
as written in the source (e.g., "foo::type") or template-ids that name
a class template specialization (e.g., "std::vector<INT>").

DeclSpec's TST_typedef has become TST_typename, to reflect its use to
describe types found by name (that may or may not be typedefs). The
type representation of a DeclSpec with TST_typename is an opaque
QualType pointer. All users of TST_typedef, both direct and indirect,
have been updated for these changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
87fd703e097c27d63479cb83b687d4000a22bbb1 02-Feb-2009 Douglas Gregor <dgregor@apple.com> Check value-initializations that occur when an initializer list
provides too few elements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
caae7b099a0324b7c15dc89a9b70969d5d7ce996 24-Jan-2009 Chris Lattner <sabre@nondot.org> fix some const-correctness issues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
87f55cf59e82f246d8605733e9300d0c5f6830a6 23-Jan-2009 Douglas Gregor <dgregor@apple.com> Reimplement the handling of the "current object" in designator
initializers, so that we are within the appropriate subobject after
we've processed a multi-designator designation. We're matching GCC and
EDG's behavior on all examples I've found thus far.

*Huge* thanks to Eli Friedman for pointing out my fundamental
misunderstanding of "current object" in the C99 spec.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62812 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
5cd9d6daf3acd4cc87fecebd81d9495b9e4ba9cd 13-Jan-2009 Chris Lattner <sabre@nondot.org> use a slightly more sensible position for an array ref's "getExprLoc"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62182 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
b3eef68111ffc220e449be96da1747998c057790 08-Jan-2009 Douglas Gregor <dgregor@apple.com> Revert my previous, failed attempt to pretty-print anonymous struct/union accesses well. Added a FIXME so we know to revisit this later

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
83233a4b7c2bc7b531ffa3b33fdd1cd8138373b6 07-Jan-2009 Douglas Gregor <dgregor@apple.com> Fix printing of member references to avoid displaying implicitly-generated member references, e.g., for anonymous struct/unions or implicit 'this' in member functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
9103bb27f4eefa0e0d7935387750e3aca24abc49 17-Dec-2008 Douglas Gregor <dgregor@apple.com> Delay semantic analysis of the C++ names casts when the subexpression is type-dependent or the destination type is dependent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
5b45d4ef1ea3f04ec863daf8aa29be6c6e021750 30-Nov-2008 Anders Carlsson <andersca@mac.com> Add a new variant of Evaluate and reimplement the old Evaluate in terms of the new.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
94deaf675ae60e11c2d9475c6dbfd0c7123160f5 30-Nov-2008 Anders Carlsson <andersca@mac.com> Add Expr::EvalResult struct. (Not used just yet)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
6dde0d5dc09f45f4d9508c964703e36fef1a0198 22-Nov-2008 Anders Carlsson <andersca@mac.com> Case values must be evaluated

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
51fe996231b1d7199f76e4005ff4c943d5deeecd 22-Nov-2008 Anders Carlsson <andersca@mac.com> Use Expr::Evaluate for case statements. Fixes PR2525

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
904eed3f6148758d39a2d3c88f3133274460d645 10-Nov-2008 Douglas Gregor <dgregor@apple.com> Basic support for taking the address of an overloaded function

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
b2f9e516327310d95840d442416084508f80c183 04-Nov-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6339636> clang ObjC rewriter: Assertion failed: FileID-1 < FileIDs.size() && "Invalid FileID!", file c:\cygwin\home\Administrator\llvm\tools\clang\include\clang/Basic/SourceManager.h, line 513



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58654 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
7fcfa4a9b5054bc2a3bc65093f9d2e9e67a70838 30-Oct-2008 Ted Kremenek <kremenek@apple.com> Add iterator/reverse_iterator to InitListExpr for iteration over the subexpressions of an initializer list. This is basically the same as child_iterator except reverse iteration is possible (which will be used by GRExprEngine::VisitInitListExpr).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58438 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
f7c2aa0b049272d8f318988c1965760dcb852578 29-Oct-2008 Douglas Gregor <dgregor@apple.com> Make the non-reference check in Expr work always

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
8320aaaa01d931aa234fc3bce05b399ef41898d5 28-Oct-2008 Daniel Dunbar <daniel@zuster.org> 80-col fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
8e9bebdea69c590dedfbf27374114cb76fe12fbd 21-Oct-2008 Douglas Gregor <dgregor@apple.com> Preliminary support for function overloading

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57909 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
20c77e995d5f1bad8fc59fe9e1883a563d94f535 15-Oct-2008 Daniel Dunbar <daniel@zuster.org> Use BatchEmitOwnedPtrs for writing multiple child exprs, per review.

Also added serialization support to OverloadExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
d17c24ff8597fe0dee4210639d225bc4f7c5ac04 14-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add serialization support in several missing places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
a09f585a7fdbb01b4bf9de3679fd37005379ca66 29-Sep-2008 Chris Lattner <sabre@nondot.org> move ExtVectorElementExpr down into the 'clang extensions' section.
Wrap line to 80 cols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
9e922b1663ecb95dc7eee03002fd66ed18fb3192 10-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add new 'CXXConditionDeclExpr' expression node used for a 'condition' declaration, e.g: "if (int x=0) {...}".
It is a subclass of DeclRefExpr and the main difference is that CXXConditionDeclExpr owns the declaration that it references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
cb6accb4659af86627ce43f7a90bc92f763b075e 23-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> CXXFunctionalCastExpr is a subclass of CastExpr. Make it known to isa/dyn_cast/cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
8070a8497c0fb3e6f70a557f788405d8945b1208 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Update Expr::{getIntegerConstantExprValue, isIntegerConstantExpr} to
use default APSInt constructor instead of embedding arbitrary
constant.

Update OverloadExpr::getNumArgs to use getIntegerConstantExprValue.

Update OverloadExpr::getExpr to be const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
a5d1cb7ef3f0780540e7fd7180399fd220ef0210 10-Aug-2008 Daniel Dunbar <daniel@zuster.org> Update ShuffeVectorExpr::getShuffleMaskIdx to use
getIntegerConstantExprValue.

Tweak getIntegerConstantExprValue to suppress warning in
Release-Asserts mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
cd8f646eca128f52a7bce0103c51ff82ce96f374 24-Jul-2008 Daniel Dunbar <daniel@zuster.org> Add Expr::getIntegerConstantExprValue helper method
- For getting an APSInt from a known integer constant Expr.
- TODO: Many users of Expr::isIntegerConstantExpr in codegen should
probably be using this instead...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
f2da7a06f6b98c3886d9b871ab839f5085b1c238 18-Jul-2008 Ted Kremenek <kremenek@apple.com> Provide static methods in BinaryOperator to determine if an opcode is an equality opcode, a relational opcode, or a logical opcode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
b4825df6af2298f9007ee95ab5f16ed4b855ef4a 04-Jul-2008 Seo Sanghyeon <sanxiyn@gmail.com> Fix warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53133 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
63e9d5673791096589c601528e857e00a13050ff 21-Jun-2008 Chris Lattner <sabre@nondot.org> remove dead enums.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
0d17f6f7b1882850fa56ad38cca0ee518869255b 21-Jun-2008 Chris Lattner <sabre@nondot.org> Switch 'super' from being a weird cast thing to being a predefined expr node.
Patch by David Chisnall with objc rewriter and stmtdumper updates from me.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
dbdbbd7a7b728bf7734c992fe72b0e549d31a710 10-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Fix getTrueExpr for ConditionalOperator to actually work. No testcase
because it's currently unused.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
c250aae4f645833aed3a6321bc8598f7330dce8d 08-Jun-2008 Chris Lattner <sabre@nondot.org> capture whether a CharacterLiteral was wide or not in the AST.
Patch by Mike Stump!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
8bf3b1d0e75da8b15bc331ebeb44f34b689f03ad 24-May-2008 Steve Naroff <snaroff@apple.com> Fix range info for explicit ivar refs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
f809e3bd0c3d063f22ba34981072dae306ca9272 20-May-2008 Ted Kremenek <kremenek@apple.com> Delete AST nodes, not just Decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
dde8c94873976632e3ada4d8d067e1e244184d51 16-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix review nit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51194 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
28a309e387a0a69b0c055c1565aa147fc695f906 05-May-2008 Chris Lattner <sabre@nondot.org> Fix a bug from when this was a pointer instead of vector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
66783caa67fd947787a0656fa642ddb4e770f074 01-May-2008 Ted Kremenek <kremenek@apple.com> Added comments to ObjCMessageExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
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/include/clang/AST/Expr.h
866b5c03e3b9c01cf496ad97b85a05afc917345b 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Several Expr subclasses did not mark "getSourceRange()" virtual. Fixed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
97b7f26a92d87e514530a5b652460190ce48c974 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Remove uses of "Selector&" and "const Selector&", since Selector is just an
immutable smart pointer (we don't need to pass references, just pass Selector).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
e2563ca02a519c2ad6d64dfed87d6e86c5d3c072 07-Apr-2008 Sam Bishop <sam@bishop.dhs.org> Pass the ASTContext object around when deserializing Decl and Stmt objects, so
they can be created using the same allocator as in the "from source code" case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
e0def7589a8afa8a6acef13476bb3f882c104b91 06-Apr-2008 Chris Lattner <sabre@nondot.org> fix a number of const qualification bugs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
c74840329eeee429d9527cf2f3694a74accd1603 27-Mar-2008 Ted Kremenek <kremenek@apple.com> In ObjCMessageExpr: getSelector() const should just return "Selector", not "const Selector&" because Selector is just a smart pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
3fb94d87b937a89400d1195479702b6f6bb9a59e 25-Mar-2008 Ted Kremenek <kremenek@apple.com> Added "arg_iterators" to ObjCMessageExpr (for iterating over the arguments of a message expression)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
6a1bc1b95ee31c6892d46a6993b9e2d2d66831ee 18-Mar-2008 Nate Begeman <natebegeman@mac.com> Fix a typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
2e5f54aa1dd15a62c34a9d1d24a5a0692f43934a 27-Feb-2008 Ted Kremenek <kremenek@apple.com> Removed VarDecl::hasStaticStorage() (redundant with hasGlobalStorage())
Removed VarDecl::hasAutoStorage() (only used by hasLocalStorage())

Merged logic from VarDecl::hasAutoStorage() into VarDecl::hasLocalStorage(),
and expanded (fixed) the logic of hasLocalStorage() to handle Extern and PrivateExtern.

Renamed Expr::hasStaticStorage() to Expr::hasGlobalStorage().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
5d826b82936beb2c32dd02460332ba8035192c65 15-Feb-2008 Ted Kremenek <kremenek@apple.com> Added predicate function "UnaryOperator::isIncrementOp()".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
56f349400c5932a196509c0480ff6f99a9a0b48f 13-Feb-2008 Chris Lattner <sabre@nondot.org> Move IgnoreParenCasts to be a method on Expr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
a7ad98ff0919d6a24ea7c46634ea29bea551c1a0 11-Feb-2008 Chris Lattner <sabre@nondot.org> Fix PR1992 by computing the right type for string literals, which
is an array type not a pointer type. This requires updating some
diags that change and updating the code generator to handle the
proper form of strings.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
510190777c4bd53e960eea4665b204778fec1b64 06-Feb-2008 Eli Friedman <eli.friedman@gmail.com> Make sure to propagate qualifiers through the member operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
796ef3d4a32ce8d9e76df0d5bcab07db97883064 31-Jan-2008 Nate Begeman <natebegeman@mac.com> Remainder of the __builtin_overload feedback


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
c4f8e8b645b8e0e685c089dde0674c6f29a24168 31-Jan-2008 Steve Naroff <snaroff@apple.com> Add support for CallExpr::isBuiltinConstantExpr(). For now, this hook is used to support CFConstantStrings. Can be extended to support other built-in functions.

This allows the following code to compile without error...

#include <CoreFoundation/CoreFoundation.h>

#define CONST_STRING_DECL(S, V) const CFStringRef S = (const CFStringRef)__builtin___CFStringMakeConstantString(V);

CONST_STRING_DECL(kCFTimeZoneSystemTimeZoneDidChangeNotification, "kCFTimeZoneSystemTimeZoneDidChangeNotification")



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
67295d05c50ab0b5d1b0f9ef82a906701c348715 30-Jan-2008 Nate Begeman <natebegeman@mac.com> Implement first round of feedback on __builtin_overload



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46572 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
3fd1dfa22f2642c627ad2139b048b99fc5507ef3 30-Jan-2008 Chris Lattner <sabre@nondot.org> Eli points out this can only happen for scalar elements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
196ef51bc4d008ec1c69851fb3b0f8d036065931 30-Jan-2008 Chris Lattner <sabre@nondot.org> Be more explicit about what flavors of initlistexpr's we can see. I don't
know if all of this is exactly right, but it seems like the right thing to
aim for. Steve, please review.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
5a1deb8d9c0722beae28d693fa137bbb942bd11f 29-Jan-2008 Anders Carlsson <andersca@mac.com> Implement __builtin_offsetof.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
7da8d94cb79f311c5b126483b8edfe5dc70d6c8f 23-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Fixed a nasty bug which took a while to come up with a test case,
diagnose, and took even longer to fix. It has to do with rewriting of a message
receiver which is an 'ivar' reference. Fix, however, is to remove a code which
was not doing the right thing and no longer needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
e2ce1d9440186cf3332368291cd884a6e3ae8946 17-Jan-2008 Nate Begeman <natebegeman@mac.com> Implement basic overload support via a new builtin, __builtin_overload.

__builtin_overload takes 2 or more arguments:
0) a non-zero constant-expr for the number of arguments the overloaded
functions will take
1) the arguments to pass to the matching overloaded function
2) a list of functions to match.

The return type of __builtin_overload is inferred from the function whose args
match the types of the arguments passed to the builtin. For example:

float a;
float sinf(float);
int sini(int);

float b = __builtin_overload(1, a, sini, sinf);

Says that we are overloading functions that take one argument, and trying to
pass an argument of the same type as 'a'. sini() does not match since it takes
and argument of type int. sinf does match, so at codegen time this will turn
into float b = sinf(a);


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46132 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
4e99a5fc3b203397a91136c6e695e405fb8fc606 17-Jan-2008 Ted Kremenek <kremenek@apple.com> Added method Expr::IgnoreParens(), which returns the first non-ParenExpr Expr*.
Refactored the use of this method into both the Sema module and Analysis module,
which were using their own static functions that did the same thing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
e9b12198c4cc7f5687960100351b4af006c14469 14-Jan-2008 Steve Naroff <snaroff@apple.com> Record if a compound literal expression is @ file scope. This allows us to implement C99 6.5.2.5p6. This could have been done without modifying the AST (by checking the decl type and passing the info down to isContextExpr), however we concluded this is more desirable.

Bug/patch by Eli Friedman!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
a526c5c67e5a0473c340903ee542ce570119665f 07-Jan-2008 Ted Kremenek <kremenek@apple.com> Substituted all instances of the string "Objc" for "ObjC". This fixes
some naming inconsistencies in the names of classes pertaining to Objective-C
support in clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
0fc53dfc7a33f68e71ef245389c4e7cd34a62a39 02-Jan-2008 Chris Lattner <sabre@nondot.org> Compute the proper sourcerange for an CompoundLiteralExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
0bc735ffcfb223c0186419547abaa5c84482663e 29-Dec-2007 Chris Lattner <sabre@nondot.org> Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
33fd5c124aac15bab7cad95e4e0e7761356d2c06 29-Dec-2007 Christopher Lamb <christopher.lamb@gmail.com> Fix an error in the base/idx accessors for ArraySubscriptExpr's that crops up with vector element access.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
d18b3299debb7b0dbd9d34d9369189dc98c87f53 28-Dec-2007 Chris Lattner <sabre@nondot.org> Add accessors + iterator interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
18b2515e1bf8c86a4900792692e42fe1296be28d 20-Dec-2007 Chris Lattner <sabre@nondot.org> add accessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
5ca4020c6e1e4f8d81cf4c2890ca8a7c0dd28d56 19-Dec-2007 Steve Naroff <snaroff@apple.com> Emit errors when attempting to rewrite ObjC expressions that originate from a macro expansion.

We plan on fixing this and removing this restriction after the break...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
8f6dc77d1fa6c9fd71d26c96bfa007775d8e3905 05-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of: ObjCEncodeExpr, ObjCSelectorExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
b107ce82d425939ce32fc3c02faf7c2364abc1a3 04-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Simplified setting up Method's scope before generating AST for its nody.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
46dc0a54ed6deb165117a6b0166d9bb7acb785f5 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ObjCStringLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
395a2abf0028968d85958610e393e067885dc14f 03-Dec-2007 Ted Kremenek <kremenek@apple.com> Added getTrueExpr() and getFalseExpr() to ConditionalOperator. These methods
provide handy accessors to the subexpressions of ConditionalOperator that
automatically take into account the GCC extension where the "LHS" expression is
omitted: e.g x ?: y;. When the LHS expression is available, getTrueExpr() is the
same as getLHS(); when LHS is NULL, getTrueExpr() returns the condition expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
720c4ec57b6110873cd533ad434853a27e7c3f4a 29-Nov-2007 Ted Kremenek <kremenek@apple.com> Added "isExact" field to FloatingLiteral. This flag indicates whether or not
the APFloat representing the parsed literal can represent the literal value
exactly. This is useful when performing various semantic checks on the code,
and issuing appropriate warnings to users.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44423 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
4cc627111453b75519d5130b57e06256da7b00e8 27-Nov-2007 Chris Lattner <sabre@nondot.org> add several cases that Expr::hasStaticStorage missed, pointed out by Oliver Hunt


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44376 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
49f109c786f99eb7468dac3976db083a65493444 15-Nov-2007 Steve Naroff <snaroff@apple.com> Finish up variadic methods/messages.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44172 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
7e3411b23eb3724da5461dc6d6f97d14b3b0a52f 15-Nov-2007 Steve Naroff <snaroff@apple.com> - Implement ivar rewrite (patch by Fariborz).
- RewriteMessageExpr()...make implicit casts explicit with synthesizing call (removing warnings when calling objc_msgSend()).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
6336f8dbae5145eb7b1429a8ec424c44e668f7cb 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of InitListExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
4b7d9ca9fd65a5a68e907b1b7effe33bf1e93629 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of CompoundLiteralExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
ea2fe9b435e1b55135de32dcac97366554706ac4 13-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for SizeOfAlignOfTypeExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
bd57e7c4754c0ce5d7d460041c8fd613e45c4319 13-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for MemberExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
1d09ecca892185ba067e47ba879f424de59950ef 13-Nov-2007 Chris Lattner <sabre@nondot.org> improve handling of address of global when checking for
constants and initializers. Patch by Sanghyeon Seo, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
0f84c0059cec39fd1c73ac05bc2864dca664e7f4 13-Nov-2007 Ted Kremenek <kremenek@apple.com> Renamed all serialization "Materialize" methods to "Create" to conform with
the new serialization API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44035 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
232220c6982e3a70d8f7fc06a011ead490a2f516 12-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to do statically typed ivar references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
ec0aa78745f7b3bc96c20fffd1115bf26aaa0ead 12-Nov-2007 Ted Kremenek <kremenek@apple.com> In Stmt serialization, renamed directEmit to EmitImpl and
directMaterialize to CreateImpl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
7779db42c94405ecbd6ee45efb293483fa6cbeff 12-Nov-2007 Steve Naroff <snaroff@apple.com> Implement instance variable references.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
aa33763cc3dfa2fcb4fdb3c5b4be0c37f8d8f8e9 08-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of AddrLabelExpr.
Implemented serialization of ConditionalOperator.
Implemented serialization of StmtExpr.
Fixed bug in serialization of IndirectGoto (did not properly serialize subexpression).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
83efb151a0c1df8cb8fb25d6dbb6c0f12f07f60a 08-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of CompoundAssignOperator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
1049436d4b53d928b555f7381bc1639dd302bbc7 08-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of UnaryOperator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
d7fe4ea296646f049e4ff4cc37aa92ff4014a6b3 08-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of CallExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
96fa54fc6dc7f4c8dad1fb22fc7fc4f4d775d6c0 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ArraySubscriptExpr.
Added "using ..." for "Serializer" and "Deserializer" to reduce amount
of typing for serialization methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
9971c9ace70624987cd74645a75f4bfbc05afdf2 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of CastExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
a7c20dd6c78db562ff463ee5fb13e248a1d3c93f 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ImplicitCastExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
7febad7377c04607aa2c744d58af61e1abea6250 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of StringLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
1c72de1be77fc43cc27e9bf1cbfe7bd25bee2f81 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ImaginaryLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
612c9b9ca73593b3194866c9e1a51554db9752e7 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of FloatingLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
7338a8299ec393eaf6bb580b5ef9ab2b08b5bd11 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of CharacterLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43824 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
1ba485e582edfc8636afc25a6d7453c869530688 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialiation of PreDefinedExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
4210f3dfd73ad3482f9cfa0a382e1fd78f22976d 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of IfStmt.

Fixed declarations of several "directEmit" methods of classes that subclass
Stmt that were missing a "virtual" keyword.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
9eea2ca5f2cb5d77569274702b5b06273e426dc2 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of SwitchStmt, CaseStmt, BreakStmt, DefaultStmt,
and ParenExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
2dc9ac73a8a34cabf261a81a1653d7379065ac61 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Overhauled serialization of statements. We no longer use specialized SerializeTrait<> classes,
but methods in Stmt (like other objects we are serializing). Full serialization of all statements
is not yet complete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
db611d556f71f98b66b69514d45958d76e5727ab 03-Nov-2007 Steve Naroff <snaroff@apple.com> Add a method prototype slot/getter to the ObjCMessageExpr AST.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
beaf299a2701c5559a4e5d76b0c40f805afb8e6a 03-Nov-2007 Steve Naroff <snaroff@apple.com> Implement rewrite rules for ObjC string constants.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
2e7d352dbec06755105237afba183492d31d03cb 31-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of Variable Array Types (VLAs).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
27437caadea35f84d550cd29f024fcf3ea240eec 25-Oct-2007 Chris Lattner <sabre@nondot.org> Add a new ChooseExpr::isConditionTrue method to unify
some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
934f276cc5b45e19cd12ebb2d04fd7972a23865c 25-Oct-2007 Steve Naroff <snaroff@apple.com> More work on translating message expressions.

Still to do:

- Chris will fix a bug in the rewriting engine for nested stmts. For example, the following:

NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

tranlates to:

NSAutoreleasePool * pool = objc_msgSend(objc_msgSend(objc_getClass("NSAutoreleasePool"), sel_getUid("alloc")), sel_getUid("init"))utoreleasePool"), sel_getUid("alloc")) init];

...which is correct, except there is garbage after sel_getUid("init"). This is because the rewriter isn't updating the extent of the containing message expression.

- Do the crazy cast thang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
390d50a725497e99247dc104a7d2c2a255d3af14 17-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Implementation of AST for @protocol expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
2a35fa9b5e0f9d9429c04adb2e1249b6fd425e7a 17-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Fix location processing of @selector: the range should include the @ sign.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
674af9541256dc3ef803e3723027a8b028f1f7a2 17-Oct-2007 Chris Lattner <sabre@nondot.org> Fix location processing of @encode: the range should include the @ sign.
@selector probably gets this wrong also.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
311ff02fae0392bee6abe7723cdf5a69b2899a47 17-Oct-2007 Chris Lattner <sabre@nondot.org> Add a new Rewriter::getRangeSize method.
Rename SourceRange::Begin()/End() to getBegin()/getEnd() for
consistency with other code.
Start building the rewriter towards handling @encode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43047 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
05de8bc173c217f349f09b143bf5c6f6e82b87ae 16-Oct-2007 Chris Lattner <sabre@nondot.org> publish location info


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
b62f6813406a03bf8a371c4e46c9fad51d102121 16-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to implement AST generation for objective-c's @selector expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
ec0550fa3653d46560bf4484a2e988329c228e39 15-Oct-2007 Steve Naroff <snaroff@apple.com> Move type compatibility predicates from Type to ASTContext. In addition, the predicates are now instance methods (they were previously static class methods on Type).

This allowed me to fix the following hack from this weekend...

// FIXME: Devise a way to do this without using strcmp.
// Would like to say..."return getAsStructureType() == IdStructType;", but
// we don't have a pointer to ASTContext.
bool Type::isObjcIdType() const {
if (const RecordType *RT = getAsStructureType())
return !strcmp(RT->getDecl()->getName(), "objc_object");
return false;
}

...which is now...

bool isObjcIdType(QualType T) const {
return T->getAsStructureType() == IdStructType;
}

Side notes:

- I had to remove a convenience function from the TypesCompatibleExpr class.

int typesAreCompatible() const {return Type::typesAreCompatible(Type1,Type2);}

Which required a couple clients get a little more verbose...

- Result = TCE->typesAreCompatible();
+ Result = Ctx.typesAreCompatible(TCE->getArgType1(), TCE->getArgType2());

Overall, I think this change also makes sense for a couple reasons...

1) Since ASTContext vends types, it makes sense for the type compatibility API to be there.
2) This allows the type compatibility predeciates to refer to data not strictly present in the AST (which I have found problematic on several occasions).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
7c50aca2fe36f6daa9bf1c8c428f30e72f96470a 15-Oct-2007 Anders Carlsson <andersca@mac.com> Add code generation and sema checking for __builtin_va_arg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
833b2eb738a2a7a77b5c758555694a0d6bc10e1b 13-Oct-2007 Chris Lattner <sabre@nondot.org> remove dead method with bogus comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42937 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
c7229c338c21ef26b01ef3ecf9eec4fd373fa9ec 07-Oct-2007 Chris Lattner <sabre@nondot.org> move IdentifierTable.h from liblex to libbasic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
6a8a9a41e9067b708498c02180159bafecfa044f 02-Oct-2007 Steve Naroff <snaroff@apple.com> - Add ObjcInterfaceDecl::lookupInstanceMethod(), lookupClassMethod().
- Add ObjcMessageExpr::getSelector(), getClassName().
- Change Sema::getObjCInterfaceDecl() to simply take an IdentifierInfo (no Scope needed).
- Remove FIXME for printing ObjCMessageExpr's.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
bcfb06ac6da1aa3c74ac1ef7a49c2807522366e7 29-Sep-2007 Steve Naroff <snaroff@apple.com> Yesterday I discovered that 78% of all selectors in "Cocoa.h" take 0/1 argument.

This motivated implementing a devious clattner inspired solution:-)

This approach uses a small value "Selector" class to point to an IdentifierInfo for the 0/1 case. For multi-keyword selectors, we instantiate a MultiKeywordSelector object (previously known as SelectorInfo). Now, the incremental cost for selectors is only 24,800 for Cocoa.h! This saves 156,592 bytes, or 86%!! The size reduction is also the result of getting rid of the AST slot, which was not strictly necessary (we will associate a selector with it's method using another table...most likely in Sema).

This change was critical to make now, before we have too many clients.

I still need to add some comments to the Selector class...will likely add later today/tomorrow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
68d331a78e655d97294e94fcfa63f92cc1f40578 27-Sep-2007 Steve Naroff <snaroff@apple.com> Add SelectorInfo (similar in spirit to IdentifierInfo). The key difference is SelectorInfo is not string-oriented, it is a unique aggregate of IdentifierInfo's (using a folding set). SelectorInfo also has a richer API that simplifies the parser/action interface. 3 noteworthy benefits:

#1: It is cleaner. I never "liked" storing keyword selectors (i.e. foo:bar:baz) in the IdentifierTable.

#2: It is more space efficient. Since Cocoa keyword selectors can be quite long, this technique is space saving. For Cocoa.h, pulling the keyword selectors out saves ~180k. The cost of the SelectorInfo data is ~100k. Saves ~80k, or 43%.

#3: It results in many API simplifications. Here are some highlights:

- Removed 3 actions (ActOnKeywordMessage, ActOnUnaryMessage, & one flavor of ObjcBuildMethodDeclaration that was specific to unary messages).
- Removed 3 funky structs from DeclSpec.h (ObjcKeywordMessage, ObjcKeywordDecl, and ObjcKeywordInfo).
- Removed 2 ivars and 2 constructors from ObjCMessageExpr (fyi, this space savings has not been measured).

I am happy with the way it turned out (though it took a bit more hacking than I expected). Given the central role of selectors in ObjC, making sure this is "right" will pay dividends later.

Thanks to Chris for talking this through with me and suggesting this approach.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
3d2313ef5de46228b157b1f1f6e306812dae3942 22-Sep-2007 Chris Lattner <sabre@nondot.org> add comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
c9bec4bfea9090a08dd83a7b213f0c8adf8d78ec 22-Sep-2007 Chris Lattner <sabre@nondot.org> further apfloat'ize the front-end, allowing codegen to pass
APFloat straight through to LLVM now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
1c9bdaef20398390818e9114269cd9925534b89c 22-Sep-2007 Chris Lattner <sabre@nondot.org> work around bugs and missing features in apfloat.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
525a05093a4816af961fe2bc6b8a81c17e2e26c2 22-Sep-2007 Chris Lattner <sabre@nondot.org> Use APFloat for the representation of FP immediates, ask the target
for *which* apfloat to use for a particular type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
21d5a95b8f50be3e0fdd8c53f92fc201f665a4b4 19-Sep-2007 Steve Naroff <snaroff@apple.com> Remove SelectorTable/SelectorInfo, simply store all selectors in the central IdentifierTable.

Rationale:

We currently have a separate table to unique ObjC selectors. Since I don't need all the instance data in IdentifierInfo, I thought this would save space (and make more sense conceptually).

It turns out the cost of having duplicate entries for unary selectors (i.e. names without colons) outweighs the cost difference between the IdentifierInfo & SelectorInfo structures. Here is the data:

Two tables:

*** Selector/Identifier Stats:
# Selectors/Identifiers: 51635
Bytes allocated: 1999824

One table:

*** Identifier Table Stats:
# Identifiers: 49500
Bytes allocated: 1990316




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
563477da25f824e37c535131695dc4dc9b68c465 19-Sep-2007 Steve Naroff <snaroff@apple.com> Progress on message expressions...

- Add ObjcMessageExpr AST node and associated constructors.
- Add SourceLocation's to ActOnKeywordMessage/ActOnUnaryMessage API.
- Instantiate message expressions...
- Replace alloca usage with SmallString.

Next step, installing a correct type, among other tweaks...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
8e74c93ddaa8268a999e1b25c723dc1984a434b4 13-Sep-2007 Steve Naroff <snaroff@apple.com> Phase 2 of making the Decl class more lightweight...

Move Identifier/Loc instance variables (and associated getters/setters) down from Decl to ScopedDecl/FieldDecl.

Objc AST's can now inherit from Decl without getting instance variables and types that are C specific. For now, I am keeping NextDeclarator, since I believe it may be useful to ObjC. If not, it can be moved later.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
9e8925e72f53a9e2c4633b6b48e965ed01702fe4 04-Sep-2007 Steve Naroff <snaroff@apple.com> Make sure initializer type promotions get propagated.

This fixes a recent regression with Codegen/mandel.c.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
38374b05791ee93300b9fbe8ceb3957f54184b37 02-Sep-2007 Steve Naroff <snaroff@apple.com> More progress on array initializers.

- Added Expr::isConstantExpr().
- Added type checking for InitListExpr elements.
- Added diagnostic for trying to initialize a variable sized object.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
b5a69586f1b8855ee4c1f0bb7a8f0ff4fe32ce09 01-Sep-2007 Steve Naroff <snaroff@apple.com> Move SourceRange protocol from Expr->Stmt.

Converted many of the statements over. Still a hanful left...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
66b5a8a39088598c01a9fa6f032dc908612dc8ec 31-Aug-2007 Anders Carlsson <andersca@mac.com> Add InitListExpr class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
73d0d4fac161ed12926e010dcf8b448a8de6a2ec 30-Aug-2007 Chris Lattner <sabre@nondot.org> implement initial sema support for __builtin_offsetof


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
17d1b2ac9f8371a0a2e79d4f8e0008658164f080 28-Aug-2007 Chris Lattner <sabre@nondot.org> add a sourcelocation to binary operator to keep track of the location of the operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
5d66145eed1c319df5a69977cb8ff74f597ea544 26-Aug-2007 Chris Lattner <sabre@nondot.org> add a new ImaginaryLiteral AST node that is used to
represent imaginary literals:

float _Complex A;
void foo() {
A = 1.0iF;
}

generates:

(BinaryOperator 0x2305ec0 '_Complex float' '='
(DeclRefExpr 0x2305e60 '_Complex float' Decl='A' 0x2305cf0)
(ImaginaryLiteral 0x2305f40 '_Complex float'
(FloatingLiteral 0x2305ea0 'float' 1.000000))))



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
eb14fe839ec24c2ca14e5f094be147a34e3d3339 25-Aug-2007 Chris Lattner <sabre@nondot.org> Split the ASTNode out for compound assignments out from binary operators. Now
they show up in dumps etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
dbb36971c68ea944ac4b1fbe2d97fe7cca3b20ac 24-Aug-2007 Chris Lattner <sabre@nondot.org> Implement sema support for __real/__imag nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
1237c673c07f9d827129ba02720108816abde562 24-Aug-2007 Ted Kremenek <kremenek@apple.com> Finished adding child_begin/child_end to all subclasses of Stmt in Expr.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
77ed8e4edf6ed78c53fb20ec3210aff2a59c9d87 24-Aug-2007 Ted Kremenek <kremenek@apple.com> Began implementing "child iterator" interface for Stmts and Exprs. Each
subclass of Stmt will implement child_begin() and child_end(), which will
be used to iterate over all the children (subexpressions/substatements) of
a Stmt object. This will provide for easy traversal over the AST, which
is useful for a variety of purposes.

None of the interfaces to subclasses of Stmt will be changed (other than
adding the child_begin and child_end methods).

The only caveat is that the implementation of subclasses of Stmt will require
colocating all substatements (subexpressions) in an array. This is because
we define child_iterator as Stmt**. All accessor methods to subexpressions
will need to be altered to reflect this new implementation.

This patch includes the typedefs for child_iterator, as well the implementation
for child_begin/child_end for the primary expressions and some postfix
expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
f9bcf01f82dfd2688f81e57bcc6300c9b13c51a6 22-Aug-2007 Anders Carlsson <andersca@mac.com> Parse @encode expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
13d130c3d225cdb5b1e6d9e86cea12eea718c707 21-Aug-2007 Chris Lattner <sabre@nondot.org> add unary operator support to the stmtvisitor



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
5508518a2702b00be3b15a26d772bde968972f54 21-Aug-2007 Anders Carlsson <andersca@mac.com> Implement parsing and code generation of Objective-C string literals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
03d6fb99224c36935c9af9f4785cb33453c99b2b 21-Aug-2007 Chris Lattner <sabre@nondot.org> Add the ability to visit binary operators without having to
match on binop then explicitly switching again.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
c5598cbc4c3f2fb515af7f142f78ff630bdb5c01 21-Aug-2007 Chris Lattner <sabre@nondot.org> Switch StmtVisitor from using dynamic to static dispatch. This makes it
significantly faster and actually reduces the amount of code in the system.
This also allows for future visitor changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
2324512285caac0332bbbc6e4cab6245d2a370a1 20-Aug-2007 Ted Kremenek <kremenek@apple.com> Modified ArraySubscriptExpr to have accessors getLHS and getRHS in addition
to getBase and getIdx. getBase and getIdx now return a "normalized" view
of the expression (e.g., always "A[4]" instead of possibly "4[A]"). getLHS
and getRHS return the expressions with syntactic fidelity to the original
source code.

Also modified client code of ArraySubscriptExpr, including the AST dumper
and pretty printer, the return-stack value checker, and the LLVM code
generator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
fc4a1601a84d280d7e5c424b77843fdd743beec8 16-Aug-2007 Ted Kremenek <kremenek@apple.com> Added a comment to ArraySubscriptExpr to note that the expressions like
"A[4]" are equivalent to "4[A]", and that a test that the expression
returned by "getBase()" has a pointer type is required to resolve which
subexpression is the "true" base expression of the array index.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
e6a82b2c29ad05534841e5f8fd033fb17b6f61e2 14-Aug-2007 Ted Kremenek <kremenek@apple.com> Added documentation to StringLiteral noting that the strings returned by
getStrData() are not null-terminated, and the lengths of these strings should
be determined using getByteLength().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
06184086c10c6672f4bcc3630a5a2b0bed048f63 09-Aug-2007 Chris Lattner <sabre@nondot.org> minor fixes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
13b7c5ff42d6077a8d59e2c9ec9e7fedd0150ae6 09-Aug-2007 Steve Naroff <snaroff@apple.com> Finish implementing __builtin_classify_type()...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
c1b607db38501f73c8e1461fc749a6b0e469f157 04-Aug-2007 Chris Lattner <sabre@nondot.org> fix constness issues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
d04fdd5f99f985abf2e7b7d7d4d427eebe001e55 03-Aug-2007 Steve Naroff <snaroff@apple.com> Implement __builtin_choose_expr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
dd652cdb7046155437eeb3dff512768f0a57369b 03-Aug-2007 Chris Lattner <sabre@nondot.org> fix a buggy comment I added


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
6481a57fefbf1a313ff439028470fe4c27a3b7a3 03-Aug-2007 Chris Lattner <sabre@nondot.org> Rename AddrLabel and OCUVectorComponent -> AddrLabelExpr and OCUVectorElementExpr respectively. This is for consistency with other expr nodes end with *Expr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
4d0ac88428b3ed7c6f3a2f4e758ea5424ecd70ae 03-Aug-2007 Chris Lattner <sabre@nondot.org> add OCUVectorComponent::getNumComponents()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
b8f849da3cedee2f61ad98389115ddd04e439d60 03-Aug-2007 Chris Lattner <sabre@nondot.org> Add support for encoding a OCUVectorComponent into a single integer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
cb92a118145c2a425666068d37c4049c38e24914 02-Aug-2007 Chris Lattner <sabre@nondot.org> Minor comment improvements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
7f28fe8e00ec4fac17977374d8da491f873a3b05 02-Aug-2007 Steve Naroff <snaroff@apple.com> Add a couple const modifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
389cecc83f33e93c8ba6bf2e8269b8690404416f 02-Aug-2007 Steve Naroff <snaroff@apple.com> Hack Expr::isConstantExpr() to allow for __builtin_types_compatible_p.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
363bcff47df2fda3cfcfcd994b7888157df58c43 02-Aug-2007 Steve Naroff <snaroff@apple.com> - Finish hooking up support for __builtin_types_compatible_p().
- Fix type printing code for recently added TypeOfExpr/TypeOfType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
d34e915f33224c508ad55fbf975bd10b7876e197 02-Aug-2007 Steve Naroff <snaroff@apple.com> Add AST/Sema support for __builtin_types_compatible_p (a GNU extension).
Todo...still need to call the action from the parser...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
fec0b49c3fa621fbf63e420f3d54a5bb3a0265d2 30-Jul-2007 Steve Naroff <snaroff@apple.com> Finish up semantic analysis for vector components.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
31a458462c6cf417a84e0c47852b18fb22d79acb 29-Jul-2007 Steve Naroff <snaroff@apple.com> Added a new expression, OCUVectorComponent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
ab18c4c0ac1a46a38aa84c2c8ea485612e21a614 24-Jul-2007 Chris Lattner <sabre@nondot.org> implement ast building and trivial semantic analysis of stmt exprs.
This implements test/Sema/stmt_exprs.c



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
aa4166c6c86e174362c0dc4e2cb63345f72cc5a0 21-Jul-2007 Chris Lattner <sabre@nondot.org> implement getSourceRange for ImplicitCast


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
227426661be33ff3e21f2b6b9f97971da2da044f 21-Jul-2007 Anders Carlsson <andersca@mac.com> Implement code generation for __func__, __FUNCTION__ and __PRETTY_FUNCTION__

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
aff1edd84aaafef15b737acd8ec61abcca6d6bc3 19-Jul-2007 Steve Naroff <snaroff@apple.com> Finish fixing crasher with compound literals.

We still need to do sematic analysis (and implement initializers), however this
should complete the parsing & ast building for compound literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40067 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
76e773a443be9f006610f46529e07d4c8d857680 18-Jul-2007 Chris Lattner <sabre@nondot.org> implement i-c-e correct evaluation for sizeof/alignof, remove some obsolete fixme's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
08ad47cbd1f81fcb31dbc731c13b885a07e12704 17-Jul-2007 Bill Wendling <isanbard@gmail.com> Fix references:
According to the spec (C++ 5p6[expr]), we need to adjust "T&" to
"T" before further analysis. We do this via the "implicit cast"
thingy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
ca51c97fbb10b9d48e1857e01c532493f87cd5f0 16-Jul-2007 Bill Wendling <isanbard@gmail.com> Constify the is*Lvalue() methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
26dc7b39267b7d29b35a7887a5b8e54697192192 16-Jul-2007 Chris Lattner <sabre@nondot.org> Remove an extraneous QualType from CastExpr, it's type is always
the result type of the expr node.

Implement isIntegerConstantExpr for ImplicitCastExpr nodes the same
was as for CastExpr nodes.

Implement proper sign/zero extension as well as truncation and noop
conversion in the i-c-e evaluator. This allows us to correctly
handle i-c-e's like these:

char array[1024/(sizeof (long))];
int x['\xBb' == (char) 187 ? 1: -1];

this implements test/Sema/i-c-e2.c



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
2eadfb638eb1bb6ccfd6fd0453e764d47e27eed9 16-Jul-2007 Chris Lattner <sabre@nondot.org> set the correct width for a character literal when evaluating it as an i-c-e.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
590b6646ef747d2f7b42e5f40487ff07642d7b6f 16-Jul-2007 Chris Lattner <sabre@nondot.org> Refactor code so that isIntegerConstantExpr has an ASTContext available.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
fa2eaabd304172dd8afc561f6156a65f8d0e442b 15-Jul-2007 Steve Naroff <snaroff@apple.com> This is the final step/commit for implementing exlicit implicit casts. Unlike the
previous two checkins, which involved lot's of tedious refactoring, this checkin is nice and clean:-)

- Hacked UsualUnaryConversions, UsualArithmeticConversions, and DefaultFunctionArrayConversion
to create the AST node (using a helper function promoteExprToType).
- Added a setType method to Expr.
- Changed Expr::isIntegerConstantExpr to allow for the new node.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
90045e8ebabf50d6f1b3a67081a621b20b5e5341 14-Jul-2007 Steve Naroff <snaroff@apple.com> More changes related to implementing ImplicitCastExpr.

- Fixed a recent regression discovered by Keith Bauer (thanks!).
The fix involved adding (back) two arguments to UsualArithmeticConversions.
Without the reference arguments, no unary conversions were being passed back
to the caller. This had the effect of turning off the UsualUnaryConversions.
- Refactored CheckAssignmentConstraints into 3 functions. CheckAssignmentConstraints,
CheckSingleAssignmentConstraints, and CheckCompoundAssignmentConstraints.
- Changed the argument type of DefaultFunctionArrayConversion from QualType->Expr*&.
- Removed a bunch of casts in routines I was working on (cleanup).
- Fixed the visitor for ImplicitCastExpr (oops).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39840 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
d0d560a0975c2f8c4a9559e84ec556b6a0baf7df 13-Jul-2007 Chris Lattner <sabre@nondot.org> eliminate extraneous type, add accessors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
49b4526992a8c8a6a290aa3efa9828154a24af8d 13-Jul-2007 Steve Naroff <snaroff@apple.com> Add (explicit) AST support for implicit casts. This should simplify the
code generator. Source translation tools can simply ignore this node.

- Added a new Expr node, ImplicitCastExpr.
- Changed UsualUnaryConversions/UsualArithmeticConversions to take references
to Expr *'s. This will allow these routines to instantiate the new AST node
and pass it back.
- Changed all clients of UsualUnary/UsualArithmetic (lot's of diff's).
- Changed some names in CheckConditionalOperands. Several variables where
only distinguished by their case (e.g. Cond, cond). Yuck (what was I thinking).
- Removed an old/crufty constructor in CastExpr (cleanup).

This check-in does not actually create the new AST node. I wanted to separate
the mechanical changes from the semantic changes. In addition, I need to
coordinate with Chris, since the semantic change will break the code generator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h
5f016e2cb5d11daeb237544de1c5d59f20fe1a6e 11-Jul-2007 Reid Spencer <rspencer@reidspencer.com> Stage two of getting CFE top correct.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Expr.h