History log of /external/clang/lib/Sema/TreeTransform.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1ad23d62007162df82b58bca31b4aa277a5f6586 10-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Remove redundant semicolons which are null statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
568ba871bbac959029671b81f8e531edb7e0d7d6 04-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Revert r163083 per chandlerc's request.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
5be92de217a1940d0e109abd0f401df4480c1a4b 02-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Implemented parsing and AST support for the MS __leave exception statement. Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a6c66cedc022c9e5d45a937d6b8cff491a6bf81b 31-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Change the representation of builtin functions in the AST
(__builtin_* etc.) so that it isn't possible to take their address.
Specifically, introduce a new type to represent a reference to a builtin
function, and a new cast kind to convert it to a function pointer in the
operand of a call. Fixes PR13195.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
02e221bad95aada3190fa6189e38023cba27bc72 28-Aug-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix for assertion when solving unresolved templates.
Patch by Magee, Josh.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
5c7f59445ae68109c7ffee731aca2ce32db587c7 28-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Rename getClobber to getClobberStringLiteral. No functional
change intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
df5faf5e7ae6823d0af0b801c4ac26d47f2cee97 25-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] As part of a larger refactoring, rename AsmStmt to GCCAsmStmt.
No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
5354e77e60e82828c7c2361f5c688c2667ab59cc 24-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Now that ASTMultiPtr is nothing more than a array reference, make it a MutableArrayRef.

This required changing all get() calls to data() and using the simpler constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
4e28d9e2ba9ce237549b45cfd4136ec6536d1325 24-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove ASTOwningVector, it doesn't own anything and provides no value over SmallVector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
3fe198bf0d6118c7b080c17c3bb28d7c84e458b9 23-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Rip out remnants of move semantic emulation and smart pointers in Sema.

These were nops for quite a while and only lead to confusion. ASTMultiPtr
now behaves like a proper dumb array reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
e1715b66a878bcab315513351e5df68bfc010d2e 21-Aug-2012 Sam Panzer <espanz@gmail.com> Better diagnostics for range-based for loops with bad range types.

The old error message stating that 'begin' was an undeclared identifier
is replaced with a new message explaining that the error is in the range
expression, along with which of the begin() and end() functions was
problematic if relevant.

Additionally, if the range was a pointer type or defines operator*,
attempt to dereference the range, and offer a FixIt if the modified range
works.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
df4ee102aa909e2f40c294701bfeffac63e8d29b 20-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove old cruft now that MS-style asms their own code path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
bc20bbb0bf90446a469848c658ca376832f43dc8 16-Aug-2012 Sam Panzer <espanz@gmail.com> Removed unused LParenLoc parameter to ActOnCXXForRangeStmt

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
7bd092b054444e9800e8de1d8d71c408dbdc8ead 15-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add the left brace source location and improve the pretty
printer. Patch by Enea Zaffanella <zaffanella@cs.unipr.it>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
92570bd1597f355d5673a94960323f81d99c4921 15-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove the last bits of LineEnds.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
9fbf327cfdd27ddb5d845042c95f2299ac95b143 15-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Remove trailing return flag from FunctionTypeLoc, since we now carry that
information on FunctionProtoType. (This also fixes one of *many* misalignment
problems in the TypeLoc hierarchy...)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
62f22b87801882646418bae85111e565f7a53ddb 08-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Refactor the logic to generate the AsmString into Sema. No
functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161518 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
4a9d795502f8e001cdc6465ea7a0739ca48dd483 08-Aug-2012 Chad Rosier <mcrosier@apple.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
79efe24e125553b7fd4a35ffb3b7a45c4f1e661a 07-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Stmt destructors are never called, so allocate the AsmToks using
the ASTContext BumpPtr. Also use the preferred llvm::ArrayRef interface.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
8f726de55412870ef70e788b852c6cc50873e15b 06-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Pass Tokens to Sema and store them in the AST. No functional
change intended. No test case as there's no real way to test at this time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
612409ece080e814f79e06772c690d603f45fbd6 25-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR12057: Allow variadic template pack expansions to cross lambda boundaries.
Rather than adding a ContainsUnexpandedParameterPack bit to essentially every
AST node, we tunnel the bit directly up to the surrounding lambda expression
when we reach a context where an unexpanded pack can not normally appear.
Thus any statement or declaration within a lambda can now potentially contain
an unexpanded parameter pack.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
adb1d4c18ee83249d4cffc99ef902f98e846092a 23-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR12917: Remove incorrect assumption that lambda mangling information cannot
change once it's been assigned. It can change in two ways:
1) In a template instantiation, the context declaration should be the
instantiated declaration, not the declaration in the template.
2) If a lambda appears in the pattern of a variadic pack expansion, the
mangling number will depend on the pack length.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
4990890fc9428f98bef90ba349203a648c592778 09-Jul-2012 Alexander Kornienko <alexfh@google.com> Inline storage of attributes in AttributedStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a1eec4bd198b96ef40a7c15cd0e131ca94511ad8 04-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: Refactor parse/sema portion of
objective-c's fast enumeration statement,
for more work to come.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
699c9044c7d53a2774d0dd261a6901dd2c4a545f 15-Jun-2012 James Dennett <jdennett@google.com> Documentation cleanup:
* Removed \param comments for parameters that no longer exist;
* Fixed a "\para" typo to "\param";
* Escaped @, # and \ symbols as needed in Doxygen comments;
* Added use of \brief to output short summaries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
8cd64b4c5553fa6284d248336cb7c82dc960a394 11-Jun-2012 Chad Rosier <mcrosier@apple.com> Etch out the code path for MS-style inline assembly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
6314db9d5918939ad8ec88cd9c3f42a33a67c2b6 15-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR12798: Don't drop part of the nested name specifier when instantiating a
pseudo-destructor expression. This can affect whether virtual dispatch for
the destructor call is bypassed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
eb382ec1507cf2c8c12d7443d0b67c076223aec6 19-Apr-2012 Patrick Beard <pcbeard@mac.com> Implements boxed expressions for Objective-C. <rdar://problem/10194391>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
cefc3afac14d29de5aba7810cc8fe6c858949e9d 16-Apr-2012 Douglas Gregor <dgregor@apple.com> Implement C++11 [expr.prim.general]p3, which permits the use of 'this'
in the declaration of a non-static member function after the
(optional) cv-qualifier-seq, which in practice means in the exception
specification and late-specified return type.

The new scheme here used to manage 'this' outside of a member function
scope is more general than the Scope-based mechanism previously used
for non-static data member initializers and late-parsesd attributes,
because it can also handle the cv-qualifiers on the member
function. Note, however, that a separate pass is required for static
member functions to determine whether 'this' was used, because we
might not know that we have a static function until after declaration
matching.

Finally, this introduces name mangling for 'this' and for the implicit
'this', which is intended to match GCC's mangling. Independent
verification for the new mangling test case would be appreciated.

Fixes PR10036 and PR12450.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
534986f2b21e6050bf00163cd6423fd92155a6ed 14-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Add an AttributedStmt type to represent a statement with C++11 attributes
attached. Since we do not support any attributes which appertain to a statement
(yet), testing of this is necessarily quite minimal.

Patch by Alexander Kornienko!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
7f39d51d9c8f551fd09c1feee3d8033f5702b2cb 06-Apr-2012 John McCall <rjmccall@apple.com> Fix a Sema invariant bug that I recently introduced involving
the template instantiation of statement-expressions.

I think it was jyasskin who had a crashing testcase in this area;
hopefully this fixes it and he can find his testcase and check it in.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
f54486acc1cadf2791c3916ece66fded1e57ba0b 04-Apr-2012 Douglas Gregor <dgregor@apple.com> Move the computation of the lambda mangling information (mangling
number + context) to the point where we initially start defining the
lambda, so that the linkage won't change when that information is made
available. Fixes the assertion in <rdar://problem/11182962>.

Plus, actually mangle the context of lambdas properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
d8b5ca14277e142506daed181ecff9151dfae32c 12-Mar-2012 Jordy Rose <jediknil@belkadan.com> ObjCBoolLiterals (__objc_yes/__objc_no) behave like C++ booleans (true/false). They are NOT objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d 11-Mar-2012 David Blaikie <dblaikie@gmail.com> Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).

The member variable is always "LangOpts" and the member function is always "getLangOpts".

Reviewed by Chris Lattner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
9fcce65e7e1307b5b8da9be13e4092d6bb94dc1d 07-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> AST representation for user-defined literals, plus just enough of semantic
analysis to make the AST representation testable. They are represented by a
new UserDefinedLiteral AST node, which is a sugared CallExpr. All semantic
properties, including full CodeGen support, are achieved for free by this
representation.

UserDefinedLiterals can never be dependent, so no custom instantiation
behavior is required. They are mangled as if they were direct calls to the
underlying literal operator. This matches g++'s apparent behavior (but not its
actual mangling, which is broken for literal-operator-ids).

User-defined *string* literals are now fully-operational, but the semantic
analysis is quite hacky and needs more work. No other forms of user-defined
literal are created yet, but the AST support for them is present.

This patch committed after midnight because we had already hit the quota for
new kinds of literal yesterday.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ebcb57a8d298862c65043e88b2429591ab3c58d3 06-Mar-2012 Ted Kremenek <kremenek@apple.com> Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,
NSNumber, and boolean literals. This includes both Sema and Codegen support.
Included is also support for new Objective-C container subscripting.

My apologies for the large patch. It was very difficult to break apart.
The patch introduces changes to the driver as well to cause clang to link
in additional runtime support when needed to support the new language features.

Docs are forthcoming to document the implementation and behavior of these features.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
72b8b1ef9f7fb4f66fefcbd8d82fce2301b851d4 29-Feb-2012 Eli Friedman <eli.friedman@gmail.com> A couple minor bug-fixes for template instantiation for expressions which are sometimes potentially evaluated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151707 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ac6260187b6b2f26faa9264d170d649a501f58a9 29-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Make the odr-use logic work correctly for constant-expressions. PR12006.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
4ca8ac2e61c37ddadf37024af86f3e1019af8532 24-Feb-2012 Douglas Gregor <dgregor@apple.com> Implement a new type trait __is_trivially_constructible(T, Args...)
that provides the behavior of the C++11 library trait
std::is_trivially_constructible<T, Args...>, which can't be
implemented purely as a library.

Since __is_trivially_constructible can have zero or more arguments, I
needed to add Yet Another Type Trait Expression Class, this one
handling arbitrary arguments. The next step will be to migrate
UnaryTypeTrait and BinaryTypeTrait over to this new, more general
TypeTrait class.

Fixes the Clang side of <rdar://problem/10895483> / PR12038.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
76f3f69db1416425070177243e9f390122c553e0 22-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Implement C++11 [expr.call]p11: If the operand to a decltype-specifier is a
function call (or a comma expression with a function call on its right-hand
side), possibly parenthesized, then the return type is not required to be
complete and a temporary is not bound. Other subexpressions inside a decltype
expression do not get this treatment.

This is implemented by deferring the relevant checks for all calls immediately
within a decltype expression, then, when the expression is fully-parsed,
checking the relevant constraints and stripping off any top-level temporary
binding.

Deferring the completion of the return type exposed a bug in overload
resolution where completion of the argument types was not attempted, which
is also fixed by this change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ccc1b5eebc6ca8a904c58c0468b9a71483b7c7cf 21-Feb-2012 Douglas Gregor <dgregor@apple.com> Implement name mangling for lambda expressions that occur within the
default arguments of function parameters. This simple-sounding task is
complicated greatly by two issues:

(1) Default arguments aren't actually a real context, so we need to
maintain extra state within lambda expressions to track when a
lambda was actually in a default argument.
(2) At the time that we parse a default argument, the FunctionDecl
doesn't exist yet, so lambda closure types end up in the enclosing
context. It's not clear that we ever want to change that, so instead
we introduce the notion of the "effective" context of a declaration
for the purposes of name mangling.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
9e8c92a9c9b949bbb0408fbbd9a58e34894b6efc 20-Feb-2012 Douglas Gregor <dgregor@apple.com> Basic support for name mangling of C++11 lambda expressions. Because
name mangling in the Itanium C++ ABI for lambda expressions is so
dependent on context, we encode the number used to encode each lambda
as part of the lambda closure type, and maintain this value within
Sema.

Note that there are a several pieces still missing:
- We still get the linkage of lambda expressions wrong
- We aren't properly numbering or mangling lambda expressions that
occur in default function arguments or in data member initializers.
- We aren't (de-)serializing the lambda numbering tables




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
e8e92b9dccc362be33a7f9bb84a114b18db65b10 19-Feb-2012 Ahmed Charles <ace2001ac@gmail.com> Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
999713eea940f4e087cc3ac878689c5c5c7a7225 18-Feb-2012 Douglas Gregor <dgregor@apple.com> Rewrite variable capture within lambda expressions and blocks,
eliminating a bunch of redundant code and properly modeling how the
captures of outside blocks/lambdas affect the types seen by inner
captures.

This new scheme makes two passes over the capturing scope stack. The
first pass goes up the stack (from innermost to outermost), assessing
whether the capture looks feasible and stopping when it either hits
the scope where the variable is declared or when it finds an existing
capture. The second pass then walks down the stack (from outermost to
innermost), capturing the variable at each step and updating the
captured type and the type that an expression referring to that
captured variable would see. It also checks type-specific
restrictions, such as the inability to capture an array within a
block. Note that only the first odr-use of each
variable needs to do the full walk; subsequent uses will find the
capture immediately, so multiple walks need not occur.

The same routine that builds the captures can also compute the type of
the captures without signaling errors and without actually performing
the capture. This functionality is used to determine the type of
declaration references as well as implementing the weird decltype((x))
rule within lambda expressions.

The capture code now explicitly takes sides in the debate over C++
core issue 1249, which concerns the type of captures within nested
lambdas. We opt to use the more permissive, more useful definition
implemented by GCC rather than the one implemented by EDG.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
2aed8b88613863f3c439cdfb205bdf8b608fb205 16-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Revert "Revert "Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself.""

This reintroduces commit r150682 with a fix for the Bullet benchmark crash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
1548d14f4092a817f7d90ad3e7a65266dc85fbc5 16-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Revert "Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself."
It leads to a compiler crash in the Bullet benchmark.

This reverts commit r12014.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
5f688f4b15d02aa7ad159c46b1f78fe59d412f12 16-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself.

Holding the constructor directly makes no sense when list-initialized arrays come into play. The constructor is now held in a CXXConstructExpr, if construction is what is done. The new design can also distinguish properly between list-initialization and direct-initialization, as well as implicit default-initialization constructors and explicit value-initialization constructors. Finally, doing it this way removes redundance from the AST because CXXNewExpr doesn't try to handle both the allocation and the initialization responsibilities.

This breaks the static analysis of new expressions. I've filed PR12014 to track this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
c6889e7ed16604c51994e1f11becf213fdc64eb3 14-Feb-2012 Douglas Gregor <dgregor@apple.com> Implement C++ core issue 974, which permits default arguments for
lambda expressions. Because these issue was pulled back from Ready
status at the Kona meeting, we still emit an ExtWarn when using
default arguments for lambda expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150519 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
625bb569df0c34feec0d52c0ec5215f21ef2e054 14-Feb-2012 Dmitri Gribenko <gribozavr@gmail.com> Generalize -Wempty-body: warn when statement body is empty (closes: PR11329)

* if, switch, range-based for: warn if semicolon is on the same line.
* for, while: warn if semicolon is on the same line and either next
statement is compound statement or next statement has more
indentation.

Replacing the semicolon with {} or moving the semicolon to the next
line will always silence the warning.

Tests from SemaCXX/if-empty-body.cpp merged into SemaCXX/warn-empty-body.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a73652465bcc4c0f6cb7d933ad84e002b527a643 14-Feb-2012 Douglas Gregor <dgregor@apple.com> Implement support for lambda capture pack expansions, e.g.,

[&values...] { print(values...); }




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
d5387e86ce3dfe1ae09e050ee11d86ca0d066d04 14-Feb-2012 Douglas Gregor <dgregor@apple.com> Link together the call operator produced from transforming a lambda
expression with the original call operator, so that we don't try to
separately instantiate the call operator. Test and tweak a few more
bits for template instantiation of lambda expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
dfca6f53ab97d28d43e3fa2564209df08f3d282c 13-Feb-2012 Douglas Gregor <dgregor@apple.com> Introduce support for template instantiation of lambda
expressions. This is mostly a simple refact, splitting the main "start
a lambda expression" function into smaller chunks that are driven
either from the parser (Sema::ActOnLambdaExpr) or during AST
transformation (TreeTransform::TransformLambdaExpr). A few minor
interesting points:

- Added new entry points for TreeTransform, so that we can
explicitly establish the link between the lambda closure type in the
template and the lambda closure type in the instantiation.
- Added a bit into LambdaExpr specifying whether it had an explicit
result type or not. We should have had this anyway.

This code is 'lightly' tested.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
eefb3d5b49c844347f212073a7e975b8118fe8e9 10-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Track whether a function type has a trailing return type as type sugar. Use this
to pretty-print such function types better, and to fix a case where we were not
instantiating templates in lexical order. In passing, move the Variadic bit from
Type's bitfields to FunctionProtoType to get the Type bitfields down to 32 bits.
Also ensure that we always substitute the return type of a function when
substituting explicitly-specified arguments, since that can cause us to bail
out with a SFINAE error before we hit a hard error in parameter substitution.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
01d08018b7cf5ce1601707cfd7a84d22015fc04e 07-Feb-2012 Douglas Gregor <dgregor@apple.com> Introduce basic ASTs for lambda expressions. This covers:
- Capturing variables by-reference and by-copy within a lambda
- The representation of lambda captures
- The creation of the non-static data members in the lambda class
that store the captured variables
- The initialization of the non-static data members from the
captured variables
- Pretty-printing lambda expressions

There are a number of FIXMEs, both explicit and implied, including:
- Creating a field for a capture of 'this'
- Improved diagnostics for initialization failures when capturing
variables by copy
- Dealing with temporaries created during said initialization
- Template instantiation
- AST (de-)serialization
- Binding and returning the lambda expression; turning it into a
proper temporary
- Lots and lots of semantic constraints
- Parameter pack captures


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
66581d41527628d4b37f7b05c288f77be7415d7d 06-Feb-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Added source location for the template keyword in DependentTemplateSpecializationTypeLoc nodes (DTSTLoc).

The new info is propagated to TSTLoc on template instantiation, getting rid of 3 FIXMEs in TreeTransform.h and another one Parser.cpp.

Simplified code in TypeSpecLocFiller visitor methods for DTSTLoc and DependentNameTypeLoc by removing what now seems to be dead code (adding corresponding assertions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
38a42916cb07fd368d9e2ae1e7915fa896f9ec06 06-Feb-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Removed redundant location info from ElaboratedTypeLoc / DependentNameLoc / DependentTSTLoc. Uniformed names referencing elaborated keyword. No intended functionality changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
55d23c925b058be29b792008ddb7d68f6c4fa9a0 06-Feb-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Added location for template keyword in TemplateSpecializationTypeLoc. In the process removed some naming ambiguities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
9d9922af13edf3ddf8804a41a98d997324fdd58e 06-Feb-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed instantiation of DependentScopeDeclRefExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
5f2987c11491edb186401d4e8eced275f0ea7c5e 02-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Split Sema::MarkDeclarationReferenced into multiple functions; the additional entry points are needed to implement C++11 odr-use marking correctly. No functional change in this patch; I'll actually make the change which fixes the odr-use marking in a followup patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
d29975fd08713eb9d1777e60536addaa62df8995 31-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Make sure we call MaybeCreateExprWithCleanups for the sub-expression of an indirect goto.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
c6c14e56e34864c5d9343d9ea62ab688cf301eee 31-Jan-2012 Eli Friedman <eli.friedman@gmail.com> A couple minor fixes to template instantiation for for-range loops.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
84b007fae6c0cd30fa07074d34fbe2bf61fa44f9 26-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Refactor to share code for handling return statements between lambda expressions and block literals. As it turns out, almost all the logic can be shared.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
01f276dac946c0845f6eb3449ab253cfdba841a1 26-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Don't stack-allocate an IntegerLiteral which can be referred to after the current method returns. PR11744, part 2.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
457a377ac8566ddc0c455a64843ecf5e675cfff8 25-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Fix a crash involving a multi-dimensional dependent VLA. PR11744.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
d1bb4ae6cbc0f8bea4b329e040f58b18c03388e7 25-Jan-2012 Douglas Gregor <dgregor@apple.com> When we're substituting into a function parameter pack and expect to
get a function parameter pack (but don't due to weird substitutions),
complain. Fixes the last bit of PR11848.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148960 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
00b465747138ec5c00e1d7568d2eb88c6db6042d 25-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> In TreeTransform<Derived>::TransformBlockExpr, call ActOnBlockError for errors,
patch by Dmitri Gribenko.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ef331b783bb96a0f0e34afdb7ef46677dc4764cb 20-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Remove PotentiallyPotentiallyEvaluated, and replace it with a much simpler and less error-prone way of handling the relevant cases. Towards marking of whether a declaration is used more accurately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
6b3014b07c40a6ed8b0c8ed63950df02eeb82c28 18-Jan-2012 Eli Friedman <eli.friedman@gmail.com> The value of a case statement is a potentially evaluated context. Found by inspection.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
b69b42c55d56815bab62991bf839cdb41634d3af 11-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Start refactoring code for capturing variables and 'this' so that it is shared between lambda expressions and block literals.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147917 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
f6702a3927147655206ae729a84339c4fda4c651 20-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> Unlike in C++03, a constant-expression is not an unevaluated operand in C++11.
Split out a new ExpressionEvaluationContext flag for this case, and don't treat
it as unevaluated in C++11. This fixes some crash-on-invalids where we would
allow references to class members in potentially-evaluated constant expressions
in static member functions, and also fixes half of PR10177.

The fix to PR10177 exposed a case where template instantiation failed to provide
a source location for a diagnostic, so TreeTransform has been tweaked to supply
source locations when transforming a type. The source location is still not very
good, but MarkDeclarationsReferencedInType would need to operate on a TypeLoc to
improve it further.

Also fix MarkDeclarationReferenced in C++98 mode to trigger instantiation for
static data members of class templates which are used in constant expressions.
This fixes a link-time problem, but we still incorrectly treat the member as
non-constant. The rest of the fix for that issue is blocked on PCH support for
early-instantiated static data members, which will be added in a subsequent
patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
92be2a5f4e938fc512683cd4e7dfd4e6789eb787 10-Dec-2011 Douglas Gregor <dgregor@apple.com> When we manage to re-use an expression during tree transformation (=
template instantiation), and that expression might produce a
temporary, invoke MaybeBindToTemporary. Otherwise, we forget to
destroy objects, release objects, etc. Fixes <rdar://problem/10531073>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
0586520acb2f368c874943353a222be7f00c3068 03-Dec-2011 Fariborz Jahanian <fjahanian@apple.com> If block literal return type is not specified, return type of the block is
inferred from return types. All the return statements have to agree about the type.
// rdar://10466373


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145774 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
01e19be69a37bc4ab7746c454cfaa6aec7bb7c6a 30-Nov-2011 John McCall <rjmccall@apple.com> Fix the instantiation of pseudo-object expressions. This is a
really bad way to go about this, but I'm not sure there's a better
choice without substantial changes to TreeTransform --- most
notably, preserving implicit semantic nodes instead of discarding
and rebuilding them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
6b18e740495b67b439fa366367242110365cc4d9 09-Nov-2011 Douglas Gregor <dgregor@apple.com> Don't crash when transforming an ill-formed pseudo-destructor
expression. Fixes PR11339.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
9138b4e96429cbaae00c52c15c960f72b6645088 26-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Pull out conversion on LHS of -> and . into its own function. This happens
implicitly in LookupMemberExpr and explicitly in cases where template
instantiation doesn't redo the lookup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
f1f6d85694fcf772f6d602fd9709318b08b96328 26-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Fix crash due to missing array-to-pointer decay when instantiating an unresolved
member expression. Refactoring to follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
601d2ee8dd783503f9d556e1ed3b107abf196a1e 26-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> UnresolvedMemberExprs need lvalue-to-rvalue conversions during template
instantiations too.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
a01c71191c93691e592c030cc48764e52272eea5 25-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Don't forget the lvalue-to-rvalue conversion on the LHS when instantiating a
dependent ->, where the member being referred to is an anonymous struct or
union. This path was missed by the fix in r142890.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
65019acfc46ffb191fac4e781ac0c4b8d0c8434e 25-Oct-2011 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs in the name that guards a
Microsoft __if_exists/__if_not_exists statement. Also note that we
weren't traversing DeclarationNameInfo *at all* within the
RecursiveASTVisitor, which would be rather fatal for variadic
templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ba0513de93d2fab6db5ab30b6927209fcc883078 25-Oct-2011 Douglas Gregor <dgregor@apple.com> Implement support for dependent Microsoft __if_exists/__if_not_exists
statements. As noted in the documentation for the AST node, the
semantics of __if_exists/__if_not_exists are somewhat different from
the way Visual C++ implements them, because our parsed-template
representation can't accommodate VC++ semantics without serious
contortions. Hopefully this implementation is "good enough".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
97f9fe06e7acd55d7d9075a41e33f54855c75eae 25-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Don't forget the lvalue-to-rvalue conversion on the LHS of an -> when rebuilding
it during template instantiation, for a known RHS decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
95aafb2453e1fecec8dcfd9e125cd78277f45859 20-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add -Wc++98-compat warning for enumerations in nested name specifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
4e8ea0b2e163aa9681e2f14ad75ab4990a69d39b 18-Oct-2011 Douglas Gregor <dgregor@apple.com> When transforming the arguments for a C++ "new" expression, make sure
to drop the implicitly-generated value initialization expression used
for initializing scalars. Fixes <rdar://problem/10283928>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
089e8939b7b3e72c32477e39df82f18e6a8f436e 10-Oct-2011 Douglas Gregor <dgregor@apple.com> When substituting into a sizeof parameter pack expression in a context
where we can't expand (i.e., multi-level substitution), be sure to
substitute the pack with its level-reduced pack. Fixes PR10230.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
b001de7458d17c17e6d8b8034c7cfcefd3b70c00 07-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Support for C1x _Atomic specifier (see testcase). This is primarily being committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic.

Thanks to Jeffrey Yasskin for the thorough review!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
207180802c836fda8acbedb47a92f9d2bdca59c3 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow getting all source locations of selector identifiers in a ObjCMessageExpr.

Instead of always storing all source locations for the selector identifiers
we check whether all the identifiers are in a "standard" position; "standard" position is

-Immediately before the arguments: [foo first:1 second:2]
-With a space between the arguments: [foo first: 1 second: 2]
-For nullary selectors, immediately before ']': [foo release]

In such cases we infer the locations instead of storing them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
eb2d1f1c88836bd5382e5d7aa8f6b85148a88b27 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Removing a bunch of dead returns/breaks after llvm_unreachables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Switch assert(0/false) llvm_unreachable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a71f9d0a5e1f8cafdd23a17e292de22fdc8e99ff 22-Sep-2011 David Blaikie <dblaikie@gmail.com> ArrayRef-ifying the UnexpandedParameterPacks passed to Sema::CheckParameterPacksForExpansion


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
4278c654b645402554eb52a48e9c7097c9f1233a 21-Sep-2011 David Blaikie <dblaikie@gmail.com> ArrayRef-ifying Function/BlockDecl's setParams


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
07524039dce5c820f111a1b3f772b4261f004b4a 27-Jul-2011 John McCall <rjmccall@apple.com> The lock operand to an @synchronized statement is also
supposed to be a full-expression; make it so. In ARC, make sure
we retain the lock for the entire protected block.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
990567cb60e8530ba01b41d4e056e32b44b95ec0 27-Jul-2011 John McCall <rjmccall@apple.com> Clean up the analysis of the collection operand to ObjC
for-in statements; specifically, make sure to close over any
temporaries or cleanups it might require. In ARC, this has
implications for the lifetime of the collection, so emit it
with a retain and release it upon exit from the loop.

rdar://problem/9817306



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
2ad63cf7146268a336b5a931f626adaa8a5150f0 26-Jul-2011 Douglas Gregor <dgregor@apple.com> When we decide not to rebuild an instantiated C++ 'new' expression
that allocates an array of objects with a non-trivial destructor, be
sure to mark the destructor is "used". Fixes PR10480 /
<rdar://problem/9834317>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
bca01b46850f867b2f4137f25c882022b58f8471 07-Jul-2011 Douglas Gregor <dgregor@apple.com> Properly implement the scope restriction on the NRVO for
throw-expressions, such that we don't consider the NRVO when the
non-volatile automatic object comes from outside the innermost try
scope (C++0x [class.copymove]p13). In C++98/03, our ASTs were
incorrect but it didn't matter because IR generation doesn't actually
apply the NRVO here. In C++0x, however, we were moving from an object
when in fact we should have copied from it. Fixes PR10142 /
<rdar://problem/9714312>.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
c8fc90a854b4ccba21c85884676a80334159dd94 06-Jul-2011 John McCall <rjmccall@apple.com> When tree-transforming an expression sequence, always flag expanded
variadic argument pack expansions as having changed, rather than doing
it for each changed expansion, which leaves out zero-argument packs
with catastrophic consequences.

Fixes PR10260.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134483 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
d0e8b782787638bcc9c57022e47c28d3529f02d4 27-Jun-2011 Douglas Gregor <dgregor@apple.com> When instantiating a C++ "new" expression, don't fake source locations
for the '(' and ')' around the initializer unless we actually have an
initializer. Fixes PR10197, an issue where we were value-initializing
rather than default-initializing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133913 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
b8b0313e84700b5c6d597b3be4de41c97b7550f1 24-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about 'ownership', not 'lifetime'.

rdar://9477613.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
03e80030515c800d1ab44125b9052dfffd1bd04c 21-Jun-2011 Douglas Gregor <dgregor@apple.com> Introduce a new AST node describing reference binding to temporaries.

MaterializeTemporaryExpr captures a reference binding to a temporary
value, making explicit that the temporary value (a prvalue) needs to
be materialized into memory so that its address can be used. The
intended AST invariant here is that a reference will always bind to a
glvalue, and MaterializeTemporaryExpr will be used to convert prvalues
into glvalues for that binding to happen. For example, given

const int& r = 1.0;

The initializer of "r" will be a MaterializeTemporaryExpr whose
subexpression is an implicit conversion from the double literal "1.0"
to an integer value.

IR generation benefits most from this new node, since it was
previously guessing (badly) when to materialize temporaries for the
purposes of reference binding. There are likely more refactoring and
cleanups we could perform there, but the introduction of
MaterializeTemporaryExpr fixes PR9565, a case where IR generation
would effectively bind a const reference directly to a bitfield in a
struct. Addresses <rdar://problem/9552231>.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
4020caec546d221170072d2388b57d151cb26111 18-Jun-2011 Douglas Gregor <dgregor@apple.com> Objective-C++ ARC: eliminate the utterly unjustified loophole that
silently dropped ownership qualifiers that were being applied to
ownership-qualified, substituted type that was *not* a substituted
template type parameter. We now provide a diagnostic in such cases,
and recover by dropping the added qualifiers.

Document this behavior in the ARC specification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133309 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
e559ca1672ecef59345a928af0a6809b09282d2c 18-Jun-2011 Douglas Gregor <dgregor@apple.com> Objective-ARC++: infer template type arguments of
ownership-unqualified retainable object type as __strong. This allows
us to write, e.g.,

std::vector<id>

and we'll infer that the vector's element types have __strong
ownership semantics, which is far nicer than requiring:

std::vector<__strong id>

Note that we allow one to override the ownership qualifier of a
substituted template type parameter, e.g., given

template<typename T>
struct X {
typedef __weak T type;
};

X<id> is treated the same as X<__strong id>. At instantiation type,
the __weak in "__weak T" overrides the (inferred or specified)
__strong on the template argument type, so that we can still provide
metaprogramming transformations.

This is part of <rdar://problem/9595486>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133303 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
7a614d8380297fcd2bc23986241905d97222948c 11-Jun-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement support for C++11 in-class initialization of non-static data members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
bbf34c024398e7bae825686dcff4c3b901ec9f89 10-Jun-2011 Richard Trieu <rtrieu@google.com> Made changes to how 'struct'/'class' mismatches are handled in -Wmismatched-tags.
- Removed fix-it hints from template instaniations since changes to the
templates are rarely helpful.
- Changed the caret in template instaniations from the class/struct name to the
class/struct keyword, matching the other warnings.
- Do not offer fix-it hints when multiple declarations disagree. Warnings are
still given.
- Once a definition is found, offer a fix-it hint to all previous declarations
with wrong tag.
- Declarations that disagree with a previous definition will get a fix-it hint
to change the declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
eea06c609b73afc7bcfdf3e101efb8d9e7b3560c 31-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Ensure we enter an unevaluated context when instantiating a noexcept
expression. Fixes bug raised by hhinnant to cfe-dev

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
e72c55b9a11be9f00fa3f66f7ad6b73b2814e963 29-May-2011 Chandler Carruth <chandlerc@gmail.com> Fix a regression in the source locations for unary trait expressions.
I tried to use an assert to prove that I could remove each of the
arguments I did, but ended up writing my assert with inverted logic.
Doh! Reported by Xi Wang on cfe-dev. I have manually verified the source
locations and ranges for these using -ast-dump. I tried writing a test
case that would catch these, but these expressions aren't exposed in the
c-index-test's token annotation utility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
9d342d0121531bcbd2410f600a751dc85993bdee 26-May-2011 Chandler Carruth <chandlerc@gmail.com> Add a convenience interface for checking expression arguments to unary
traits which uses the information embedded in the expression. Use this
to simplify several interfaces which repeated information embedded in
the expression through explicit arguments. I added an assertion that the
only extra piece of data to come in from the parser matches what is
stored in the expression. No functionality change intended here.

Also cleaned up the doxygen comments for some of these methods and some
formatting oddities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ca63c200346c0ca9e00194ec6e34a5a7b0ed9321 25-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement a new type node, UnaryTransformType, designed to represent a
type that turns one type into another. This is used as the basis to
implement __underlying_type properly - with TypeSourceInfo and proper
behavior in the face of templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
fc92137eee708b632c00a9b0934ff87aeae234a5 20-May-2011 Douglas Gregor <dgregor@apple.com> Diagnose unexpanded parameter packs in return statements. This
manifested in a crash with blocks in PR9953, but it was a ticking time
bomb for normal functions, too. Fixes PR9953.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131731 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
1804174e1591bf59118f317775b48edd0382c3f0 14-May-2011 Richard Smith <richard-llvm@metafoo.co.uk> PR9908: Fix the broken fix for PR9902 to get the template argument lists in the right order.
Also, don't reject alias templates in all ElaboratedTypes: some ElaboratedTypes do not correspond to elaborated-type-specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
00c93a10c3504b77dad4467766bfca3248defbfb 07-May-2011 Richard Trieu <rtrieu@google.com> Patch for PR 7409 - only error on definition of invalid typedefs. Suppress errors for additional uses of this invalid typedef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
3e4c6c4c79a03f5cb0c4671d7c282d623c6dc35e 05-May-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement support for C++0x alias templates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ff365592d1878c0e454f288e30613664a72cff4c 05-May-2011 Fariborz Jahanian <fjahanian@apple.com> When instantiating a block expression, the instantiated
blockScopeInfo's CapturesCXXThis field need get set as
well. // rdar://9362021. John M. please review.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
fb44de956f27875def889482b5393475060392af 02-May-2011 John McCall <rjmccall@apple.com> Store a parameter index and function prototype depth in every
parameter node and use this to correctly mangle parameter
references in function template signatures.

A follow-up patch will improve the storage usage of these
fields; here I've just done the lazy thing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130669 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
28bbe4b8acc338476fe0825769b41fb32b423c72 28-Apr-2011 John Wiegley <johnw@boostpro.com> Parsing/AST support for Structured Exception Handling

Patch authored by Sohail Somani.

Provide parsing and AST support for Windows structured exception handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
21ff2e516b0e0bc8c1dbf965cb3d44bac3c64330 28-Apr-2011 John Wiegley <johnw@boostpro.com> Implementation of Embarcadero array type traits

Patch authored by John Wiegley.

These are array type traits used for parsing code that employs certain
features of the Embarcadero C++ compiler: __array_rank(T) and
__array_extent(T, Dim).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
223de2497fdaacf3a6b0a123c12265ca837abf19 25-Apr-2011 Chris Lattner <sabre@nondot.org> fix PR9474, a crash with -fshort-enum and C++ templates: when instantiating
the enum decl, we need to use an integer type the same size as the enumerator,
which may not be the promoted type with packed enums.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
552622067dc45013d240f73952fece703f5e63bd 25-Apr-2011 John Wiegley <johnw@boostpro.com> t/clang/expr-traits

Patch authored by David Abrahams.

These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for
parsing code that employs certain features of the Embarcadero C++ compiler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
34f52d14742914bbaa975ce7de45957cccf256bc 22-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix crashing rdar://9122854 & http://llvm.org/PR9461.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
162e1c1b487352434552147967c3dd296ebee2f7 15-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> Support for C++11 (non-template) alias declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
efdf988611c1eb02770643cd3fabd5df2f579353 15-Apr-2011 Douglas Gregor <dgregor@apple.com> When we transform a C++ exception declaration (e.g., for template
instantiation), be sure to add the transformed declaration into the
current DeclContext. Also, remove the -Wuninitialized hack that works
around this bug. Fixes <rdar://problem/9200676>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ad762fcdc16b9e4705b12b09d92b8c026212b906 15-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add support for C++0x's range-based for loops, as specified by the C++11 draft standard (N3291).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
429bb276991ff2dbc7c5b438828b9b7737cb15eb 08-Apr-2011 John Wiegley <johnw@boostpro.com> Use ExprResult& instead of Expr *& in Sema

This patch authored by Eric Niebler.

Many methods on the Sema class (e.g. ConvertPropertyForRValue) take Expr
pointers as in/out parameters (Expr *&). This is especially true for the
routines that apply implicit conversions to nodes in-place. This design is
workable only as long as those conversions cannot fail. If they are allowed
to fail, they need a way to report their failures. The typical way of doing
this in clang is to use an ExprResult, which has an extra bit to signal a
valid/invalid state. Returning ExprResult is de riguour elsewhere in the Sema
interface. We suggest changing the Expr *& parameters in the Sema interface
to ExprResult &. This increases interface consistency and maintainability.

This interface change is important for work supporting MS-style C++
properties. For reasons explained here
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-February/013180.html>,
seemingly trivial operations like rvalue/lvalue conversions that formerly
could not fail now can. (The reason is that given the semantics of the
feature, getter/setter method lookup cannot happen until the point of use, at
which point it may be found that the method does not exist, or it may have the
wrong type, or overload resolution may fail, or it may be inaccessible.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a35d5d7700b519d713039afd31477e95e2da7aa7 01-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Fix an error in TreeTransform where we failed to copy the TemplateName's
location into a TemplateSpecializationTypeLoc. These were found using
a hand-written program to inspect every source location in
TemplateSpecializationTypeLocs and Valgrind. I don't know of any way to
test them in Clang's existing test suite sadly.

Example code that triggers the ElaboratedType case:
template <typename T> struct X1 {
template <typename U> struct X1_1 {
int x;
};
};

template <typename T, typename U> struct X2 {
typename X1<T>::template X1_1<U> B;
};

X2<char, int> x2;

The other fix was simply spotted by inspection. I audited all constructions of
[Dependent]TemplateSpecializationTypeLocs in TreeTransform.h, and the rest set
the TemplateNameLoc properly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
796aa443ab5ed036f42ef33fed629e1b4b34871b 12-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Forgotten part of previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
ff676cb48fe8bf7be2feaa251dc7c5fb15af4730 08-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed source range for all DeclaratorDecl's.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
944cdae86ecb2ab5deda96804099bd28f6a6cd39 07-Mar-2011 Douglas Gregor <dgregor@apple.com> When rebuilding a dependent template specialization type to another
dependent template specialization type, make sure to set the keyword
location. Fixes some valgrind issues introduced in r127150.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
0a0367a479e2ad204a97f87ed72f18209169b775 07-Mar-2011 Douglas Gregor <dgregor@apple.com> When transforming a dependent template specialization type, make sure
to set the source-location information for the template arguments to
the *transformed* source-location information, not the original
source-location information. Fixes <rdar://problem/8986308> (a libc++
SFINAE issue) and the Boost.Polygon failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
3c52a218f41f091a17582d037663594d2b8dc708 06-Mar-2011 Douglas Gregor <dgregor@apple.com> Fix copy-and-paste typo in the transformation of Microsoft __uuidof expressions, from Eric Niebler via John Wiegley

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
0b4bcb639a9aab9c466a9e6d6e61b3bd1bb36d68 05-Mar-2011 Douglas Gregor <dgregor@apple.com> When transforming a substituted template type parameter, try to
transform the type that replaces the template type parameter. In the
vast majority of cases, there's nothing to do, because most template
type parameters are replaced with something non-dependent that doesn't
need further transformation. However, when we're dealing with the
default template arguments of template template parameters, we might
end up replacing a template parameter (of the template template
parameter) with a template parameter of the enclosing template.

This addresses part of PR9016, but not within function
templates. That's a separate issue.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
b6ab6c1ca733fda2302a1c5066bdfc6218c89e41 05-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Improved MemberPointerType source locations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
087eb5a2d3c7988eb7c440cd86cc7479e57d5dc0 04-Mar-2011 Douglas Gregor <dgregor@apple.com> When constructing source-location information for a
DependentTemplateSpecializationType during tree transformation, retain
the NestedNameSpecifierLoc as it was used to translate the template
name, rather than reconstructing it from the template name.

Fixes PR9401.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
67714230a191bc3c01f33378f34f34ef377991a6 03-Mar-2011 Douglas Gregor <dgregor@apple.com> When we use the default template arguments of a template template
parameter, save the instantiated default template arguments along with
the explicitly-specified template argument list. That way, we prefer
the default template template arguments corresponding to the template
template parameter rather than those of its template template argument.

This addresses the likely direction of C++ core issue 150, and fixes
PR9353/<rdar://problem/9069136>, bringing us closer to the behavior of
EDG and GCC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
6ebe66417437b76e520c9a3231a0bbb30bac08cc 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Eliminate an unnecessary TemporaryBase object from TreeTransform

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
044526fe99692343b7770895bdd73f394cc815e4 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Kill off the
TreeTransform::TransformDependentTemplateSpecializationType() with
poor source-location information handling. All of the
CXXScopeSpec::MakeTrivial() and
NestedNameSpecifierLocBuilder::MakeTrivial() callers actually make
sense now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
d11050fa37c50546dcb795d0cd99ca7384d3929b 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Eliminate TreeTransform::RebuildNestedNameSpecifier(), all four of
them, which are no longer used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
21e2e60fc02b5172e3da38f887b9f611d59afcd6 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Eliminate an unnecessary use of CXXScopeSpec::MakeTrivial. We have proper nested-name-specifier source-location information in DependentTemplateSpecializationTypeLocs now

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
9151c11836f5fbb36cedfe4d22df7e00e77a1d42 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Kill off TreeTransform::TransformNestedNameSpecifier() in favor of the
source-location-preserving
TreeTransform::TranformNestedNameSpecifierLoc(). No functionality
change: the victim had no callers (that themselves had callers) anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
1d752d7d68359fd8f7701585d4658aa70e129261 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Kill off the TreeTransform::TransformTemplateName overload that has
poor source-location information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
b71d821d64af88749fc9860fd43a5164d8d819c8 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Kill off one of the TreeTransform::TransformTypeInObjectScope()
overloads (the one with the poor source-location information).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
fd4ffebd8e8e77346e70dfbc2d72dd673ebd7c6d 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Start migrating TreeTransform's TransformTemplateName over to version
that preserve source-location information. This commit adds more
redundancy than it removes; WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
b6744efecba58792cce20d2d7b9ee39927c5422e 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into template
template arguments. I believe that this is the last place in the AST
where we were storing a source range for a nested-name-specifier
rather than a proper nested-name-specifier location structure. (Yay!)

There is still a lot of cleanup to do in the TreeTransform, which
doesn't take advantage of nested-name-specifiers with source-location
information everywhere it could.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126844 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
406f98f6a5a7bde5707085af8d66204e7e76af45 02-Mar-2011 Douglas Gregor <dgregor@apple.com> When we're substituting into a parameter-type-list nested inside the pattern
of an expansion, and we have a paramameter that is not a parameter
pack, don't suppress substitution of parameter packs within this
context.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
94fdffa4a572fc14ac296f5f1aae9db3734c72f1 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source-location information into dependent
template specialization types. There are still a few rough edges to
clean up with some of the parser actions dropping
nested-name-specifiers too early.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
9e876876afc13aa671cc11a17c19907c599b9ab9 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Reinstate the introduction of source-location information for
nested-name-speciciers within elaborated type names, e.g.,

enum clang::NestedNameSpecifier::SpecifierKind

Fixes in this iteration include:

(1) Compute the type-source range properly for a dependent template
specialization type that starts with "template template-id ::", as
in a member access expression

dep->template f<T>::f()

This is a latent bug I triggered with this change (because now we're
checking the computed source ranges for dependent template
specialization types). But the real problem was...

(2) Make sure to set the qualifier range on a dependent template
specialization type appropriately. This will go away once we push
nested-name-specifier locations into dependent template
specialization types, but it was the source of the
valgrind errors on the buildbots.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
2786864406af0f3ec65b300675c6f3c809c22fd7 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Revert r126748, my second attempt at nested-name-specifier source
location information for elaborated types. *sigh*


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
be38c5f5d8fa7c43c52fafddee054b8fe8c2b964 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Reinstate r126737, extending the generation of type-source location
information for qualifier type names throughout the parser to address
several problems.

The commit message from r126737:

Push nested-name-specifier source location information into elaborated
name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind".

Aside from the normal changes, this also required some tweaks to the
parser. Essentially, when we're looking at a type name (via
getTypeName()) specifically for the purpose of creating an annotation
token, we pass down the flag that asks for full type-source location
information to be stored within the returned type. That way, we retain
source-location information involving nested-name-specifiers rather
than trying to reconstruct that information later, long after it's
been lost in the parser.

With this change, test/Index/recursive-cxx-member-calls.cpp is showing
much improved results again, since that code has lots of
nested-name-specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
44cd9f9d686dfdb9ad16113c41c2dca1da35a646 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Revert r126737, the most recent nested-name-specifier location change, for buildbot breakage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
239cbb023c8da689e7722f7146914eed9755e368 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into elaborated
name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind".

Aside from the normal changes, this also required some tweaks to the
parser. Essentially, when we're looking at a type name (via
getTypeName()) specifically for the purpose of creating an annotation
token, we pass down the flag that asks for full type-source location
information to be stored within the returned type. That way, we retain
source-location information involving nested-name-specifiers rather
than trying to reconstruct that information later, long after it's
been lost in the parser.

With this change, test/Index/recursive-cxx-member-calls.cpp is showing
much improved results again, since that code has lots of
nested-name-specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
2494dd024b392b8def58bf067cc94b51c214cf77 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into
DependentNameTypeLoc. Teach the recursive AST visitor and libclang how to
walk DependentNameTypeLoc nodes.

Also, teach libclang about TypedefDecl source ranges, so that we get
those. The massive churn in test/Index/recursive-cxx-member-calls.cpp
is a good thing: we're annotating a lot more of this test correctly
now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
e29425bd22fbb9200bbec7b743197b9c6dad3e40 28-Feb-2011 Douglas Gregor <dgregor@apple.com> Teach Sema::CheckTypenameType to use nested-name-specifiers with
source-location information. We don't actually preserve this
information in any of the resulting TypeLocs (yet), so it doesn't
matter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
4c9be89bb615ec07eb3ed507c8fa9d0baa8a5ad7 28-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into
UnresolvedLookupExpr and UnresolvedMemberExpr.

Also, improve the computation that checks whether the base of a member
expression (either unresolved or dependent-scoped) is implicit. The
previous check didn't cover all of the cases we use in our
representation, which threw off source-location information for these
expressions (which, in turn, caused some breakage in libclang's token
annotation).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
7c3179cf463c3b3b8c21dbb955f933ba50b74f28 28-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into
CXXDependentScopeMemberExpr, and clean up instantiation of
nested-name-specifiers with dependent template specialization types in
the process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a88f09f34e86125ee4e6949a757aaed314012664 28-Feb-2011 Douglas Gregor <dgregor@apple.com> Eliminate the last remains of TemplateSpecializationTypes with
dependent template names. There is still a lot of redundant code in
TreeTransform to cope with TemplateSpecializationTypes, which I'll
remove in stages.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
aa2187de137e5b809dcbbe14f3b61ae907a3d8aa 28-Feb-2011 Douglas Gregor <dgregor@apple.com> When we encounter a dependent template name within a
nested-name-specifier, e.g.,

T::template apply<U>::

represent the dependent template name specialization as a
DependentTemplateSpecializationType, rather than a
TemplateSpecializationType with a dependent TemplateName.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
00cf3cc2718671aa48e8da264a523b0058a8591e 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into
DependentScopeDeclRefExpr. Plus, give NestedNameSpecifierLoc == and !=
operators, since we're going to need 'em elsewhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
f3db29fff6a583ecda823cf909ab7737d8d30129 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source-location information into
pseudo-destructor expressions. Also, clean up some
template-instantiation and type-checking issues with
pseudo-destructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
c22b5fff39a7520207f165fb16a27a34b944bd9c 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Use NestedNameSpecifierLoc within out-of-line variables, function, and
tag definitions. Also, add support for template instantiation of
NestedNameSpecifierLocs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
c34348a7ef1a6b3f92a644a227953800cd1f9947 24-Feb-2011 Douglas Gregor <dgregor@apple.com> Retain complete source-location information for C++
nested-name-specifiers throughout the parser, and provide a new class
(NestedNameSpecifierLoc) that contains a nested-name-specifier along
with its type-source information.

Right now, this information is completely useless, because we don't
actually store the source-location information anywhere in the
AST. Call this Step 1/N.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
14aba76042e041b2c5e439bf4ae353a0a3c7fd73 24-Feb-2011 Douglas Gregor <dgregor@apple.com> Teach NestedNameSpecifier to keep track of namespace aliases the same
way it keeps track of namespaces. Previously, we would map from the
namespace alias to its underlying namespace when building a
nested-name-specifier, losing source information in the process.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126358 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
9ddba32f25c0315cd3a6c7b63e0275b27cc1d973 24-Feb-2011 Douglas Gregor <dgregor@apple.com> Tweak the CXXScopeSpec API a bit, so that we require the
nested-name-specifier and source range to be set at the same time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
2e4c34ac53d08633b9473df921db4c7e4c9cd577 24-Feb-2011 Douglas Gregor <dgregor@apple.com> Teach CXXScopeSpec to handle the extension of a nested-name-specifier
with another component in the nested-name-specifiers, updating its
representation (a NestedNameSpecifier) and source-location information
(currently a SourceRange) simultaneously. This is groundwork for
adding source-location information to nested-name-specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
406c38e8c1f105acfd438f94dfbc17af817aa4a5 23-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> Fix PR9276: We were missing the checks for auto deducing to different types in the same declaration group in the template instantiation case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
34b41d939a1328f484511c6002ba2456db879a29 20-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement the C++0x deduced 'auto' feature.

This fixes PR 8738, 9060 and 9132.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126069 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
57ad37823e198f977cac605dbfbaefb4daf325e9 17-Feb-2011 Chris Lattner <sabre@nondot.org> Step #2/N of __label__ support: keep pushing LabelDecl forward,
making them be template instantiated in a more normal way and
make them handle attributes like other decls.

This fixes the used/unused label handling stuff, making it use
the same infrastructure as other decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
e08ce650a2b02410eddd1f60a4aa6b3d4be71e73 09-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> AST, Sema, Serialization: add CUDAKernelCallExpr and related semantic actions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
c6ac9c3d754f91d27b1734965e5f1a8e542e8f40 04-Feb-2011 John McCall <rjmccall@apple.com> Assert during instantiation of blocks that we've captured everything that
we captured in the dependent case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
c938c1668b4fd12af154e965dd935a89e4801a70 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Rvalue references for *this:

- Add ref-qualifiers to the type system; they are part of the
canonical type. Print & profile ref-qualifiers
- Translate the ref-qualifier from the Declarator chunk for
functions to the function type.
- Diagnose mis-uses of ref-qualifiers w.r.t. static member
functions, free functions, constructors, destructors, etc.
- Add serialization and deserialization of ref-qualifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
c21c7e9c2cded68f91be15be6847c9649242dc17 25-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach TemplateSpecializationTypeLoc::initializeArgLocs() to actually
generate meaningful [*] template argument location information.

[*] Well, as meaningful as possible, given that this entire code path
is a hack for when we've lost type-source information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ae201f75e56f33278b2d48396b35bfa74c32af63 25-Jan-2011 Douglas Gregor <dgregor@apple.com> Be a bit more defensive about setting the temporary base location
during template instantiation. This code needs to eventually die, but
this little tweak fixes PR8629, where bad location information slipped
through to the location of a class template instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124199 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
446e4029c75b651475e9055dc9dd18fbc7b6dabe 24-Jan-2011 Nick Lewycky <nicholas@mxc.ca> Enhance the diagnostic for referring to a typedef with an elaborated name to be
as useful in a templated context as it is without templates. Fixes PR8755!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124136 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
3b6575108a5b6d8b92ac3a9a7794bf6c3a210907 19-Jan-2011 John McCall <rjmccall@apple.com> Change the canonical representation of array types to store qualifiers on the
outermost array types and not on the element type. Move the CanonicalType
member from Type to ExtQualsTypeCommonBase; the canonical type on an ExtQuals
node includes the qualifiers on the ExtQuals. Assorted optimizations enabled
by this change.

getQualifiers(), hasQualifiers(), etc. should all now implicitly look through
array types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
f4c7371fb1d3cebcfb40abad4537bb82515704ea 19-Jan-2011 John McCall <rjmccall@apple.com> Change QualType::getTypePtr() to return a const pointer, then change a
thousand other things which were (generally inadvertantly) relying on that.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
dec0984fce504a39a7f085774fb67cfd9957be58 18-Jan-2011 Jeffrey Yasskin <jyasskin@google.com> Fix warnings found by gcc-4.6, from -Wunused-but-set-variable and
-Wint-to-pointer-cast.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
1aee05d08b2184acadeb36de300e216390780d6c 15-Jan-2011 Douglas Gregor <dgregor@apple.com> Introduce a new kind of TemplateName that captures a substituted
template template parameter pack that cannot be fully expanded because
its enclosing pack expansion could not be expanded. This form of
TemplateName plays the same role as SubstTemplateTypeParmPackType and
SubstNonTypeTemplateParmPackExpr do for template type parameter packs
and non-type template parameter packs, respectively.

We should now handle these multi-level pack expansion substitutions
anywhere. The largest remaining gap in our variadic-templates support
is that we cannot cope with non-type template parameter packs whose
type is a pack expansion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
c7793c73ba8a343de3f2552d984851985a46f159 15-Jan-2011 Douglas Gregor <dgregor@apple.com> Introduce a new expression kind, SubstNonTypeTemplateParmPackExpr,
that captures the substitution of a non-type template argument pack
for a non-type template parameter pack within a pack expansion that
cannot be fully expanded. This follows the approach taken by
SubstTemplateTypeParmPackType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
2be29f423acad3bbe39099a78db2805acb5bdf17 15-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach template template argument pack expansions to keep track of the
number of expansions, when we know it, and propagate that information
through Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
6a24bfda084f06a0b252b7befe8cbb17fce7f94e 14-Jan-2011 Douglas Gregor <dgregor@apple.com> Handle substitutions into function parameter packs whose patterns
contain multiple parameter packs at different levels.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
67fd1251aad51bb80d050b7fa5e506fef0ec8e02 14-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach PackExpansionExpr to keep track of the number of pack expansions
it will expand to, if known. Propagate this information throughout Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
cded4f649cd4b7ba7d461c25c6482ef52b8d3a2a 14-Jan-2011 Douglas Gregor <dgregor@apple.com> Keep track of the number of expansions to be produced from a type pack
expansion, when it is known due to the substitution of an out
parameter pack. This allows us to properly handle substitution into
pack expansions that involve multiple parameter packs at different
template parameter levels, even when this substitution happens one
level at a time (as with partial specializations of member class
templates and the signatures of member function templates).

Note that the diagnostic we provide when there is an arity mismatch
between an outer parameter pack and an inner parameter pack in this
case isn't as clear as the normal diagnostic for an arity
mismatch. However, this doesn't matter because these cases are very,
very rare and (even then) only typically occur in a SFINAE context.

The other kinds of pack expansions (expression, template, etc.) still
need to support optional tracking of the number of expansions, and we
need the moral equivalent of SubstTemplateTypeParmPackType for
substituted argument packs of template template and non-type template
parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
c3069d618f4661d923cb1b5c4525b082fce73b04 14-Jan-2011 Douglas Gregor <dgregor@apple.com> Start implementing support for substitution into pack expansions that
involve template parameter packs at multiple template levels that
occur within the signatures members of class templates (and partial
specializations thereof). This is a work-in-progress that is deficient
in several ways, notably:
- It only works for template type parameter packs, but we need to
also support non-type template parameter packs and template template
parameter packs.
- It doesn't keep track of the lengths of the substituted argument
packs in the expansion, so it can't properly diagnose length
mismatches.

However, this is a concrete step in the right direction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123425 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
4f1d282d6f32a419e89ddb56342e2313b0c78bb7 13-Jan-2011 Douglas Gregor <dgregor@apple.com> Allow us to transform pack expansion expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
2fc1bb76e719d0620b4a6e2134413933b21ca6b6 12-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach TreeTransform how to transform a pack expansion type into
another pack expansion type. This can happen when rebuilding types in
the current instantiation.

Fixes <rdar://problem/8848837> (Clang crashing on libc++ <functional>).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
77d6bb9e223496aa5288294f34e7225d1f65dddc 11-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement partial ordering of class template partial specializations
and function templates that contain variadic templates. This involves
three small-ish changes:

(1) When transforming a pack expansion, if the transformed argument
still contains unexpanded parameter packs, build a pack
expansion. This can happen during the substitution that occurs into
class template partial specialiation template arguments during
partial ordering.

(2) When performing template argument deduction where the argument
is a pack expansion, match against the pattern of that pack
expansion.

(3) When performing template argument deduction against a non-pack
parameter, or a non-expansion template argument, deduction fails if
the argument itself is a pack expansion (C++0x
[temp.deduct.type]p22).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
3cae5c9a79bfd2e27eb44c32b13dfacd2ce5c66f 10-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement more of C++0x [temp.arg.explicit]p9, allowing extension of
pack expansions in template argument lists and function parameter
lists. The implementation of this paragraph should be complete
*except* for cases where we're substituting into one of the unexpanded
packs in a pack expansion; that's a general issue I haven't solved yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
d3731198193eee92796ddeb493973b7a598b003e 10-Jan-2011 Douglas Gregor <dgregor@apple.com> Work-in-progress implementation of C++0x [temp.arg.explicit]p9, which
allows an argument pack determines via explicit specification of
function template arguments to be extended by further, deduced
arguments. For example:

template<class ... Types> void f(Types ... values);
void g() {
f<int*, float*>(0, 0, 0); // Types is deduced to the sequence int*, float*, int
}

There are a number of FIXMEs in here that indicate places where we
need to implement + test retained expansions, plus a number of other
places in deduction where we need to correctly cope with the
explicitly-specified arguments when deducing an argument
pack. Furthermore, it appears that the RecursiveASTVisitor needs to be
auditied; it's missing some traversals (especially w.r.t. template
arguments) that cause it not to find unexpanded parameter packs when
it should.

The good news, however, is that the tr1::tuple implementation now
works fully, and the tr1::bind example (both from N2080) is actually
working now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
bd5f9f708aa31920d3bd73aa10fcb5de424c657a 07-Jan-2011 Douglas Gregor <dgregor@apple.com> Fix a valgrind error when transforming function prototypes with
function parameter pack expansions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
12c9c00024a01819e3a70ef6d951d32efaeb9312 07-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement substitution of a function parameter pack for its set of
instantiated function parameters, enabling instantiation of arbitrary
pack expansions involving function parameter packs. At this point, we
can now correctly compile a simple, variadic print() example:

#include <iostream>
#include <string>

void print() {}

template<typename Head, typename ...Tail>
void print(const Head &head, const Tail &...tail) {
std::cout << head;
print(tail...);
}

int main() {
std::string hello = "Hello";
print(hello, ", world!", " ", 2011, '\n');
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a009b59fc2c550a229b9146aabda8e33fe3a7771 07-Jan-2011 Douglas Gregor <dgregor@apple.com> Factor out the template transformation of a sequence of function
parameters into parameter types, so that substitution of
explicitly-specified function template arguments uses the same
path. This enables the use of explicitly-specified function template
arguments with variadic templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
9d156a7b1b2771e191f2f5a45a7b7a694129463b 06-Jan-2011 John McCall <rjmccall@apple.com> Introduce an AttributedType, but don't actually use it anywhere yet.
The initial TreeTransform is a cop-out, but it's more-or-less equivalent
to what we were doing before, or rather what we're doing now and might
eventually stop doing in favor of using this type.
I am simultaneously intrigued by the possibilities of rebuilding a
dependent Attri



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122942 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
c8a16fbb78c0e0ae2d2ebdb00bd6761d9d6714d2 06-Jan-2011 Douglas Gregor <dgregor@apple.com> Eliminate an unnecessary dance where we tried to cope with the lack of
TypeSourceInfo when transforming a function parameter. The callees of
this routine already assume that TypeSourceInfo will be present, and
we want to always be sure that it exists.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
603cfb4da2f7ba08a1c3452c2fbf70585b8e7621 06-Jan-2011 Douglas Gregor <dgregor@apple.com> Initial implementation of function parameter packs. This implementation allows:

1) Declaration of function parameter packs
2) Instantiation of function parameter packs within function types.
3) Template argument deduction of function parameter packs when
matching two function types.

We're missing all of the important template-instantiation logic for
function template definitions, along with template argument deduction
from the argument list of a function call, so don't even think of
trying to use these for real yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
1d65ebba273e6797902dcfa93964bae5ca0fe8d2 05-Jan-2011 Douglas Gregor <dgregor@apple.com> Eliminate two "unsupported" errors relating to variadic templates: one
for template template argument pack expansions (which was no longer
used) and another that was a placeholder for an llvm_unreachable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a7fc901a2e39bfe55bfcff5934b2d9fdf9656491 05-Jan-2011 Douglas Gregor <dgregor@apple.com> Replace the representation of template template argument pack
expansions with something that is easier to use correctly: a new
template argment kind, rather than a bit on an existing kind. Update
all of the switch statements that deal with template arguments, fixing
a few latent bugs in the process. I"m happy with this representation,
now.

And, oh look! Template instantiation and deduction work for template
template argument pack expansions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
711c52bb20d0c69063b52a99826fb7d2835501f1 05-Jan-2011 John McCall <rjmccall@apple.com> Refactor the application of type attributes so that attributes from
the declaration-specifiers and on the declarator itself are moved
to the appropriate declarator chunk. This permits a greatly
simplified model for how to apply these attributes, as well as
allowing a much more efficient query for the GC attribute.
Now all qualifier queries follow the same basic strategy of
"local qualifiers, local qualifiers on the canonical type,
then look through arrays". This can be easily optimized by
changing the canonical qualified-array-type representation.

Do not process type attributes as decl attributes on declarations
with declarators.

When computing the type of a block, synthesize a prototype
function declarator chunk if the decl-spec type was not a
function. This simplifies the logic for building block signatures.

Change the logic which inserts an objc_read_weak on a block
literal to only fire if the block has a __weak __block variable,
rather than if the return type of the block is __weak qualified,
which is not actually a sensible thing to ask.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ee8aff06f6a96214731de17b2cb6df407c6c1820 04-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement the sizeof...(pack) expression to compute the length of a
parameter pack.

Note that we're missing proper libclang support for the new
SizeOfPackExpr expression node.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
7a21fd45d4f04643cbfb5df96a01f84bc6d3dd14 03-Jan-2011 Douglas Gregor <dgregor@apple.com> Properly rebuild pack expansions whose pattern is a non-type template
argument. As part of this, be more careful when determining if there
are any parameter packs that cannot be expanded.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
dcaa1ca0b475dfa887e1d061678a1e3501288510 03-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement support for pack expansions in initializer lists and
expression lists.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122764 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
be230c36e32142cbdcdbe9c97511d097beeecbab 03-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement support for pack expansions whose pattern is a non-type
template argument (described by an expression, of course). For
example:

template<int...> struct int_tuple { };

template<int ...Values>
struct square {
typedef int_tuple<(Values*Values)...> type;
};

It also lays the foundation for pack expansions in an initializer-list.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
f7dd69969aa25093ca9a7897a0d8819c145d1c77 21-Dec-2010 Douglas Gregor <dgregor@apple.com> Add some const qualifiers

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
b99268b3083c882103bd1bd08bdcc9a76a2b4795 21-Dec-2010 Douglas Gregor <dgregor@apple.com> Implement instantiation of pack expansions whose pattern is a type-id
in an exception specification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
7ca7ac40ad45d5253ba474dddfa5ee233f35c2fe 21-Dec-2010 Douglas Gregor <dgregor@apple.com> Further refactoring of the tree transformation for template argument
lists, so that all such transformations go through a single,
iterator-based transformation function. This is the only place where
we need to implement the logic for transforming pack expansions whose
pattern is a template argument.

Unfortunately, the new cases this refactoring brings into the fold
can't be meaningfully tested yet. We need template argument deduction
to work well enough for variadic function templates first.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
8491ffe86c50241b47c6d7ef8cd9ee00f5e675da 20-Dec-2010 Douglas Gregor <dgregor@apple.com> Implement basic support for template instantiation of pack expansions
whose patterns are template arguments. We can now instantiate, e.g.,

typedef tuple<pair<OuterTypes, InnerTypes>...> type;

where OuterTypes and InnerTypes are template type parameter packs.

There is a horrible inefficiency in
TemplateArgumentLoc::getPackExpansionPattern(), where we need to
create copies of TypeLoc data because our interfaces traffic in
TypeSourceInfo pointers where they should traffic in TypeLocs
instead. I've isolated in efficiency in this one routine; once we
refactor our interfaces to traffic in TypeLocs, we can eliminate it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
21a288f2ee8673d91e2d0b7d5aaca567c332de13 20-Dec-2010 Matt Beaumont-Gay <matthewbg@google.com> Remove unused variable


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
7f61f2fc1a880ac3bf5b0993525922dd2c1f09bf 20-Dec-2010 Douglas Gregor <dgregor@apple.com> Finish refactoring the transformation of template argument lists,
centralizing the transformation into two routines. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
fcc1253ba28d1d1debacd147be15e1684cc2eda5 20-Dec-2010 Douglas Gregor <dgregor@apple.com> Refactor the transformation of template argument lists to centralize
the list traversal. Part 1, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
7536dd5e6c99584481b7dab68b7e7d8df9c54054 20-Dec-2010 Douglas Gregor <dgregor@apple.com> Introduce a new type, PackExpansionType, to capture types that are
pack expansions, e.g. given

template<typename... Types> struct tuple;

template<typename... Types>
struct tuple_of_refs {
typedef tuple<Types&...> types;
};

the type of the "types" typedef is a PackExpansionType whose pattern
is Types&.

This commit introduces support for creating pack expansions for
template type arguments, as above, but not for any other kind of pack
expansion, nor for any form of instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
f40f0d5a382395e0301d7dcbeaa2b8e90b8973b1 10-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Keep the source location of the selector in ObjCMessageExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
075f8f1b6bed4d1b224c74f87508534cc6392ce6 10-Dec-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added ParenType type node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
6ad6f2848d7652ab2991286eb48be440d3493b28 07-Dec-2010 Francois Pichet <pichet2000@gmail.com> Type traits intrinsic implementation: __is_base_of(T, U)
New AST node introduced: BinaryTypeTraitExpr; to be reused for more intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
4765fa05b5652fcc4356371c2f481d0ea9a1b007 06-Dec-2010 John McCall <rjmccall@apple.com> Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoretical
reason this is limited to C++, and it's certainly not limited to temporaries.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
12f78a6741a4cb3d904340f8d3d2714568b50e7a 02-Dec-2010 John McCall <rjmccall@apple.com> Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ObjCPropertyRefExpr
into the latter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
7e44e3fcd75147f229f42e6912898ce62d6b4d08 02-Dec-2010 Douglas Gregor <dgregor@apple.com> Make TypeLocBuilder an implementation detail of Sema. Nobody else should be using it

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
44aa1f397855f130e88e62ffc1029f7f83bb5d2e 20-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r119838 "Don't warn for empty 'if' body if there is a macro that expands to nothing"
and use a better and more general approach, where NullStmt has a flag to indicate whether it was preceded by an empty macro.

Thanks to Abramo Bagnara for the hint!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a25b6a4b43e8b9611f7506e5fe1b448833b10a46 19-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't warn for empty 'if' body if there is a macro that expands to nothing, e.g:

if (condition)
CALL(0); // empty macro but don't warn for empty body.

Fixes rdar://8436021.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
43fed0de4f5bc189e45562491f83d5193eb8dac0 12-Nov-2010 John McCall <rjmccall@apple.com> Replace one hack with a different hack: strip out the ObjectType
parameters to the Transform*Type functions and instead call out
the specific cases where an object type and the unqualified lookup
results are important. Fixes an assert and failed compile on
a testcase from PR7248.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
e86d78cf4754a6aef2cf9a33d847aa15338e276f 10-Nov-2010 Bob Wilson <bob.wilson@apple.com> Add a variant of GCC-style vector types for ARM NEON.
NEON vector types need to be mangled in a special way to comply with ARM's ABI,
similar to some of the AltiVec-specific vector types. This patch is mostly
just renaming a bunch of "AltiVecSpecific" things, since they will no longer
be specific to AltiVec. Besides that, it just adds the new "NeonVector" enum.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
910f8008fea79120489a53593fe971b0b8a4a740 08-Nov-2010 Douglas Gregor <dgregor@apple.com> Remove broken support for variadic templates, along with the various
abstractions (e.g., TemplateArgumentListBuilder) that were designed to
support variadic templates. Only a few remnants of variadic templates
remain, in the parser (parsing template type parameter packs), AST
(template type parameter pack bits and TemplateArgument::Pack), and
Sema; these are expected to be used in a future implementation of
variadic templates.

But don't get too excited about that happening now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
21e413fe6305a198564d436ac515497716c47844 04-Nov-2010 John McCall <rjmccall@apple.com> Use the real keyword location when rebuilding an elaborated type instead of
making something up. Fixes PR8129.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
428edafa9eb80e01dd40aab31d4166a787a741e1 25-Oct-2010 Chandler Carruth <chandlerc@gmail.com> Improve the tracking of source locations for parentheses in constructor calls.
This adds them where missing, and traces them through PCH. We fix at least one
bug in the extents found by the Index library, and make a lot of refactoring
tools which care about the exact formulation of a constructor call easier to
write. Also some minor cleanups to more consistently follow the friend pattern
instead of the setter pattern when rebuilding a serialized AST.

Patch originally by Samuel Benzaquen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
8ac2d449820fd0df00fcbde5bf82165c1f49854d 14-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Eliminate usage of ObjCSuperExpr used for
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116483 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
2a984cad5ac3fdceeff2bd99daa7b90979313475 12-Oct-2010 John McCall <rjmccall@apple.com> Add some infrastructure for dealing with expressions of 'placeholder' type,
i.e. expressions with an internally-convenient type which should not be
appearing in generally valid, complete ASTs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
63d5fb3a142c39ff4236235cb284401b88685692 06-Oct-2010 John McCall <rjmccall@apple.com> When instantiating a new-expression, force a rebuild if there were default
arguments in either the placement or constructor arguments. This is
important if the default arguments refer to a declaration or create a
temporary.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
dab60ad68a3a98d687305941a3852e793705f945 01-Oct-2010 Douglas Gregor <dgregor@apple.com> Implement the C++0x "trailing return type" feature, e.g.,

auto f(int) -> int

from Daniel Wallin!

(With a few minor bug fixes from me).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
1a18600b85aaa691122983dd8dcf4225cfc9ef68 28-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't warn for an unused label if it has 'unused' attribute. Fixes rdar://8483139.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114954 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
5833b0b831d6afae2885e6af420e2bda639652e6 15-Sep-2010 Douglas Gregor <dgregor@apple.com> When marking the declarations in a default argument expression as
"used", at the time that the default argument itself is used, also
mark destructors that will be called by this expression. This fixes a
regression that I introduced in r113700, which broke WebKit, and fixes
<rdar://problem/8427926>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113883 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
2e156225a29407a50dd19041aa5750171ad44ea3 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Define and implement CXXNoexceptExpr. Create it in Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
83cb94269015bf2770ade71e616c5322ea7e76e1 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Simplify template instantiation for C++ exception declarations,
eliminating an unnecessary use of TemporaryBase in the process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ba48d6aad11a684d8557b25831764a61a37f65a2 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Eliminate some unnecessary uses of TreeTransform::TemporaryBase. There
are still a few (legitimate, unfortunate) uses of this hack around,
but at least now there are fewer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a1a04786cea2445759026edacd096abd1fbf4a05 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Eliminate the comma locations from all of the Sema routines that deal
with comma-separated lists. We never actually used the comma
locations, nor did we store them in the AST, but we did manage to
waste time during template instantiation to produce fake locations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
3d37c0ada0e46b87be0a10e8d52d990a97d3907a 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Add proper type-source information to UnaryTypeTraitExpr, including
libclang visitation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
1efb6c716397f2c4e3ede3a4853c5efebb375441 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Push the range associated with a nested-name-specifier further through
TreeTransform, since we were getting an empty source range where we
shouldn't. Sadly, the test case is Boost.Proto, and isn't worth
reducing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
01b7c3028da5bbcb9f8e52ba67e4613070de0e60 08-Sep-2010 Francois Pichet <pichet2000@gmail.com> Microsoft's __uuidof operator implementation part 1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ab6677ec401cfd2c82b34e4cdfebd55a9dc25778 08-Sep-2010 Douglas Gregor <dgregor@apple.com> Provide proper type-source location information for
CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and
CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the
process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
1bb2a93ab7b1499dda6f6b58865bd0dce1864228 07-Sep-2010 Douglas Gregor <dgregor@apple.com> Improve source-location information for CXXNewExpr, by hanging on to
the TypeSourceInfo for the allocated type. Fixes PR7501.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
e2ca6d4a2f41876930fbd304caa706452d2569d8 02-Sep-2010 Douglas Gregor <dgregor@apple.com> Eliminate CXXBindReferenceExpr, which was used in a ton of
well-intentioned but completely unused code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
7e010a04fef171049291d8cb3047f118566da090 31-Aug-2010 Douglas Gregor <dgregor@apple.com> When instantiating a function type, instantiate the return type before
instantiating the parameters. In a perfect world, this wouldn't
matter, and compilers are free to instantiate in any order they
want. However, every other compiler seems to instantiate the return
type first, and some code (in this case, Boost.Polygon) depends on
this and SFINAE to avoid instantiating something that shouldn't be
instantiated.

We could fight this battle, and insist that Clang is allowed to do
what it does, but it's not beneficial: it's more predictable to
instantiate this way, in source order. When we implement
late-specified return types, we'll need to instantiate the return type
last when it was late-specified, hence the FIXME.

We now compile Boost.Polygon properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
6cf750298d3621d8a10a6dd07fcee8e274b9d94d 30-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Revert my user-defined literal commits - r1124{58,60,67} pending
some issues being sorted out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
0016d519b831859526b79405cdae4c64c73731c8 29-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement C++0x user-defined string literals.

The extra data stored on user-defined literal Tokens is stored in extra
allocated memory, which is managed by the PreprocessorLexer because there isn't
a better place to put it that makes sure it gets deallocated, but only after
it's used up. My testing has shown no significant slowdown as a result, but
independent testing would be appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
7114cbab7eb6e8b714eb22f014327daf2c741c08 27-Aug-2010 John McCall <rjmccall@apple.com> Continue to instantiate sub-statements in a CompoundStmt as long as
we don't see a DeclStmt (failure to instantiate which generally causes
panic).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112282 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
f312b1ea179f1c44371f9ee0cd0bc006f612de11 27-Aug-2010 John McCall <rjmccall@apple.com> One who seeks knowledge learns something new every day.
One who seeks the Tao unlearns something new every day.
Less and less remains until you arrive at non-action.
When you arrive at non-action,
nothing will be left undone.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
2d88708cbe4e4ec5e04e4acb6bd7f5be68557379 26-Aug-2010 John McCall <rjmccall@apple.com> Split out a header to hold APIs meant for the Sema implementation from Sema.h.
Clients of Sema don't need to know (for example) the list of diagnostics we
support.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
781472fe99a120098c631b0cbe33c89f8cef5e70 25-Aug-2010 John McCall <rjmccall@apple.com> Split FunctionScopeInfo and BlockScopeInfo into their own header.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
7cd088e519d7e6caa4c4c12db52e0e4ae35d25c2 24-Aug-2010 John McCall <rjmccall@apple.com> Struggle mightily against header inclusion in Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
60d7b3a319d84d688752be3870615ac0f111fb16 24-Aug-2010 John McCall <rjmccall@apple.com> OwningExprResult -> ExprResult. This patch brought to you by
M-x query-replace-regexp
\(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
b3d8748e797c6c2f1dc01186c8eeb3b1b5fe970c 24-Aug-2010 John McCall <rjmccall@apple.com> Abstract out passing around types and kill off ActionBase.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
9ae2f076ca5ab1feb3ba95629099ec2319833701 24-Aug-2010 John McCall <rjmccall@apple.com> Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ca0408fb49c1370430672acf2d770b7151cf71de 23-Aug-2010 John McCall <rjmccall@apple.com> Sundry incremental steps towards killing off Action.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
8c3e554d00d456d5093c21ce8a0c205461279aab 22-Aug-2010 Douglas Gregor <dgregor@apple.com> Preserve the zero-initialization and construction-kind settings when
instantiating CXXConstructExpr expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
d226f65006733ed7f709c3174f22ce33391cb58f 21-Aug-2010 John McCall <rjmccall@apple.com> DeclPtrTy -> Decl *



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
19510856727e0e14a3696b2a72c35163bff2a71f 20-Aug-2010 John McCall <rjmccall@apple.com> Another step in the process of making the parser depend on Sema:
- move DeclSpec &c into the Sema library
- move ParseAST into the Parse library
Reflect this change in a thousand different includes.
Reflect this change in the link orders.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
ec8045d3f0375302eadaa63deb373bacaf25a569 17-Aug-2010 John McCall <rjmccall@apple.com> Implicit decl ref expressions might not have name locations; don't silently
fail to instantiate them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
e737f5041a36d0befb39ffeed8d50ba15916d3da 12-Aug-2010 Douglas Gregor <dgregor@apple.com> Move Sema's headers into include/clang/Sema, renaming a few along the way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
9bcd4d4a4b9281ba3526b0e86e6d422db93a9074 10-Aug-2010 Douglas Gregor <dgregor@apple.com> Eliminate unnecessary uses of TemporaryBase in TreeTransform;
transforming TypeSourceInfos already gives us proper (and better)
source-location information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
22f638a58ed05579c51ee6a35a1d16a7c2157f90 10-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed redundant NNS loading.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
fa869547eb1cab12d7e0c0dfa8ba594e336b9b32 05-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Preserve calling convention etc. across template instantiations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
e7ffbe233ed04f921a008ed893672ee759d1a0ad 13-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> More block instantiation stuff. Set variable/param DeclContext
to block context when first instantiating them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
4bd40318cbea15310a37343db46de96c4fcc15e6 13-Jul-2010 Douglas Gregor <dgregor@apple.com> Downgrade the "when type is in parentheses, array cannot have dynamic
size" error for code like

new (int [size])

to a warning, add a Fix-It to remove the parentheses, and make this
diagnostic work properly when it occurs in a template
instantiation. <rdar://problem/8018245>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
5291c3cec0dbe8ad1d8e7e67e93af2b1586d5400 13-Jul-2010 Douglas Gregor <dgregor@apple.com> When forming a function call or message send expression, be sure to
strip cv-qualifiers from the expression's type when the language calls
for it: in C, that's all the time, while C++ only does it for
non-class types.

Centralized the computation of the call expression type in
QualType::getCallResultType() and some helper functions in other nodes
(FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant
callers of getResultType() to getCallResultType().

Fixes PR7598 and PR7463, along with a bunch of getResultType() call
sites that weren't stripping references off the result type (nothing
stripped cv-qualifiers properly before this change).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
cad8d31117800f804ee4f313134162edac8f8813 12-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Copy over attributes to instantiated variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
720b6392f901085f851f1575feaaa291f26731d3 10-Jul-2010 Dale Johannesen <dalej@apple.com> Fix compile error. Per Fariborz.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
5750b81beb0d508278011c410b01acabc9c7ca05 09-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Instantiation of byref variable in
block literal expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a729da2c29e7df26319acf2675d51e377287a139 09-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Instantiation of block literal expressions. wip.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ed8abf18329df67b0abcbb3a10458bd8c1d2a595 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Reinstate the fix for PR7556. A silly use of isTrivial() was
suppressing copies of objects with trivial copy constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
84745677f64863e025a6733cb29d0b94bc3a6ae2 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Revert r107828 and r107827, the fix for PR7556, which seems to be
breaking bootstrap on Linux.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
016a4a90c8e75d59de731fa3aa98f0a55656e66c 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Rename CXXZeroInitValueExpr to CXXScalarValueInitExpr, to reflect its
newly-narrowed scope. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
788b0fd67e1992f23555454efcdb16a19dfefac3 23-Jun-2010 Chris Lattner <sabre@nondot.org> improve altivec vector bool/pixel support, patch by Anton Yartsev
with several tweaks by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
83c9abcce26422420dcdb9d2741bced21ee2477f 22-Jun-2010 Douglas Gregor <dgregor@apple.com> Apply array-to-pointer decay when instantiating a MemberExpr. Fixes
PR7405, patch by Kyle Lippincott!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
96fb42ea29253cf2b34848dfdb3e40ef14ca8ebc 19-Jun-2010 Douglas Gregor <dgregor@apple.com> A trivial fix for a test case that's too horrible to commit. Fixes
<rdar://problem/8108088>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106328 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
e2872d0bda1d209d4409de2ed13648e6811628b7 17-Jun-2010 Douglas Gregor <dgregor@apple.com> When pushing a copy of the TypeLoc information for a dependent
template specialization type, copy the location information but use
the new type. Fixes PR7385.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
d6ab232bb3ec9847de5af06249afb63078b5f2ee 17-Jun-2010 Douglas Gregor <dgregor@apple.com> When we see a 'template' disambiguator that marks the next identifier
(or operator-function-id) as a template, but the context is actually
non-dependent or the current instantiation, allow us to use knowledge
of what kind of template it is, e.g., type template vs. function
template, for further syntactic disambiguation. This allows us to
parse properly in the presence of stray "template" keywords, which is
necessary in C++0x and it's good recovery in C++98/03.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
1a15dae8be2b28e02b6639aa92b832465c5be420 17-Jun-2010 Douglas Gregor <dgregor@apple.com> Fix the recently-added warning about 'typename' and 'template'
disambiguation keywords outside of templates in C++98/03. Previously,
the warning would fire when the associated nested-name-specifier was
not dependent, but that was a misreading of the C++98/03 standard:
now, we complain only when we're outside of any template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ad00b7705f9bbee81beeac428e7c6587734ab5a6 16-Jun-2010 John McCall <rjmccall@apple.com> Fix a point of semantics with using declaration hiding: method templates
introduced by using decls are hidden even if their template parameter lists
or return types differ from the "overriding" declaration.

Propagate using shadow declarations around more effectively when looking up
template-ids. Reperform lookup for template-ids in member expressions so that
access control is properly set up.

Fix some number of latent bugs involving template-ids with totally invalid
base types. You can only actually get these with a scope specifier, since
otherwise the template-id won't parse as a template-id.

Fixes PR7384.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
33500955d731c73717af52088b7fc0e7a85681e7 11-Jun-2010 John McCall <rjmccall@apple.com> Split DependentNameType into two types. DependentNameType represents the
case of an elaborated-type-specifier like 'typename A<T>::foo', and
DependentTemplateSpecializationType represents the case of an
elaborated-type-specifier like 'typename A<T>::template B<T>'. The TypeLoc
representation of a DependentTST conveniently exactly matches that of an
ElaboratedType wrapping a TST.

Kill off the explicit rebuild methods for RebuildInCurrentInstantiation;
the standard implementations work fine because the nested name specifier
is computable in the newly-entered context.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
2865474261a608c7873b87ba4af110d17907896d 05-Jun-2010 John McCall <rjmccall@apple.com> Simplify the methods for creating a pointer, reference, member-pointer,
or block-pointer type by removing the qualifiers parameter. Introduce a
method to perform semantic checking when adding qualifiers to a type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
5613876991c80a684595fe8de1f039296a0657ff 27-May-2010 John McCall <rjmccall@apple.com> Require a complete type when performing the qualified lookup during
instantiation of a dependent elaborated type specifier. Fixes PR 7199.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ff2e4f44e56aef84fa423af4ca5c1fe56886b4aa 26-May-2010 Douglas Gregor <dgregor@apple.com> When transforming a C++ "new" expression's constructor arguments, drop
any arguments that are default-argument expressions. The can show up
when we have a new expression whose constructor arguments are not
type-dependent and whose allocated type is not dependent and has a
constructor with default arguments. Fixes PR7202.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
9cbb4d81b98ee84795e267d51c1fa530ef6723bf 20-May-2010 Jim Grosbach <grosbach@apple.com> tweak to (hopefully) fix darwin[89] buildbots. Thanks to Doug for the suggested modification.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
e4da7a034a2fcf4b14d0bcc28d05de0878159061 19-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added basic source locations to Elaborated and DependentName types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
042d6f98ea73d781e43cc17077e8fc84a4201eef 19-May-2010 Chandler Carruth <chandlerc@gmail.com> Fix an obvious goof that rjmccall found by inspection. No testcase, suggestions
welcome for one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
7381d5cfbd599fa2b9e215011ad7cbd449de231a 18-May-2010 Sean Hunt <rideau3@gmail.com> Switch over the tablegen to use much prettier range technology
Also rename ABSTRACT to ABSTRACT_STMT, in keeping with the other .def
files

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
c12c5bba6ceb6acd4e51e7a0fc03257da9cfd44e 15-May-2010 John McCall <rjmccall@apple.com> Substantially alter the design of the Objective C type AST by introducing
ObjCObjectType, which is basically just a pair of
one of {primitive-id, primitive-Class, user-defined @class}
with
a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared). ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.

Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet. Remove some number of methods that are no
longer used, at least after this patch.

By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a63db84b164d3f1c987a3ea6251e3092db4f317b 14-May-2010 Daniel Dunbar <daniel@zuster.org> Revert r103770, "Added basic source locations to Elaborated and DependentName
types.", it is breaking Clang bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103775 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
5431299f6e1e1d14b39b924fe24bf04035f4ae42 14-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added basic source locations to Elaborated and DependentName types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103770 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
5d7c29a278c4ef95d68c3a0d059ef5fe59b8bb45 13-May-2010 John McCall <rjmccall@apple.com> Rebuild builtin_id * as an ObjCObjectPointerType, where builtin_id is the
magic type that 'id' is a pointer to.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
465d41b92b2c862f3062c412a0538db65c6a2661 11-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Merged Elaborated and QualifiedName types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
afa0fefb573f74ac7836daf1601c214eda946212 09-May-2010 Douglas Gregor <dgregor@apple.com> Fix a silly bootstrap-breaking thinko, where we were trying to convert
non-existent condition expressions to boolean values during template
instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
eaa18e449bb09c1e580aa35f9606ff2ca682f4cb 09-May-2010 Douglas Gregor <dgregor@apple.com> When instantiating statements that involve conditions (if, while, do,
for, and switch), be careful to construct the full expressions as soon
as we perform template instantation, so we don't either forget to call
temporary destructors or destroy temporaries at the wrong time. This
is the template-instantiation analogue to r103187, during which I
hadn't realized that the issue would affect the handling of these
constructs differently inside and outside of templates.

Fixes a regression in Boost.Function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
eecf38f821fe8e113722096b77da7d68b26d28d1 06-May-2010 Douglas Gregor <dgregor@apple.com> Fixed DISABLE_SMART_POINTERS breakage

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103198 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
586596fd7f7a336a2847b300c80614dcf39ab6d5 06-May-2010 Douglas Gregor <dgregor@apple.com> Rework our handling of temporary objects within the conditions of
if/switch/while/do/for statements. Previously, we would end up either:

(1) Forgetting to destroy temporaries created in the condition (!),
(2) Destroying the temporaries created in the condition *before*
converting the condition to a boolean value (or, in the case of a
switch statement, to an integral or enumeral value), or
(3) In a for statement, destroying the condition's temporaries at
the end of the increment expression (!).

We now destroy temporaries in conditions at the right times. This
required some tweaking of the Parse/Sema interaction, since the parser
was building full expressions too early in many places.

Fixes PR7067.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
72be24f39c162448e53dd73cf57cc6357114361e 30-Apr-2010 Douglas Gregor <dgregor@apple.com> Fix a thinko that caused us not to compute __builtin_offset as a
constant expression in C.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
895162da2d52f4243f61081d7436de66af4503fc 30-Apr-2010 Douglas Gregor <dgregor@apple.com> Clean up our handling of local instantiation scopes, which keep track
of the mapping from local declarations to their instantiated
counterparts during template instantiation. Previously, we tried to do
some unholy merging of local instantiation scopes that involved
storing a single hash table along with an "undo" list on the
side... which was ugly, and never handled function parameters
properly.

Now, we just keep separate hash tables for each local instantiation
scope, and "combining" two scopes means that we'll look in each of the
combined hash tables. The combined scope stack is rarely deep, and
this makes it easy to avoid the "undo" issues we were hitting. Also,
I've simplified the logic for function parameters: if we're declaring
a function and we need the function parameters to live longer, we just
push them back into the local instantiation scope where we need them.

Fixes PR6990.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
29d2fd56b5eeeb52f7fdbdd232229e570c30d62b 29-Apr-2010 Douglas Gregor <dgregor@apple.com> Fix template instantiation for __builtin_offfsetof expressions that refer to members of anonymous structs/unions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
c96be1ea33cdf63d07cec48d18fe8e3afea48f8d 27-Apr-2010 Douglas Gregor <dgregor@apple.com> During template instantiation, set the naming class of
UnresolvedLookupExpr and UnresolvedMemberExpr by substituting the
naming class we computed when building the expression in the
template...

... which we didn't always do correctly. Teach
UnresolvedMemberExpr::getNamingClass() all about the new
representation of injected-class-names in templates, so that it can
return a naming class that is the current instantiation.

Also, when decomposing a template-id into its template name and its
arguments, be sure to set the naming class on the LookupResult
structure.

Fixes PR6947 the right way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
66c45154186b7786d5dca645d548d73c47cf5d87 27-Apr-2010 Douglas Gregor <dgregor@apple.com> When instantiating UnresolvedLookupExpr and UnresolvedMemberExpr
expressions, be sure to set the naming class of the LookupResult
structure. Fixes PR6947.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
57fdc8a4382164955c7b30d09f4ce46fc7e67659 27-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve source-location information in a C++ typeid (type) expression
by using TypeSourceInfo, cleaning up the representation
somewhat. Teach getTypeOperand() to strip references and
cv-qualifiers, providing the semantic view of the type without
requiring any extra storage (the unmodified type remains within the
TypeSourceInfo). This fixes a bug found by Boost's call_traits test.

Finally, clean up semantic analysis, by splitting the ActOnCXXTypeid
routine into ActOnCXXTypeId (the parser action) and two BuildCXXTypeId
functions, which perform the semantic analysis for typeid(type) and
typeid(expression), respectively. We now perform less work at template
instantiation time (we don't look for std::type_info again) and can
give better diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
9cbfdd212ee0167f2487363d6fac7faaf7c65b64 26-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement template instantiation for implicit property references in
Objective-C++. This is the last bit of (non-blocks-related) template
instantiation logic for Objective-C++. Yay!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102382 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
e330354c6bfbb0d7856432fa9055d5236f1b2fa4 26-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement template instantiation for ObjCPropertyRefExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102379 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
f9b9eab747e911ded499924b2616d8712d65efce 26-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement template instantiation for value-dependent Objective-C ivar
references and isa expressions. Also, test template instantiation of
unresolved member references to Objective-C ivar references and isa
expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
be270a0fae647ae3fb4d6a21ba1ea5ab9c40853a 26-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement template instantiation for Objective-C @catch
statements. This is the last of the Objective-C statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
107de90451b7f7a7749380a9d017ff1bafb6b407 24-Apr-2010 Douglas Gregor <dgregor@apple.com> Keep track of when DependentNameTypes have no associated keyword
(e.g., no typename, enum, class, etc.), e.g., because the context is
one that is known to refer to a type. Patch from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
8f5e3dd32e443768d9dbbad7191e123e6733750c 24-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve the AST representation of Objective-C @try/@catch/@finally
statements. Instead of the @try having a single @catch, where all of
the @catch's were chained (using an O(n^2) algorithm nonetheless),
@try just holds an array of its @catch blocks. The resulting AST is
slightly more compact (not important) and better represents the actual
language semantics (good).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
4dfdd1b5eb49999e3871f92310f2c53e1739f4f4 23-Apr-2010 Douglas Gregor <dgregor@apple.com> Template instantiation for @try and @finally (but not @catch, yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
c3203e7ee1464a096f341c2e2a83a10be2da000a 23-Apr-2010 Douglas Gregor <dgregor@apple.com> Template instantiation for the Objective-C "fast enumeration"
statement, i.e.,

for (element in collection) {
// do something
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
8fdc13a78a43f09ac396e682c35d57ca0b48216d 23-Apr-2010 Douglas Gregor <dgregor@apple.com> Template instantiation for Objective-C++ @synchronized statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
d1377b25a36adfe6604f78cbd3a23a07cf0f29e6 22-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement template instantiation for Objective-C++ @throw statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102133 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ef57c61ec3642ba7faaf7b9c0c4a6f23fa39d77c 22-Apr-2010 Douglas Gregor <dgregor@apple.com> Some Objective-C++ types and expressions will never change during
template instantiation, since they cannot be dependent or have
dependent parts. Handle them the simple way.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
f49bb082ebf6413b2d3cb956e9c78dbb8a978c58 22-Apr-2010 Douglas Gregor <dgregor@apple.com> When a dependent Objective-C++ message send was able to resolve the
method being called at template definition time, retain that method
and pass it through to type-checking. We will not perform any lookup
for the method during template instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
39968adc66ab02275d2f561e372a20ae454bd4e7 22-Apr-2010 Douglas Gregor <dgregor@apple.com> Remove the SelectorLoc argument to Sema::BuildInstanceMesssage and
Sema::BuildClassMessage; we weren't using it, and template
instantiation was faking it anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
db93c4a8f839b2f46bfea66531aa014242f4da2c 22-Apr-2010 Douglas Gregor <dgregor@apple.com> Expand the one use of TransformPointerLikeType and eliminate this macro. No functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
92e986e0adb79e8a47f738bd608e6c97c547641d 22-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement template instantiation for Objective-C++ message sends. We
support dependent receivers for class and instance messages, along
with dependent message arguments (of course), and check as much as we
can at template definition time.

This commit also deals with a subtle aspect of template instantiation
in Objective-C++, where the type 'T *' can morph from a dependent
PointerType into a non-dependent ObjCObjectPointer type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
81d3466d037dc5844234c7a93dab21a6ad986e7d 20-Apr-2010 Douglas Gregor <dgregor@apple.com> Keep proper source location information for the type in an Objective-C
@encode expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
16573fa9705b546b7597c273b25b85d6321e2b33 20-Apr-2010 Douglas Gregor <dgregor@apple.com> Keep track of the actual storage specifier written on a variable or
function declaration, since it may end up being changed (e.g.,
"extern" can become "static" if a prior declaration was static). Patch
by Enea Zaffanella and Paolo Bolzoni.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
1eabb7d0c30f6a876b0fd03ad4656c096c26b8d0 01-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve diagnostics when an elaborated-type-specifer containing a
nested-name-specifier (e.g., "class T::foo") fails to find a tag
member in the scope nominated by the
nested-name-specifier. Previously, we gave a bland

error: 'Nested' does not name a tag member in the specified scope

which didn't actually say where we were looking, which was rather
horrible when the nested-name-specifier was instantiated. Now, we give
something a bit better:

error: no class named 'Nested' in 'NoDepBase<T>'




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
4033642464e8ba0982f88f34cffad808d247b393 01-Apr-2010 Douglas Gregor <dgregor@apple.com> Change the representation of dependent elaborated-type-specifiers
(such as "class T::foo") from an ElaboratedType of a TypenameType to a
DependentNameType, which more accurately models the underlying
concept.

Improve template instantiation for DependentNameType nodes that
represent nested-name-specifiers, by performing tag name lookup and
checking the resulting tag appropriately. Fixes PR5681.

There is still much testing and cleanup to do in this area.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
4a2023f5014e82389d5980d307b89c545dbbac81 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Extend DependentNameType with a keyword enum that specifies whether
this was parsed as a typename-specifier, elaborated-type-specifier
(including the kind), or just a dependent qualified type name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a3ce8ae36144991fa125dafc5345a03cc875e503 31-Mar-2010 Chandler Carruth <chandlerc@gmail.com> Re-bind non-dependent CXXTemporaryObjectExpr nodes as temporaries when
instantiating a template, which ensures the destructor is called. This fixes
PR6671.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
4714c12a1ab759156b78be8f109ea4c12213af57 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Rename TypenameType to DependentNameType in anticipation of some
refactoring work in this area.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
069ace5adc444a159003c29e85e166cee491ad39 11-Mar-2010 John McCall <rjmccall@apple.com> Fix a self-host problem caused by this over-eager assertion. I'm not sure
there's a good equivalent that's actually true, unfortunately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
21ef0fa27b0783ec0bc6aa5b524feb2ec840f952 11-Mar-2010 John McCall <rjmccall@apple.com> Maintain type source information for functions through template
instantiation. Based on a patch by Enea Zaffanella! I found a way to
reduce some of the redundancy between TreeTransform's "standard"
FunctionProtoType transformation and TemplateInstantiator's override,
and I killed off the old SubstFunctionType by adding type source info
for the last cases where we were creating FunctionDecls without TSI
(at least that get passed through template instantiation).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
3cb0ebd5f76abcb776f7cb4062bd79e3268c0dc4 10-Mar-2010 John McCall <rjmccall@apple.com> Create a new InjectedClassNameType to represent bare-word references to the
injected class name of a class template or class template partial specialization.
This is a non-canonical type; the canonical type is still a template
specialization type. This becomes the TypeForDecl of the pattern declaration,
which cleans up some amount of code (and complicates some other parts, but
whatever).

Fixes PR6326 and probably a few others, primarily by re-establishing a few
invariants about TypeLoc sizes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
5fccd36204f11c8491325038e6ffcc784399098e 04-Mar-2010 Douglas Gregor <dgregor@apple.com> Reinstate r97674 with a fix for the assertion that was firing in <list>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a7cb22d27f4440d264f2a1407c43b8d7259d23b0 04-Mar-2010 Douglas Gregor <dgregor@apple.com> Revert r97674; it's causing failures

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
b29b37d7e5bba50acc3a6642a2c90db080c22b90 03-Mar-2010 Douglas Gregor <dgregor@apple.com> Implement disambiguation of base class members via a
nested-name-specifier. For example, this allows member access in
diamond-shaped hierarchies like:

struct Base {
void Foo();
int Member;
};

struct D1 : public Base {};
struct D2 : public Base {};

struct Derived : public D1, public D2 { }

void Test(Derived d) {
d.Member = 17; // error: ambiguous cast from Derived to Base
d.D1::Member = 17; // error: okay, modify D1's Base's Member
}

Fixes PR5820 and <rdar://problem/7535045>. Also, eliminate some
redundancy between Sema::PerformObjectMemberConversion() and
Sema::PerformObjectArgumentInitialization() -- the latter now calls
the former.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
91be6f5ccbde073e592bed9a3e3bc363957714fb 02-Mar-2010 Douglas Gregor <dgregor@apple.com> Use CXXTemporaryObjectExpr for explicitly-constructed temporaries. We
used to do this, but it got lost when we switched functional-style
cast syntax over to using the new initialization code. Fixes PR6457.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
aac571c68de0a7c58d92fba0057e308f0e6d115c 01-Mar-2010 Douglas Gregor <dgregor@apple.com> Finish pushing source-location information though TreeTransform's
TransformDefinition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
7c1e98f1cb37b40e619a0c8aee8b337f037b432b 01-Mar-2010 Douglas Gregor <dgregor@apple.com> When looking for the instantiated declaration that corresponds to a
given declaration in a template, make sure that the context we're
searching through is complete. Fixes PR6376.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97444 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
1af745143eb3066660d8855c17ccec6b38f5d789 26-Feb-2010 Douglas Gregor <dgregor@apple.com> Make sure to mark constructors, operator new, and operator delete as
used when we instantiate C++ new expressions, delete expressions, and
object-construction expressions. Fixes PR6424, although we can't test
all of it until we finish implementing lookup of "operator delete" for
new expressions (!).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
c845aad6f7d012ab0cd0a040515ab512d1a93566 26-Feb-2010 Douglas Gregor <dgregor@apple.com> When we decide to re-use an existing CXXConstructExpr node, make sure
to mark the constructor as referenced. Fixes the narrow issue reported
in PR6424, but there are a few other places that I'll fix before
closing out that PR.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
bf2ca2f87ff0b33b839b1b51d233a79bb56e5bac 25-Feb-2010 Gabor Greif <ggreif@gmail.com> Add "template" keyword at strategic position to fix
compilation using g++ v3.4.

I'll watch the buildbots and back out if necessary.
Feel free to do the same if something breaks.

Without this patch I get (on g++ 3.4.6) following error:

In file included from clang/lib/Sema/SemaTemplate.cpp:14:
clang/lib/Sema/TreeTransform.h: In member function `clang::ASTOwningResult<&clang::ActionBase::DeleteExpr> clang::TreeTransform<Derived>::RebuildCXXPseudoDestructorExpr(clang::ASTOwningResult<&clang::ActionBase::DeleteExpr>, clang::SourceLocation, bool, clang::NestedNameSpecifier*, clang::SourceRange, clang::TypeSourceInfo*, clang::SourceLocation, clang::SourceLocation, clang::PseudoDestructorTypeStorage)':
clang/lib/Sema/TreeTransform.h:5784: error: expected primary-expression before '>' token
clang/lib/Sema/TreeTransform.h:5784: error: expected primary-expression before ')' token
make[4]: *** [clang/lib/Sema/Release/SemaTemplate.o] Error 1


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97136 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
edc90500b1d2587bf0b698fada14537d6741fddf 25-Feb-2010 Douglas Gregor <dgregor@apple.com> Restore the invariant that a nested-name-specifier can only contain
class types, dependent types, and namespaces. I had previously
weakened this invariant while working on parsing pseudo-destructor
expressions, but recent work in that area has made these changes
unnecessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a2e7dd2f4a50d835351153aee568d35ccc986310 25-Feb-2010 Douglas Gregor <dgregor@apple.com> Use CXXPseudoDestructorExpr as the stored representation for dependent
expressions that look like pseudo-destructors, e.g.,

p->T::~T()

where p has dependent type.

At template instantiate time, we determine whether we actually have a
pseudo-destructor or a member access, and funnel down to the
appropriate routine in Sema.

Fixes PR6380.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
fce46ee68f779e239826e69e45d01d4c8e5323ca 25-Feb-2010 Douglas Gregor <dgregor@apple.com> Keep track of the location of the '~' in a pseudo-destructor expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97080 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
26d4ac97fb514bb60c2536eae6f203dc569159d9 25-Feb-2010 Douglas Gregor <dgregor@apple.com> Retain complete source information for the type after the '~' in a
CXXPseudoDestructorExpr.

Update template instantiation for pseudo-destructor expressions to use
this source information and to make use of
Sema::BuildPseudoDestructorExpr when the base expression is dependent
or refers to a scalar type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
d4dca08d6b7ed2e3e3718caa6fd735960b135e9a 24-Feb-2010 Douglas Gregor <dgregor@apple.com> Rework parsing of pseudo-destructor expressions and explicit
destructor calls, e.g.,

p->T::~T

We now detect when the member access that we've parsed, e.g.,

p-> or x.

may be a pseudo-destructor expression, either because the type of p or
x is a scalar or because it is dependent (and, therefore, may become a
scalar at template instantiation time).

We then parse the pseudo-destructor grammar specifically:

::[opt] nested-name-specifier[opt] type-name :: ∼ type-name

and hand those results to a new action, ActOnPseudoDestructorExpr,
which will cope with both dependent member accesses of destructors and
with pseudo-destructor expressions.

This commit affects the parsing of pseudo-destructors, only; the
semantic actions still go through the semantic actions for member
access expressions. That will change soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
b10cd04880672103660e5844e51ee91af7361a20 21-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement support for parsing pseudo-destructor expression with a nested-name-specifier, e.g.,

typedef int Int;
int *p;
p->Int::~Int();

This weakens the invariant that the only types in nested-name-specifiers are tag types (restricted to class types in C++98/03). However, we weaken this invariant as little as possible, accepting arbitrary types in nested-name-specifiers only when we're in a member access expression that looks like a pseudo-destructor expression.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
124b878dba5007df0a268ea128a6ad8dc5dd2c5e 16-Feb-2010 Douglas Gregor <dgregor@apple.com> Improve parsing and instantiation of destructor names, so that we can
now cope with the destruction of types named as dependent templates,
e.g.,

y->template Y<T>::~Y()

Nominally, we implement C++0x [basic.lookup.qual]p6. However, we don't
follow the letter of the standard here because that would fail to
parse

template<typename T, typename U>
X0<T, U>::~X0() { }

properly. The problem is captured in core issue 339, which gives some
(but not enough!) guidance. I expect to revisit this code when the
resolution of 339 is clear, and/or we start capturing better source
information for DeclarationNames.

Fixes PR6152.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ae6288981b77d6230bf62055d3bb6380580aa1e8 13-Feb-2010 Douglas Gregor <dgregor@apple.com> Fix a fiendinshly fun little type-canonicalization bug, where we were
rebuilding a typename type terminating in a template-id (with
dependent template name, naturally) as a TypenameType when, because
its context could be fully resolved, we should have been building it
as a QualifiedNameType. Fixes PR6268.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
53cb6f82c41397917b14fb8cdcb32e6c9bd07655 08-Feb-2010 Chandler Carruth <chandlerc@gmail.com> This doesn't seem to be used code as it didn't break any tests, but fix the
glaring logic bug anyways. =D


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95533 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
82287d19ded35248c4ce6a425ce74116a13ce44e 05-Feb-2010 John Thompson <John.Thompson.JTSoftware@gmail.com> First stage of adding AltiVec support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
321725d95d331d1612ac386d7d4235eca94b0021 03-Feb-2010 Douglas Gregor <dgregor@apple.com> Provide a real fix for PR6199, reverting the old workaround. Here, we
realize that CXXConstructExpr is always implicit, so we should just
return its argument (if there is only one) rather than directly
invoking the constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95192 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
ff93dbd887e40588ed55d135037bb9287488b285 30-Jan-2010 Anders Carlsson <andersca@mac.com> Use IdentifierInfo * instead of std::string for the AsmStmt names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a5a79f7d16b48d3be8bcc8c7650e31aefd92b657 30-Jan-2010 Anders Carlsson <andersca@mac.com> More asm cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
eb60edffa147e061278c436e513b0df9b4c4e7f6 29-Jan-2010 Anders Carlsson <andersca@mac.com> Add an CXXBindReferenceExpr (not used just yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
6e26689f5d513e24ad7783a4493201930fdeccc0 26-Jan-2010 John McCall <rjmccall@apple.com> Preserve access bits through overload resolution much better. Some
general refactoring in operator resolution.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
703e39486689d6660e75f6b6de0068db031a51c7 24-Jan-2010 Anders Carlsson <andersca@mac.com> Implement instantiation of AsmStmts (Crazy, I know)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94361 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
ddf889a2ad2888f1dea573987bbe952d9912c1a0 18-Jan-2010 Douglas Gregor <dgregor@apple.com> Improve source-location information for builtin TypeLocs, from Enea
Zaffanella (with a couple of my tweaks).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
c89724cc6dcb178ec79c76d7e629d9a7b5d83418 15-Jan-2010 John McCall <rjmccall@apple.com> Preserve type source information for C++ named casts through template
instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93533 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
b042fdfc9460e0018276412257e3c3226f9ea96e 15-Jan-2010 John McCall <rjmccall@apple.com> Don't lose type source information when rebuilding C-style cast expressions.
Also we don't need to recheck for altivec initializers, I think.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93529 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
c2233c5c46eafebd5529bf2bbd1f0a723b892e61 15-Jan-2010 John McCall <rjmccall@apple.com> Don't repeat lookup when instantiating resolved member expressions.
Adjust BuildMemberReferenceExpr to perform the inheritance check on implicit
member accesses, which can arise from unqualified lookups and therefore may
reference decls from enclosing class scopes.

Fixes PR 5838.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
cfb708c354e2f30ccc5cba9d644650f408a1ec3e 13-Jan-2010 John McCall <rjmccall@apple.com> Add type source information for both kinds of typeof types.
Patch by Enea Zaffanella.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
828a197317288e3333b0ce6f5cedadd036e3531f 08-Jan-2010 Douglas Gregor <dgregor@apple.com> Add an "implicit" bit to CXXThisExpr, so that we can track
implicitness without losing track of the (logical or actual) location
where "this" would occur in the source.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
f5f7d864f5067d1ea4bff7fcf41b53a43b7b48ba 29-Dec-2009 Anders Carlsson <andersca@mac.com> Get rid of FixedWidthIntType, as suggested by Chris and Eli.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92246 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
8aa5f407d9e4787ff08bd66e1a2fe39be174fddc 24-Dec-2009 Douglas Gregor <dgregor@apple.com> Add test case for PR5868, and improve location information slightly for implicit "this" expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
83a56c4a1d5bbf7e4b6b08b105051575a2421d34 24-Dec-2009 Douglas Gregor <dgregor@apple.com> When rebuilding a MemberExpr that refers to an anonymous union, be
sure to perform derived-to-base conversions on the base
expression. Fixes PR5868. Proper testcase is coming soon.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
5132655e4296b780672e9a96b46a740135073534 24-Dec-2009 Douglas Gregor <dgregor@apple.com> When transforming CXXExprWithTemporaries and CXXBindTemporaryExpr
expressions (e.g., for template instantiation), just transform the
subexpressions and return those, since the temporary-related nodes
will be implicitly regenerated. Fixes PR5867, but I said that
before...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
036aed18662e0193aafe0e8ae13d2e57efe6df25 24-Dec-2009 Douglas Gregor <dgregor@apple.com> When we see a CXXDefaultArgExpr during template instantiation, rebuild
the default argument so that we're sure to mark any referenced
declarations. This gets us another little step closer to fixing
PR5810.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
5b5ad8453c8e79f642c3ddfeeadf162ae67309c0 22-Dec-2009 Douglas Gregor <dgregor@apple.com> When transforming a C++ "new" expression that was not explicitly given
a size, check whether the transformed type is itself an array type. If
so, take the major array bound as the size to allocate. Fixes PR5833.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
1f24032ea28d0df9d6227e4faf89306dfa990994 22-Dec-2009 Anders Carlsson <andersca@mac.com> When we simply return a retained member expression when instantiating, we must also mark the member decl as referenced.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
5ee56e95c3905d2e7bc403631b03865cdbdd8a42 16-Dec-2009 Anders Carlsson <andersca@mac.com> Check in a rudimentary FullExpr class that isn't used anywhere yet. Rename Action::FullExpr to Action::MakeFullExpr to avoid name clashes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
0ece491d8f62ce67f047491a6703fac0d3bd4ff4 15-Dec-2009 Anders Carlsson <andersca@mac.com> ShouldDestroyTemporaries? I don't think so.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
4411d2e674b0119f682ac472c3a377f14fa9fa30 14-Dec-2009 Douglas Gregor <dgregor@apple.com> When rebuilding CXXConstructExprs after a transformation, use
CompleteConstructorCall to perform type-checking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
668d6d9dc100b3ef28a9b8e6fe987c2f5b6edcc9 13-Dec-2009 Douglas Gregor <dgregor@apple.com> Fix template instantiation for non-dependent calls to overloaded call
operators. Fixes PR5266.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a88cfbfac9bbcbb9858f048d6d73a48711d8e93d 12-Dec-2009 Douglas Gregor <dgregor@apple.com> Rework the way we handle template instantiation for
implicitly-generated AST nodes. We previously built instantiated nodes
for each of these AST nodes, then passed them on to Sema, which was
not prepared to see already-type-checked nodes (see PR5755). In some
places, we had ugly workarounds to try to avoid re-type-checking
(e.g., in VarDecl initializer instantiation).

Now, we skip implicitly-generated nodes when performing instantiation,
preferring instead to build just the AST nodes that directly reflect
what was written in the source code. This has several advantages:

- We don't need to instantiate anything that doesn't have a direct
correlation to the source code, so we can have better location
information.
- Semantic analysis sees the same thing at template instantiation
time that it would see for a non-template.
- At least one ugly hack (VarDecl initializers) goes away.

Fixes PR5755.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
9f61aa9e280adea9fbf3365f0e4f6ed568c9885a 12-Dec-2009 Jeffrey Yasskin <jyasskin@google.com> Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
no extra safety anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
9f54ad4381370c6b771424b53d219e661d6d6706 10-Dec-2009 John McCall <rjmccall@apple.com> Implement redeclaration checking and hiding semantics for using declarations. There
are a couple of O(n^2) operations in this, some analogous to the usual O(n^2)
redeclaration problem and some not. In particular, retroactively removing
shadow declarations when they're hidden by later decls is pretty unfortunate.
I'm not yet convinced it's worse than the alternative, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
454feb9da67504b475d032ca2a9fc34c5744748e 08-Dec-2009 John McCall <rjmccall@apple.com> The refactor of implicit member access expressions means we don't need this
horrible isAddressOfOperand hack in TreeTransform, since that syntactic
information is managed by the initial parser callbacks now.

That's enough insomniac commits for one night.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
46646491834cd8faabb22482dfe93b24ce28a6c1 07-Dec-2009 Chris Lattner <sabre@nondot.org> reapply my patch for PR4451, which improves diagnostics for :: vs : confusion.
This time with a fix to bail out when in a dependent context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
1ade4ca0aa9331c2388cca9becad1357a154ae34 06-Dec-2009 Chris Lattner <sabre@nondot.org> revert my previous patch, it is breaking something and I don't have time
to fix it ATM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a564b17dcc7daf298ffa72cde94630343bf9c31a 06-Dec-2009 Chris Lattner <sabre@nondot.org> implement PR4451, improving error recovery for a mistaken : where a :: was
intended. On the first testcase in the bug, we now produce:

cxx-decl.cpp:12:2: error: unexpected ':' in nested name specifier
y:a a2;
^
::

instead of:

t.cc:8:1: error: C++ requires a type specifier for all declarations
x:a a2;
^
t.cc:8:2: error: invalid token after top level declarator
x:a a2;
^
;
t.cc:9:11: error: use of undeclared identifier 'a2'
x::a a3 = a2;
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ed97649e9574b9d854fa4d6109c9333ae0993554 04-Dec-2009 John McCall <rjmccall@apple.com> Fix "using typename" and the instantiation of non-dependent using declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
aa81e1658d87b9011125c632aa902d154ae4b02c 01-Dec-2009 John McCall <rjmccall@apple.com> Rework how we support C++ implicit member accesses. If we can resolve an
implicit member access to a specific declaration, go ahead and create
it as a DeclRefExpr or a MemberExpr (with implicit CXXThisExpr base) as
appropriate. Otherwise, create an UnresolvedMemberExpr or
DependentScopeMemberExpr with a null base expression.

By representing implicit accesses directly in the AST, we get the ability
to correctly delay the decision about whether it's actually an instance
member access or not until resolution is complete. This permits us
to correctly avoid diagnosing the 'problem' of 'MyType::foo()'
where the relationship to the type isn't really known until instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
129e2df52ed7e0434b3f1cf1867fd6a5cb083ff6 30-Nov-2009 John McCall <rjmccall@apple.com> Eliminate the use of OverloadedFunctionDecl in member expressions.
Create a new UnresolvedMemberExpr for these lookups. Assorted hackery
around qualified member expressions; this will all go away when we
implement the correct (i.e. extremely delayed) implicit-member semantics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
3e518bda00d710754ca077cf9be8dd821e16a854 29-Nov-2009 Sean Hunt <rideau3@gmail.com> Add DeclarationName support for C++0x operator literals. They should now work as
function names outside of templates - they'll probably cause some damage there as
they're largely untested.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90064 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
f88f7ab5adaa11d050270ffee6aa871e855f83b8 25-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Some fancy footwork to move the decision on how
to build casted expression-list AST to Sema.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
5656e14d91405417182171a705ed3e3d2d6d7aa3 24-Nov-2009 Douglas Gregor <dgregor@apple.com> Clean up the AST for while loops and fix several problems with
cleanups for while loops:

1) Make sure that we destroy the condition variable of a while statement each time through the loop for, e.g.,

while (shared_ptr<WorkInt> p = getWorkItem()) {
// ...
}

2) Make sure that we always enter a new cleanup scope for the body of the while loop, even when there is no compound expression, e.g.,

while (blah)
RAIIObject raii(blah+1);



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
f7a1a744eba4b29ceb0f20af8f34515d892fdd64 24-Nov-2009 John McCall <rjmccall@apple.com> Rip out TemplateIdRefExpr and make UnresolvedLookupExpr and
DependentScopeDeclRefExpr support storing templateids. Unite the common
code paths between ActOnDeclarationNameExpr and ActOnTemplateIdExpr.

This gets us to a point where we don't need to store function templates in
the AST using TemplateNames, which is critical to ripping out OverloadedFunction.

Also resolves a few FIXMEs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
d3d5301c44138b92bf01286183f5bf310cdd37cf 24-Nov-2009 Douglas Gregor <dgregor@apple.com> Explicitly store the condition variable within switch statements, and
make sure that this variable is destroyed when we exit the switch
statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
8cfe5a784133d90bf329fd20801824a6f71bb8ca 24-Nov-2009 Douglas Gregor <dgregor@apple.com> Explicitly track the condition variable within an "if" statement,
rather than burying it in a CXXConditionDeclExpr (that occassionally
hides behind implicit conversions). Similar changes for
switch, while, and do-while will follow, then the removal of
CXXConditionDeclExpr. This commit is the canary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
ba13543329afac4a0d01304ec2ec4924d99306a6 21-Nov-2009 John McCall <rjmccall@apple.com> "Incremental" progress on using expressions, by which I mean totally ripping
into pretty much everything about overload resolution in order to wean
BuildDeclarationNameExpr off LookupResult::getAsSingleDecl(). Replace
UnresolvedFunctionNameExpr with UnresolvedLookupExpr, which generalizes the
idea of a non-member lookup that we haven't totally resolved yet, whether by
overloading, argument-dependent lookup, or (eventually) the presence of
a function template in the lookup results.

Incidentally fixes a problem with argument-dependent lookup where we were
still performing ADL even when the lookup results contained something from
a block scope.

Incidentally improves a diagnostic when using an ObjC ivar from a class method.
This just fell out from rewriting BuildDeclarationNameExpr's interaction with
lookup, and I'm too apathetic to break it out.

The only remaining uses of OverloadedFunctionDecl that I know of are in
TemplateName and MemberExpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a481edb1b11c956a46cb42cd0dc4dd9851c10801 21-Nov-2009 Douglas Gregor <dgregor@apple.com> Cope with extraneous "template" keyword when providing an out-of-line
definition of a member template (or a member thereof). Fixes PR5566.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
865d447ac6a4721ab58e898d014a21f2eff74b06 19-Nov-2009 John McCall <rjmccall@apple.com> Draw a brighter line between "unresolved" expressions, where we have done the
appropriate lookup and simply can't resolve the referrent yet, and
"dependent scope" expressions, where we can't do the lookup yet because the
entity we need to look into is a dependent type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
264c1f8ec895952466eab59b84b8b06801e721fa 19-Nov-2009 Eli Friedman <eli.friedman@gmail.com> The sub-statement of a case statement is not an unevaluated context!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89303 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a4923eb7c4b04d360cb2747641a5e92818edf804 16-Nov-2009 Douglas Gregor <dgregor@apple.com> First part of changes to eliminate problems with cv-qualifiers and
sugared types. The basic problem is that our qualifier accessors
(getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at
the current QualType and not at any qualifiers that come from sugared
types, meaning that we won't see these qualifiers through, e.g.,
typedefs:

typedef const int CInt;
typedef CInt Self;

Self.isConstQualified() currently returns false!

Various bugs (e.g., PR5383) have cropped up all over the front end due
to such problems. I'm addressing this problem by splitting each
qualifier accessor into two versions:

- the "local" version only returns qualifiers on this particular
QualType instance
- the "normal" version that will eventually combine qualifiers from this
QualType instance with the qualifiers on the canonical type to
produce the full set of qualifiers.

This commit adds the local versions and switches a few callers from
the "normal" version (e.g., isConstQualified) over to the "local"
version (e.g., isLocalConstQualified) when that is the right thing to
do, e.g., because we're printing or serializing the qualifiers. Also,
switch a bunch of

Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType()

expressions over to

Context.hasSameUnqualifiedType(T1, T2)




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
1a3c75f32f0d27de5f3f6b2ef4c6bbe7e18bddad 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Fix PR5488: special-case the overloaded arrow operator so that we don't try to
treat it as a unary operator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88938 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
afe7ec28b1880335daba5f7310fe5191e14c4e76 13-Nov-2009 Douglas Gregor <dgregor@apple.com> When transforming an expression statement (e.g., for template
instantiation), be sure to finish the expression statement by
providing a FullExprArg, making sure that temporaries get
destroyed. Fixes an obscure failure when parsing
llvm/LinkAllPasses.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
788cd06cf8e868a67158aafec5de3a1f408d14f3 11-Nov-2009 Douglas Gregor <dgregor@apple.com> Introduce a new representation for template template
parameters. Rather than storing them as either declarations (for the
non-dependent case) or expressions (for the dependent case), we now
(always) store them as TemplateNames.

The primary change here is to add a new kind of TemplateArgument,
which stores a TemplateName. However, making that change ripples to
every switch on a TemplateArgument's kind, also affecting
TemplateArgumentLocInfo/TemplateArgumentLoc, default template
arguments for template template parameters, type-checking of template
template arguments, etc.

This change is light on testing. It should fix several pre-existing
problems with template template parameters, such as:
- the inability to use dependent template names as template template
arguments
- template template parameter default arguments cannot be
instantiation

However, there are enough pieces missing that more implementation is
required before we can adequately test template template parameters.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86777 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
e48319a8a901bc915d48d02b99c62e5f2589dbd9 09-Nov-2009 Douglas Gregor <dgregor@apple.com> When transforming an InitListExpr, if we already computed a non-dependent type for the InitListExpr, keep it

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
6ca7cfb3fbe4dc92e457fd303814d274176cf359 05-Nov-2009 Douglas Gregor <dgregor@apple.com> When instantiating a UnaryOperator, allow the resulting expression to
still be dependent or invoke an overloaded operator. Previously, we
only supported builtin operators.

BinaryOperator/CompoundAssignOperator didn't have this issue because
we always built a CXXOperatorCallExpr node, even when name lookup
didn't find any functions to save until instantiation time. Now, that
code builds a BinaryOperator or CompoundAssignOperator rather than a
CXXOperatorCallExpr, to save some space.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
8a4386b3634065b96d08f94736bc1f953e385f50 05-Nov-2009 Douglas Gregor <dgregor@apple.com> When instantiating a MemberExpr, be sure to instantiate the
explicitly-specified template arguments, too!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
c86a6e988184867b09aa17a619402d0e81d0fda0 04-Nov-2009 Douglas Gregor <dgregor@apple.com> When performing template instantiation (transformation) of
expressions, keep track of whether we are immediately taking the
address of the expression. Pass this flag when building a declaration
name expression so that we handle pointer-to-member constants
properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ca1bdd7c269a2390d43c040a60511edd017ee130 04-Nov-2009 Douglas Gregor <dgregor@apple.com> Implement support for parsing dependent template-ids that refer to
overloaded operators, e.g.,

p->template operator+<T>()




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
014e88d94ff83e3aad4e33b16413a2d1817ec208 04-Nov-2009 Douglas Gregor <dgregor@apple.com> Parsing and semantic analysis for template-ids that name overloaded
operators, e.g.,

operator+<int>

which now works in declarators, id-expressions, and member access
expressions. This commit only implements the non-dependent case, where
we can resolve the template-id to an actual declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
2d1c21414199a7452f122598189363a3922605b1 03-Nov-2009 Douglas Gregor <dgregor@apple.com> Replace the code that parses member access expressions after "." or
"->" with a use of ParseUnqualifiedId. Collapse
ActOnMemberReferenceExpr, ActOnDestructorReferenceExpr (both of them),
ActOnOverloadedOperatorReferenceExpr,
ActOnConversionOperatorReferenceExpr, and
ActOnMemberTemplateIdReferenceExpr into a single, new action
ActOnMemberAccessExpr that does the same thing more cleanly (and can
keep more source-location information).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
85737a71fee8c737f7cfba79a0aca89298fe573b 30-Oct-2009 John McCall <rjmccall@apple.com> Report accurate source-location information when rebuilding types during
template instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
fbf2c945f8f8bbfe0459d45c03f9ff34bb445c81 29-Oct-2009 Douglas Gregor <dgregor@apple.com> Slightly improve source-location information during template instantiation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85529 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
f322ed6d39a30f509023cf88588c1e6514226127 29-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Properly instantiate usage of overloaded operator []. Fixes PR5345.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
828bff2079b6a91ecd7ed5b842c59527d7682789 29-Oct-2009 John McCall <rjmccall@apple.com> A few TemplateArgumentLoc clean-ups. Try to remember the Expr for a declaration.
Provide an API for getting the SourceRange of a TAL and use it judiciously.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
fd2300e1ee0eab6c51862a92d3f3c72540b36b23 29-Oct-2009 Douglas Gregor <dgregor@apple.com> Yet more instantiation-location information. Fixes PR5336.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
5557b25bdbd63536f687ebb63a0bab55aa227626 28-Oct-2009 Douglas Gregor <dgregor@apple.com> Slightly improve source location information during template instantiation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
972e6ce33c7e307f4b0da12bd6079bbd6ef76948 27-Oct-2009 Douglas Gregor <dgregor@apple.com> Only set the point of instantiation for an implicit or explicit
instantiation once we have committed to performing the
instantiation. As part of this, make our makeshift
template-instantiation location information suck slightly less.

Fixes PR5264.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
644be853b87cae94fcabaf309a5e482a8c291fb9 23-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Apply the special enum restrictions from [over.match.oper]p3b2 in argument-dependent lookup too. This fixes PR5244.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
eee91c3efbfc6a1509b42f39beb5533a9636fd70 23-Oct-2009 John McCall <rjmccall@apple.com> Rebuild dependently-sized ext vectors if either the element type or the size
changed under the transform.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
38caf910aa1fbf3953bf05506b1e49577f46ab42 23-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Silence GCC 4.3 warning.

TreeTransform.h:2333: warning: suggest parentheses around && within ||


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
54e14c4db764c0636160d26c5bbf491637c83a76 23-Oct-2009 John McCall <rjmccall@apple.com> When building types from declarators, instead of building two types (one for
the DeclaratorInfo, one for semantic analysis), just build a single type whose
canonical type will reflect the semantic analysis (assuming the type is
well-formed, of course).

To make that work, make a few changes to the type system:
* allow the nominal pointee type of a reference type to be a (possibly sugared)
reference type. Also, preserve the original spelling of the reference type.
Both of these can be ignored on canonical reference types.
* Remove ObjCProtocolListType and preserve the associated source information on
the various ObjC TypeLocs. Preserve the spelling of protocol lists except in
the canonical form.
* Preserve some level of source type structure on parameter types, but
canonicalize on the canonical function type. This is still a WIP.

Drops code size, makes strides towards accurate source location representation,
slight (~1.7%) progression on Cocoa.h because of complexity drop.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
f17bb74e74aca9bb0525d2249041ab65c7d1fd48 22-Oct-2009 Douglas Gregor <dgregor@apple.com> When building and instantiating a template-id reference expression, such as

N::f<int>

keep track of the full nested-name-specifier. This is mainly QoI and
relatively hard to test; will try to come up with a printing-based
test once we also retain the explicit template arguments past overload
resolution.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
4802a311f402836f1f226a3d7a87e6a3088f9704 21-Oct-2009 John McCall <rjmccall@apple.com> Initialize using the base location provided by the derived implementation,
not the default one (which is always empty).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a2becad14a0eb19cde2f441ced588b975433d2ed 21-Oct-2009 John McCall <rjmccall@apple.com> Rewrite TreeTransform to transform types as DeclaratorInfos rather than as bare
QualTypes. Don't actually exploit this yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
6cd219879ffce00920189ec1dcea927a42602961 20-Oct-2009 Douglas Gregor <dgregor@apple.com> Handle substitutions into the "first qualifier in scope" of a
qualified member access expression (e.g., t->U::member) when that
first qualifier refers to a template parameters.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
dd62b15665a4144c45c1f7c53665414ad5f7f4f2 20-Oct-2009 Douglas Gregor <dgregor@apple.com> Parse a simple-template-id following a '~' when calling a destructor, e.g.,

t->~T<A0, A1>()

Fixes PR5213.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
49a832bd499d6f61c23655f1fac99f0dd229756e 18-Oct-2009 John McCall <rjmccall@apple.com> When performing template-substitution into a type, don't just replace the
TemplateTypeParmType with the substituted type directly; instead, replace it
with a SubstTemplateTypeParmType which will note that the type was originally
written as a template type parameter. This makes it reasonable to preserve
source information even through template substitution.

Also define the new SubstTemplateTypeParmType class, obviously.

For consistency with current behavior, we stringize these types as if they
were the underlying type. I'm not sure this is the right thing to do.
At any rate, I paled at adding yet another clause to the don't-desugar 'if'
statement, so I extracted a function to do it. The new function also does
The Right Thing more often, I think: e.g. if we have a chain of typedefs
leading to a vector type, we will now desugar all but the last one.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
46a617a792bfab0d9b1e057371ea3b9540802226 16-Oct-2009 John McCall <rjmccall@apple.com> Remove the ConstantArrayType subtypes. This information is preserved in the
TypeLoc records for declarations; it should not be necessary to represent it
directly in the type system.

Please complain if you were using these classes and feel you can't replicate
previous functionality using the TypeLoc API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
24fab41057e4b67ed69a6b4027d5ae0f2f6934dc 29-Sep-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce ObjCProtocolListType type subclass.

This is used only for keeping detailed type source information for protocol references,
it should not participate in the semantics of the type system.

Its protocol list is not canonicalized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
0953e767ff7817f97b3ab20896b229891eeff45b 24-Sep-2009 John McCall <rjmccall@apple.com> Refactor the representation of qualifiers to bring ExtQualType out of the
Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right; many more remain.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
3b6afbb99a1c44b4076f8e15fb7311405941b306 09-Sep-2009 Douglas Gregor <dgregor@apple.com> Initial stab at implement dependent member references to member
templates, e.g.,

x.template get<T>

We can now parse these, represent them within an UnresolvedMemberExpr
expression, then instantiate that expression node in simple cases.

This allows us to stumble through parsing LLVM's Casting.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
f47511ab0575b8c4752e33cdc4b82a84dcc4d263 08-Sep-2009 Anders Carlsson <andersca@mac.com> BuildCXXConstructExpr now takes a MultiExprArg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
ec8e5ea799412a9d2aac4814c9c62cc32b3faad5 05-Sep-2009 Anders Carlsson <andersca@mac.com> Pass the ConstructLoc to BuildCXXConstructExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
7da2431c23ef1ee8acb114e39692246e1801afc2 05-Sep-2009 John McCall <rjmccall@apple.com> Basic support for representing elaborated type specifiers
directly in the AST. The current thinking is to create these
only in C++ mode for efficiency. But for now, they're not being
created at all; patch to follow.

This will let us do things like verify that tags match during
template instantation, as well as signal that an elaborated type
specifier was used for clients that actually care.

Optimally, the TypeLoc hierarchy should be adjusted to carry tag
location information as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a71d819bb8f50c28938db0f2867d3fb6e2ce5910 04-Sep-2009 Douglas Gregor <dgregor@apple.com> Implement AST, semantics, and CodeGen for C++ pseudo-destructor
expressions, e.g.,

p->~T()

when p is a pointer to a scalar type.

We don't currently diagnose errors when pseudo-destructor expressions
are used in any way other than by forming a call.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
81499bbeb2bd157a77b60364676ac434aca7a4df 04-Sep-2009 Douglas Gregor <dgregor@apple.com> Implement tree transformations for DeclarationNames. Among other
things, this means that we can properly cope with member access
expressions such as

t->operator T()

where T is a template parameter (or other dependent type).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
c68afe2cbe7f875a9243c411077602fb5f5dc74b 03-Sep-2009 Douglas Gregor <dgregor@apple.com> Improve template instantiation for member access expressions that
involve qualified names, e.g., x->Base::f. We now maintain enough
information in the AST to compare the results of the name lookup of
"Base" in the scope of the postfix-expression (determined at template
definition time) and in the type of the object expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
a38c687ef5354678b9d76a7b29354159f2b83736 03-Sep-2009 Douglas Gregor <dgregor@apple.com> Improved handling for dependent, qualified member access expressions, e.g.,

t->Base::f

where t has a dependent type. We save the nested-name-specifier in the
CXXUnresolvedMemberExpr then, during instantiation, substitute into
the nested-name-specifier with the (transformed) object type of t, so
that we get name lookup into the type of the object expression.

Note that we do not yet retain information about name lookup into the
lexical scope of the member access expression, so several regression
tests are still disabled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
2dd078ae50ff7be1fb25ebeedde45e9ab691a4f0 03-Sep-2009 Douglas Gregor <dgregor@apple.com> Rewrite of our handling of name lookup in C++ member access expressions, e.g.,

x->Base::f

We no longer try to "enter" the context of the type that "x" points
to. Instead, we drag that object type through the parser and pass it
into the Sema routines that need to know how to perform lookup within
member access expressions.

We now implement most of the crazy name lookup rules in C++
[basic.lookup.classref] for non-templated code, including performing
lookup both in the context of the type referred to by the member
access and in the scope of the member access itself and then detecting
ambiguities when the two lookups collide (p1 and p4; p3 and p7 are
still TODO). This change also corrects our handling of name lookup
within template arguments of template-ids inside the
nested-name-specifier (p6; we used to look into the scope of the
object expression for them) and fixes PR4703.

I have disabled some tests that involve member access expressions
where the object expression has dependent type, because we don't yet
have the ability to describe dependent nested-name-specifiers starting
with an identifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
8f1d89e40ac853903916b88b850fb9638609173d 01-Sep-2009 Douglas Gregor <dgregor@apple.com> Fix a crasher involving template instantiation of non-dependent
expressions making use of an overloaded operator. Thanks for the test
case, Anders!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
d8b285fee4471f393da8ee30f552ceacdc362afa 01-Sep-2009 Anders Carlsson <andersca@mac.com> Don't assert when instantiating member references to fields in anonymous structs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
017dde547d359a66ec38b80a098a5ddbef087048 31-Aug-2009 Douglas Gregor <dgregor@apple.com> Implement template instantiation for member operator access.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.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/lib/Sema/TreeTransform.h
495c35d291da48c4f5655bbb54d15128ddde0d4d 26-Aug-2009 Douglas Gregor <dgregor@apple.com> Improve support for out-of-line definitions of nested templates and
their members, including member class template, member function
templates, and member classes and functions of member templates.

To actually parse the nested-name-specifiers that qualify the name of
an out-of-line definition of a member template, e.g.,

template<typename X> template<typename Y>
X Outer<X>::Inner1<Y>::foo(Y) {
return X();
}

we need to look for the template names (e.g., "Inner1") as a member of
the current instantiation (Outer<X>), even before we have entered the
scope of the current instantiation. Since we can't do this in general
(i.e., we should not be looking into all dependent
nested-name-specifiers as if they were the current instantiation), we
rely on the parser to tell us when it is parsing a declaration
specifier sequence, and, therefore, when we should consider the
current scope specifier to be a current instantiation.

Printing of complicated, dependent nested-name-specifiers may be
somewhat broken by this commit; I'll add tests for this issue and fix
the problem (if it still exists) in a subsequent commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
da3f4e2dd5938145f132be237a2ed5914cc86702 25-Aug-2009 Anders Carlsson <andersca@mac.com> BuildCXXConstructExpr now returns an OwningExprResult.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79975 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
88650c371187e5a1eed0f05abc4019f93938ff79 24-Aug-2009 Chris Lattner <sabre@nondot.org> fix a GCC type punning warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
09105f52b1f28cbb1374c27c3c70f5517e2c465d 20-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Using "ObjCImplicitSetterGetterRefExpr" instead of "ObjCImplctSetterGetterRefExpr".
A field rename and more comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
43959a93c6aba8b03b09116fe077f4ce8e80005e 20-Aug-2009 Douglas Gregor <dgregor@apple.com> Refactor the instantiation of statements into a generic tree
transformation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79519 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
1bb8a45f7386a23871598d05141a07af03067925 19-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce LocInfoType which is a Sema-specific implementation detail.

This is a Type subclass that can hold a DeclaratorInfo* when we have type source info coming
out of a declarator that we want to preserve. This is used only at the "border" of Parser/Sema for
passing/getting QualTypes, it does not participate in the type system semantics in any way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
154440e6a8fa6ac5bca395876d79b530b39a2c1c 18-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.
Removed an unnecessary loop to get to setters incoming
argument. Added DoxyGen comments. Still more work
to do in this area (WIP).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
089c2602ebaccdda271beaabdd32575b354d4d09 16-Aug-2009 Anders Carlsson <andersca@mac.com> BuildCXXConstructExpr doesn't need to take an ASTContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
f1480eee38b59d15438fb7bc50865ac7c7e22403 14-Aug-2009 Anders Carlsson <andersca@mac.com> Make the CXXDefaultArgExpr constructor protected and add a static Create function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
0dec56d4ce737484aff17d4429a6e2e2fbad73e0 11-Aug-2009 Douglas Gregor <dgregor@apple.com> Fix DISABLE_SMART_POINTERS build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
b98b1991c7ad1eaedb863bdbdd784ec164277675 11-Aug-2009 Douglas Gregor <dgregor@apple.com> Refactor the template-instantiation logic for expressions into a
generic tree transformation (also used for recanonicalization) and a
small amount of template-instantiation-specific logic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
657c1acfc47d5c315ce864f2089b692262532a17 07-Aug-2009 Douglas Gregor <dgregor@apple.com> Minor refactoring to introduce a new transformation function,
TransformStmt, into the tree transformer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
4a959d8788179d654df6b213b08d2b064989211d 06-Aug-2009 Douglas Gregor <dgregor@apple.com> When we encounter a dependent type that was parsed before we know that
we were going to enter into the scope of a class template or class
template partial specialization, rebuild that type so that it can
refer to members of the current instantiation, as in code like

template<typename T>
struct X {
typedef T* pointer;
pointer data();
};

template<typename T>
typename X<T>::pointer X<T>::data() { ... }

Without rebuilding the return type of this out-of-line definition, the
canonical return type of the out-of-line definition (a TypenameType)
will not match the canonical return type of the declaration (the
canonical type of T*).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
d1067e5a0a6e2aee7260c392452df9553034c92b 06-Aug-2009 Douglas Gregor <dgregor@apple.com> Implement transformation of template names within the generic tree
transform, then use the result for template instantiation. The generic
transformation fixes a few issues:

- It copes better with template template parameters and member
templates (when they're implemented).
- The logic used to replace template template parameters with their
arguments is now centralized in TransformDecl, so that it will apply
for other declaration-instantiation steps.
- The error-recovery strategy is normalized now, so that any error
results in a NULL TemplateName.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
dcee1a12c83a6cbc9b5bf42df5d4efbc502664e7 06-Aug-2009 Douglas Gregor <dgregor@apple.com> Implement transformation of nested-name-specifiers within the general
tree transformation. Template instantiation uses this general
transformation rather than implementing its own transformation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
670444ed30cc8ff66eb4847d921d9af0291a7111 05-Aug-2009 Douglas Gregor <dgregor@apple.com> Move the template instantiation logic for template arguments into the
general tree transformation. Also, implement template instantiation
for parameter packs.

In addition, introduce logic to enter the appropriate context for
subexpressions that are not potentially evaluated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h
577f75a7498e9e2536434da0ef0da0eea390d18b 04-Aug-2009 Douglas Gregor <dgregor@apple.com> Refactor template instantiation for types into a generic tree
transformation template (TreeTransform) that handles the
transformation and reconstruction of AST nodes. Template instantiation
for types is a (relatively small) customization of the generic tree
transformation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/TreeTransform.h