History log of /external/clang/include/clang/AST/DeclCXX.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
17d35c36fbae764fcd68fa8b31624078a033aabc 01-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Normalize line endings of r163013 (part 2).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
6666ed4ed2e2bc13da5ac5d0a4947019137d45be 31-Aug-2012 Joao Matos <ripzonetriton@gmail.com> Improved MSVC __interface support by adding first class support for it, instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
4e79fdfe22db1c982e8fdf8397fee426a8c57821 15-Aug-2012 Jordan Rose <jordan_rose@apple.com> [analyzer] Correctly devirtualize virtual method calls in constructors.

This is the other half of C++11 [class.cdtor]p4 (the destructor side
was added in r161915). This also fixes an issue with post-call checks
where the 'this' value was already being cleaned out of the state, thus
being omitted from a reconstructed CXXConstructorCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
4ef832ffc1147ce2f9777f9fad650cb3139a1d00 10-Aug-2012 David Blaikie <dblaikie@gmail.com> Provide isConst/Volatile on CXXMethodDecl.

This also provides isConst/Volatile/Restrict on FunctionTypes to coalesce
the implementation with other callers (& update those other callers).

Patch contributed by Sam Panzer (panzer@google.com).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161647 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
2aa800a955132d83a666bcd52d3d59d09cffc079 08-Aug-2012 Jordan Rose <jordan_rose@apple.com> Constify CXXRecordDecl::isVirtuallyDerivedFrom.

No functionality change. A couple ugly const_casts because the ancestor
search code is used for other purposes as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
e3f470a718ec00eb8b546e405fa59bc2df2d7c46 12-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> Stop instantiating a class if we hit a static_assert failure. Also, if the
static_assert fails when parsing the template, don't diagnose it again on every
instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
478851c3ed6bd784e7377dffd8e57b200c1b9ba9 04-Jul-2012 Benjamin Kramer <benny.kra@googlemail.com> Drop the ASTContext.h include from Stmt.h and fix up transitive users.

This required moving the ctors for IntegerLiteral and FloatingLiteral out of
line which shouldn't change anything as they are usually called through Create
methods that are already out of line.

ASTContext::Deallocate has been a nop for a long time, drop it from ASTVector
and make it independent from ASTContext.h

Pass the StorageAllocator directly to AccessedEntity so it doesn't need to
have a definition of ASTContext around.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
ee3096a2d3092892d4c6f607a6323d9409714ed5 04-Jul-2012 Benjamin Kramer <benny.kra@googlemail.com> CXXRecordDecl: Split getBases/getVBases into a slow and a fast path.

This avoids costly computation of getASTContext() and drops the header
dependency from DeclCXX.h to ASTContext.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
0b4fe503ef00d9f8ea330850d3e3b303e9c7c876 26-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> During codegen of a virtual call we would extract any casts in the expression
to see if we had an underlying final class or method, but we would then
use the cast type to do the call, resulting in a direct call to the wrong
method.

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
d3861ce75a308c65b58c0159e2cee58aea2dff1c 10-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> Remove CXXRecordDecl flags which are unused after r158289.

We need an efficient mechanism to determine whether a defaulted default
constructor is constexpr, in order to determine whether a class is a literal
type, so keep the incrementally-built form on CXXRecordDecl. Remove the
on-demand computation of same, so that we only have one method for determining
whether a default constructor is constexpr. This doesn't affect correctness,
since default constructor lookup is much simpler than selecting a constructor
for copying or moving.

We don't need a corresponding mechanism for defaulted copy or move constructors,
since they can't affect whether a type is a literal type. Conversely, checking
whether such functions are constexpr can require non-trivial effort, so we defer
such checks until the copy or move constructor is required.

Thus we now only compute whether a copy or move constructor is constexpr on
demand, and only compute whether a default constructor is constexpr in advance.
This is unfortunate, but seems like the best solution.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
3f5f558a4ca08fe952cbbdf69b87487163c9a719 08-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR13051: If a constructor is explicitly defaulted, it isn't marked as being
constexpr until we get to the end of the class definition. When that happens,
be sure to remember that the class actually does have a constexpr constructor.

This is a stopgap solution, which still doesn't cover the case of a class with
multiple copy constructors (only some of which are constexpr). We should be
performing constructor lookup when implicitly defining a constructor in order
to determine whether all constructors it invokes are constexpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
0e5e092228495c9524ba6fa9b49f116a0c1bbe55 22-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> Truthify a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157232 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
d079abfb5eefaf7da232e39a6564f561402cf4fe 07-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> A union can have a constexpr defaulted default constructor, if it has an
in-class initializer for one of its fields. Value-initialization of such
a type should use the in-class initializer!

The former was just a bug, the latter is a (reported) standard defect.


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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
3d4144f32ea4c24aaf48cbff4f476c1446ba2641 09-Mar-2012 Daniel Dunbar <daniel@zuster.org> [AST/Sema] Add {CXXBaseSpecifier,Declarator,DeclSpec,TypeLoc,UnqualifiedId}::getLoc{Start,End}.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
c1b0f7fa9b755ab59129ae85187d0d4f91379995 06-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use TinyPtrVector instead of UsuallyTinyPtrVector.

The latter is just a worse version of the former.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152096 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
441b3bb6eb3b43f5ad740d5cc6ad5c27823b6681 29-Feb-2012 Eric Christopher <echristo@apple.com> Add some iterators for grabbing lambda expression contexts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
dfefb840e36f069286ef6cf178ef339c90f4603d 25-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Teach CXXRecordDecl::hasIrrelevantDestructor to check the base classes and
data members for deleted or user-provided destructors.

Now it's computed in advance, serialize it, and in passing fix all the other
record DefinitionData flags whose serialization was missing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
ac1303eca6cbe3e623fb5ec6fe7ec184ef4b0dfa 22-Feb-2012 Douglas Gregor <dgregor@apple.com> Generate an AST for the conversion from a lambda closure type to a
block pointer that returns a block literal which captures (by copy)
the lambda closure itself. Some aspects of the block literal are left
unspecified, namely the capture variable (which doesn't actually
exist) and the body (which will be filled in by IRgen because it can't
be written as an AST).

Because we're switching to this model, this patch also eliminates
tracking the copy-initialization expression for the block capture of
the conversion function, since that information is now embedded in the
synthesized block literal. -1 side tables FTW.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
f4b7de1cef3007cc0479775638198287384d9af1 21-Feb-2012 Douglas Gregor <dgregor@apple.com> Improve our handling of lambda expressions that occur within default
arguments. There are two aspects to this:

- Make sure that when marking the declarations referenced in a
default argument, we don't try to mark local variables, both because
it's a waste of time and because the semantics are wrong: we're not
in a place where we could capture these variables again even if it
did make sense.
- When a lambda expression occurs in a default argument of a
function template, make sure that the corresponding closure type is
considered dependent, so that it will get properly instantiated. The
second bit is a bit of a hack; to fix it properly, we may have to
rearchitect our handling of default arguments, parsing them only
after creating the function definition. However, I'd like to
separate that work from the lambdas work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.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/include/clang/AST/DeclCXX.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/include/clang/AST/DeclCXX.h
213d70b58b4f48050c3e545ce1bd4b0ec3af74be 18-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Diagnose uses of deleted destructors and inaccessible defaulted destructors.

We had two separate issues here: firstly, varions functions were assuming that
they did not need to perform semantic checks on trivial destructors (this is
not true in C++11, where a trivial destructor can nonetheless be private or
deleted), and a bunch of DiagnoseUseOfDecl calls were missing for uses of
destructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
27dd7d962bbf774988bc5e59d04a7743ed503514 17-Feb-2012 Douglas Gregor <dgregor@apple.com> Rework the Sema/AST/IRgen dance for the lambda closure type's
conversion to function pointer. Rather than having IRgen synthesize
the body of this function, we instead introduce a static member
function "__invoke" with the same signature as the lambda's
operator() in the AST. Sema then generates a body for the conversion
to function pointer which simply returns the address of __invoke. This
approach makes it easier to evaluate a call to the conversion function
as a constant, makes the linkage of the __invoke function follow the
normal rules for member functions, and may make life easier down the
road if we ever want to constexpr'ify some of lambdas.

Note that IR generation is responsible for filling in the body of
__invoke (Sema just adds a dummy body), because the body can't
generally be expressed in C++.

Eli, please review!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
f6e2e0291b8964ed41b4325e21dd90b86e791f10 16-Feb-2012 Douglas Gregor <dgregor@apple.com> Implicitly define a lambda's conversion functions (to function
pointers and block pointers). We use dummy definitions to keep the
invariant that an implicit, used definition has a body; IR generation
will substitute the actual contents, since they can't be represented
as C++.

For the block pointer case, compute the copy-initialization needed to
capture the lambda object in the block, which IR generation will need
later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
0bdb5aa1a3384d194b0e14a9ecbe3309ff33daa3 14-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Refactor out new function EmitInitializerForField from EmitMemberInitializer. The new function will be used to initialize the fields of lambda expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
7ae282fde0a12635893931ebf31b35b0d5d5cab3 13-Feb-2012 Douglas Gregor <dgregor@apple.com> Split the storage of lambda information between the LambdaExpr and the
CXXRecordDecl in a way that actually makes some sense:
- LambdaExpr contains all of the information for initializing the
lambda object, including the capture initializers and associated
array index variables.
- CXXRecordDecl's LambdaDefinitionData contains the captures, which
are needed to understand the captured variable references in the
body of the lambda.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
9daa7bfdff7256cef693d7bf10084881bcb9253c 13-Feb-2012 Douglas Gregor <dgregor@apple.com> Keep track of the set of array index variables we use when we
synthesize a by-copy captured array in a lambda. This information will
be needed by IR generation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
da8962a6198bc4bf09a38209db99551b2b0a41a0 13-Feb-2012 Douglas Gregor <dgregor@apple.com> Move the storage of lambda captures and capture initializers from
LambdaExpr over to the CXXRecordDecl. This allows us to eliminate the
back-link from the closure type to the LambdaExpr, which will simplify
and lazify AST deserialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
86c3ae46250cdcc57778c27826060779a92f3815 13-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Update constexpr implementation to match CWG's chosen approach for core issues
1358, 1360, 1452 and 1453.
- Instantiations of constexpr functions are always constexpr. This removes the
need for separate declaration/definition checking, which is now gone.
- This makes it possible for a constexpr function to be virtual, if they are
only dependently virtual. Virtual calls to such functions are not constant
expressions.
- Likewise, it's now possible for a literal type to have virtual base classes.
A constexpr constructor for such a type cannot actually produce a constant
expression, though, so add a special-case diagnostic for a constructor call
to such a type rather than trying to evaluate it.
- Classes with trivial default constructors (for which value initialization can
produce a fully-initialized value) are considered literal types.
- Classes with volatile members are not literal types.
- constexpr constructors can be members of non-literal types. We do not yet use
static initialization for global objects constructed in this way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
41105ad37a2de9bccfcd8137ccfa869cc8345275 11-Feb-2012 Eli Friedman <eli.friedman@gmail.com> const-qualify CXXRecordDecl::getCaptureFields.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
4d8d22bfaed6e5d7da6b5556415b18c43b44e36c 10-Feb-2012 Douglas Gregor <dgregor@apple.com> Extend CXXRecordDecl with a function that determines the mapping from
the variables captured by a lambda to the fields that store the
captured values. To be used in IRgen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
f15fda02e9c8c82b4a716618f4010b9af8bff796 02-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> constexpr:
* support the gcc __builtin_constant_p() ? ... : ... folding hack in C++11
* check for unspecified values in pointer comparisons and pointer subtractions


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
4fe19b5bf0db0cbe6afa280ed9f52ed4cb631e53 26-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change HasMutableFields to HasOnlyCMembers and consider that a tag inside
another tag does not break C-like-ness. rdar://10756831

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
277b15684582193d26f6c15b40e90a6e45299857 23-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce CXXRecordDecl::isCLike() that is true if the class is C-like,
without C++-specific features.

Use it to set the language to C++ when indexing non-C-like structs.
rdar://10732579

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
ef96ee0be5f100789f451641542a69cd719144d2 14-Jan-2012 Douglas Gregor <dgregor@apple.com> De-virtualize getPreviousDecl() and getMostRecentDecl() when we know
we have a redeclarable type, and only use the new virtual versions
(getPreviousDeclImpl() and getMostRecentDeclImpl()) when we don't have
that type information. This keeps us from penalizing users with strict
type information (and is the moral equivalent of a "final" method).

Plus, settle on the names getPreviousDecl() and getMostRecentDecl()
throughout.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
15e17aed79163d0d40ed7914f7fe992c400d93dd 10-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Per John's comment, it makes sense to ask isLambda on any CXXRecordDecl; make sure that's safe. Get rid of a check which is now unnecessary in Sema::getFunctionLevelDeclContext().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
9bc6fb6317f9bc6aaaacd266b9ea36996ad338bb 07-Jan-2012 Benjamin Kramer <benny.kra@googlemail.com> Pack UsingDecl more.

88 -> 80 bytes on x86_64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
72899c34e3d1abfffa241ad0ce5c4bf175e5ea51 07-Jan-2012 Eli Friedman <eli.friedman@gmail.com> More lambda work: semantic analysis of capturing 'this'. It's a bit complicated, but we have to be careful about when exactly captures are marked given PotentiallyPotentiallyEvaluated contexts. (Actually, it's not 100% correct yet, but it's close enough for the moment.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
1e68ecc4fcce12f683c4fd38acfd1a004001b04f 05-Jan-2012 Douglas Gregor <dgregor@apple.com> When creating declarations that are deserialized from an module file,
go through a central allocation routine
Decl::AllocateDeserializedDecl(). No actual functionality change (yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
6180245e9f63d2927b185ec251fb75aba30f1cac 22-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> PR11614: Mark defaulted special constructors as constexpr if their implicit
definition would satisfy the constexpr requirements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
99ba9e3bd70671f3441fb974895f226a83ce0e66 20-Dec-2011 David Blaikie <dblaikie@gmail.com> Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
5bbe816cd08bd28a87e8dadedf2cafb19ebf3b0b 12-Nov-2011 David Blaikie <dblaikie@gmail.com> Remove unnecessary 'else's after 'return's.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
27c72d8ca8bbb2861959c71f737e2560a7bf9991 03-Nov-2011 Douglas Gregor <dgregor@apple.com> Teach the ASTImporter to import DefinitionData bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
76852c218a207ef43583515cb835b6e855353a0f 01-Nov-2011 Douglas Gregor <dgregor@apple.com> Rework the AST for the initializer of a delegating constructor, so
that it retains source location information for the type. Aside from
general goodness (being able to walk the types described in that
information), we now have a proper representation for dependent
delegating constructors. Fixes PR10457 (for real).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
9f569cca2a4c5fb6026005434e27025b9e71309d 01-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> constexpr: semantic checking for constexpr functions and constructors. Based in
part on patches by Peter Collingbourne.

We diverge from the C++11 standard in a few areas, mostly related to checking
constexpr function declarations, and not just definitions. See WG21 paper
N3308=11-0078 for details.

Function invocation substitution is not available in this patch; constexpr
functions cannot yet be used from within constant expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
85ea7aa961deac1d754f610af8062ae3f8b4e2a5 30-Aug-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Declare and define implicit move constructor and assignment operator.

This makes the code duplication of implicit special member handling even worse,
but the cleanup will have to come later. For now, this works.
Follow-up with tests for explicit defaulting and enabling the __has_feature
flag to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
af1fc7af351758b0ea0d285bdfe5640128109a4e 15-Aug-2011 Richard Smith <richard-llvm@metafoo.co.uk> Track in the AST whether a function is constexpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
6b8bc0707f26aa6acfdd80a59b9a3850cafbe387 10-Aug-2011 Richard Smith <richard-llvm@metafoo.co.uk> Renamings to consistently use 'Constexpr' not 'ConstExpr' when referring to the C++0x 'constexpr' keyword.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
d16aa4139b8e6d08c0166945ab24ce340055465c 29-Jul-2011 Douglas Gregor <dgregor@apple.com> Add a missing \endcode for Doxygen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
6af966266235cae3287d50f1a10072bc48759ba0 20-Jun-2011 Francois Pichet <pichet2000@gmail.com> Remove more unnecessary #include <llvm/ADT/SmallVector.h>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.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/include/clang/AST/DeclCXX.h
ffe37fdda5b4b4f162a45155c30d9f60ce110c12 25-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement a little bit of cleanup and a lot more of the base work
behind implicit moves. We now correctly identify move constructors and
assignment operators and update bits on the record correctly. Generation
of implicit moves (declarations or definitions) is not yet supported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132080 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
2bb110125e0e5adb7c1c65d12adfa34151ca1c47 13-May-2011 Douglas Gregor <dgregor@apple.com> When determining whether we can make a declaration into a global
constant, also consider whether it's a class type that has any mutable
fields. If so, it can't be a global constant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
5762c0bec6b73a7f6360a71b94b07b7ba0e4b5e8 13-May-2011 Nick Lewycky <nicholas@mxc.ca> Add a method to query whether or not a class has a default constructor declared.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
cdee3fee8ca4df7fb9179f29cc3ba96ac4fd0f95 12-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement implicit deletion of default constructors.

Yes, I'm aware that the diagnostics are awful.

Tests to follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
001cad932380419c6fbfecbeec63e0579f5ecbf3 10-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Further implement defaulting constructors.

Focus is on default constructors for the time being. Currently the
exception specification and prototype are processed correctly. Codegen
might work but in all likelihood doesn't.

Note that due to an error, out-of-line defaulting of member functions is
currently impossible. It will continue to that until I muster up the
courage to admit that I secretly pray to epimetheus and that I need to
rework the way default gets from Parse -> Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
37b8c9ee7cf2b4d5ce3ccd3be1fcadd18a783a57 09-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Clean up trivial default constructors now.

hasTrivialDefaultConstructor() really really means it now.

Also implement a fun standards bug regarding aggregates. Doug, if you'd
like, I can un-implement that bug if you think it is truly a defect.

The bug is that non-special-member constructors are never considered
user-provided, so the following is an aggregate:

struct foo {
foo(int);
};

It's kind of bad, but the solution isn't obvious - should

struct foo {
foo (int) = delete;
};

be an aggregate or not?

Lastly, add a missing initialization to FunctionDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
023df37c27ee8035664fb62f206ca58f4e2a169d 09-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Rename "hasTrivialConstructor" to "hasTrivialDefaultConstructor" and
modify the semantics slightly to accomodate default constructors (I
hope).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
10620eb5164e31208fcbf0437cd79ae535ed0559 06-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Modify some deleted function methods to better reflect reality:

- New isDefined() function checks for deletedness
- isThisDeclarationADefinition checks for deletedness
- New doesThisDeclarationHaveABody() does what
isThisDeclarationADefinition() used to do
- The IsDeleted bit is not propagated across redeclarations
- isDeleted() now checks the canoncial declaration
- New isDeletedAsWritten() does what it says on the tin.
- isUserProvided() now correct (thanks Richard!)

This fixes the bug that we weren't catching

void foo() = delete;
void foo() {}

as being a redefinition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
fe2695eec167b28578825576863228f86b392f24 06-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Do defaulted constructors properly.

Explictly defaultedness is correctly reflected on the AST, but there are
no changes to how that affects the definition of functions or much else
really.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
5f802e51406664ca9b6e0d57fc7ce37ea97a1c65 06-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Revert r130912 in order to approach defaulted functions from the other
direction and not introduce things in the wrong place three different
times.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
ad7ec12ef2edbadb85a3754f0395ef2f06d4256c 05-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement some framework for defaulted constructors.

There's some unused stuff for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
fe57eef44cc80e5bb51e4f484835be08b8d84256 04-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement a better version of delegating constructor cycle detection.

This is more efficient as it's all done at once at the end of the TU.
This could still get expensive, so a flag is provided to disable it. As
an added bonus, the diagnostics will now print out a cycle.

The PCH test is XFAILed because we currently can't deal with a note
emitted in the header and I, being tired, see no other way to verify the
serialization of delegating constructors. We should probably address
this problem /somehow/ but no good solution comes to mind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
fa74c2344addf92826c938758fb4dc612a004eb9 04-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Ensure that delegating constructor loop detection uses canonical
declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
059ce0d92eb5a7da900ae735dc0a2ea3d64f4b0b 01-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Fully implement delegating constructors!

As far as I know, this implementation is complete but might be missing a
few optimizations. Exceptions and virtual bases are handled correctly.

Because I'm an optimist, the web page has appropriately been updated. If
I'm wrong, feel free to downgrade its support categories.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
ec997dc66627957bcdcd3db7906a68c1e14a279c 30-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Rename the last '[hH]asStandardLayout' entites to '[iI]sStandardLayout'
based on Doug's preferences when we discussed this in IRC. This brings
the wording more in line with the standard.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
a8225449421e8c1e996a7c48300521028946482a 30-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Completely re-implement the core logic behind the __is_standard_layout
type trait. The previous implementation suffered from several problems:

1) It implemented all of the logic in RecordType by walking over every
base and field in a CXXRecordDecl and validating the constraints of
the standard. This made for very straightforward code, but is
extremely inefficient. It also is conceptually wrong, the logic tied
to the C++ definition of standard-layout classes should be in
CXXRecordDecl, not RecordType.
2) To address the performance problems with #1, a cache bit was added to
CXXRecordDecl, and at the completion of every C++ class, the
RecordType was queried to determine if it was a standard layout
class, and that state was cached. Two things went very very wrong
with this. First, the caching version of the query *was never
called*. Even within the recursive steps of the walk over all fields
and bases the caching variant was not called, making each query
a full *recursive* walk. Second, despite the cache not being used, it
was computed for every class declared, even when the trait was never
used in the program. This probably significantly regressed compile
time performance for edge-case files.
3) An ASTContext was required merely to query the type trait because
querying it performed the actual computations.
4) The caching bit wasn't managed correctly (uninitialized).

The new implementation follows the system for all the other traits on
C++ classes by encoding all the state needed in the definition data and
building up the trait incrementally as each base and member are added to
the definition of the class.

The idiosyncracies of the specification of standard-layout classes
requires more state than I would like; currently 5 bits. I could
eliminate one of the bits easily at the expense of both clarity and
resilience of the code. I might be able to eliminate one of the other
bits by computing its state in terms of other state bits in the
definition. I've already done that in one place where there was a fairly
simple way to achieve it.

It's possible some of the bits could be moved out of the definition data
and into some other structure which isn't serialized if the serialized
bloat is a problem. That would preclude serialization of a partial class
declaration, but that's likely already precluded.

Comments on any of these issues welcome.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
20c0da7787c9a7d2529e42a4a91d777778595d74 28-Apr-2011 John Wiegley <johnw@boostpro.com> t/clang/type-traits

Patch authored by John Wiegley.

These type traits are used for parsing code that employs certain features of
the Embarcadero C++ compiler. Several of these constructs are also desired by
libc++, according to its project pages (such as __is_standard_layout).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
9b6347cd410be55425f7062d22fd6e4ecb4e1a58 24-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Implement most of the remaining logic in __is_literal type trait. This
should now support all of the C++98 types, and all of the C++0x types
Clang supports.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
4d6e5a22d9481bb83b82d911727540096d171c0b 24-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Begin tracking trivialness of move constructors and move assignment
operators in C++ record declarations.

This patch starts off by updating a bunch of the standard citations to
refer to the draft 0x standard so that the semantics intended for move
varianst is clear. Where necessary these are duplicated so they'll be
available in doxygen.

It adds bit fields to keep track of the state for the move constructs,
and updates all the code necessary to track this state (I think) as
members are declared for a class. It also wires the state into the
various trait-like accessors in the AST's API, and tests that the type
trait expressions now behave correctly in the presence of move
constructors and move assignment operators.

This isn't complete yet due to these glaring FIXMEs:
1) No synthesis of implicit move constructors or assignment operators.
2) I don't think we correctly enforce the new logic for both copy and
move trivial checks: that the *selected* copy/move
constructor/operator is trivial. Currently this requires *all* of them
to be trivial.
3) Some of the trait logic needs to be folded into the fine-grained
trivial bits to more closely match the wording of the standard. For
example, many of the places we currently set a bit to track POD-ness
could be removed by querying other more fine grained traits on
demand.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
b7e9589bce9852b4db9575f55ac9137572147eb5 23-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Implement basic __is_trivial type-trait support, enough to close PR9472.
This introduces a few APIs on the AST to bundle up the standard-based
logic so that programmatic clients have access to exactly the same
behavior.

There is only one serious FIXME here: checking for non-trivial move
constructors and move assignment operators. Those bits need to be added
to the declaration and accessors provided.

This implementation should be enough for the uses of __is_trivial in
libstdc++ 4.6's C++98 library implementation.

Ideas for more thorough test cases or any edge cases missing would be
appreciated. =D

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
ba877adeb49ed6dc17f27fa3a3bcd0cca713fd68 09-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed InnerLocStart.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
f52516038ab5d0b1b90a6dd32f46b7d6dabd04c8 08-Mar-2011 Douglas Gregor <dgregor@apple.com> Teach libclang's token-annotation logic about context-sensitive
keywords for Objective-C+ and C++0x.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
a2026c96d3935e7909e049ad9096762844544ed6 08-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed source range for StaticAssertDecl and LinkageSpecDecl. Fixed source range for declarations using postfix types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.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/include/clang/AST/DeclCXX.h
a868c3799b739781db325c1bd2c6afd182bc9bd6 06-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Completed source ranges fixes for all classes inheriting from TypeDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
55a9637969260ca7eb66011732094b33f049c52a 03-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Removed left brace location from LinkageSpecDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
5f6bcbebedb85ee745cbd9a3ca51ca8c766a6117 03-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed end source location for LinkageSpecDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
46bb4f1a3ac9517406887939612eb8df4b7be006 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Eliminate some unused getQualifierRange() member functions. We deal in nested-name-specifier locations now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
4171766318a2564fbc9a739be0a2851f441c0d29 26-Feb-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement delegating constructors partially.

This successfully performs constructor lookup and verifies that a
delegating initializer is the only initializer present.

This does not perform loop detection in the initialization, but it also
doesn't codegen delegating constructors at all, so this won't cause
runtime infinite loops yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126552 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
0cfaf6a270ecd0f5c7e541a8047c87948317548b 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into namespace
aliases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126496 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
db9924191092b4d426cc066637d81698211846aa 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into using directives.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
dc355713be51fcb4ee52d9fd6b4548ceff47fadf 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Update UsingDecl, UnresolvedUsingTypenameDecl, and
UnresolvedUsingValueDecl to use NestedNameSpecifierLoc rather than the
extremely-lossy NestedNameSpecifier/SourceRange pair it used to use,
improving source-location information.

Various infrastructure updates to support NestedNameSpecifierLoc:
- AST/PCH (de-)serialization
- Recursive AST visitor
- libclang traversal (including the first tests of this
functionality)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
da2142f2e2b3a02ee6eb5de9f9e6ed6f7eb5a0c0 19-Feb-2011 Douglas Gregor <dgregor@apple.com> Revert all of my commits that devirtualized the Decl hierarchy, which
lead to a serious slowdown (4%) on parsing of Cocoa.h. This memory
optimization should be revisited later, when we have time to look at
the generated code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
2ae442a8a0974aee1da389a69857a4b6f2823c1a 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Devirtualize TagDecl::completeDefinition().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125755 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
770877fa855d1de462392e503ef08252614b0994 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Devirtualize Decl::getSourceRange()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
0eccdcac47f0ee1d2081244ca714088779b09b98 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Devirtualize Decl::getCanonicalDecl().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
f677ea3cc9598d9952ad7ffab5fb322ba4c5be31 05-Feb-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Basic implementation of inherited constructors. Only generates declarations, and probably only works for very basic use cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
d89d30fdd9e3061fb100fb8f976aab5c6cf2c901 28-Jan-2011 John McCall <rjmccall@apple.com> Fix some corner cases in the __is_base_of logic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124505 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
0a9a6d68979619a621fedc5089674487f720f765 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Rvalue references for *this: add name mangling for ref-qualifiers,
using rules that I just made up this morning. This encoding has now
been proposed to the Itanium C++ ABI group for inclusion, but of
course it's still possible that the mangling will change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
cb88a1f968c3d4eb451dafb421a8d9578edcbf1a 24-Jan-2011 Anders Carlsson <andersca@mac.com> Use attributes for all the override control specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
b76cc4d4445fd9e5b29722407ce870e3f5a64cca 22-Jan-2011 Anders Carlsson <andersca@mac.com> Add final/explicit getters and setters to CXXRecordDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
cc15f010672a13b38104a32e3cefc7adc07ffbf7 21-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement the preference for move-construction over copy-construction
when returning an NRVO candidate expression. For example, this
properly picks the move constructor when dealing with code such as

MoveOnlyType f() { MoveOnlyType mot; return mot; }

The previously-XFAIL'd rvalue-references test case now works, and has
been moved into the appropriate paragraph-specific test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.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/include/clang/AST/DeclCXX.h
4ba2a17694148e16eaa8d3917f657ffcd3667be4 12-Jan-2011 Jay Foad <jay.foad@gmail.com> PR3558: mark "logically const" accessor methods in ASTContext as const,
and mark the fields they use as mutable. This allows us to remove a few
const_casts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
f51d0b6c2f5abd09d3a7ba907a3d9b7a43752f3d 09-Jan-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Rename CXXCtorInitializer::BaseOrMember to Initializee, since it will also be
used to store the CXXConstructorDecl in a delegating constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
cbb67480094b3bcb5b715acd827cbad55e2a204c 08-Jan-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Renamed CXXBaseOrMemberInitializer to CXXCtorInitializer. This is both shorter,
more accurate, and makes it make sense for it to hold a delegating constructor
call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
3fb9e4b89f72823f162096086f0f964e6dcf66d6 04-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement pack expansion of base initializers, so that we can
initialize those lovely mixins that come from pack expansions of base
specifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
f90b27ad077c3339b62befc892382845339f9490 03-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement pack expansions whose pattern is a base-specifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
00eb3f9c5b33e3d99aee1f8b75dd9c9678fdd66b 04-Dec-2010 Francois Pichet <pichet2000@gmail.com> More anonymous struct/union redesign. This one deals with anonymous field used in a constructor initializer list:

struct X {
X() : au_i1(123) {}
union {
int au_i1;
float au_f1;
};
};

clang will now deal with au_i1 explicitly as an IndirectFieldDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
3a1c36c099df4dcc94d1d24516a8a2c809c764d4 02-Dec-2010 Douglas Gregor <dgregor@apple.com> Eliminate two uses of NDEBUG in headers that cause different symbols
to be available in debug vs. release builds.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
46170f9c7d561d0f94af34a4b5da909d2584370a 24-Nov-2010 Anders Carlsson <andersca@mac.com> Add CXXRecordDecl::getIndirectPrimaryBases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
826faa22bae112e01293a58534a40711043cce65 10-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Replace UsingDecl's SmallPtrSet of UsingShadowDecls with a linked list to avoid leaking memory.
Fixes rdar://8649963.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
6493cc50b66c2d097b3e22514bbe303048c4a8ff 08-Nov-2010 Douglas Gregor <dgregor@apple.com> Improve our handling of C++ [class.copy]p3, which specifies that a
constructor template will not be used to copy a class object to a
value of its own type. We were eliminating all constructor templates
whose specializations look like a copy constructor, which eliminated
important candidates. Fixes PR8182.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
dfdfc584f2a8d9f1eebd6e6eaa9b1bbff519d8f9 07-Nov-2010 Anders Carlsson <andersca@mac.com> A union cannot contain static data members or data members of reference type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
7c789c1a3f77f24032aa0bed2afacdb9e094e952 30-Oct-2010 Douglas Gregor <dgregor@apple.com> Make the deserialization of C++ base class specifiers lazy, improving
the performance of C++ PCH and reducing stack depth in the reader.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
89eaf3af92c72c0c1aae807644e39cabc461d685 24-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactoring.
- Pass around RecordDataImpl instead of the concrete RecordData so that any SmallVector can be used.
- Move ASTDeclWriter::WriteCXXDefinitionData to ASTWriter::AddCXXDefinitionData.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
b41d899a6023385c00a61eb9dd3e44db9dc7994e 21-Oct-2010 Craig Silverstein <csilvers2000@yahoo.com> Pass TInfo to CXXDestructorDecl::Create(), just like we do for other
function decls.

Reviewed by rjmccall and nlewycky.


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
e80622fd48261b6e5c7e6629dcfee2f76b124487 29-Sep-2010 Douglas Gregor <dgregor@apple.com> Move the management of the set of conversion functions in a C++ class
into CXXRecordDecl. The only part that we do not handle this way are
using declarations, since that would require extra name lookup that we
don't currently want to pay for. This fixes <rdar://problem/8459981>,
so that LLDB can build a CXXRecordDecl and magically get all of the
right bits set.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
7a39dd01edc43aa5f058e7259a39737fc1f43792 29-Sep-2010 Douglas Gregor <dgregor@apple.com> Move the maintenance of CXXRecordDecl::DefinitionData's Abstract bit
completely into CXXRecordDecl, by adding a new completeDefinition()
function. This required a little reshuffling of the final-overrider
checking code, since the "abstract" calculation in the presence of
abstract base classes needs to occur in
CXXRecordDecl::completeDefinition() but we don't want to compute final
overriders more than one in the common case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
2138664dd2cff39de52ff11ca35f653c20b2e4b0 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Teach FunctionDecl::setPure() to (indirectly) mark the Abstract bit in
CXXRecordDecl::DefinitionData, rather than having Sema mark the bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
85606ebf3dd1b5dd81a59ef25b5ad47627664774 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Reinstate r114925 and r114929, both steps toward
<rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
2cf9d656f6283f2a8be0549da110d7cfbb1ea4b2 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Centralize the management of CXXRecordDecl::DefinitionData's Empty bit
in CXXRecordDecl itself. Yes, this is also part of <rdar://problem/8459981>.

This reinstates r114924, with one crucial bug fix: we were ignoring
the implicit fields created by anonymous structs/unions when updating
the bits in CXXRecordDecl, which means that a class/struct containing
only an anonymous class/struct would be considered "empty". Hilarity
follows.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
9fe183ae1ec568716501f861235afecebee8cd45 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Reinstate r114921, which I've exonerated via a self-host build.

Centralize the management of CXXRecordDecl::DefinitionData's Aggregate
and PlainOldData bits in CXXRecordDecl itself. Another milepost on the
road toward <rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
2a674e8e443b7a3e77957078248fb52b3b1ec321 28-Sep-2010 Bill Wendling <isanbard@gmail.com> Temporarily revert 114929 114925 114924 114921. It looked like they (or at least
one of them) was causing a series of failures:

http://google1.osuosl.org:8011/builders/clang-x86_64-darwin10-selfhost/builds/4518

svn merge -c -114929 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114929 into '.':
U include/clang/Sema/Sema.h
U include/clang/AST/DeclCXX.h
U lib/Sema/SemaDeclCXX.cpp
U lib/Sema/SemaTemplateInstantiateDecl.cpp
U lib/Sema/SemaDecl.cpp
U lib/Sema/SemaTemplateInstantiate.cpp
U lib/AST/DeclCXX.cpp
svn merge -c -114925 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114925 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/AST/DeclCXX.cpp
svn merge -c -114924 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114924 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/Sema/SemaDecl.cpp
G lib/AST/DeclCXX.cpp
U lib/AST/ASTContext.cpp
svn merge -c -114921 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114921 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/Sema/SemaDecl.cpp
G lib/AST/DeclCXX.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
e10288c1e9e06dbd715f47bfaa22ce5d65fdf096 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Centralize the management of CXXRecordDecl::DefinitionData's
HasTrivialConstructor, HasTrivialCopyConstructor,
HasTrivialCopyAssignment, and HasTrivialDestructor bits in
CXXRecordDecl's methods. This completes all but the Abstract bit and
the set of conversion functions, both of which will require a bit of
extra work. The majority of <rdar://problem/8459981> is now
implemented (but not all of it).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
4a74df5901330c577d0a30d052338d06bbf9e279 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Centralize the management of CXXRecordDecl::DefinitionData's
Polymorphic bit in CXXRecordDecl itself. Yes, this is also part of
<rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
cdbfa6c4113411debfed9ffec2a45bd50b13e10f 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Centralize the management of CXXRecordDecl::DefinitionData's Empty bit
in CXXRecordDecl itself. Yes, this is also part of <rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
6e3c7713ca126c76053cc092670a949a5e15ddaf 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Centralize the management of CXXRecordDecl::DefinitionData's Aggregate
and PlainOldData bits in CXXRecordDecl itself. Another milepost on the
road toward <rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
0ed2e0823cc7b727abd9307db4cd887f293eebe2 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Centralize the handling of CXXRecordDecl::DefinitionData's
DeclaredDestructor and UserDeclaredDestructor bits in CXXRecordDecl
itself. Another step on the road to <rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
27c08ab4859d071efa158a256f7e47e13d924443 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Centralize the handling of
CXXRecordDecl::DefinitionData::DeclaredCopyAssignment, for
copy-assignment operators. Another step toward <rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
5c0646b98b203d105c10ad8cc11be11cc99a4218 27-Sep-2010 Douglas Gregor <dgregor@apple.com> Clean up the handling of the DeclaredDefaultConstructor and
DeclaredCopyConstructor bits in CXXRecordDecl's DefinitionData
structure. Rather than having Sema call addedConstructor or set the
bits directly at semi-random places, move all of the logic for
managing these bits into CXXRecordDecl itself and tie the
addedConstructor call into DeclContext::addDecl().

This makes it easier for AST-building clients to get the right bits
set in DefinitionData, and is one small part of <rdar://problem/8459981>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
dacd24775d9654c3fe5dc2a01640c2b2aab2bead 14-Sep-2010 Ted Kremenek <kremenek@apple.com> Add reverse iterator for initializers in constructor. Patch by Marcin Åšwiderski!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
751025d5d174ab75dc3788211581d9fbe6224841 14-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Remove CXXRecordDecl::getDefaultConstructor(), an inherently unsafe function due to lazy declaration of default constructors. Now that __has_nothrow_constructor doesn't use it anymore, part of PR8101 is fixed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
65b63ec1410f09e1f3cdb847018d678b8f8fc3f7 08-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Re-enable CheckAccessDeclContext and make sure it doesn't trigger assertions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
7e24256c95afb64b4d5abf201a0f9f0527cb4cf3 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement libclang support for using declarations. Clang actually uses
three different kinds of AST nodes to represent using declarations:
UsingDecl, UnresolvedUsingValueDecl, and
UnresolvedUsingTypenameDecl. These three are collapsed into a single
cursor kind for using declarations, since libclang clients don't need
the distinction.

Several related changes here:
- Cursor visitation of the three AST nodes for using declarations
- Proper source-range computation for these AST nodes
- Using declarations have no USRs, since they don't actually declare
any entities.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
0a35bceb7768fc0be62cb644a4e31d8bfd9fb44a 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement libclang support for using directives (cursor + visitation +
suppressing USRs). Also, fix up the source location information for
using directives so that the declaration location refers to the
namespace name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
8ea5b9d832455247a15925398fb663d299d33238 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Improve location information in the representation of namespace
aliases. Previously, the location of the alias was at the "namespace"
keyword. Now, it's on the identifier being declared (as is the custom
for Clang), and we keep a separate source location for the "namespace"
keyword.

Also, added a getSourceRange() member function to NamespaceAliasDecl
to correctly compute the source range.

Finally, removed a bunch of setters from NamespaceAliasDecl and gave
ASTReaderDecl friendship so that it could set the corresponding fields
directly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
d931b086984257de68868a64a235c2b4b34003fb 26-Aug-2010 John McCall <rjmccall@apple.com> De-memberify the VarDecl and FunctionDecl StorageClass enums.
This lets us remove Sema.h's dependency on Expr.h and Decl.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
d527cc06d78fe5afa5f20105b51697637eb02c56 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename PCHDeclReader -> ASTDeclReader.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
ef3dce817d43faadbf21ce9102d33a9d84b02e09 12-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added locations and type source info for DeclarationName inside UsingDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
2577743c5650c646fb705df01403707e94f2df04 12-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added locations and type source info for DeclarationName.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
8e706f4b8da141612861e127610141b8d17a9667 09-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactor into functions PCH reading/writing the CXXBaseOrMemberInitializers. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110566 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
5606220447c7901ba8d80147ddab893bb7949dd5 26-Jul-2010 Nick Lewycky <nicholas@mxc.ca> Add source location information to C++ base specifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
a2da780b325e78c6c6bbbb766459a73243c3cf9e 25-Jul-2010 Douglas Gregor <dgregor@apple.com> Remove destructors from declaration nodes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
ff331c15729f7d4439d253c97f4d60f2a7ffd0c6 25-Jul-2010 Douglas Gregor <dgregor@apple.com> Remove the vast majority of the Destroy methods from the AST library,
since we aren't going to be calling them ever.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
0d396896998685809bda7444d772bbeb5bbe9b46 22-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write C++0x static_assert for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
82f8e796d6ffce1d63729a2df87c1060edf6593a 08-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix reading of UsingDecl from PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
c91e9f439ae85d5f79a6b65672f1d7d1b55ccda0 04-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write more information of ASTContext for PCH. Overriden methods and instantiated-from information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
1827403a7138946305c0058f262e02b595cf882f 03-Jul-2010 Douglas Gregor <dgregor@apple.com> Lazily declare default constructors. We now delay the construction of
declarations for implicit default constructors, copy constructors,
copy assignment operators, and destructors. On a "simple" translation
unit that includes a bunch of C++ standard library headers, we
generate relatively few of these implicit declarations now:

4/159 implicit default constructors created
18/236 implicit copy constructors created
70/241 implicit copy assignment operators created
0/173 implicit destructors created

And, on this translation unit, this optimization doesn't really
provide any benefit. I'll do some more performance measurements soon,
but this completes the implementation work for <rdar://problem/8151045>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
225843186e3972ce798d3de00f86da9008b15a0e 03-Jul-2010 Douglas Gregor <dgregor@apple.com> Lazily declare implicit copy constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
a376d10acfacf19d6dfa41069f7929739a18dd7a 02-Jul-2010 Douglas Gregor <dgregor@apple.com> Lazily declare copy-assignment operators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
4923aa25eb39d64106a5817c02d560a3aecf8b2c 02-Jul-2010 Douglas Gregor <dgregor@apple.com> Lazily declare the implicitly-declared destructor in a C++ class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
91468328268f8be076c399e8482ec3cf98fe90cc 02-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Handle CXXConstructorDecl, CXXDestructorDecl, and CXXConversionDecl for PCH.

<vector> header can be used correctly through PCH now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107483 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
37ffed3b7f229844cae2463ff82b527506c86c74 02-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fully read/write CXXRecordDecl for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
b8b03e6df1cc89e701a809c6a47c41f31b7a9e50 02-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add some side-effect free Create methods for TypeDecl subclasses and use them for PCH reading.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
eb8c670d2949eb62005eca36c64c9461f2a2173e 02-Jul-2010 Douglas Gregor <dgregor@apple.com> Provide exception specifications for implicitly-declared default constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
b87786f045d798b070980c108c922e1475d27b15 01-Jul-2010 Douglas Gregor <dgregor@apple.com> Provide an exception-specification for an implicitly-declared
copy-assignment operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
1d110e05e0ff48c1c7a483d6b7fd094cdf28316a 01-Jul-2010 Douglas Gregor <dgregor@apple.com> Remove unnecessary ASTContext parameter from
CXXRecordDecl::getDestructor(); no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
6764334dfa73d67cbbb1b1fc8fe00440aad00f2a 30-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support C++ friend declarations for PCH.

This commit 'introduces' a slightly different way to restore the state of the AST object.
It makes PCHDeclReader/PCHDeclWriter friends and gives them access to the private members of the object.
The rationale is to avoid using/modifying the AST interfaces for PCH read/write so that to:

-Avoid complications with objects that have side-effects during creation or when using some setters.
-Not 'pollute' the AST interface with methods only used by the PCH reader/writer
-Allow AST objects to be read-only.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107219 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
b01a552d7bafb889305affe83018563620aab326 20-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support PCH emitting/reading of using declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
6206d53f67613958ae1b023aba337ebb46f11a8b 05-Jun-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added AccessSpecDecl node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
9a55591af3e5506b95a9718e15380129fbfc5ebc 30-May-2010 Sean Hunt <rideau3@gmail.com> Convert DeclNodes to use TableGen.

The macros required for DeclNodes use have changed to match the use of
StmtNodes. The FooFirst enumerator constants have been named firstFoo
to match usage elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
e935fdb06d60398bef724fd50bba84c1b921b40e 26-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
a0af3b453160fc4c67363c204da13820b0586909 26-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added source order to CXXBaseOrMemberInitializer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
6ad9ac097918fbdeb443ea7b99d4db9e49b28534 07-May-2010 Chris Lattner <sabre@nondot.org> add PCH support for a bunch of C++ Decls, patch by
Andrew Sutton!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
fb8cc253420e93cee33d29df5a2bdae6aaf16e39 05-May-2010 Douglas Gregor <dgregor@apple.com> Reimplement code generation for copying fields in the
implicitly-generated copy constructor. Previously, Sema would perform
some checking and instantiation to determine which copy constructors,
etc., would be called, then CodeGen would attempt to figure out which
copy constructor to call... but would get it wrong, or poke at an
uninstantiated default argument, or fail in other ways.

The new scheme is similar to what we now do for the implicit
copy-assignment operator, where Sema performs all of the semantic
analysis and builds specific ASTs that look similar to the ASTs we'd
get from explicitly writing the copy constructor, so that CodeGen need
only do a direct translation.

However, it's not quite that simple because one cannot explicit write
elementwise copy-construction of an array. So, I've extended
CXXBaseOrMemberInitializer to contain a list of indexing variables
used to copy-construct the elements. For example, if we have:

struct A { A(const A&); };

struct B {
A array[2][3];
};

then we generate an implicit copy assignment operator for B that looks
something like this:

B::B(const B &other) : array[i0][i1](other.array[i0][i1]) { }

CodeGen will loop over the invented variables i0 and i1 to visit all
elements in the array, so that each element in the destination array
will be copy-constructed from the corresponding element in the source
array. Of course, if we're dealing with arrays of scalars or class
types with trivial copy-assignment operators, we just generate a
memcpy rather than a loop.

Fixes PR6928, PR5989, and PR6887. Boost.Regex now compiles and passes
all of its regression tests.

Conspicuously missing from this patch is handling for the exceptional
case, where we need to destruct those objects that we have
constructed. I'll address that case separately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
06a9f3680d22529a2fcf20c52d71cf221d99d910 01-May-2010 Douglas Gregor <dgregor@apple.com> Complete reimplementation of the synthesis for implicitly-defined copy
assignment operators.

Previously, Sema provided type-checking and template instantiation for
copy assignment operators, then CodeGen would synthesize the actual
body of the copy constructor. Unfortunately, the two were not in sync,
and CodeGen might pick a copy-assignment operator that is different
from what Sema chose, leading to strange failures, e.g., link-time
failures when CodeGen called a copy-assignment operator that was not
instantiation, run-time failures when copy-assignment operators were
overloaded for const/non-const references and the wrong one was
picked, and run-time failures when by-value copy-assignment operators
did not have their arguments properly copy-initialized.

This implementation synthesizes the implicitly-defined copy assignment
operator bodies in Sema, so that the resulting ASTs encode exactly
what CodeGen needs to do; there is no longer any special code in
CodeGen to synthesize copy-assignment operators. The synthesis of the
body is relatively simple, and we generate one of three different
kinds of copy statements for each base or member:

- For a class subobject, call the appropriate copy-assignment
operator, after overload resolution has determined what that is.
- For an array of scalar types or an array of class types that have
trivial copy assignment operators, construct a call to
__builtin_memcpy.
- For an array of class types with non-trivial copy assignment
operators, synthesize a (possibly nested!) for loop whose inner
statement calls the copy constructor.
- For a scalar type, use built-in assignment.

This patch fixes at least a few tests cases in Boost.Spirit that were
failing because CodeGen picked the wrong copy-assignment operator
(leading to link-time failures), and I suspect a number of undiagnosed
problems will also go away with this change.

Some of the diagnostics we had previously have gotten worse with this
change, since we're going through generic code for our
type-checking. I will improve this in a subsequent patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
10dc0f8c355c6a726f206aefcb249cb2fafbce17 21-Apr-2010 Anders Carlsson <andersca@mac.com> Remove an unused parameter from isImplicitlyDefined.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.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/include/clang/AST/DeclCXX.h
80638c5e6395344c1e6096542b0ff3b8bfb2139e 12-Apr-2010 Anders Carlsson <andersca@mac.com> Have the CXXBaseOrMemberInitializer keep track of whether an initializer initializes a virtual base or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
161755a09898c95d21bfff33707da9ca41cd53c5 06-Apr-2010 John McCall <rjmccall@apple.com> Implement the protected access restriction ([class.protected]), which requires
that protected members be used on objects of types which derive from the
naming class of the lookup. My first N attempts at this were poorly-founded,
largely because the standard is very badly worded here.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
db2eb5abf4c082d1f0c5c45e39d8cd0300f81e38 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Remove the AST statistics tracking I added yesterday; it didn't pan out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
32daa4223ccb2c0afe5fbe151c6eb1ab64816957 31-Mar-2010 John McCall <rjmccall@apple.com> Regularize support for naming conversion functions in using decls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
f540305c5d834ad9412b41805b81a74249b7c5af 30-Mar-2010 Douglas Gregor <dgregor@apple.com> Introduce new AST statistics that keep track of the number of isa (or
dyn_cast) invocations for C++ and Objective-C types, declarations,
expressions, and statements. The statistics will be printed when
-print-stats is provided to Clang -cc1, with results such as:

277073 clang - Number of checks for C++ declaration nodes
13311 clang - Number of checks for C++ expression nodes
18 clang - Number of checks for C++ statement nodes
174182 clang - Number of checks for C++ type nodes
92300 clang - Number of checks for Objective-C declaration nodes
9800 clang - Number of checks for Objective-C expression nodes
7 clang - Number of checks for Objective-C statement nodes
65733 clang - Number of checks for Objective-C type nodes

The statistics are only gathered when NDEBUG is not defined, since
they introduce potentially-expensive operations into very low-level
routines (isa).




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
2eef829b19bdc59976a827fa39b409440e352bff 24-Mar-2010 Douglas Gregor <dgregor@apple.com> When a declaration of a function is missing an exception specification
that was present in a prior declaration, emit a warning rather than a
hard error (which we did before, and still do with mismatched
exception specifications). Moreover, provide a fix-it hint with the
throw() clause that should be added, e.g.,

t.C:10:7: warning: 'operator new' is missing exception specification
'throw(std::bad_alloc)'
void *operator new(unsigned long sz)
^
throw(std::bad_alloc)

As part of this, disable the warning when we're missing an exception
specification on operator new, operator new[], operator delete, or
operator delete[] when exceptions are turned off (-fno-exceptions).

Fixes PR5957.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
7b2fc9d3c97f2526528a8b686af1589054025ca0 24-Mar-2010 Douglas Gregor <dgregor@apple.com> Implement computation of the final overriders for each virtual
function within a class hierarchy (C++ [class.virtual]p2).

We use the final-overrider computation to determine when a particular
class is ill-formed because it has multiple final overriders for a
given virtual function (e.g., because two virtual functions override
the same virtual function in the same virtual base class). Fixes
PR5973.

We also use the final-overrider computation to determine which virtual
member functions are pure when determining whether a class is
abstract or diagnosing the improper use of an abstract class. The
prior approach to determining whether there were any pure virtual
functions in a class didn't cope with virtual base class subobjects
properly, and could not easily be fixed to deal with the oddities of
subobject hiding. Fixes PR6631.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
b05b5f35f114505182b076aa70002843c0669beb 15-Mar-2010 John McCall <rjmccall@apple.com> Remember access paths for visible conversion decls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98539 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
d60e22e601852ae1345f01514318a0951dc09f89 12-Mar-2010 John McCall <rjmccall@apple.com> Implement basic support for friend types and functions in non-dependent
contexts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
92b7f70c924cbf4514e9e434cea7def51ab49860 11-Mar-2010 John McCall <rjmccall@apple.com> Split C++ friend declarations into their own header/implementation file.
I'm expecting this portion of the AST to grow and change, and I'd like to
be able to do that with minimal recompilation. If this proves unnecessary
when access control is fully-implemented, I'll fold the classes back into
DeclCXX.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
4e6ba4be8ddeca2978da6b9bae02cbe9594f2ef4 03-Mar-2010 Douglas Gregor <dgregor@apple.com> Implement name hiding for names found through virtual base subobjects
that are hidden by other derived base subobjects reached along a
lookup path that does *not* pass through the hiding subobject (C++
[class.member.lookup]p6). Fixes PR6462.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
c0bf462cf35fe050bddbd8bff967298e4a67e79d 23-Feb-2010 John McCall <rjmccall@apple.com> Perform two more constructor/destructor code-size optimizations:

1) emit base destructors as aliases to their unique base class destructors
under some careful conditions. This is enabled for the same targets that can
support complete-to-base aliases, i.e. not darwin.

2) Emit non-variadic complete constructors for classes with no virtual bases
as calls to the base constructor. This is enabled on all targets and in
theory can trigger in situations that the alias optimization can't (mostly
involving virtual bases, mostly not yet supported).

These are bundled together because I didn't think it worthwhile to split them,
not because they really need to be.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
3dbd3d5c04cd5abd7dfd83b15f51d7c610a3c512 16-Feb-2010 John McCall <rjmccall@apple.com> Support local namespace aliases and permit them to be instantiated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
2d5b70386d6f5553b667b6e407ca781b4ca2009e 11-Feb-2010 Douglas Gregor <dgregor@apple.com> Remove another redundant ASTContext parameter

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
952b017601f9c82b51119c3a1600f1312a833db9 11-Feb-2010 Douglas Gregor <dgregor@apple.com> Eliminate the ASTContext parameter from RecordDecl::getDefinition()
and CXXRecordDecl::getDefinition(); it's totally unnecessary. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
96a01b4acf76fb8fe1e05341a97a27b39fb0b914 11-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement basic AST merging for classes, structs, and unions in C.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
86ff308724171494395a840fd2efbe25e62f352e 04-Feb-2010 John McCall <rjmccall@apple.com> Extract a common structure for holding information about the definition
of a C++ record. Exposed a lot of problems where various routines were
silently doing The Wrong Thing (or The Acceptable Thing in The Wrong Order)
when presented with a non-definition. Also cuts down on memory usage.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
9db7dbb918ca49f4ee6c181e4917e7b6ec547353 31-Jan-2010 Douglas Gregor <dgregor@apple.com> Rework base and member initialization in constructors, with several
(necessarily simultaneous) changes:

- CXXBaseOrMemberInitializer now contains only a single initializer
rather than a set of initialiation arguments + a constructor. The
single initializer covers all aspects of initialization, including
constructor calls as necessary but also cleanup of temporaries
created by the initializer (which we never handled
before!).

- Rework + simplify code generation for CXXBaseOrMemberInitializers,
since we can now just emit the initializer as an initializer.

- Switched base and member initialization over to the new
initialization code (InitializationSequence), so that it

- Improved diagnostics for the new initialization code when
initializing bases and members, to match the diagnostics produced
by the previous (special-purpose) code.

- Simplify the representation of type-checked constructor initializers in
templates; instead of keeping the fully-type-checked AST, which is
rather hard to undo at template instantiation time, throw away the
type-checked AST and store the raw expressions in the AST. This
simplifies instantiation, but loses a little but of information in
the AST.

- When type-checking implicit base or member initializers within a
dependent context, don't add the generated initializers into the
AST, because they'll look like they were explicit.

- Record in CXXConstructExpr when the constructor call is to
initialize a base class, so that CodeGen does not have to infer it
from context. This ensures that we call the right kind of
constructor.

There are also a few "opportunity" fixes here that were needed to not
regress, for example:

- Diagnose default-initialization of a const-qualified class that
does not have a user-declared default constructor. We had this
diagnostic specifically for bases and members, but missed it for
variables. That's fixed now.

- When defining the implicit constructors, destructor, and
copy-assignment operator, set the CurContext to that constructor
when we're defining the body.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
80cd64a8450d8e2c079dc134d9711cd45ba89d63 29-Jan-2010 John McCall <rjmccall@apple.com> Do a little magic and a little greasework to make it much more efficient
to cast a DeclContext down to a specific implementation class.

There are still lots of calls to Decl::castFromDeclContext left, mostly
arising from DeclContext::getParent().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
3a18917b5260d67426f55792118262aa6ad42c06 27-Jan-2010 Anders Carlsson <andersca@mac.com> It's not Explicit anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
7a6e13aa2e3874fecf45043ed1a26900b8c13b98 24-Jan-2010 Anders Carlsson <andersca@mac.com> Fix a pretty bad bug where if a constructor (or conversion function) was marked as 'explicit', but then defined out-of-line, we would not treat it as being explicit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
92f883177b162928a8e632e4e3b93fafd2b26072 23-Jan-2010 John McCall <rjmccall@apple.com> Implement elementary access control.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
eec51cf1ba5f0e62c9cdb81b5c63babdd6e649ab 20-Jan-2010 John McCall <rjmccall@apple.com> Give UnresolvedSet the ability to store access specifiers for each declaration.
Change LookupResult to use UnresolvedSet. Also extract UnresolvedSet into its
own header and make it templated over an inline capacity.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
9edad9b6184c730a73dc9241c043ea3bae54189f 14-Jan-2010 Douglas Gregor <dgregor@apple.com> When qualified lookup into the current instantiation fails (because it
finds nothing), and the current instantiation has dependent base
classes, treat the qualified lookup as if it referred to an unknown
specialization. Fixes PR6031.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
7557a1348d2821dce126a778aa7acd7a00b814fd 24-Dec-2009 Douglas Gregor <dgregor@apple.com> Egregious, disgusting workaround for PR5866. We need to rework how we
keep track of friends within templates, which will provide a real for
PR5866. For now, this makes sure we don't do something entirely stupid
with friends of specializations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
9e9199d8649cf3e10c98a69403f05dbb666d8fb1 22-Dec-2009 Douglas Gregor <dgregor@apple.com> Eliminate the ASTContext argument to CXXConstructorDecl::isCopyConstructor, since the context is available in the Decl

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
20093b4bf698f292c664676987541d5103b65b15 10-Dec-2009 Douglas Gregor <dgregor@apple.com> Reimplement reference initialization (C++ [dcl.init.ref]) using the
new notion of an "initialization sequence", which encapsulates the
computation of the initialization sequence along with diagnostic
information and the capability to turn the computed sequence into an
expression. At present, I've only switched one CheckReferenceInit
callers over to this new mechanism; more will follow.

Aside from (hopefully) being much more true to the standard, the
diagnostics provided by this reference-initialization code are a bit
better than before. Some examples:

p5-var.cpp:54:12: error: non-const lvalue reference to type 'struct
Derived'
cannot bind to a value of unrelated type 'struct Base'
Derived &dr2 = b; // expected-error{{non-const lvalue reference to
...
^ ~
p5-var.cpp:55:9: error: binding of reference to type 'struct Base' to
a value of
type 'struct Base const' drops qualifiers
Base &br3 = bc; // expected-error{{drops qualifiers}}
^ ~~

p5-var.cpp:57:15: error: ambiguous conversion from derived class
'struct Diamond' to base class 'struct Base':
struct Diamond -> struct Derived -> struct Base
struct Diamond -> struct Derived2 -> struct Base
Base &br5 = diamond; // expected-error{{ambiguous conversion from
...
^~~~~~~
p5-var.cpp:59:9: error: non-const lvalue reference to type 'long'
cannot bind to
a value of unrelated type 'int'
long &lr = i; // expected-error{{non-const lvalue reference to type
...
^ ~

p5-var.cpp:74:9: error: non-const lvalue reference to type 'struct
Base' cannot
bind to a temporary of type 'struct Base'
Base &br1 = Base(); // expected-error{{non-const lvalue reference to
...
^ ~~~~~~

p5-var.cpp:102:9: error: non-const reference cannot bind to bit-field
'i'
int & ir1 = (ib.i); // expected-error{{non-const reference cannot
...
^ ~~~~~~
p5-var.cpp:98:7: note: bit-field is declared here
int i : 17; // expected-note{{bit-field is declared here}}
^






git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
e8174bc483615e79614d9284a50ac94831e8b7c6 08-Dec-2009 John McCall <rjmccall@apple.com> Add CXXRecordDecl::forallBases to walk an inheritance hierarchy with non-lookup
semantics and CXXRecordDecl::isProvablyNotDerivedFrom to assist with
pre-instantiation diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
b13e357dac872bc7d507a770c4fb0f7b47ff0ac9 07-Dec-2009 Anders Carlsson <andersca@mac.com> getTemplateSpecializationKind should be const.

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

For posterity, I did:

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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
d7d7f67c1dd8626520bb243d3928f59d32424534 06-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Move helper onto CXXMethodDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
e7184df728bb339633d88c774b5097dd9318cc8a 03-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> A new helper function to set various bits in the class when
a new virtual function is declared/instantiated. it is used
in couple of places.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
802ab45fea51beff12f386329d4928811a479c6e 02-Dec-2009 Douglas Gregor <dgregor@apple.com> Improve source location information for C++ member initializers in a
constructor, by keeping the DeclaratorInfo* rather than just the type
and a single location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
5ec02ae147760c32ad5b6fb0fec30ab3b3696778 02-Dec-2009 Anders Carlsson <andersca@mac.com> In Sema, whenever we think that a function is going to cause a vtable to be generated, we mark any virtual implicit member functions as referenced.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
51fa86f738a9768fac4e1cad7bdde53774b5b322 02-Dec-2009 John McCall <rjmccall@apple.com> r90313, in which OverloadedFunctionDecl is removed and never spoken of again.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
eb0d8c95b43549ebf1acbb78d597901ace6dc8b7 23-Nov-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Let using directives refer to namespace aliases. Fixes PR5479.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
d5532b6cfff2977e0c59fa6ead7f7973984a620d 23-Nov-2009 John McCall <rjmccall@apple.com> Encapsulate "an array of TemplateArgumentLocs and two angle bracket locations" into
a new class. Use it pervasively throughout Sema.

My fingers hurt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.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/include/clang/AST/DeclCXX.h
7ba107a1863ddfa1664555854f0d7bdb3c491c92 18-Nov-2009 John McCall <rjmccall@apple.com> Incremental progress on using declarations. Split UnresolvedUsingDecl into
two classes, one for typenames and one for values; this seems to have some
support from Doug if not necessarily from the extremely-vague-on-this-point
standard. Track the location of the 'typename' keyword in a using-typename
decl. Make a new lookup result for unresolved values and deal with it in
most places.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
9488ea120e093068021f944176c3d610dd540914 17-Nov-2009 John McCall <rjmccall@apple.com> Instead of hanging a using declaration's target decls directly off the using
decl, create shadow declarations and put them in scope like normal.
Work in progress.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
9f853df0d3c25c646907a7b7ef22398370def00f 17-Nov-2009 Anders Carlsson <andersca@mac.com> Unify the way destructor epilogues are generated for synthesized and regular destructors. Also fix PR5529.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
6d7013940a37f03fd324ef438ff984a5369013b0 15-Nov-2009 Anders Carlsson <andersca@mac.com> Make sure that virtual destructors have delete operators.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88877 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
66724ea67d7d598b937d86fa66f03f09a1c758f3 14-Nov-2009 Douglas Gregor <dgregor@apple.com> If we attempt to add a constructor template specialization that looks
like a copy constructor to the overload set, just ignore it. This
ensures that we don't try to use such a constructor as a copy
constructor *without* triggering diagnostics at the point of
declaration.

Note that we *do* diagnose such copy constructors when explicitly
written by the user (e.g., as an explicit specialization).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
af8e6ed61b5e80ab95632b63f583af79dcb62590 12-Nov-2009 John McCall <rjmccall@apple.com> Random const correctness, and incidentally use computeDeclContext when building
a using declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86942 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
b3ae4fcd4314a9c1c46d41b200883599c32025b4 12-Oct-2009 Douglas Gregor <dgregor@apple.com> Diagnose the declaration of explicit specializations after an implicit
instantiation has already been required. To do so, keep track of the
point of instantiation for anything that can be instantiated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
f4e462c2c2f4cb76c5a75d952adeb4355f32f6a7 12-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Use CanQualType (instead of QualType) to store collection of visible
canonical conversion types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
f6b1185f0a8a209c06dfc1efdb6a59cc851e970c 08-Oct-2009 Douglas Gregor <dgregor@apple.com> Improve checking for specializations of member classes of class
templates, and keep track of how those member classes were
instantiated or specialized.

Make sure that we don't try to instantiate an explicitly-specialized
member class of a class template, when that explicit specialization
was a declaration rather than a definition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
0351a1e2e17c1edf27f90c23fbf65d8fcad995c4 07-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes problem in finding visible convertion functions of a class
where matching conversion types in base classes were still visible.
Plus refactoring and cleanup.
Added a test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
a8f32e0965ee19ecc53cd796e34268377a20357c 06-Oct-2009 Douglas Gregor <dgregor@apple.com> Refactor the code that walks a C++ inheritance hierarchy, searching
for bases, members, overridden virtual methods, etc. The operations
isDerivedFrom and lookupInBases are now provided by CXXRecordDecl,
rather than by Sema, so that CodeGen and other clients can use them
directly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
9091656e423f2354e53b2b3baa95b3eb5510badc 29-Sep-2009 Douglas Gregor <dgregor@apple.com> Handle C++ delete expressions when the overloaded delete operator is a
"usual deallocation function" with two arguments. CodeGen will have to
handle this case specifically, since the value for the second argument
(the size of the allocated object) may have to be computed at run
time.

Fixes the Sema part of PR4782.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83080 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
740256bafbba6c5b5cb95a5c5bd7db161f3b2833 29-Sep-2009 Mike Stump <mrs@apple.com> Fix http://llvm.org/PR5090.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83035 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
3f066522342538509cf0aa4f381503b43fbdb68b 22-Sep-2009 Anders Carlsson <andersca@mac.com> Store the set of indirect primary bases directly in the record layout builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82513 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
183700f494ec9b6701b6efe82bcb25f4c79ba561 22-Sep-2009 John McCall <rjmccall@apple.com> Change all the Type::getAsFoo() methods to specializations of Type::getAs().
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.

The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
8195bc932d27e21be46b9a1f8ce268ebd419246b 13-Sep-2009 Anders Carlsson <andersca@mac.com> CXXMethodDecl::isVirtual needs to check the canonical declaration. Fixes PR4878.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
debc629300e4c6c774b7d2a1d3c665c2c719e803 12-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Removed Context argument from couple of methods which don't
need them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
6250921cc5bd3493a0d99fa2c32ec9716767a965 12-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> More work toward having an access method for visible
conversion functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
5346278f81930e7fd0545bbbb2fc217c6921b109 11-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to build visible conversion function list lazily and make its
first use in calling the conversion function on delete statements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
9f185076dc8b79c8240b20a8746da96beb3f147b 11-Sep-2009 Douglas Gregor <dgregor@apple.com> Tweak the semantics of FunctionDecl::isOutOfLine to consider an
instantiation of a member function template or member function of a
class template to be out-of-line if the definition of that function
template or member function was defined out-of-line. This ensures that
we get the correct linkage for explicit instantiations of out-of-line
definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
1eb4433ac451dc16f4133a88af2d002ac26c58ef 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
34374e6ce5710a91c478f69379220ff20c3e7f15 04-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to instantiate destructors used to destruct
base and data members when they are needed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
80545ad0f9b8e52177a8c37bd140bae0ffbd0cc6 03-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Issue diagnostics in variety of situations involving
reference/const data members when user has declared
the constructor. This necessitated some non-minor
refactoring.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
72f6d678c8de9f3a770e8ae5fc4979abf3940668 01-Sep-2009 Douglas Gregor <dgregor@apple.com> In CXXBaseOrMemberInitializer, don't confuse CtorTocall with
AnonUnionMember. Fixes PR4826.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
52a575a5ce7b27b6612357cdba5aa4ec1574ad5e 29-Aug-2009 John McCall <rjmccall@apple.com> Fix the breakage by handling indirect instantiations. This would be much
improved if there were a consistent name for getInstantiatedFromMemberX()
across all classes. Cheap refactor if someone wants to do it, but let's get the
buildbots happy first.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80425 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
8c57a66a2aa59939a902ffa8c4ad0ddd5b949a21 29-Aug-2009 Anders Carlsson <andersca@mac.com> Store the SourceLocation of right parentheses in member initializers. Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80416 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
faccd72e2448b552f17992eaba6cfe12ec497e58 28-Aug-2009 Anders Carlsson <andersca@mac.com> Fix this for real.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
0dde18e5a713bc186062ca1ebc9967500b07faee 28-Aug-2009 Anders Carlsson <andersca@mac.com> Instantiate unresolved using declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
02cace78cf48cc26686bd5b07c78606abca13bcd 28-Aug-2009 John McCall <rjmccall@apple.com> Omnibus friend decl refactoring. Instead of cloning AST classes for friend
declarations of same, introduce a single AST class and add appropriate bits
(encoded in the namespace) for whether a decl is "real" or not. Much hackery
about previously-declared / not-previously-declared, but it's essentially
mandated by the standard that friends alter lookup, and this is at least
fairly non-intrusive.

Refactor the Sema methods specific to friends for cleaner flow and less nesting.

Incidentally solve a few bugs, but I remain confident that we can put them back.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
665b49c62d637d16826036118f92d35f116f3ef3 28-Aug-2009 Anders Carlsson <andersca@mac.com> Check in UnresolvedUsingDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
8a5ae2401645788144c0ae769a2fb899866801f5 28-Aug-2009 Douglas Gregor <dgregor@apple.com> When looking for overloaded member operators, make sure to instantiate
class template specializations (when possible) and look into base
classes. Thanks to Eli for the test case!

FIXME -=1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80302 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
bb60a509f47a95a4ed9366ec1fc65850da654d38 27-Aug-2009 Anders Carlsson <andersca@mac.com> In ActOnCXXTypeConstructExpr, check that the type is complete and non-abstract before creating any expressions. This assures that any templates are instantiated if necessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
5842ba9fd482bb2fe5198b32c2ae549cd5474e6d 24-Aug-2009 Douglas Gregor <dgregor@apple.com> Try to complete a type before looking for conversion functions within
that type. Note that we do not produce a diagnostic if the type is
incomplete; rather, we just don't look for conversion functions. Fixes PR4660.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
65ec1fda479688d143fe2403242cd9c730c800a1 22-Aug-2009 Douglas Gregor <dgregor@apple.com> Implement conversion function templates, along with the ability to use
template argument deduction from a conversion function (C++
[temp.deduct.conv]) with implicit conversions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
dec06664a1c4d8984251083db2215875aea1c80d 21-Aug-2009 Douglas Gregor <dgregor@apple.com> Introduce support for constructor templates, which can now be declared
and will participate in overload resolution. Unify the instantiation
of CXXMethodDecls and CXXConstructorDecls, which had already gotten
out-of-sync.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79658 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
f18970d1dd3a88b7a50e9abd4fd4ceef675a8a2e 20-Aug-2009 John McCall <rjmccall@apple.com> Add syntax examples for the friend declaration types.

Remove an assert trivialized by dominating code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
a1d5662d96465f0fddf8819d245da4d19b892eff 19-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema interfaces.

DeclaratorDecl contains a DeclaratorInfo* to keep type source info.
Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl.
EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo.

Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
1d954f6a0057cb55a3a5d483904a3c57d03c996f 15-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Implement __is_empty. Patch by Sean Hunt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
0270b8aa3f9b50ec3acd1abfd2b97377a3e1bb05 13-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> More toward synthesizing copy assignments. SWIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
c48fbdfb83a5e50fed693f0bdda3396e5b67051d 11-Aug-2009 John McCall <rjmccall@apple.com> Add a FriendClassDecl type for holding declarations of friend types in
the AST, and create such declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
e64941280877d065a27e8cefd2a9038256d0e3ac 11-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen support for anonymous union data member
copying in copy constructors and used in
default constructor's initializer list.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
3f9a8a60614b763785d54ad08821745d03a4af70 11-Aug-2009 John McCall <rjmccall@apple.com> Argument-dependent lookup for friend declarations. Add a new decl type,
FriendFunctionDecl, and create instances as appropriate.

The design of FriendFunctionDecl is still somewhat up in the air; you can
befriend arbitrary types of functions --- methods, constructors, etc. ---
and it's not clear that this representation captures that very well.
We'll have a better picture when we start consuming this data in access
control.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
b98f05c7389a5426c54f0e864043bb34862fa4e7 10-Aug-2009 Mike Stump <mrs@apple.com> Add walking bases in reverse order.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
89ed850a1b586a4ed303ee8a8140bed11b85b390 07-Aug-2009 Mike Stump <mrs@apple.com> Add rbegin and rend for virtual bases, might come in handy some day.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
6f376336138ea719e3c4757ae046a5768043b276 06-Aug-2009 Mike Stump <mrs@apple.com> Calculate the primary base class better and use that when laying down
the vtable. Still a work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
82b56961dcb813674dbda3c5f5aaee703d55741c 31-Jul-2009 Mike Stump <mrs@apple.com> And now we can generate a simple vtable. Still a work in progress...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
426cc3828ce07a2cff15c9837f5958e6fc4b7739 30-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for future ir-gen for destructor calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
8e9e9ef5348bce1a8f0741a5684fac3de9701c28 30-Jul-2009 Douglas Gregor <dgregor@apple.com> Make tag declarations redeclarable. This change has three purposes:

1) Allow the Index library (and any other interested client) to walk
the set of declarations for a given tag (enum, union, class,
whatever). At the moment, this information is not readily available.

2) Reduce our dependence on TagDecl::TypeForDecl being mapped down
to a TagType (for which getDecl() will return the tag definition, if
one exists). This property won't exist for class template partial
specializations.

3) Make the canonical declaration of a TagDecl actually canonical,
e.g., so that it does not change when the tag is defined.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
50b8eea3f36881a988a5757e0f6e15d45900324b 24-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> More work toward initialization of objects
in constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
87595e46ccd61c9b7c08074c2c64b66b5c0fc694 24-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose when base classes and members to be intialized
with constructors don't have a matching constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76913 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
d7b27e1c17d40c72a1ccf8868315bf0c5271aa54 23-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Add constructor used to initialize base/member in
CXXBaseOrMemberInitializer AST node. Needed by
its clients to do the initialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
1f2023ab8b35e0f665eb6c0f11dd6d9b9bca12b8 22-Jul-2009 Douglas Gregor <dgregor@apple.com> "This patch implements the restrictions on union members detailed in
[class.union]p1", from John McCall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
cf1831204b2b575fc57b851172f0426559ae482c 22-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Minor mod. per Doug's comment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
393612e6c7727f1fee50039254d9f434364cc0b2 22-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to accomodate Doug's comment on default
destruction of base/members for each destructor AST.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
741dd9a7e1d63e4e385b657e4ce11c5d96d44f72 21-Jul-2009 Douglas Gregor <dgregor@apple.com> Add the location of the tag keyword into TagDecl. From Enea
Zaffanella, with tweaks from Abramo Bagnara.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
a8ded8be82f7d5f5fc93c8626cfa9ca9cee4199e 16-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a stinko which caused an ast-print test failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
560de45ccbf21c5e4dbeef3fc49f932e499cc181 16-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Added ASTs to destructor decl AST for default destruction of object's
base/members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
40c072f44ff081293f79909ecc518af23938108e 10-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to build list of inherited virtual base classes
in their order of construction for each class and use it
to to check on propery order of base class construction
under -Wreorder option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
daa439a6c47d3299157b94a496bf22389bbc77a3 08-Jul-2009 Douglas Gregor <dgregor@apple.com> Fix a corner case with argument-dependent lookup and overloaded function sets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
0d3c26c76997688eaf7e51764a66815652e09642 07-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> A few change per Doug's feedback.
- Fariborz



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74909 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
5ffcd7b1ba8bfcb253f0a0bdf7c94c4d0270a4ab 02-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to allocate list of bases in CXXRecordDecl
using ASTContxt allocation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
73b85f3d7ccdff37bab7adafc6b06dfd03740058 02-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Use Destroy for member initializer list clean up.
Per Doug's comments. Doug please review.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
d45c36308e563e1fac1cd124d606f403f9a39a29 01-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Updated CXXConstructorDecl AST node for ctor-initilaizer list.
No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
16dbdce02366c372fe934c0528148fc38906f21a 30-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Take care of Chris's comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
47deacfa43625c6cc1b2008a0396ccb3af725fde 30-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> A more detailed diagnosis of ill-formed ctor-initializer
list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
7881a0565893f1da6faafbd86377f5b50e4376a5 30-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose multiple initialzation of data-member/base
in the ctor-initializer list. More to come.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
364e021e8cbbeebd4d2544053268a008cf9ee5a9 27-Jun-2009 Douglas Gregor <dgregor@apple.com> Improve support for overloaded operator templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
58badb7a655d021fc67bb7ed0af95d6ea0c63eb1 26-Jun-2009 Anders Carlsson <andersca@mac.com> See through UsingDecls in more places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
e53060fa78ad7e98352049f72787bdb7543e2a48 26-Jun-2009 Douglas Gregor <dgregor@apple.com> Improved semantic analysis and AST respresentation for function
templates.

For example, this now type-checks (but does not instantiate the body
of deref<int>):

template<typename T> T& deref(T* t) { return *t; }

void test(int *ip) {
int &ir = deref(ip);
}

Specific changes/additions:
* Template argument deduction from a call to a function template.
* Instantiation of a function template specializations (just the
declarations) from the template arguments deduced from a call.
* FunctionTemplateDecls are stored directly in declaration contexts
and found via name lookup (all forms), rather than finding the
FunctionDecl and then realizing it is a template. This is
responsible for most of the churn, since some of the core
declaration matching and lookup code assumes that all functions are
FunctionDecls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
e41590d2504d73453d58f22e9176088990555cc1 24-Jun-2009 Anders Carlsson <andersca@mac.com> [class.local] p1 and p3. Also, add back the xcodeproj file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
485f087407849a8989053122f52b8c07d1191b45 23-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> patch to mark use of implicit copy constructors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
b7f4cc09ead099c1306d06db53e258d648d0f652 22-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Remove ImplicitMustBeDefined, use universal 'Used' flag
instead. Do the implicit default ctor checking in MarkDeclarationReferenced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
9cfbe48a7a20a217fdb2920b29b67ae7941cb116 20-Jun-2009 Douglas Gregor <dgregor@apple.com> Parsing and AST support for using declarations, from John Thompson!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73812 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
f8dcb866d344aa9355595e14c429852830b63095 19-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for implementation of C++'s object model. This is
work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
f5cecfbdcd20be224861f9e67c5973a9a2b61512 18-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move CXXMethodDecl::OutOfLineDefinition into Decl::OutOfLine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
54481f194b6ac5c49f9220ca8d4f9f38d4d53c86 17-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Added missing @endcode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
c8ab2563ac8f7dcc4fdc518b5cc7015ecbb2f003 31-May-2009 Douglas Gregor <dgregor@apple.com> Initial infrastructure for class template partial specialization. Here
we have the basics of declaring and storing class template partial
specializations, matching class template partial specializations at
instantiation time via (limited) template argument deduction, and
using the class template partial specialization's pattern for
instantiation.

This patch is enough to make a simple is_pointer type trait work, but
not much else.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72662 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
1c02101999a576790b433ac4b5195e7ac4197347 30-May-2009 Anders Carlsson <andersca@mac.com> Get rid of CXXTempVarDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
6c9c94053132e5ca0655124b70f1c386a332e71d 30-May-2009 Douglas Gregor <dgregor@apple.com> Pretty printing and improved representation for namespace alias declarations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
8419fa3af97208eb00f0cd6c62354ce4ff986677 30-May-2009 Douglas Gregor <dgregor@apple.com> Printing for using directives, e.g.,

using namespace std::debug;

Extended UsingDirectiveDecl to store the nested-name-specifier that
precedes the nominated namespace.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
7267c1693abe7875b0c57268be05005ae013c6c9 29-May-2009 Anders Carlsson <andersca@mac.com> Add code for emitting C++ destructors. Not used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
05eb24474218d70366b4d7d6b5b19dda2473a163 17-May-2009 Anders Carlsson <andersca@mac.com> Add setters/getters to CXXMethodDecl so it can keep track of which virtual member functions it overrides (if any)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
aafc0ccfcf860d921a86423c6c9a738301987abf 15-May-2009 Douglas Gregor <dgregor@apple.com> Make sure that the type associated with a class template is dependent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
77b7f1d4fb782c9152f91b76f9f8b1d1af21bd35 15-May-2009 Anders Carlsson <andersca@mac.com> Check that the function being overridden is virtual.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
1eee0e753fb390b04848846e837714ec774b7bfd 14-May-2009 Douglas Gregor <dgregor@apple.com> Link FunctionDecls instantiated from the member functions of a class
template to the FunctionDecls from which they were instantiated. This
is a necessary first step to support instantiation of the definitions
of such functions, but by itself does essentially nothing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
42af25f865a82022a04bedeb483ac251c4412e29 11-May-2009 Douglas Gregor <dgregor@apple.com> Implement the notions of the "current instantiation" and "unknown
specialization" within a C++ template, and permit name lookup into the
current instantiation. For example, given:

template<typename T, typename U>
struct X {
typedef T type;

X* x1; // current instantiation
X<T, U> *x2; // current instantiation
X<U, T> *x3; // not current instantiation
::X<type, U> *x4; // current instantiation
X<typename X<type, U>::type, U>: *x5; // current instantiation
};



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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
19d28a650ca6d98f7907ad891557fccca7baaea8 21-Apr-2009 Anders Carlsson <andersca@mac.com> Add a CXXDestroyExpr. Add classof member functions to CXXTempVarDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69654 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
86fa7502706b993ebbe5b5be147604c3bed0fcad 21-Apr-2009 Anders Carlsson <andersca@mac.com> Add the beginnings of a CXXTempVarDecl class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
7297134f128423fce2e88f92421ed135bded7d4e 18-Apr-2009 Douglas Gregor <dgregor@apple.com> FunctionDecl::getBody() is getting an ASTContext argument for use in
lazy PCH deserialization. Propagate that argument wherever it needs to
be. No functionality change, except that I've tightened up a few PCH
tests in preparation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
072abefcddea5fb65e435cea60921b3c21c1279d 17-Apr-2009 Anders Carlsson <andersca@mac.com> Add support for the __has_trivial_destructor type trait.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
347ba89dec89091868982434154c3508085b727a 16-Apr-2009 Anders Carlsson <andersca@mac.com> Add support for the __has_trivial_constructor type trait.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69245 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
63840b5fc57b426e156d36e5109b7d418b711f7d 31-Mar-2009 Anders Carlsson <andersca@mac.com> Document NamespaceAliasDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
005f92f53c99ce8e701e44115c94216b108ea021 29-Mar-2009 Chris Lattner <sabre@nondot.org> switch TemplateOrInstantiation to be a PointerUnion, which
simplifies some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
af9e40f9909d89501617897c7295dff68c3907a3 29-Mar-2009 Anders Carlsson <andersca@mac.com> Handle the case where the namespace decl is an alias.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
68771c73f4293620dc1a99154ec02111e6490e28 28-Mar-2009 Anders Carlsson <andersca@mac.com> Create AST nodes for namespace aliases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
05bf2c79770927c66ca725e9bb589048ed3f069e 27-Mar-2009 Anders Carlsson <andersca@mac.com> Add

const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
AccessSpecifier AS);

so we can easily add access specifiers to diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
d475b8d9e6f5ff0e6ab8d15667ce8a64c7cb9a4d 25-Mar-2009 Douglas Gregor <dgregor@apple.com> Instantiation for member classes of class templates. Note that only
the declarations of member classes are instantiated when the owning
class template is instantiated. The definitions of such member classes
are instantiated when a complete type is required.

This change also introduces the injected-class-name into a class
template specialization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67707 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
67e4dd2e9936d828d68b20e01922b6442c6ce31b 22-Mar-2009 Anders Carlsson <andersca@mac.com> Keep track of whether a class is abstract or not. This is currently only used for the __is_abstract type trait.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67461 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
94b15fbc3a10cdfb1639528a8a773b66a1e7cd9e 15-Mar-2009 Anders Carlsson <andersca@mac.com> Handle static_asserts when instantiating structs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
fb311762bb52dc015c02cb257d2913f104b556f8 14-Mar-2009 Anders Carlsson <andersca@mac.com> More static_assert work. Check that the assert expr is valid and show an error if it's false. Create the declaration and add it to the current context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
ff7fea809bab2badd0cb241703b14ac20ac258cb 11-Mar-2009 Douglas Gregor <dgregor@apple.com> Eliminate CXXClassMemberWrapper

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
2d2e9cfdc1dbb6e4a22f8c0b1abcd30437e3795d 11-Mar-2009 Douglas Gregor <dgregor@apple.com> Eliminate CXXClassVarDecl. It doesn't add anything

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
72564e73277e29f6db3305d1f27ba408abb7ed88 27-Feb-2009 Douglas Gregor <dgregor@apple.com> Create a new TypeNodes.def file that enumerates all of the types,
giving them rough classifications (normal types, never-canonical
types, always-dependent types, abstract type representations) and
making it far easier to make sure that we've hit all of the cases when
decoding types.

Switched some switch() statements on the type class over to using this
mechanism, and filtering out those things we don't care about. For
example, CodeGen should never see always-dependent or non-canonical
types, while debug info generation should never see always-dependent
types. More switch() statements on the type class need to be moved
over to using this approach, so that we'll get warnings when we add a
new type then fail to account for it somewhere in the compiler.

As part of this, some types have been renamed:

TypeOfExpr -> TypeOfExprType
FunctionTypeProto -> FunctionProtoType
FunctionTypeNoProto -> FunctionNoProtoType

There shouldn't be any functionality change...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
3e00bad490f1bae8a2c60f934e7eb5dbb9752c5d 17-Feb-2009 Douglas Gregor <dgregor@apple.com> Added ClassTemplateSpecializationDecl, which is a subclass of
CXXRecordDecl that is used to represent class template
specializations. These are canonical declarations that can refer to
either an actual class template specialization in the code, e.g.,

template<> class vector<bool> { };

or to a template instantiation. However, neither of these features is
actually implemented yet, so really we're just using (and uniqing) the
declarations to make sure that, e.g., A<int> is a different type from
A<float>. Note that we carefully distinguish between what the user
wrote in the source code (e.g., "A<FLOAT>") and the semantic entity it
represents (e.g., "A<float, int>"); the former is in the sugared Type,
the latter is an actual Decl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
005f6b222dfddc12ada571e479ff2d7a58114d07 16-Feb-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> castToDeclContext/castFromDeclContext are only required to be included in the class of decls that directly derive from DeclContext.
Their subclasses don't need them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
aaba5e346dffdbad5d1c42765a89e4a7afb0da67 04-Feb-2009 Douglas Gregor <dgregor@apple.com> Basic representation of C++ class templates, from Andrew Sutton.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
2a3009a432bdcec59e6383d7b2b17494d6f91649 03-Feb-2009 Douglas Gregor <dgregor@apple.com> Semantic analysis, ASTs, and unqualified name lookup support for C++
using directives, from Piotr Rak!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63646 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
4afa39deaa245592977136d367251ee2c173dd8d 20-Jan-2009 Douglas Gregor <dgregor@apple.com> Remove ScopedDecl, collapsing all of its functionality into Decl, so
that every declaration lives inside a DeclContext.

Moved several things that don't have names but were ScopedDecls (and,
therefore, NamedDecls) to inherit from Decl rather than NamedDecl,
including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't
store empty DeclarationNames for these things, nor do we try to insert
them into DeclContext's lookup structure.

The serialization tests are temporarily disabled. We'll re-enable them
once we've sorted out the remaining ownership/serialiazation issues
between DeclContexts and TranslationUnion, DeclGroups, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
d2685209293a54fc2d888353c1fb839dcde616ef 10-Jan-2009 Zhongxing Xu <xuzhongxing@gmail.com> add a bunch of castToDeclContext/castFromDeclContext methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
6b3945f4bc757bdadd3e443180cf32c2cccb52a0 07-Jan-2009 Douglas Gregor <dgregor@apple.com> Finished semantic analysis of anonymous unions in C++.

Duplicate-member checking within classes is still a little messy, and
anonymous unions are still completely broken in C. We'll need to unify
the handling of fields in C and C++ to make this code applicable in
both languages.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
64b45f7e0d3167f040841ac2920aead7f080730d 05-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> PODness and Type Traits

Make C++ classes track the POD property (C++ [class]p4)
Track the existence of a copy assignment operator.
Implicitly declare the copy assignment operator if none is provided.
Implement most of the parsing job for the G++ type traits extension.
Fully implement the low-hanging fruit of the type traits:
__is_pod: Whether a type is a POD.
__is_class: Whether a type is a (non-union) class.
__is_union: Whether a type is a union.
__is_enum: Whether a type is an enum.
__is_polymorphic: Whether a type is polymorphic (C++ [class.virtual]p1).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
074149e11baf5f7db12f84efd5c34ba6e35d5cdf 05-Jan-2009 Douglas Gregor <dgregor@apple.com> Introduce support for "transparent" DeclContexts, which are
DeclContexts whose members are visible from enclosing DeclContexts up
to (and including) the innermost enclosing non-transparent
DeclContexts. Transparent DeclContexts unify the mechanism to be used
for various language features, including C enumerations, anonymous
unions, C++0x inline namespaces, and C++ linkage
specifications. Please refer to the documentation in the Clang
internals manual for more information.

Only enumerations and linkage specifications currently use transparent
DeclContexts.

Still to do: use transparent DeclContexts to implement anonymous
unions and GCC's anonymous structs extension, and, later, the C++0x
features. We also need to tighten up the DeclContext/ScopedDecl link
to ensure that every ScopedDecl is in a single DeclContext, which
will ensure that we can then enforce ownership and reduce the memory
footprint of DeclContext.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
c4b4e7b8f6ca9b036824e048af49cd2a52b57cdf 24-Dec-2008 Douglas Gregor <dgregor@apple.com> Keep track of template arguments when we parse them. Right now, we don't actually do anything with the template arguments, but they'll be used to create template declarations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
4b07b2968f87f3cd5a3d8c76145f1cbfd718d42d 22-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Partial AST and Sema support for C++ try-catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61337 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
f44515a49b549171dc3ee9faa6281b72609da563 16-Dec-2008 Douglas Gregor <dgregor@apple.com> Make linkage-specifications hold on to all of their declarations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61110 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
fea8685bf3036b199c573e70b03affde2583fc44 16-Dec-2008 Nate Begeman <natebegeman@mac.com> Remove tabs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
9e7d9de3ef538c1473248238b76a6d7b16f5f684 15-Dec-2008 Douglas Gregor <dgregor@apple.com> Place constructors and destructors into the DeclContext of the class,
just like all other members, and remove the special variables in
CXXRecordDecl to store them. This eliminates a lot of special-case
code for constructors and destructors, including
ActOnConstructor/ActOnDeclarator and special lookup rules in
LookupDecl. The result is far more uniform and manageable.

Diagnose the redeclaration of member functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
44b4321feab46299d3f5cfd404680884752a0fcf 11-Dec-2008 Douglas Gregor <dgregor@apple.com> Unifies the name-lookup mechanisms used in various parts of the AST
and separates lexical name lookup from qualified name lookup. In
particular:
* Make DeclContext the central data structure for storing and
looking up declarations within existing declarations, e.g., members
of structs/unions/classes, enumerators in C++0x enums, members of
C++ namespaces, and (later) members of Objective-C
interfaces/implementations. DeclContext uses a lazily-constructed
data structure optimized for fast lookup (array for small contexts,
hash table for larger contexts).

* Implement C++ qualified name lookup in terms of lookup into
DeclContext.

* Implement C++ unqualified name lookup in terms of
qualified+unqualified name lookup (since unqualified lookup is not
purely lexical in C++!)

* Limit the use of the chains of declarations stored in
IdentifierInfo to those names declared lexically.

* Eliminate CXXFieldDecl, collapsing its behavior into
FieldDecl. (FieldDecl is now a ScopedDecl).

* Make RecordDecl into a DeclContext and eliminates its
Members/NumMembers fields (since one can just iterate through the
DeclContext to get the fields).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
72c3f314d92d65c050ee1c07b7753623c044d6c7 05-Dec-2008 Douglas Gregor <dgregor@apple.com> Representation of template type parameters and non-type template
parameters, with some semantic analysis:
- Template parameters are introduced into template parameter scope
- Complain about template parameter shadowing (except in Microsoft mode)

Note that we leak template parameter declarations like crazy, a
problem we'll remedy once we actually create proper declarations for
templates.

Next up: dependent types and value-dependent/type-dependent
expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
a11f42f4bca694b9be91350d0a74815f119e3fbf 18-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implement effects of 'mutable', and a few comments from Chris on its parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
10bd36882406cdf4805e35add1ce2f11ab9ae152 17-Nov-2008 Douglas Gregor <dgregor@apple.com> Eliminate all of the placeholder identifiers used for constructors,
destructors, and conversion functions. The placeholders were used to
work around the fact that the parser and some of Sema really wanted
declarators to have simple identifiers; now, the code that deals with
declarators will use DeclarationNames.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
2e1cd4264d363ca869bf37ef160902f211d21b8c 17-Nov-2008 Douglas Gregor <dgregor@apple.com> Introduction the DeclarationName class, as a single, general method of
representing the names of declarations in the C family of
languages. DeclarationName is used in NamedDecl to store the name of
the declaration (naturally), and ObjCMethodDecl is now a NamedDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
7d7e6727a5de032c86dcb58ae734e7c1603c26e6 13-Nov-2008 Douglas Gregor <dgregor@apple.com> Don't build identifiers for C++ constructors, destructors, or
conversion functions. Instead, we just use a placeholder identifier
for these (e.g., "<constructor>") and override NamedDecl::getName() to
provide a human-readable name.

This is one potential solution to the problem; another solution would
be to replace the use of IdentifierInfo* in NamedDecl with a different
class that deals with identifiers better. I'm also prototyping that to
see how it compares, but this commit is better than what we had
previously.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
5239304ff761b8b03eefb772bd5d830a9b9f1aea 10-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce ScopedDecl::getLexicalDeclContext() which is different from ScopedDecl::getDeclContext() when there are nested-names.
e.g.:
namespace A {
void f(); // SemanticDC (getDeclContext) == LexicalDC (getLexicalDeclContext) == 'namespace A'
}
void A::f(); // SemanticDC == namespace 'A'
// LexicalDC == global namespace


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
ef6e647b8d3268a765c2c4dd7f8a73cad281a8e6 08-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement Sema support for C++ nested-name-specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
5540a72fe407f77d4155511b508f21a237254092 08-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use only one constructor for CXXMethodDecl. Keep initialization stuff into one place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
2f1bc5285ccd40f411af5f5993f013e27e74ab78 07-Nov-2008 Douglas Gregor <dgregor@apple.com> Parsing, ASTs, and semantic analysis for the declaration of conversion
functions in C++, e.g.,

struct X {
operator bool() const;
};

Note that these conversions don't actually do anything, since we don't
yet have the ability to use them for implicit or explicit conversions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
d93f0ddba0965ded252e228134b30ce30e863fb0 06-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Sema-check virtual declarations. Complete dynamic_cast checking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
42a552f8200ba5948661aee0106fce0c04e39818 05-Nov-2008 Douglas Gregor <dgregor@apple.com> Parsing, representation, and preliminary semantic analysis of destructors.

Implicit declaration of destructors (when necessary).

Extended Declarator to store information about parsed constructors
and destructors; this will be extended to deal with declarators that
name overloaded operators (e.g., "operator +") and user-defined
conversion operators (e.g., "operator int").



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
64bffa9a6f40e5a3d5556f994f09f7bf45eecd4c 05-Nov-2008 Douglas Gregor <dgregor@apple.com> Keep track of whether a C++ class is an aggregate. Don't allow initialization of non-aggregates with initializer lists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58757 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
7ad8390f7992ab7f19b1460c5f0b9d96f165c4e9 05-Nov-2008 Douglas Gregor <dgregor@apple.com> Initial implementation of parsing, semantic analysis, and AST-building
for constructor initializations, e.g.,

class A { };
class B : public A {
int m;
public:
B() : A(), m(17) { };
};





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58749 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
21ef7ae45c8b91f23cf5eab2263421bb398a644b 04-Nov-2008 Chris Lattner <sabre@nondot.org> LinkageSpecDecl is c++ specific, move it to DeclCXX


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
396b7cd9f6b35d87d17ae03e9448b5c1f2184598 03-Nov-2008 Douglas Gregor <dgregor@apple.com> Add implicitly-declared default and copy constructors to C++ classes,
when appropriate.

Conversions for class types now make use of copy constructors. I've
replaced the egregious hack allowing class-to-class conversions with a
slightly less egregious hack calling these conversions standard
conversions (for overloading reasons).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
030ff0cdad79b9e0602e143e0669364d2bad8bd2 31-Oct-2008 Douglas Gregor <dgregor@apple.com> Semantic checking of constructor declarations and classification of default/copy constructors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
60d62c29d260596454aaf4cb50cbc756ac08875e 31-Oct-2008 Douglas Gregor <dgregor@apple.com> Implement basic support for converting constructors in user-defined
conversions.

Notes:
- Overload resolution for converting constructors need to prohibit
user-defined conversions (hence, the test isn't -verify safe yet).
- We still use hacks for conversions from a class type to itself.
This will be the case until we start implicitly declaring the appropriate
special member functions. (That's next on my list)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58513 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
b48fe3812047e84164925c8938ce82be0624c40c 31-Oct-2008 Douglas Gregor <dgregor@apple.com> Add support for parsing and representing C++ constructor declarations.

Notes:
- Constructors are never found by name lookup, so they'll never get
pushed into any scope. Instead, they are stored as an
OverloadedFunctionDecl in CXXRecordDecl for easy overloading.
- There's a new action isCurrentClassName that determines whether an
identifier is the name of the innermost class currently being defined;
we use this to identify the declarator-id grammar rule that refers to
a type-name.
- MinimalAction does *not* support parsing constructors.
- We now handle virtual and explicit function specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58499 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
971c4fae6092976338b755af1d47dac07c8f16e3 24-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Add support for cv-qualifiers after function declarators.
-Add withConst/withVolatile/withRestrict methods to QualType class, that return the QualType plus the respective qualifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
1f81230ac57b9bda8bba9c8221652842ca786132 24-Oct-2008 Douglas Gregor <dgregor@apple.com> Move viewInheritance to CXXRecordDecl, and make sure it builds in Release mode, too

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
57c856b96e6bbfc64c2d61b950b116b523dc3e46 23-Oct-2008 Douglas Gregor <dgregor@apple.com> Clean up and document the representation of C++ base classes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
f8268ae3196002bbab6adb830302e79b0f368f13 22-Oct-2008 Douglas Gregor <dgregor@apple.com> Add representation of base classes in the AST, and verify that we
don't have duplicated direct base classes.

Seriliazation of base class specifiers is not yet implemented.



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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57909 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
35bc0821c4f80041724cd4c5c4889b2581546a41 15-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Simplify handling of struct/union/class tags.
Instead of using two sets of Decl kinds (Struct/Union/Class and CXXStruct/CXXUnion/CXXClass), use one 'Record' and one 'CXXRecord' Decl kind and make tag kind a property of TagDecl.
Cleans up the code a bit and better reflects that Decl class structure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
42220c5432c141d47cc8ce786e472b49dc907378 12-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement more efficient Decl <-> DeclContext conversions.
When the static type on the Decl side is a subclass of DeclContext the compiler will use a "inlinable" static_cast, instead of always using an out-of-line function call.

Note, though, that the isa<> check still uses an out-of-line function call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
4b7c98378ae0c1a3635f0b7756848b4a9923f8bc 05-Sep-2008 Ted Kremenek <kremenek@apple.com> Change struct forward declarations and definitions to use unique RecordDecls, as opposed to creating a single RecordDecl and reusing it.

This change effects both RecordDecls and CXXRecordDecls, but does not effect EnumDecls (yet).

The motivation of this patch is as follows:
- Capture more source information, necessary for refactoring/rewriting clients.

- Pave the way to resolve ownership issues with RecordDecls with the forthcoming
addition of DeclGroups.

Current caveats:
- Until DeclGroups are in place, we will leak RecordDecls not explicitly
referenced by the AST. For example:

typedef struct { ... } x;

The RecordDecl for the struct will be leaked because the TypedefDecl doesn't
refer to it. This will be solved with DeclGroups.

- This patch also (temporarily) breaks CodeGen. More below.

High-level changes:
- As before, TagType still refers to a TagDecl, but it doesn't own it. When
a struct/union/class is first referenced, a RecordType and RecordDecl are
created for it, and the RecordType refers to that RecordDecl. Later, if
a new RecordDecl is created, the pointer to a RecordDecl in RecordType is
updated to point to the RecordDecl that defines the struct/union/class.

- TagDecl and RecordDecl now how a method 'getDefinition()' to return the
TagDecl*/RecordDecl* that refers to the TagDecl* that defines a particular
enum/struct/class/union. This is useful from going from a RecordDecl* that
defines a forward declaration to the RecordDecl* that provides the actual
definition. Note that this also works for EnumDecls, except that in this case
there is no distinction between forward declarations and definitions (yet).

- Clients should no longer assume that 'isDefinition()' returns true from a
RecordDecl if the corresponding struct/union/class has been defined.
isDefinition() only returns true if a particular RecordDecl is the defining
Decl. Use 'getDefinition()' instead to determine if a struct has been defined.

- The main changes to Sema happen in ActOnTag. To make the changes more
incremental, I split off the processing of enums and structs et al into two
code paths. Enums use the original code path (which is in ActOnTag) and
structs use the ActOnTagStruct. Eventually the two code paths will be merged,
but the idea was to preserve the original logic both for comparison and not to
change the logic for both enums and structs all at once.

- There is NO CHAINING of RecordDecls for the same RecordType. All RecordDecls
that correspond to the same type simply have a pointer to that type. If we
need to figure out what are all the RecordDecls for a given type we can build
a backmap.

- The diff in CXXRecordDecl.[cpp,h] is actually very small; it just mimics the
changes to RecordDecl. For some reason 'svn' marks the entire file as changed.

Why is CodeGen broken:
- Codegen assumes that there is an equivalence between RecordDecl* and
RecordType*. This was true before because we only created one RecordDecl* for
a given RecordType*, but it is no longer true. I believe this shouldn't be too
hard to change, but the patch was big enough as it is.

I have tested this patch on both the clang test suite, and by running the static analyzer over Postgresql and a large Apple-internal project (mix of Objective-C and C).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55839 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
df042e6c2bf06b2d9ed53c52469599ac1bd93a3f 05-Sep-2008 Ted Kremenek <kremenek@apple.com> Remove "NextDecl" from RecordDecl. This change touches many files that where RecordDecl or CXXRecordDecl was constructed, always with an argument of 'NULL' for the previous declaration.

The motivation behind this change is that chaining the RecordDecls is simply unnecessary. Once we create multiple RecordDecls for the same struct/union/class, clients that care about all the declarations of the same struct can build a back map by seeing which Decls refer to the same RecordType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
df91eca19bd9738abd9a3b84791f39750e27ad36 02-Sep-2008 Ted Kremenek <kremenek@apple.com> CXXRecordDecl and RecordDecl:
- Change constructor and create methods to accept a CXXRecordDecl* (RecordDecl*)
instead of a ScopedDecl* for PrevDecl. This causes the type checking
to be more tight and doesn't break any code.

RecordDecl:

- Don't use the NextDeclarator field in ScopedDecl to represent the previous
declaration. This is a conflated use of the NextDeclarator field, which will
be removed anyway when DeclGroups are fully implemented.

- Instead, represent (a soon to be implemented) chain of RecordDecls using a
NextDecl field. The last RecordDecl in the chain is always the 'defining'
RecordDecl that owns the FieldDecls. The other RecordDecls in the chain
are forward declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
296e8671bca0d1d54c0755ba3fc1c7b285924fe6 08-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change line endings, CRLF -> LF.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
274479ec1f0fd5e8ee556854fb0e9b618448ffab 08-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert my previous commit where I replaced cast<> with static_cast<> in CXXFieldDecl::getMember().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54529 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
fef35f1ce99765670482124e2bd640bbe7a20a4f 08-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use static_cast<> instead of cast<> for CXXFieldDecl::getMember().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
39ba4aeca296b1c9f04bde7d9d3cbbf129f1abd3 10-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Changes to TagDecl:
Added TagKind enum.
Added getTagKind() method.
Added convenience methods: isEnum(), isStruct(), isUnion(), isClass().
-RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclCXX.h
d3bb44f0f1a83cb208d3e61ee80afe6a4d20d2d8 09-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Added new C++ AST Decl subclasses.

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