History log of /external/clang/include/clang/AST/DeclBase.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ef8225444452a1486bd721f3285301fe84643b00 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

This also fixes a small issue with arm_neon.h not being generated always.

Includes a cherry-pick of:
r213450 - fixes mac-specific header issue
r213126 - removes a default -Bsymbolic on Android

Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/include/clang/AST/DeclBase.h
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

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

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/include/clang/AST/DeclBase.h
142ab06ffb2ec286917554aa5d945323a1ebf359 14-Nov-2013 Serge Pavlov <sepavloff@gmail.com> Added warning on structures/unions that are empty or contain only
bit fields of zero size. Warnings are generated in C++ mode and if
only such type is defined inside extern "C" block.
The patch fixed PR5065.

Differential Revision: http://llvm-reviews.chandlerc.com/D2151


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
e7bd89af8aa96a779c0031baf1a21e960a51d0f0 23-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> A decl never becomes unused. Make that explicit in the API.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
e6ddd7f610cf6caf3b5691b0f3d60e00e8c95741 19-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> This should use the possessive adjective.

Thanks to David Blaikie for noticing it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
eaa9035a782fe845ecef4f00029ec33baa2cb701 19-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Comment improvement.

Thanks to Sean Silva for the suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
7693b32af6863c63fcaf4de087760740ee675f71 19-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Add isFirstDecl to DecBase too and use it instead of getPreviousDecl() == 0.

Redeclarable already had a isFirstDecl, but it was missing from DeclBase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
9a7e09fffbad657f775417252bc966098dfb1501 07-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Remove -ast-dump-xml.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
a41c97a5d1912ffd184381d269fd8e5a25ee5e59 20-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> Switch the semantic DeclContext for a block-scope declaration of a function or
variable from being the function to being the enclosing namespace scope (in
C++) or the TU (in C). This allows us to fix a selection of related issues
where we would build incorrect redeclaration chains for such declarations, and
fail to notice type mismatches.

Such declarations are put into a new IdentifierNamespace, IDNS_LocalExtern,
which is only found when searching scopes, and not found when searching
DeclContexts. Such a declaration is only made visible in its DeclContext if
there are no non-LocalExtern declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191064 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
86164e8f51fa89a3ec904607c3848dc4a21b12cf 05-Sep-2013 Eli Friedman <eli.friedman@gmail.com> Note when a decl is used in AST files.

When an AST file is built based on another AST file, it can use a decl from
the fist file, and therefore mark the "isUsed" bit. We need to note this in
the AST file so that the bit is set correctly when the second AST file is
loaded.

This patch introduces the distinction between setIsUsed() and markUsed() so
that we don't call into the ASTMutationListener callback when it wouldn't
be appropriate.

Fixes PR16635.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
b775100fea6d8955149897dae1adca50ca471d17 26-Jul-2013 Richard Smith <richard-llvm@metafoo.co.uk> When we perform dependent name lookup during template instantiation, it's not
sufficient to only consider names visible at the point of instantiation,
because that may not include names that were visible when the template was
defined. More generally, if the instantiation backtrace goes through a module
M, then every declaration visible within M should be available to the
instantiation. Any of those declarations might be part of the interface that M
intended to export to a template that it instantiates.

The fix here has two parts:

1) If we find a non-visible declaration during name lookup during template
instantiation, check whether the declaration was visible from the defining
module of all entities on the active template instantiation stack. The defining
module is not the owning module in all cases: we look at the module in which a
template was defined, not the module in which it was first instantiated.

2) Perform pending instantiations at the end of a module, not at the end of the
translation unit. This is general goodness, since it significantly cuts down
the amount of redundant work that is performed in every TU importing a module,
and also implicitly adds the module containing the point of instantiation to
the set of modules checked for declarations in a lookup within a template
instantiation.

There's a known issue here with template instantiations performed while
building a module, if additional imports are added later on. I'll fix that
in a subsequent commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
22050f25e34ba0cd21ee2dc3d765951c48e27cde 18-Jul-2013 Richard Smith <richard-llvm@metafoo.co.uk> Reinstate r186040, with additional fixes and more test coverage (reverted in
r186331).

Original commit log:
If we friend a declaration twice, that should not make it visible to
name lookup in the surrounding context. Slightly rework how we handle
friend declarations to inherit the visibility of the prior
declaration, rather than setting a friend declaration to be visible
whenever there was a prior declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
52c2575fc77a51f36129be89d1a0a90e31617a57 15-Jul-2013 Chandler Carruth <chandlerc@gmail.com> Re-revert r86040, which was un-reverted in r186199.

This breaks the build of basic patterns with repeated friend
declarations. See the added test case in SemaCXX/friend.cpp or the test
case reported to the original commit log.

Original commit log:
If we friend a declaration twice, that should not make it visible to
name lookup in the surrounding context. Slightly rework how we handle
friend declarations to inherit the visibility of the prior
declaration, rather than setting a friend declaration to be visible
whenever there was a prior declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
e7bae1597f4a7088f5048695c14a8f1013a86108 13-Jul-2013 Richard Smith <richard-llvm@metafoo.co.uk> C++ modules: Don't call DeclContext::lookup when half-way through deserializing
decls. That can reenter deserialization and explode horribly by trying to merge
a declaration that we've not got very far through deserializing yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
f9e65a274d4e5c5a45503efc81da43be76503983 12-Jul-2013 Richard Smith <richard-llvm@metafoo.co.uk> Unrevert r186040, reverted in r186185, with fix for PR16597.

Original commit log:
If we friend a declaration twice, that should not make it visible to
name lookup in the surrounding context. Slightly rework how we handle
friend declarations to inherit the visibility of the prior
declaration, rather than setting a friend declaration to be visible
whenever there was a prior declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186199 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
1afa611e36e0ab23dd3cde4bbe5aa74ceb7d77c5 12-Jul-2013 Chandler Carruth <chandlerc@gmail.com> Revert r186040 to fix PR16597 while Richard investigates what the best
fix is.

Original commit log:
If we friend a declaration twice, that should not make it visible to
name lookup in the surrounding context. Slightly rework how we handle
friend declarations to inherit the visibility of the prior
declaration, rather than setting a friend declaration to be visible
whenever there was a prior declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
433a13d0cdb1c48b828fe5bfb6a835c58e1e758b 11-Jul-2013 Richard Smith <richard-llvm@metafoo.co.uk> If we friend a declaration twice, that should not make it visible to name
lookup in the surrounding context. Slightly rework how we handle friend
declarations to inherit the visibility of the prior declaration, rather
than setting a friend declaration to be visible whenever there was a prior
declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
bf516f7a5d3385ab9989220eface8d5709038924 27-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Delete dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
7841abf94eb8653b26aa8d5bf67f4ad0ff074767 26-Jun-2013 David Majnemer <david.majnemer@gmail.com> AST: small cleanup to FriendObjectKind


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
ab297ccbcc51d5197d4ddb4e99b7bc8868d38314 24-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add -ast-dump-lookups switch to -cc1 to dump DeclContext lookup maps. Test to
follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
2946cebdf49d3a6eeba8df93be291a07b2d58cbc 23-Jun-2013 David Majnemer <david.majnemer@gmail.com> AST: Clean up FriendObjectKind related decls

Allow the comments in the FriendObjectKind enumerator-list show up in
doxygen. Also, some small readability improvements in related functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
6e322c08b187ba93019732d2295c84c339813e0d 22-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add dumping support for DeclContext's StoredDeclsMap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
a438e68ad7da48e7e4903785e5e96732abcdadfb 13-Jun-2013 Manuel Klimek <klimek@google.com> Make it clear in Decl::hasBody that it can return true on redeclarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
dc0705645276258afddb06cdf0fd7c8840251ee0 28-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Check the linkage cache at every recursive step.

Before this patch the linkage cache was only used by the entry level function
(getLinkage). The function that does the actual computation (getLVForDecl),
never looked at it.

This means that we would not reuse an entry in the cache when getLVForDecl did
a recursive call. This patch fixes that by adding another computation enum
value for when we don't care about the linkage at all and having getLVForDecl
check the cache in that case.

When running "clang -cc1" over SemaExpr.ii this brings the number of linkage
computations from 93749 to 58426. When running "clang -cc1 -emit-llvm -O3" it
goes from 198708 to 161444.

For SemaExpr.ii at least linkage computation is a small enough percentage of
the work that the time difference was in the noise.

When asserts are enabled this patch also causes clang to check the linkage
cache even on recursive calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
a99ecbcc4c431d52df0b01539035ab5281d54656 25-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Fix linkage computation for derived types in inline functions.

John noticed that the fix for pr15930 (r181981) didn't handle indirect
uses of local types. For example, a pointer to local struct, or a
function that returns it.

One way to implement this would be to recursively look for local
types. This would look a lot like the linkage computation itself for
types.

To avoid code duplication and utilize the existing linkage cache, this
patch just makes the computation of "type with no linkage but
externally visible because it is from an inline function" part of the
linkage computation itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
d8ffd0b7b61566f15a67192883a607f7703bcece 05-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Make all 'is in extern "C"' tests use the lexical context.

I was not able to find a case (other than the fix in r181163) where this
makes a difference, but it is a more obviously correct API to have.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
cd904e8864637e427f5ea3bf35a26e79b3dbbadf 04-May-2013 Sean Callanan <scallanan@apple.com> Added a function to check whether a Decl is in
the list of Decls for a given DeclContext. This
is useful for LLDB's implementation of
FindExternalLexicalDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
f5ebf9bf1df10ac15ba32a4b24dfe171b7848c58 03-May-2013 John McCall <rjmccall@apple.com> Correctly emit certain implicit references to 'self' even within
a lambda.

Bug #1 is that CGF's CurFuncDecl was "stuck" at lambda invocation
functions. Fix that by generally improving getNonClosureContext
to look through lambdas and captured statements but only report
code contexts, which is generally what's wanted. Audit uses of
CurFuncDecl and getNonClosureAncestor for correctness.

Bug #2 is that lambdas weren't specially mapping 'self' when inside
an ObjC method. Fix that by removing the requirement for that
and using the normal EmitDeclRefLValue path in LoadObjCSelf.

rdar://13800041

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
6afcf8875d4e447645cd7bf3733dd8e2eb8455dc 16-Apr-2013 Tareq A. Siraj <tareq.a.sriaj@intel.com> Sema for Captured Statements

Add CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic
analysis. Currently captures all variables by reference.

TODO: templates

Author: Ben Langmuir <ben.langmuir@intel.com>

Differential Revision: http://llvm-reviews.chandlerc.com/D433


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
109f5fc8dff6f3bd707e0e4140dc99ef7d4f3e88 08-Apr-2013 Douglas Gregor <dgregor@apple.com> <rdar://problem/12806802> Propagate access specifiers for conversion functions to the conversion function set eagerly.

This slightly propagates an existing hack that delays when we provide
access specifiers for the visible conversion functions of a class by
copying the available access specifier early. The only client this
affects is LLDB, which tends to discover and add conversion functions
after the class is technically "complete". As such, the only
observable difference is in LLDB, so the testing will go there.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
5b8d0af4234252b38229a5bae1d615ac9769f73f 04-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Revert accidental commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178707 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
4382867f04549f9bfcd33a08342f4f74ab13841c 04-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Pare back r164351 somewhat. The problem that change was addressing was that we
don't serialize a lookup map for the translation unit outside C++ mode, so we
can't tell when lookup within the TU needs to look within modules. Only apply
the fix outside C++ mode, and only to the translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178706 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
d4582b8e6d056f5d991f1b8372e89a6aae58feae 03-Apr-2013 Jordan Rose <jordan_rose@apple.com> Escape more @ signs in Doxygen comments.

Doxygen treats "@command" the same as "\command" in a doc comment, so
whenever we talk about Objective-C things like "@interface" we have to
make sure to escape them.

Let's try to keep Clang -Wdocumentation-clean!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
950fee2555f7a6bd193e588d6b6a941fd182391a 14-Feb-2013 Rafael Espindola <rafael.espindola@gmail.com> Add a getLanguageLinkage method to VarDecls and FunctionDecls. Use it to fix
some cases where functions with no language linkage were being treated as having
C language linkage. In particular, don't warn in

extern "C" {
static NonPod foo();
}

Since getLanguageLinkage checks the language linkage, the linkage computation
cannot use the language linkage. Break the loop by checking just the context
in the linkage computation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
63a9514a2330b144575a136e38875193760126f7 12-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> Remove an assert which triggers when a decl context in a module hits the 'has
lexical storage but not visible storage' case in C++. It's unclear whether we
even need the special-case handling for C++, since it seems to be working
around our not serializing a lookup table for the TU in C. But in any case,
the assertion is incorrect.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
8896339a3c654dc44877d52a926eb89ab3ef30b5 11-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> Don't bother reconciling external visible decls against our current set of
declarations if we didn't have a lookup map when the external decls were added.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
6bd992946bda92193fadce7e4890d4465d2702f4 09-Feb-2013 Douglas Gregor <dgregor@apple.com> Ensure that type definitions present in just-loaded modules are
visible.

The basic problem here is that a given translation unit can use
forward declarations to form pointers to a given type, say,

class X;
X *x;

and then import a module that includes a definition of X:

import XDef;

We will then fail when attempting to access a member of X, e.g.,

x->method()

because the AST reader did not know to look for a default of a class
named X within the new module.

This implementation is a bit of a C-centric hack, because the only
definitions that can have this property are enums, structs, unions,
Objective-C classes, and Objective-C protocols, and all of those are
either visible at the top-level or can't be defined later. Hence, we
can use the out-of-date-ness of the name and the identifier-update
mechanism to force the update.

In C++, we will not be so lucky, and will need a more advanced
solution, because the definitions could be in namespaces defined in
two different modules, e.g.,

// module 1
namespace N { struct X; }

// module 2
namespace N { struct X { /* ... */ }; }

One possible implementation here is for C++ to extend the information
associated with each identifier table to include the declaration IDs
of any definitions associated with that name, regardless of
context. We would have to eagerly load those definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
bbcd0f3ba215d5a8857b224e32b0330586a00dc6 07-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> Fix handling of module imports adding names to a DeclContext after qualified
name lookup has been performed in that context (this probably only happens in
C++).

1) Whenever we add names to a context, set a flag on it, and if we perform
lookup and discover that the context has had a lookup table built but has the
flag set, update all entries in the lookup table with additional names from
the external source.

2) When marking a DeclContext as having external visible decls, mark the
context in which lookup is performed, not the one we are adding. These won't
be the same if we're adding another copy of a pre-existing namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
7ba443aa8cfb222737d3a964a19ad4fb1328c4b5 26-Jan-2013 Richard Trieu <rtrieu@google.com> Highlight various parts of the AST dump with color. Colors are controlled by
-f(no-)color-diagnostics. In addition, dumpColor() function calls are added
to force color printing. No structural changes to -ast-dump.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
cfa88f893915ceb8ae4ce2f17c46c24a4d67502f 12-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
838dc597e25614c653a062a124b06a04d6b7f5eb 12-Jan-2013 Rafael Espindola <rafael.espindola@gmail.com> Disable caching of visibility.

The testcase in pr14929 shows that this is extremely hard to do. If we choose
to apply the attribute, that causes the visibility of some decls to change and
that can happen really late (during codegen).

Current gcc warns and ignores the attribute in this testcase with a warning.
This suggest that the correct solution is to find a point in the compilation
where we can compute the visibility and
* assert it was never computed before
* reject any attempts to compute it again in the future (with warnings).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
ca2ab45341c448284cf93770018c717810575f86 12-Jan-2013 Douglas Gregor <dgregor@apple.com> Provide Decl::getOwningModule(), which determines the (sub)module in
which a particular declaration resides. Use this information to
customize the "definition of 'blah' must be imported from another
module" diagnostic with the module the user actually has to
import. Additionally, recover by importing that module, so we don't
complain about other names in that module.

Still TODO: coming up with decent Fix-Its for these cases, and expand
this recovery approach for other name lookup failures.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
140aadf5b927ae294388c680a7db44e5de39578a 25-Dec-2012 Rafael Espindola <rafael.espindola@gmail.com> Add 171048 back but invalidate the cache of all redeclarations when setting
the body of a functions. The problem was that hasBody looks at the entire chain
and causes problems to -fvisibility-inlines-hidden if the cache was not
invalidated.

Original message:

Cache visibility of decls.

This unifies the linkage and visibility caching. I first implemented this when
working on pr13844, but the previous fixes removed the performance advantage of
this one.
This is still a step in the right direction for making linkage and visibility
cheap to use.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
eaf5ec43ec52f650a00254d1c20d51fb7671aead 25-Dec-2012 NAKAMURA Takumi <geek4civic@gmail.com> Revert r171048, "Cache visibility of decls."

It broke stage2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
dfb316613a40d0efc033c7bd0a49da59c915fc63 25-Dec-2012 Rafael Espindola <rafael.espindola@gmail.com> Cache visibility of decls.

This unifies the linkage and visibility caching. I first implemented this when
working on pr13844, but the previous fixes removed the performance advantage of
this one.

This is still a step in the right direction for making linkage and visibility
cheap to use.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
3bc93e3124ad5e7191c4a12dc981c8ee53578193 19-Dec-2012 David Blaikie <dblaikie@gmail.com> Change DeclContextLookup(Const)Result to (Mutable)ArrayRef<NamedDecl*>, as per review discussion in r170365

This does limit these typedefs to being sequences, but no current usage
requires them to be contiguous (we could expand this to a more general
iterator pair range concept at some point).

Also, it'd be nice if SmallVector were constructible directly from an ArrayRef
but this is a bit tricky since ArrayRef depends on SmallVectorBaseImpl for the
inverse conversion. (& generalizing over all range-like things, while nice,
would require some nontrivial SFINAE I haven't thought about yet)

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

Recursively prune some includes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
2fa67efeaf66a9332c30a026dc1c21bef6c33a6c 01-Dec-2012 Benjamin Kramer <benny.kra@googlemail.com> Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't pull in all the generated Attr code.

Required to pull some functions out of line, but this shouldn't have a perf impact.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
10be5bad483cfe66bb5eb5ff948c03c4628ce774 14-Oct-2012 Benjamin Kramer <benny.kra@googlemail.com> Simplify code. No functionality change.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165770 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
d5a20c19416d7143771b4d503fa808ae01c4e7ad 23-Aug-2012 Sean Callanan <scallanan@apple.com> Added a method to DeclContext that marks the
lookup table as needing to be built.

This is required for LLDB, which provides the
contents of many DeclContexts through a custom
ExternalASTSource.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162471 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
42c72c258e08ca79c9267346b4badcddd8fcd001 14-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Do NOT use inline functions with LLVM_ATTRIBUTE_USED.

The function will be emitted into every single TU including the header!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
559b928b05aeacc9c984a9d633ad586bbe858196 26-Jul-2012 Alexander Kornienko <alexfh@google.com> Put back dump() without a default argument, "because debuggers don't usually respect default arguments".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
e34a052d642ba7830174b1a51787251d7f704f80 26-Jul-2012 Alexander Kornienko <alexfh@google.com> Added -ast-dump-filter option to clang -cc1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
18483f583333f8d940393e64ce111c6979639665 15-Jun-2012 James Dennett <jdennett@google.com> Fix a documentation typo: \\brief -> \brief


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
581deb3da481053c4993c7600f97acf7768caac5 06-Jun-2012 David Blaikie <dblaikie@gmail.com> Revert Decl's iterators back to pointer value_type rather than reference value_type

In addition, I've made the pointer and reference typedef 'void' rather than T*
just so they can't get misused. I would've omitted them entirely but
std::distance likes them to be there even if it doesn't use them.

This rolls back r155808 and r155869.

Review by Doug Gregor incorporating feedback from Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
514d3b6b93c83c0841d2f9dd7af8ecc2877fe921 04-May-2012 Douglas Gregor <dgregor@apple.com> Split DeclarationName::getFETokenInfoAsVoid() into hot/cold paths and
(trivially) make DeclContext::lookup()'s const version inlinable. Good
for 0.3% on <rdar://problem/11004361>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
8165605dfb926561bcbc64310bec4106a70dd1e1 01-May-2012 David Blaikie <dblaikie@gmail.com> Implement simplify_type traits for redecl_iterator.

Based on Chandler Carruth's feedback on r155869.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
bd4fa45e7cf6a2f0adcb0ab66d5b3d338ec56c3c 01-May-2012 David Blaikie <dblaikie@gmail.com> Remove ref/value inconsistency in redecl_iterator.

Similar to r155808 - this mistake has been made in a few iterators.

Based on Chandler Carruth's feedback to r155808 I added an implicit conversion
to Decl* to ease adoption/usage. Useful for the pointer comparison, but not the
dyn_cast (due to template argument deduction causing the conversion not to be
used) - there for future convenience, though. This idiom (op T* for iterators)
seems to be fairly idiomatic within the LLVM codebase & I'll likely add it as I
fix up the other iterators here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
262bc18e32500558af7cb0afa205b34bd37bafed 30-Apr-2012 David Blaikie <dblaikie@gmail.com> Remove the ref/value inconsistency in filter_decl_iterator.

filter_decl_iterator had a weird mismatch where both op* and op-> returned T*
making it difficult to generalize this filtering behavior into a reusable
library of any kind.

This change errs on the side of value, making op-> return T* and op* return
T&.

(reviewed by Richard Smith)

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

Patch by Alexander Kornienko!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
173a37a57b79bd8f94b85c2273039e760b159922 03-Apr-2012 Nick Lewycky <nicholas@mxc.ca> Remove more redundant lookups. Add a new "all_lookups_iterator" which provides
a view over the contents of a DeclContext without exposing the implementation
details of the StoredDeclsMap. Use this in LookupVisibleDecls to find the
visible declarations. Fixes PR12339!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
643586fe4fcd42b0978efd3566832ab4dce50367 22-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PCH] When we are replacing a decl in a chained PCH that is also a DeclContext,
make sure to fully load its external lexical and visible declarations before
re-writing it.

rdar://10914192

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
c5d3e80c64af9604ad798282cc6861f9cd2afc52 16-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix Objective-C compilation-time performance regression introduced in r152608.

Reintroduce lazy name lookup table building, ensuring that the lazy building step
produces the same lookup table that would be built by the eager step.

Avoid building a lookup table for the translation unit outside C++, even in cases
where we can't recover the contents of the table from the declaration chain on
the translation unit, since we're not going to perform qualified lookup into it
anyway. Continue to support lazily building such lookup tables for now, though,
since ASTMerge uses them.

In my tests, this performs very similarly to ToT with r152608 backed out, for C,
Obj-C and C++, and does not suffer from PR10447.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
1b7f9cbed1b96b58a6e5f7808ebc9345a76a0936 13-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix PR10447: lazily building name lookup tables for DeclContexts was broken.
The deferred lookup table building step couldn't accurately tell which Decls
should be included in the lookup table, and consequently built different tables
in some cases.

Fix this by removing lazy building of DeclContext name lookup tables. In
practice, the laziness was frequently not worthwhile in C++, because we
performed lookup into most DeclContexts. In C, it had a bit more value,
since there is no qualified lookup.

In the place of lazy lookup table building, we simply don't build lookup tables
for function DeclContexts at all. Such name lookup tables are not useful, since
they don't capture the scoping information required to correctly perform name
lookup in a function scope.

The resulting performance delta is within the noise on my testing, but appears
to be a very slight win for C++ and a very slight loss for C. The C performance
can probably be recovered (if it is a measurable problem) by avoiding building
the lookup table for the translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
02892a65b18875a04c7ed5eadb3a13be801ab477 05-Mar-2012 Daniel Dunbar <daniel@zuster.org> AST/stats: Don't effectively use an out-of-line function to return a static
bool. Ugh.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152062 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
341785ec52f87c0803ba52dc88faac4e136f8593 22-Feb-2012 Bill Wendling <isanbard@gmail.com> More ArrayRef-ification of methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151152 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
0ee7d94ece918f22e67d0f09fcbc631c91091adc 21-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Mark a few 'dump' methods as 'used' to make sure they are included in libclang
and useable while debugging.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
4bbb8501d9db2ae72b1e39afaafa5795d67ffe03 09-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PCH] Avoid using Decl::setAttrs() and Decl::setLexicalDeclContext() from the ASTReaderDecl
directly; they internally call Decl::getASTContext() which may crash if a declaration context
parent is still deserializing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
f785a7d611404cf4747287a2bbc59b4d0e6a5a8c 14-Jan-2012 Douglas Gregor <dgregor@apple.com> Introduce Decl::getPreviousDecl() and Decl::getMostRecentDecl(),
virtual functions that provide previous/most recent redeclaration
information for any declaration. Use this to eliminate the redundant,
less efficient getPreviousDecl() functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30 09-Jan-2012 Douglas Gregor <dgregor@apple.com> Implement redeclaration merging for namespaces defined in distinct
modules. Teach name lookup into namespaces to search in each of the
merged DeclContexts as well as the (now-primary) DeclContext. This
supports the common case where two different modules put something
into the same namespace.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
f5c9f9fd6f5e2850b9b0f19283430245b696c6e5 07-Jan-2012 Douglas Gregor <dgregor@apple.com> Switch NamespaceDecl from its own hand-rolled redeclaration chain over
to Redeclarable<NamespaceDecl>, so that we benefit from the improveed
redeclaration deserialization and merging logic provided by
Redeclarable<T>. Otherwise, no functionality change.

As a drive-by fix, collapse the "inline" bit into the low bit of the
original namespace/anonymous namespace, saving 8 bytes per
NamespaceDecl on x86_64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
46cd2186bddc3e046140cb2d56932ee7faf7e3ae 06-Jan-2012 Douglas Gregor <dgregor@apple.com> Stash Decl's TopLevelDeclInObjCContainer and ModulePrivate bits
into the two unused lower bits of the NextDeclInContext link, dropping
the number of bits in Decl down to 32, and saving 8 bytes per
declaration on x86-64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
f143ffc4a9af79ac1d822fea6995af4bf45d17dc 06-Jan-2012 Douglas Gregor <dgregor@apple.com> Introduce a "Hidden" bit into Decl, to track whether that declaration
is hidden from name lookup. The previous hack of tweaking the
ModulePrivate bit when loading a declaration from a hidden submodule
was brittle.

Note that we now have 34 bits in Decl. I'll fix that next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147658 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
b6b60c1521a2e65f60e93c5fd56c103cf027df63 05-Jan-2012 Douglas Gregor <dgregor@apple.com> When we deserialize a declaration from a module file, allocate extra
storage for the global declaration ID. Declarations that are parsed
(rather than deserialized) are unaffected, so the number of
declarations that pay this cost tends to be relatively small (since
relatively few declarations are ever deserialized).

This replaces a largish DenseMap within the AST reader. It's not
strictly a win in terms of memory use---not every declaration was
added to that DenseMap in the first place---but it's cleaner to have
this information available for every deserialized declaration, so that
future clients can rely on it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147617 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
dec1cc4ec73e96f315ab7dee51459700c0ad821d 15-Dec-2011 Douglas Gregor <dgregor@apple.com> Two null Decl*'s don't refer to the same declaration, because they
don't refer to anything. Amusingly, we were relying on this in one
place. Thanks to Chandler for noticing the weirdness in
declaresSameEntity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
eaa9511dd2bcb0c7f90f47a236a91c82048f484e 15-Dec-2011 Douglas Gregor <dgregor@apple.com> Replace Decl::isSameEntityAs with a free function declaresSameEntity, which can cope with NULL pointer values

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
c896ad064fd6ee73a7e0536d94df77b2cc7313b6 14-Dec-2011 Douglas Gregor <dgregor@apple.com> Introduce Decl::isSameEntityAs(), to help compare declarations using
their canonical Decl nodes. Not used yet, but it will be.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
ecc2c090e7146c029dd9ee9a5a2fd66b275c01c0 01-Dec-2011 Douglas Gregor <dgregor@apple.com> Implement name hiding for declarations deserialized from a non-visible
module. When that module becomes visible, so do those declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
c14a03dffff69b5e1c55cc118fc52d8fd9f3a28d 23-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix operations (token annotation, getting cursor, etc.) with a file region
inside an objc container that "contains" other file-level declarations.

When getting the array of file-level declarations that overlap with a file region,
we failed to report that the region overlaps with an objc container, if
the container had other file-level declarations declared lexically inside it.

Fix this by marking such declarations as "isTopLevelDeclInObjCContainer" in the AST
and handling them appropriately.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
1a43415b28e60e0e421ef60e254126acec7ab462 12-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add a method in ASTMutationListener for the last use of Decl's [is/set]ChangedSinceDeserialization
and remove them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
4b9c2d235fb9449e249d74f48ecfec601650de93 06-Nov-2011 John McCall <rjmccall@apple.com> Change the AST representation of operations on Objective-C
property references to use a new PseudoObjectExpr
expression which pairs a syntactic form of the expression
with a set of semantic expressions implementing it.
This should significantly reduce the complexity required
elsewhere in the compiler to deal with these kinds of
expressions (e.g. IR generation's special l-value kind,
the static analyzer's Message abstraction), at the lower
cost of specifically dealing with the odd AST structure
of these expressions. It should also greatly simplify
efforts to implement similar language features in the
future, most notably Managed C++'s properties and indexed
properties.

Most of the effort here is in dealing with the various
clients of the AST. I've gone ahead and simplified the
ObjC rewriter's use of properties; other clients, like
IR-gen and the static analyzer, have all the old
complexity *and* all the new complexity, at least
temporarily. Many thanks to Ted for writing and advising
on the necessary changes to the static analyzer.

I've xfailed a small diagnostics regression in the static
analyzer at Ted's request.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
381509ea9965ab6bde9b36b4131ad08bf851d9b4 21-Oct-2011 Sean Callanan <scallanan@apple.com> Added documentation for the recently-added
addDecl() and makeDeclVisibleInContextInternal()
functions, and made the latter private since it
does not and should not have external clients.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142655 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
9faf810f08132aabb34a478297dfeea89c3bbe17 21-Oct-2011 Sean Callanan <scallanan@apple.com> I added a new function to DeclContext called
addDeclInternal(). This function suppresses any
calls to FindExternalVisibleDeclsByName() while
a Decl is added to a DeclContext. This behavior
is required for the ASTImporter, because in the
case of the LLDB client the ASTImporter would be
called recursively to import the visible decls,
which leads to assertions because the recursive
call is seeing partially-formed types.

I also modified the ASTImporter to use
addDeclInternal() in all places where it would
otherwise use addDecl(). This fix should not
affect the rest of Clang, passes Clang's
testsuite, and fixes several serious LLDB bugs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
b75a3451bcae1301875282e73a13934c90b6574c 15-Oct-2011 Douglas Gregor <dgregor@apple.com> Teach the ASTImporter to perform DeclContext lookups in a way that
avoids loading data from an external source, since those lookups were
causing some "interesting" recursion in LLDB.

This code is not efficient. I plan to remedy this inefficiency in a
follow-up commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
ec2ec1f20322076717c3865b196f7a1c95d883a4 07-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> In DeclContext::LoadLexicalDeclsFromExternalStorage don't clear out
the fields if they are already loaded, just ignore them when we are building
the chain in BuildDeclChain.

This fixes an lldb issue where fields were removed and not getting re-added
because lldb is based on ASTImporter adding decls to DeclContext and fields
were already added before by the ASTImporter.

We should really simplify the interaction between DeclContext <-> lldb
going forward..

rdar://10246067

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
fcc1e50ebcb441c6c610ccd539f57c57549bd66c 28-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce non-const Decl::getParentFunctionOrMethod.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140707 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
c8680f46970a5a53d07e05edd93657e64764da3c 28-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Decl::getParentFunctionOrMethod which if the decl is defined inside
a function/method/block it returns the corresponding DeclContext, otherwise it returns null.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
08e0bc16b3312c27e87d33be7dcf3d4fe5bdd2e2 10-Sep-2011 Douglas Gregor <dgregor@apple.com> Kill of the Decl::PCHLevel field entirely. We now only need to know
whether a Decl was deserialized from an AST file (any AST file).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139438 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
919814def90acecd25a35445862f0c0ff72a9b05 10-Sep-2011 Douglas Gregor <dgregor@apple.com> Introduce a new predicate Decl::isFromASTFile() to determine whether a
declaration was deserialized from an AST file. Use this instead of
Decl::getPCHLevel() wherever possible. This is a simple step toward
killing off Decl::getPCHLevel().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
8d267c57afb3af418ed5281b7a9bb4555d701a82 09-Sep-2011 Douglas Gregor <dgregor@apple.com> Modules: introduce the __module_private__ declaration specifier, which
indicates that a declaration is only visible within the module it is
declared in.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
ed9d84a2112e2bd56befb5f4fa8fc5bdf71fafa3 08-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread safety: added support for function scopes in attribute arguments.

This patch was written by DeLesley Hutchins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139302 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
2ea054fbc59ed19b8e3304e7e7cbdd56a5a5120f 27-Aug-2011 Douglas Gregor <dgregor@apple.com> Teach the ASTReader how to avoid cycles when loading declarations that
are lexically within a particular DeclContext. Test forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
c266de97e269c3747ffc2d122fe53185b541cb37 24-Aug-2011 Douglas Gregor <dgregor@apple.com> Don't force the complete deserialization of the visible-declarations
table when serializing an AST file. This was a holdover from the days
before chained PCH, and is a complete waste of time and storage
now. It's a good thing it's useless, because I have no idea how I
would have implemented MaterializeVisibleDecls efficiently in the
presence of modules.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138496 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
80f775359357f90f34b6adb8104506f13a816a67 22-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objc- checking for objc decl context range is unreliable and
subject to change. Check for equality instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
a28948f34817476d02412fa204cae038e228c827 22-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Restore patch I reversed in r138040. Known buildbot
failures are resolved.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
e6f07f538fd0eddd6c087fcc01d4e4ff19129c71 19-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Revers r138040. Need to look at a few buildbot failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
3dbf2f5f00cfc8b25318c119c0d39f4a49d15ebe 19-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Bring objective-c handling of decl context
to modernity. Instead of passing down individual
context objects from parser to sema, establish decl
context in parser and have sema access current context
as needed. I still need to take of Doug's comment for
minor cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
5cb3d699f0e37de1767eb23d26d03953a46cf1ff 28-Jul-2011 Richard Trieu <rtrieu@google.com> Add template instantiations to the output of -ast-dump.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
8cc488fefb2fb04bc8d5398da29f0182f97934cf 20-Jul-2011 Chris Lattner <sabre@nondot.org> add raw_ostream and Twine to LLVM.h, eliminating a ton of llvm:: qualifications.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
8cf0f52037e0c4bf656953ae63a07e8156aeb5fb 23-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Move definition of template <typename T> void Decl::dropAttr
to its header to avoid an explicit instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
c3ca14d13741889a9b924d0ca32e818f07a9834a 23-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Remove multiple use of weak_import attribute on
same declaration. Templatize dropAttr for general use.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
8785d115ebaf1a850f5e581e4acd2dbfb2b843cb 23-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Remove weak_import attribute on new declaration.
// rdar://9538608


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
4d509341bd5db06a517daa311379f52bb540bc34 21-May-2011 Eli Friedman <eli.friedman@gmail.com> Fix the clang part of PR7952: rewrite the specialization of isa<> in DeclBase,
and stop abusing the multi-level dereference isa<> used to allow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
09e2c524a18435211cfbc2fb355f91e1ac43ea89 01-May-2011 John McCall <rjmccall@apple.com> Improve the documentation for the two ObjCDeclQualifiers so that I
stop considering whether I can compress them. :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
6b6b42aed07726178f61954ac6e51f47da00275c 19-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> We regard a function as 'unused' from the codegen perspective, so our warnings diverge from
gcc's unused warnings which don't get emitted if the function is referenced even in an unevaluated context
(e.g. in templates, sizeof, etc.). Also, saying that a function is 'unused' because it won't get codegen'ed
is somewhat misleading.

- Don't emit 'unused' warnings for functions that are referenced in any part of the user's code.
- A warning that an internal function/variable won't get emitted is useful though, so introduce
-Wunneeded-internal-declaration which will warn if a function/variable with internal linkage is not
"needed" ('used' from the codegen perspective), e.g:

static void foo() { }

template <int>
void bar() {
foo();
}

test.cpp:1:13: warning: function 'foo' is not needed and will not be emitted
static void foo() { }
^

Addresses rdar://8733476.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
7f3ad231bed2184694e407772689e8903068bdca 28-Mar-2011 Eli Friedman <eli.friedman@gmail.com> Remove stray null from the middle of a comment. (Found because my editor
was refusing to open the file.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
0a0d2b179085a52c10402feebeb6db8b4d96a140 23-Mar-2011 Douglas Gregor <dgregor@apple.com> Implement a new 'availability' attribute, that allows one to specify
which versions of an OS provide a certain facility. For example,

void foo()
__attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6)));

says that the function "foo" was introduced in 10.2, deprecated in
10.4, and completely obsoleted in 10.6. This attribute ties in with
the deployment targets (e.g., -mmacosx-version-min=10.1 specifies that
we want to deploy back to Mac OS X 10.1). There are several concrete
behaviors that this attribute enables, as illustrated with the
function foo() above:

- If we choose a deployment target >= Mac OS X 10.4, uses of "foo"
will result in a deprecation warning, as if we had placed
attribute((deprecated)) on it (but with a better diagnostic)
- If we choose a deployment target >= Mac OS X 10.6, uses of "foo"
will result in an "unavailable" warning (in C)/error (in C++), as
if we had placed attribute((unavailable)) on it
- If we choose a deployment target prior to 10.2, foo() is
weak-imported (if it is a kind of entity that can be weak
imported), as if we had placed the weak_import attribute on it.

Naturally, there can be multiple availability attributes on a
declaration, for different platforms; only the current platform
matters when checking availability attributes.

The only platforms this attribute currently works for are "ios" and
"macosx", since we already have -mxxxx-version-min flags for them and we
have experience there with macro tricks translating down to the
deprecated/unavailable/weak_import attributes. The end goal is to open
this up to other platforms, and even extension to other "platforms"
that are really libraries (say, through a #pragma clang
define_system), but that hasn't yet been designed and we may want to
shake out more issues with this narrower problem first.

Addresses <rdar://problem/6690412>.

As a drive-by bug-fix, if an entity is both deprecated and
unavailable, we only emit the "unavailable" diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
aab9e315184d344bbd733f13b68915d02db7b32b 22-Feb-2011 John McCall <rjmccall@apple.com> Provide a Decl::getNonClosureContext to look through any "closure" (i.e.
block and, eventually, C++ lambda) contexts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
f91d08712514fca6b1e66abf51a13f2d7041bb05 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Remove the last virtual member function from the Decl hierarchy,
reducing the size of all declarations by one pointer. For a 64-bit
Clang parsing Cocoa.h, this saves ~630k of memory (about 3.5% of
ASTContext's memory usage for this header).


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


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

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

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

Review appreciated, particularly for the cindex and template bits.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
1aa3d81c6e63959ef149489eca42b1520c521af4 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Devirtualize Decl::getBody() and Decl::hasBody().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125731 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
f4a03cc2b022fab0ffac6c65449555c52036dece 17-Feb-2011 Douglas Gregor <dgregor@apple.com> De-virtualize Decl::isOutOfLine().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
1fe85ea697fb5c85acded3ac0ddbc19f89c2e181 05-Jan-2011 Douglas Gregor <dgregor@apple.com> Add Decl::isParameterPack(), which covers both function and template
parameter packs, along with ParmVarDecl::isParameterPack(), which
looks for function parameter packs. Use these routines to fix some
obvious FIXMEs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
381d34e0b205ca27bcc7e7c1652561941c437965 06-Dec-2010 Douglas Gregor <dgregor@apple.com> Re-implement caching for the linkage calculation of declarations.

My previous attempt at solving the compile-time problem with many
redeclarations of the same entity cached both linkage and visibility,
while this patch only tackles linkage. There are several reasons for
this difference:

- Linkage is a language concept, and is evaluated many times during
semantic analysis and codegen, while visibility is only a
code-generation concept that is evaluated only once per (unique)
declaration. Hence, we *must* optimize linkage calculations but
don't need to optimize visibility computation.
- Once we know the linkage of a declaration, subsequent
redeclarations can't change that linkage. Hence, cache
invalidation is far simpler than for visibility, where a later
redeclaration can completely change the visibility.
- We have 3 spare bits in Decl to store the linkage cache, so the
cache doesn't increase the size of declarations. With the
visibility+linkage cache, NamedDecl got larger.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
b5f35bae05f1ce3ae62ca52b266a086fd019e89b 06-Dec-2010 Douglas Gregor <dgregor@apple.com> Revert r120808, my previous implementation of caching for the linkage
and visibility of declarations, because it was extremely messy and it
increased the size of NamedDecl.

An improved implementation is forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
2357207a5753547740c70a12c3b37f71afa93f8a 03-Dec-2010 Douglas Gregor <dgregor@apple.com> Implement caching for the linkage and visibility calculations of
declarations.

The motivation for this patch is that linkage/visibility computations
are linear in the number of redeclarations of an entity, and we've run
into a case where a single translation unit has > 6500 redeclarations
of the same (unused!) external variable. Since each redeclaration
involves a linkage check, the resulting quadratic behavior makes Clang
slow to a crawl. With this change, a simple test with 512
redeclarations of a variable syntax-checks ~20x faster than
before.

That said, I hate this change, and will probably end up reverting it
in a few hours. Reasons to hate it:
- It makes NamedDecl larger, since we don't have enough free bits in
Decl to squeeze in the extra information about caching.
- There are way too many places where we need to invalidate this
cache, because the visibility of a declaration can change due to
redeclarations (!). Despite self-hosting and passing the testsuite,
I have no confidence that I've found all of places where this cache
needs to be invalidated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
f35142413974e9dfe2c5f202084db4bd1c2073e9 24-Nov-2010 John McCall <rjmccall@apple.com> Add -cc1 -ast-dump-xml, an excessively detailed XML dump of the internals
of the ASTs. Only available in assertions builds. No stability guarantee.

This is intended solely as a debugging tool. I'm not sure if the goals
are sufficiently aligned with the XML printer to allow a common
implementation.

Currently just falls back on the StmtDumper to display statements,
which means it doesn't produce valid XML in those cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
ac65c6208d48b0f9b4661c30c28997a280ac5ba6 26-Oct-2010 John McCall <rjmccall@apple.com> A couple of tweaks to the visibility rules:
- tags with C linkage should ignore visibility=hidden
- functions and variables with explicit visibility attributes should
ignore the linkage of their types
Either of these should be sufficient to fix PR8457.

Also, FileCheck-ize a test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
7b90340c9c7d07aef4e301e72b5e8a30d5f4f0c8 24-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Put the mechanism in place to track modifications in an AST entity that were committed after
its initial creation/deserialization and store the changes in a chained PCH.

The idea is that the AST entities call methods on the ASTMutationListener to give notifications
of changes; the PCHWriter implements the ASTMutationListener interface and stores the incremental changes
of the updated entity. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
35043e56150dc4eda882acd5ddfe0f8e3c0a8cb1 19-Oct-2010 John McCall <rjmccall@apple.com> MSVC space optimization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
eb5e9986e577b1e2bff3cca5973a2494fb593fbb 14-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow deserialization of just the fields of a record, when we want to iterate over them,
instead of deserializing the complete declaration context of the record.

Iterating over the fields of a record is very common (e.g to determine the layout), unfortunately we needlessly deserialize every declaration
that the declaration context of the record contains; this can be bad for large C++ classes that contain a lot of methods.
Fix this by allow deserialization of just the fields when we want to iterate over them.
Progress for rdar://7260160.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
410c4f2eb5e6a8c2318cacb9a6751f1b4fcff166 31-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Make inline namespace not be transparent after all. The concept simply doesn't fit. Instead, special-case the few places where transparent contexts have the desired behavior for inline namespaces. Fixes a redeclaration issue in inline namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
7a126a474fdde06382b315b4e3d8ef0a21d4dc31 31-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename DeclContext::getLookupContext to getRedeclContext and change its semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
f29815affe5d28c499d21c0be9bb078c52025ae6 26-Aug-2010 John McCall <rjmccall@apple.com> Missed a couple.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
6d9496d2d22817aeb286dd7007923e14f10fa8a6 26-Aug-2010 John McCall <rjmccall@apple.com> Apparently gcc doesn't always get injected class names right.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
ea318642072d3d94b5c3cff0fa6f4b33d2db0768 26-Aug-2010 John McCall <rjmccall@apple.com> Move things around so that Sema.h no longer depends on even DeclBase.h.
It still depends on Type because DeclarationName.h does.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
a60786b46eaa4766bb57fb3ca4e0191b3f73e42a 21-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix an issue with writing to PCH another included PCH, introduced by the "using an AST on-disk hash table for name lookup" commit.

When including a PCH and later re-emitting to another PCH, the name lookup tables of DeclContexts
may be incomplete, since we now lazily deserialize the visible decls of a particular name.
Fix the issue by iterating over the un-deserialized visible decls and completing the lookup tables
of DeclContexts before writing them out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
3c7f4134603d04b44f997b43c0a9def270f25386 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> More PCH -> AST renaming.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
cf807c4dfdb23e8fa3f400e0b24ef5b79db7a530 19-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Generate Attr subclasses with TableGen.

Now all classes derived from Attr are generated from TableGen.
Additionally, Attr* is no longer its own linked list; SmallVectors or
Attr* are used. The accompanying LLVM commit contains the updates to
TableGen necessary for this.

Some other notes about newly-generated attribute classes:

- The constructor arguments are a SourceLocation and a Context&,
followed by the attributes arguments in the order that they were
defined in Attr.td

- Every argument in Attr.td has an appropriate accessor named getFoo,
and there are sometimes a few extra ones (such as to get the length
of a variadic argument).

Additionally, specific_attr_iterator has been introduced, which will
iterate over an AttrVec, but only over attributes of a certain type. It
can be accessed through either Decl::specific_attr_begin/end or
the global functions of the same name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
0b17c61e8f143901ce11b4a6e5129ac63aaeee04 13-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Instead of modifying the ObjC AST to not modify existing declarations, teach chained PCH to overwrite declarations from earlier PCH files in dependent ones. Tell Sema to note when it changes AST nodes so that they have to be reserialized. Finally, the ObjCProtocolDecls created in forward decls, like the ObjCInterfaceDecls in @class forward decls, are not lexically part of the decl context; only the definition is.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
681d7237e1014bf64dd5ead6bf74ae55cdd19e61 27-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> - Fix recording of offsets of types in dependent PCHs.
- Stop reading in (and thus deserializing) every declaration in the TU when creating a dependent PCH.
- Switch the storage of a decl context's lexical declarations to a blob containing the IDs instead of a record. This is the only sane way of supporting update records later on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
07a353c2af3a3c557205466d4f4ed2513462ebfe 14-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Increase the max PCH level for declarations to 7. Add a FromPCH flag to types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
8dd0c5626455cdf94280783e85e413eed6cbf3d9 13-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Instantiate attributes when first building an instantiated
VarDecl.


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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
5f1bfc10a12d9759444eb433f52a85d2e0058967 07-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove Decl::getCompoundBody().

This has 2 (slight) advantages:
-Make explicit at getBody()'s callsite that we expect/handle only CompoundStmt and not CXXTryStmt.
-Better tracking of Decl::getBody()'s callsites.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
06a54a38be5054c910ffc92db60edab23f9ea105 07-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH.

Makes de-serialization of the function body even more "lazier".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
c070cc602d6eefea881f71a60de09e05b54c3fdd 18-Jun-2010 Douglas Gregor <dgregor@apple.com> Given Decl::isUsed() a flag indicating when to consider the "used"
attribute as part of the calculation. Sema::MarkDeclReferenced(), and
a few other places, want only to consider the "used" bit to determine,
e.g, whether to perform template instantiation. Fixes a linkage issue
with Boost.Serialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
1715bf5ed87c792c63278e739bc492921d512a88 12-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix PCH issue. Attributes of a declaration were truncated to just one when the decl was read from a PCH file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
76bd1f387e6a7b7abfe53f63b3bd429b97bb80f0 01-Jun-2010 John McCall <rjmccall@apple.com> Alter the ExternalASTSource interface to permit by-name lookups. PCH continues to
bring in the entire lookup table at once.

Also, give ExternalSemaSource's vtable a home. This is important because otherwise
any reference to it will cause RTTI to be emitted, and since clang is compiled
with -fno-rtti, that RTTI will contain unresolved references (to ExternalASTSource's
RTTI). So this change makes it possible to subclass ExternalSemaSource from projects
compiled with RTTI, as long as the subclass's home is compiled with -fno-rtti.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.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/DeclBase.h
76d326448d7e4c10b2896edc2ee855d1e68d1b88 24-Apr-2010 John McCall <rjmccall@apple.com> Recommit r102215, this time being more careful to only set the "principal
declaration" (i.e. the only which will actually be looked up) to have the
non-member-operator bit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
f0bf4d554f2513cbb4bec952c81ced59279ad91e 24-Apr-2010 Devang Patel <dpatel@apple.com> Revert r102215. This causes clang crash while compiling a test case from gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
f88b0d6c99e6473e78331271935986535dc4603c 23-Apr-2010 John McCall <rjmccall@apple.com> Transition the last acceptable-result filter kind in LookupResult over to use
a simple IDNS mask by introducing a namespace for non-member operators.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
0d6b1640eb4d1a4a0203235cfdfcdaf3335af36d 23-Apr-2010 John McCall <rjmccall@apple.com> Recommit my change to how C++ does elaborated type lookups, now with
two bugfixes which fix selfhost and (hopefully) the nightly tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102198 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
00b40d3f2fb8b2f9043daf3dd4558bff98346b3c 23-Apr-2010 Daniel Dunbar <daniel@zuster.org> Revert "C++ doesn't really use "namespaces" for different kinds of names the same", which seems to break most C++ nightly test apps.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
d04efc98d08731e31bd73f430803acc5ffa9040a 23-Apr-2010 John McCall <rjmccall@apple.com> C++ doesn't really use "namespaces" for different kinds of names the same
way that C does. Among other differences, elaborated type specifiers
are defined to skip "non-types", which, as you might imagine, does not
include typedefs. Rework our use of IDNS masks to capture the semantics
of different kinds of declarations better, and remove most current lookup
filters. Removing the last remaining filter is more complicated and will
happen in a separate patch.

Fixes PR 6885 as well some spectrum of unfiled bugs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
bd4187bb6f4a0cfe7d6d2c8e8856b16bca2f0748 23-Apr-2010 Douglas Gregor <dgregor@apple.com> Kill off IDNS_ObjCImplementation and IDNS_ObjCCategoryName; they
aren't and never were used. There's a gap in the bit pattern for IDNS
now, but I'm sure *someone* will fill it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.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/DeclBase.h
b0cb022daec8671406ab25f4b5d5a6d48d823bc4 27-Mar-2010 John McCall <rjmccall@apple.com> Implement method friends in class templates and fix a few related problems.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
0c01d18094100db92d38daa923c95661512db203 24-Mar-2010 John McCall <rjmccall@apple.com> Implement a framework for the delay of arbitrary diagnostics within
templates. So delay access-control diagnostics when (for example) the target
of a friend declaration is a specific specialization of a template.

I was surprised to find that this was required for an access-controlled selfhost.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
dbdf5e7d0b6f1f8d8c496c1a0ada6f706cddf100 15-Mar-2010 Douglas Gregor <dgregor@apple.com> During C++ name lookup, use DeclContext::Equals() rather than
comparing DeclContext pointers, to avoid having to remember to call
getPrimaryContext() everywhere. This is the last part PR6594.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
42738573253da1bd61f9c44f8d77f600d3b0cd1c 05-Mar-2010 Douglas Gregor <dgregor@apple.com> When we invalidate a declaration, make it public, so that it doesn't
trigger access control or one of the many assertions we have for valid
access specifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
8761d680eaa7386e03f51286f4b84a1ffe575e2e 21-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Make Decl::isOutOfLine() virtual, and use that to determine when definitions
are for out of line declarations more easily. This simplifies the logic and
handles the case of out-of-line class definitions correctly. Fixes PR6107.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
12ead498c4bc279472b21d446bfccec0f654779e 17-Feb-2010 Tanya Lattner <tonic@nondot.org> Fix unused function warning to handle used attributes and redeclarations. Update test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96444 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
ad2b804faf29042e6c4e331d0987f103f1e2fd31 19-Jan-2010 John McCall <rjmccall@apple.com> Move AccessSpecifier into the new Specifiers.h; fixes the layering violations
inherent in, well, pretty much every use of AccessSpecifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
79c2278a66d8fc0943774d1b7c71a32f7764e1e2 16-Jan-2010 Douglas Gregor <dgregor@apple.com> When we are instantiating a member function of a local class, be sure
to merge the local instantiation scope with the outer local
instantiation scope, so that we can instantiate declarations from the
function owning the local class. Fixes an assert while instantiating
Boost.MPL's BOOST_MPL_ASSERT_MSG.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
84834432289a810e713f82f1ed94a99ad8a5c2ea 14-Dec-2009 Anders Carlsson <andersca@mac.com> Rename dump to dumpDeclContext, so that call RD->dump() won't dump the decl context by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91256 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
737061fc2948776f941e1854a9bc6ebd070d9151 11-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to fix a crash trying to access a category name in
objective-c++ mode and also removed dead-code in this area.
(fixes radar 7456710).



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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
2b7d8ddc746a9096f8af4bd0d8b07eae523864b5 09-Dec-2009 Anders Carlsson <andersca@mac.com> Add DeclContext::dump.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
c52365674b5b157a0486f75c12dd9f4cc41d8089 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add 1+2 consts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
7d1d49d2971b20a97b3c2a301470b9eaaa130137 16-Oct-2009 Douglas Gregor <dgregor@apple.com> Keep track of whether declararions were loaded from a precompiled
header or not via a new "PCHLevel" field in Decl. We currently use
this information to help CIndex filter out declarations that came from
a precompiled header (rather than from an AST file). Further down the
road, it can be used to help implement multi-level precompiled
headers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
9aeed32282fe8a775c24c01c923717ca86695685 01-Oct-2009 John McCall <rjmccall@apple.com> Anonymous namespaces, sema + codegen. A lot of semantics are still broken,
apparently because using directives aren't quite working correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
f88df8652e0726fe9eee5d78f92e3c5b34d0a537 26-Sep-2009 Anders Carlsson <andersca@mac.com> Make Decl::dump const.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
05b23ea2119b4c411719bd6631e5d679ba5e7ef1 14-Sep-2009 John McCall <rjmccall@apple.com> Skeletal support for friend class templates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
255d6415a692e8384971755f91541497d54b3193 14-Sep-2009 Anders Carlsson <andersca@mac.com> Fix a bug in getFriendObjectKind where we would clear out all mask bits except IDNS_TagFriend and IDNS_OrdinaryFriend but then check for IDNS_Tag and IDNS_Ordinary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
e942bbe02b6fb332d1f13d38c6e1980b416cf89a 10-Sep-2009 Douglas Gregor <dgregor@apple.com> When performing unqualified name lookup into a DeclContext, also look into
all of the parent DeclContexts that aren't represented within the
Scope chain. This fixes some name-lookup problems in out-of-line
definitions of members of nested classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
61481dad22ebca3fba3fe4fb67a3b926d0895e9c 01-Sep-2009 Douglas Gregor <dgregor@apple.com> Add DeclContext::Equals to compare declaration contexts based on their primary context. Use this instead of pointer comparisons

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
ab88d97734f1260402a0c6a8f6b77bed7ed4e295 01-Sep-2009 John McCall <rjmccall@apple.com> Fix bug 4784 and allow friend declarations to properly extend
existing declaration chains.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
6dd38daf1495367db8fe9e9a5cacb7420cf08e27 27-Aug-2009 Douglas Gregor <dgregor@apple.com> When checking whether one declaration context encloses another, make sure to look at the primary contexts. Thanks to Eli for the test case

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
6ff0785f1e58fb2cfb702d2995d076c6648a9a13 08-Aug-2009 John McCall <rjmccall@apple.com> Just add global scope to the associated namespaces set instead of tracking it
separately. Add the framework (currently unfed) for finding friend declarations
during argument-dependent lookup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78414 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
aecae629269fae3bf484baf1d109e9a89d14eead 27-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make ObjCImplDecl inherit from ObjCContainerDecl.

ObjCContainerDecl now is the root class for objc decls that contain methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
22cbd2b794676c3b29c2b401c26730ed7047809e 21-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add an assertion for the return value of Decl::getNextRedeclaration().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76511 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
ac4e3794c60fc194fb2bd9764aa81d4cae530ecc 18-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
1e4bc099882626059f14d687ed7a1a5518b7f3c2 18-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce a redecl_iterator in Decl class, so that we can do a "iterate over all declarations of the same decl" without knowing the exact type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
b57a4fe73b8227c0dba651818b8495dfca61e530 18-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move the functionality of ASTContext::getCanonicalDecl(), into a virtual method Decl::getCanonicalDecl().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
bfb498d0996ef049efe9476f2802976fd145cd60 17-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> ObjCCategoryImplDecl and ObjCImplementation do not derive directly from DeclContext but from a new abstract ObjCImplDecl.
Reflect this change on the "DeclContext hierarchy".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
fc7e2a8fbb08f0f496ac6cea0721fe72db8ce240 06-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce the virtual method Decl::getPrimaryDecl().

When a Decl subclass can have multiple re-declarations in the same declaration context (like FunctionDecl),
getPrimaryDecl() will return a particular Decl that all of them will point to as the "primary" declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
17945a0f64fe03ff6ec0c2146005a87636e3ac12 30-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> De-ASTContext-ify DeclContext.

Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating".
Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
048f30a483ca352ee7f235a5be181b9dcc5f9d9c 30-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce DeclContext::getParentASTContext().

It's not getASTContext() to avoid "getASTContext is ambiguous" compiler errors for subclasses of both Decl and DeclContext.

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

Timings showed no significant difference before and after the commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
f1d60eaf3f70975ee262852af2d6aeabd140ed58 30-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the ASTContext parameter from the printing related methods of Decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
40b598eea1310ec9ed554d56ce3e25b34c585458 30-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the ASTContext parameter from the attribute-related methods of Decl.
The implementations of these methods can Use Decl::getASTContext() to get the ASTContext.

This commit touches a lot of files since call sites for these methods are everywhere.
I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
3708b3df2e86998dca4c006939014ea1174da834 29-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Keep a reference to the ASTContext inside the TranslationUnitDecl.
-Introduce Decl::getASTContext() which returns the reference from the TranslationUnitDecl that it is contained in.

The general idea is that Decls can point to their own ASTContext so that it is no longer required to "manually" keep track and make sure that you pass the correct ASTContext to Decls' methods, e.g. methods like Decl::getAttrs should eventually not require a ASTContext parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
55d608cbadf1e9c05064f9287c057d50b7df65b4 20-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Decl::getSourceRange() which, like Stmt::getSourceRange(), represents the range that the declaration covers.

Add initial support for NamespaceDecl, VarDecl, and FunctionDecl:
-NamespaceDecl range is from name to '}'
-VarDecl is from name to possible init expression
-FunctionDecl is from name to last parameter name or to end of its function body.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
e0762c92110dfdcdd207db461a4ea17afd168f1e 20-Jun-2009 Douglas Gregor <dgregor@apple.com> Keep track of when declarations are "used" according to C and
C++. This logic is required to trigger implicit instantiation of
function templates and member functions of class templates, which will
be implemented separately.

This commit includes support for -Wunused-parameter, printing warnings
for named parameters that are not used within a function/Objective-C
method/block. Fixes <rdar://problem/6505209>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
68584ed35ad819a1668e3f527ba7f5dd4ae6a333 18-Jun-2009 Douglas Gregor <dgregor@apple.com> Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
67e332009c6e349dc34700f539747afcff990336 13-Jun-2009 Anders Carlsson <andersca@mac.com> Improvements to TemplateArgumentListBuilder to make it work better with parameter packs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
42f42c0dd5cf71fbfc6fa282d03079a902f6e342 30-May-2009 Eli Friedman <eli.friedman@gmail.com> Expose an API to print a group of decls (like "int a,b;").
Make StmtPrinter use DeclPrinter to print all declarations. Merge
declarations in the limited case of an unnamed TagDecl followed by one
or more declarations using that TagDecl directly. Change
SuppressTypeSpecifiers to the more general SuppressSpecifiers, and
use it to suppress stuff like "typedef" and "extern". Replace
OwnedTag with SuppressTag, since it's more convenient to print
declarations from DeclPrinter at the moment.
improvements to declaration printing. Fix pretty-printing for K&R
function definitions and __builtin_va_arg.

We're now to the point where the pretty-printing output for non-trivial
programs can actually be piped back into clang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
4fe0c8e9c76b96e7aff21696a40dacc09d0237bc 30-May-2009 Douglas Gregor <dgregor@apple.com> Refactor and clean up the AST printer, so that it uses a DeclVisitor,
walks through DeclContexts properly, and prints more of the
information available in the AST. The functionality is still available
via -ast-print, -ast-dump, etc., and also via the new member functions
Decl::dump() and Decl::print().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
bc221637f5ed3538b8495dd13b831c11e821c712 28-May-2009 Douglas Gregor <dgregor@apple.com> Introduced DeclContext::isDependentContext, which determines whether a
given DeclContext is dependent on type parameters. Use this to
properly determine whether a TagDecl is dependent; previously, we were
missing the case where the TagDecl is a local class of a member
function of a class template (phew!).

Also, make sure that, when we instantiate declarations within a member
function of a class template (or a function template, eventually),
that we add those declarations to the "instantiated locals" map so
that they can be found when instantiating declaration references.

Unfortunately, I was not able to write a useful test for this change,
although the assert() that fires when uncommenting the FIXME'd line in
test/SemaTemplate/instantiate-declref.cpp tells the "experienced user"
that we're now doing the right thing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
d3a413d3b8eb39bcee5944bc545d9997c1abe492 26-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement function-try-blocks. However, there's a very subtle bug that I can't track down.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
8fc463adf0116fdcbff86e9cca11955aad1649fe 24-Apr-2009 Douglas Gregor <dgregor@apple.com> Eliminate Sema::ObjCImplementations, relying instead on name lookup. What's good for uniformity is good for PCH (or is it the other way around?).

As part of this, make ObjCImplDecl inherit from NamedDecl (since
ObjCImplementationDecls now need to have names so that they can be
found). This brings ObjCImplDecl very, very close to
ObjCContainerDecl; we may be able to merge them soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.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/DeclBase.h
115cafcafec3572756635ca81ef83999ae0c8af7 12-Apr-2009 Chris Lattner <sabre@nondot.org> add a new Decl::hasAttr<T>() predicate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
8038d5182b72dcdef292f6fb8539ad77f338855a 10-Apr-2009 Douglas Gregor <dgregor@apple.com> Various minor fixes to PCH reading and writing, with general
cleanup. Aside from a minor tweak to the PCH file format, no
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
2cf2634ffdb4f7c8d46cef3f8e60a55993f1c57a 10-Apr-2009 Douglas Gregor <dgregor@apple.com> Implementation of pre-compiled headers (PCH) based on lazy
de-serialization of abstract syntax trees.

PCH support serializes the contents of the abstract syntax tree (AST)
to a bitstream. When the PCH file is read, declarations are serialized
as-needed. For example, a declaration of a variable "x" will be
deserialized only when its VarDecl can be found by a client, e.g.,
based on name lookup for "x" or traversing the entire contents of the
owner of "x".

This commit provides the framework for serialization and (lazy)
deserialization, along with support for variable and typedef
declarations (along with several kinds of types). More
declarations/types, along with important auxiliary structures (source
manager, preprocessor, etc.), will follow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
6ab3524f72a6e64aa04973fa9433b5559abb3525 09-Apr-2009 Douglas Gregor <dgregor@apple.com> Propagate the ASTContext to various AST traversal and lookup functions.
No functionality change (really).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
c36c540c5bfce941f3d892919394d092491211f2 09-Apr-2009 Douglas Gregor <dgregor@apple.com> Simple DeclContext's internal representation by always storing a
StoredDeclsMap, instead of using the it's-an-array-or-its-a-map
trick. I'll verify that performance isn't impacted later; for now, I
need the common representation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
c2ee10d79f70036af652a395ac1f8273f3d04e12 07-Apr-2009 Douglas Gregor <dgregor@apple.com> Move the internal DeclContext data structures into a separate header.

Simplify the addition of a case statement to a switch.

Fix -print-stats for attribute-qualified types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
682bf92db408a6cbc3d37b5496a99b6ef85041ec 29-Mar-2009 Chris Lattner <sabre@nondot.org> Push DeclGroup much farther throughout the compiler. Now the various
productions (except the already broken ObjC cases like @class X,Y;) in
the parser that can produce more than one Decl return a DeclGroup instead
of a Decl, etc.

This allows elimination of the Decl::NextDeclarator field, and exposes
various clients that should look at all decls in a group, but which were
only looking at one (such as the dumper, printer, etc). These have been
fixed.

Still TODO:

1) there are some FIXME's in the code about potentially using
DeclGroup for better location info.
2) ParseObjCAtDirectives should return a DeclGroup due to @class etc.
3) I'm not sure what is going on with StmtIterator.cpp, or if it can
be radically simplified now.
4) I put a truly horrible hack in ParseTemplate.cpp.

I plan to bring up #3/4 on the mailing list, but don't plan to tackle
#1/2 in the short term.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
ee219fd5f2776d8dd39d857f87304297b5ed743a 29-Mar-2009 Chris Lattner <sabre@nondot.org> switch DeclBase::DeclCtx to the new happy and type-safe
llvm::PointerUnion class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
0eda3b31a672ea486fa92b9bc49a2c91be856b53 29-Mar-2009 Chris Lattner <sabre@nondot.org> adjust to llvm mainline changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
244a67d911d08c3757a18ad666e4a268cf3ee285 28-Mar-2009 Chris Lattner <sabre@nondot.org> rename NextDeclInScope to NextDeclInContext, since the pointer
points within contexts not scopes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
96f4468b6b1bf69bb01c1207f716a3ffaeb4a8d3 28-Mar-2009 Chris Lattner <sabre@nondot.org> simplify getNextDeclInScope


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
769dbdf467681f6020ff248b969c2d41a4fdccd3 27-Mar-2009 Chris Lattner <sabre@nondot.org> minor cleanups: make getIdentifierNamespace() be a single load
instead of a load + large inlined switch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
0cf2b1990c82121d03a004dafe498ba43bf4b42a 27-Mar-2009 Chris Lattner <sabre@nondot.org> reduce # const_casts, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
10d8379676f32b493740a5509e2cd7f0d6433139 27-Mar-2009 Chris Lattner <sabre@nondot.org> change Decl::DeclCtx to use a PointerIntPair instead of hand bitmangling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
1329c274628cc8c4e8ad472b41d1a78c8123f611 26-Mar-2009 Anders Carlsson <andersca@mac.com> Tighten the setAccess assert. We now allow AS_none if the decl contex is not a C++ record decl.

Also, fix fallout from the change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
b8547e800f9553a72c2f3635ae2371692bd4411a 25-Mar-2009 Anders Carlsson <andersca@mac.com> It doesn't make sense to set the access specifier to AS_none (I think)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
81abbdd848aa02c30242bd22dcc6ffe024ae2957 21-Mar-2009 Chris Lattner <sabre@nondot.org> partially inline getAttrs() to speed up PR3810 (and lots of
other code presumably) by 4.3%


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
eaab20669b6a9910a5deb0110fdd8f7581d86a36 12-Mar-2009 Ted Kremenek <kremenek@apple.com> API fix: All "bodies" for functions, Objective-C methods, blocks, are assumed to
be CompoundStmts. I think this is a valid assumption, and felt that the API
should reflect it. Others please validate this assumption to make sure I didn't
break anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
49f28ca787d8db7cac3c8898334f70ea55374c98 05-Mar-2009 Chris Lattner <sabre@nondot.org> rename PrettyStackTraceDecl -> PrettyStackTraceActionsDecl.
Introduce a new PrettyStackTraceDecl.
Use it to add the top level LLVM IR generation stuff in
Backend.cpp to stack traces. We now get crashes like:

Stack dump:
0. Program arguments: clang t.c -emit-llvm
1. <eof> parser at end of file
2. t.c:1:5: LLVM IR generation of declaration 'a'
Abort

for IR generation crashes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
39d7650656fdd1be879ed7d0c722cfeae95e56d5 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Woot, save 8 bytes in Decl on 64-bit by reordering fields. This
reduces allocated Decl size by ~8% on Cocoa.h (~700k).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
65100792a69a16895bd80f1d639b99e7ad903386 26-Feb-2009 Douglas Gregor <dgregor@apple.com> Use RecordFirst/RecordLast range checks in DeclContext

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
88b7094185b9d4fe9820c731b6936d8d37f6143e 25-Feb-2009 Douglas Gregor <dgregor@apple.com> Perform additional semantic checking of class template
specializations. In particular:

- Make sure class template specializations have a "template<>"
header, and complain if they don't.
- Make sure class template specializations are declared/defined
within a valid context. (e.g., you can't declare a specialization
std::vector<MyType> in the global namespace).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
68835718c4125f2f66740cd04de7088645ec695d 20-Feb-2009 Chris Lattner <sabre@nondot.org> prune #includes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
cc636688c4fd10b1732ce3e33b2b106024d545ca 18-Feb-2009 Douglas Gregor <dgregor@apple.com> Implement basic parsing and semantic analysis for explicit
specialization of class templates, e.g.,

template<typename T> class X;

template<> class X<int> { /* blah */ };

Each specialization is a different *Decl node (naturally), and can
have different members. We keep track of forward declarations and
definitions as for other class/struct/union types.

This is only the basic framework: we still have to deal with checking
the template headers properly, improving recovery when there are
failures, handling nested name specifiers, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
305ec42f971a2b3e114eb35256c23e955c497a1c 17-Feb-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move DeclContext::getParent and getLexicalParent in-line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
3d7641e090cf113dec64306a1597d3e4523e2a55 16-Feb-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> DeclContext had its "casting machinery" inside the class definition so that if a new declaration context Decl appeared, the necessary changes
would be in one place. Since, now, only DeclNodes.def needs to be modified, move things out-of-line and simplify the DeclContext class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
1ad4dd78ec53c24ea9e752b216035d7aa666fe49 16-Feb-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make DeclContexts maintenance a bit easier.

-In DeclNodes.def, only mark as DeclContexts the top classes that directly derive from DeclContext. If the Decl has subclasses,
it should be marked with DECL_CONTEXT_BASE.

-Use DeclNodes.def to automate the DeclContext::classof and DeclContext::CastTo definitions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
76a642ff4fce7a0648c79a1f01324a8c3880e251 15-Feb-2009 Chris Lattner <sabre@nondot.org> Refactor the deprecated and unavailable checks into a new
DiagnoseUseOfDeprecatedDecl method. This ensures that they
are treated consistently. This gets us 'unavailable' support
on a few new types of decls, and makes sure we consistently
silence deprecated when the caller is also deprecated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
5f2bfd4811996abb783aa6c7254c56baa6930e8c 13-Feb-2009 Douglas Gregor <dgregor@apple.com> Add basic support for C++ name mangling according to the Itanium C++
ABI to the CodeGen library. Since C++ code-generation is so
incomplete, we can't exercise much of this mangling code. However, a
few smoke tests show that it's doing the same thing as GCC. When C++
codegen matures, we'll extend the ABI tester to verify name-mangling
as well, and complete the implementation here.

At this point, the major client of name mangling is in the uses of the
new "overloadable" attribute in C, which allows overloading. Any
"overloadable" function in C (or in an extern "C" block in C++) will
be mangled the same way that the corresponding C++ function would be
mangled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
7dda67d8decef1b3621a151488c4b83bd8372d6a 05-Feb-2009 Douglas Gregor <dgregor@apple.com> Improvements and fixes for name lookup with using directives, from Piotr Rak!

Also, put Objective-C protocols into their own identifier
namespace. Otherwise, we find protocols when we don't want to in C++
(but not in C).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63877 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.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/DeclBase.h
64650af7cc4352c6c67b9bd1bf8ef3ce7471b910 03-Feb-2009 Douglas Gregor <dgregor@apple.com> Add a macro-based enumeration of all of the Decl nodes (like we do
with Stmt/Expr nodes), and convert some of the more mundane
switch-on-all-decl-kinds uses over to use this new file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
669c9a28fa4be35e6b6322aa7f2f3b2968189b80 02-Feb-2009 Douglas Gregor <dgregor@apple.com> Split specific_decl_iterator, which had a run-time field for
determining what decls are acceptable, into specific_decl_iterator
(in which all decls matching the SpecificDecl type requirements are
acceptable) and filtered_decl_iterator (which also does a run-time
check via a member pointer non-type template parameter). This saves
some space in the iterators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
d6f0b4e97e681ea5d165125960f34b3b8c19e1dc 02-Feb-2009 Douglas Gregor <dgregor@apple.com> Slim down the specific_decl_iterator, since NULL denotes the end of the range. Good eyes, Chris

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
efe38bdea21953f89c1504cfd1c63bee5f15b1b6 23-Jan-2009 Douglas Gregor <dgregor@apple.com> Fix a small regression in warning about template type parameter redeclarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
3fd56d755aa74f01fbe963195c95c963ea1fee91 23-Jan-2009 Douglas Gregor <dgregor@apple.com> Make sure that all NamedDecls have an identifier namespace.
Make sure that we know a call is invalid if we dropped arguments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
0a4739305a984ef9b821cedad5f4fe235eb6ef7d 20-Jan-2009 Steve Naroff <snaroff@apple.com> Allocate expresssions through ASTContext (still more work to do).
Add debug hook to DeclContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
40f4e69002af9623a1f959bd57b99afda186a6a7 20-Jan-2009 Douglas Gregor <dgregor@apple.com> Rename DeclContext::insert to DeclContext::makeDeclVisibleInContext and document both it and DeclContext::addDecl properly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
0cba85577ae613bce5768f3089003629a46b0e7f 20-Jan-2009 Douglas Gregor <dgregor@apple.com> Fix Decl::NextDeclInScope access issue

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
9b9ca01ff3136a7539dc08a4c4e1a3dd8c8d3a7d 13-Jan-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> DeclContext::KindTrait was not meant to be used outside of DeclContext::CastTo (causes compilation error on MSVC).
Add DeclContext::getDeclKind() and use that instead of DeclContext::KindTrait.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
482b77d1cb4ca08391d1f749436f092a4cc24427 13-Jan-2009 Douglas Gregor <dgregor@apple.com> Cleanup DeclContext::addDecl and DeclContext::insert interface, from Piotr Rak

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
6037fcba3431b47de1a994c9b286feac17894eff 09-Jan-2009 Douglas Gregor <dgregor@apple.com> Replace DeclContext's vector of ScopedDecl pointers with a linked list
of ScopedDecls (using the new ScopedDecl::NextDeclInScope
pointer). Performance-wise:

- It's a net win in memory utilization, since DeclContext is now one
pointer smaller than it used to be (std::vectors are typically 3
pointers; we now use 2 pointers) and
- Parsing Cocoa.h with -fsyntax-only (with a Release-Asserts Clang)
is about 1.9% faster than before, most likely because we no longer
have the memory allocations and copying associated with the
std::vector.

I'll re-enable serialization of DeclContexts once I've sorted out the
NextDeclarator/NextDeclInScope question.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
f8d49f64ef6ab7e632717a31631fc289aab69428 09-Jan-2009 Douglas Gregor <dgregor@apple.com> Provide a new kind of iterator, the specific_decl_iterator, that
filters the decls seen by decl_iterator with two criteria: the dynamic
type of the declaration and a run-time predicate described by a member
function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl
considerably. It has no measurable performance impact.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
09c4719788a5cea09897525e528fa00420f1677b 09-Jan-2009 Steve Naroff <snaroff@apple.com> Move property API's up to ObjCContainerDecl (removing a lot of duplicate code).
Add isa/cast/dyncast support for ObjCContainerDecl.
Renamed classprop_iterator/begin/end to prop_iterator/begin/end (the class prefix was confusing).
More simplifications to Sema::ActOnAtEnd()...
Added/changed some FIXME's as a result of the above work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
d04341000d35c8808a72838b057eed7bf13b7661 09-Jan-2009 Douglas Gregor <dgregor@apple.com> Addressed the issue in <rdar://problem/6479085>, where we failed to
rewrite @class declarations that showed up within linkage
specifications because those @class declarations never made it any
place where the rewriter could find them.

Moved all of the ObjC*Decl nodes over to ScopedDecls, so that they can
live in the appropriate top-level or transparent DeclContext near the
top level, e.g., TranslationUnitDecl or LinkageSpecDecl. Objective-C
declarations now show up in a traversal of the declarations in a
DeclContext (they didn't before!). This way, the rewriter finds all
Objective-C declarations within linkage specifications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
72de6676bd30f9081ee4166bbe07b4c270258ce6 08-Jan-2009 Douglas Gregor <dgregor@apple.com> Unify the code for defining tags in C and C++, so that we always
introduce a Scope for the body of a tag. This reduces the number of
semantic differences between C and C++ structs and unions, and will
help with other features (e.g., anonymous unions) in C. Some important
points:

- Fields are now in the "member" namespace (IDNS_Member), to keep
them separate from tags and ordinary names in C. See the new test
in Sema/member-reference.c for an example of why this matters. In
C++, ordinary and member name lookup will find members in both the
ordinary and member namespace, so the difference between
IDNS_Member and IDNS_Ordinary is erased by Sema::LookupDecl (but
only in C++!).
- We always introduce a Scope and push a DeclContext when we're
defining a tag, in both C and C++. Previously, we had different
actions and different Scope/CurContext behavior for enums, C
structs/unions, and C++ structs/unions/classes. Now, it's one pair
of actions. (Yay!)

There's still some fuzziness in the handling of struct/union/enum
definitions within other struct/union/enum definitions in C. We'll
need to do some more cleanup to eliminate some reliance on CurContext
before we can solve this issue for real. What we want is for something
like this:

struct X {
struct T { int x; } t;
};

to introduce T into translation unit scope (placing it at the
appropriate point in the IdentifierResolver chain, too), but it should
still have struct X as its lexical declaration
context. PushOnScopeChains isn't smart enough to do that yet, though,
so there's a FIXME test in nested-redef.c



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
40449fe96e2c6210ecb59515aaf939516fc09c22 08-Jan-2009 Ted Kremenek <kremenek@apple.com> Initialized member variable 'Implicit' in Decl's ctor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
0701bbb228dfd87e1fe82a0a4b7b9facfecb43da 08-Jan-2009 Steve Naroff <snaroff@apple.com> This is a large/messy diff that unifies the ObjC AST's with DeclContext.

- ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts.
- ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext).
- ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-)
- Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective.
- Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch().
- Simplified Sema::ActOnAtEnd() considerably. Still more work to do.
- Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl.
- Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl.

This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
41761d67291ae9ac74843f31737a96157d982c0b 08-Jan-2009 Zhongxing Xu <xuzhongxing@gmail.com> Fix comment because we could have arbitrary number of overloaded functions with
the same name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
e4f039e01e797a38bc97bf22aff9832ecd18ff5f 07-Jan-2009 Steve Naroff <snaroff@apple.com> ObjC AST cleanups/simplifications (phase 1).
Add ObjCContainerDecl class and have ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl inherit from it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
17a9b9e3ee75f5dbb4819cc8ebf40eec8015f84a 07-Jan-2009 Douglas Gregor <dgregor@apple.com> When determining whether a variable is a file-scoped variable, check
out its lookup context (to see through linkage
specifications). Addresses <rdar://problem/6477142>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
bcbffc46f1ad3796c4582fa1e3a9113b5aa26061 07-Jan-2009 Douglas Gregor <dgregor@apple.com> Initial implementation of anonymous unions (and, as a GNU extension,
structures and classes) in C++. Covers name lookup and the synthesis
and member access for the unnamed objects/fields associated with
anonymous unions.

Some C++ semantic checks are still missing (anonymous unions can't
have function members, static data members, etc.), and there is no
support for anonymous structs or unions in C.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61840 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
ce35607c282c845b3285d0f6e106489d8bbeba13 07-Jan-2009 Douglas Gregor <dgregor@apple.com> Allow Objective-C entities to be declared within a transparent context
nested in the translation unit. This fixes <rdar://problem/6476070>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
d62fdc448b3ace606c8c9c9f13e43218fa204dbf 06-Jan-2009 Chris Lattner <sabre@nondot.org> add a helper method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
3fc749d899dfc194162128c1a88933148a39b68d 23-Dec-2008 Douglas Gregor <dgregor@apple.com> Don't explicitly represent OverloadedFunctionDecls within
DeclContext. Instead, just keep the list of currently-active
declarations and only build the OverloadedFunctionDecl when we
absolutely need it.

This is a half-step toward eliminating the need to explicitly build
OverloadedFunctionDecls that store sets of overloaded
functions. This was suggested by Argiris a while back, and it's a good
thing for several reasons: first, it eliminates the messy logic that
currently tries to keep the OverloadedFunctionDecl in sync with the
declarations that are being added. Second, it will (eventually)
eliminate the need to allocate memory for overload sets, which could
help performance. Finally, it helps set us up for when name lookup can
return multiple (possibly ambiguous) results, as can happen with
lookup of class members in C++.

Next steps: make the IdentifierResolver store overloads as separate
entries in its list rather than replacing them with an
OverloadedFunctionDecl now, then see how far we can go toward
eliminating OverloadedFunctionDecl entirely.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
73da9e462576faedc2cdf96b37a1c072b404b73d 20-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> introducing ParmVarWithOriginalTypeDecl class to
keep track of the original parameter decl. types.
This is work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
270b4146ad54784ce41d0374e6a894eaab6c1650 17-Dec-2008 Douglas Gregor <dgregor@apple.com> Remove the crufty reverse_decl_iterator

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
9d35097bc0fefb2f77638be513cac72d1c09d840 12-Dec-2008 Douglas Gregor <dgregor@apple.com> Enable out-of-line definitions of C++ constructors and destructors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
f57172b24f08a68d179675989813d5479dc87829 08-Dec-2008 Douglas Gregor <dgregor@apple.com> Move Sema::isTemplateParameterDecl to Decl::isTemplateParameter, where it belongs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
77407b802130b1c44b1f63b855722a5376f57bca 19-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Take care another assert:

struct A {
struct B;
};

struct A::B {
void m() {} // Assertion failed: getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one."
};

Introduce DeclContext::getLexicalParent which may be different from DeclContext::getParent when nested-names are involved, e.g:

namespace A {
struct S;
}
struct A::S {}; // getParent() == namespace 'A'
// getLexicalParent() == translation unit


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
20bc6762282d192bd19be03094d4f311710e020c 19-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make the non-const DeclContext::getParent call the const version, instead of the other way around.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59646 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
2def48394f6d48bde0dec2b514193c2b533265b5 17-Nov-2008 Douglas Gregor <dgregor@apple.com> Updated IdentifierResolver to deal with DeclarationNames. The names of
C++ constructors, destructors, and conversion functions now have a
FETokenInfo field that IdentifierResolver can access, so that these
special names are handled just like ordinary identifiers. A few other
Sema routines now use DeclarationNames instead of IdentifierInfo*'s.

To validate this design, this code also implements parsing and
semantic analysis for id-expressions that name conversion functions,
e.g.,

return operator bool();

The new parser action ActOnConversionFunctionExpr takes the result of
parsing "operator type-id" and turning it into an expression, using
the IdentifierResolver with the DeclarationName of the conversion
function. ActOnDeclarator pushes those conversion function names into
scope so that the IdentifierResolver can find them, of course.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.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/DeclBase.h
c7ed9c60b8ee04b119e23441cae2cfec74536ba9 07-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Changes in preparation for nested-name-specifiers.

-When parsing declarators, don't depend on "CurScope->isCXXClassScope() == true" for constructors/destructors
-For C++ member declarations, don't depend on "Declarator.getContext() == Declarator::MemberContext"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.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/DeclBase.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/DeclBase.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/DeclBase.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/DeclBase.h
e2ed203b437c14de57a80d69b70164819d045d86 12-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> More const-ness goodness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
d2595ecce5f8350e485c83bfe767549a522b2802 12-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Improve the const-ness of a few methods.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
090276f5e164d491a1bb3f541bafdb394f5e6f04 10-Oct-2008 Steve Naroff <snaroff@apple.com> Final phase of converting BlockDecls over to DeclContext. This is unfortunately a largish/complex diff, however it was necessry to pass all the current block tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57337 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
56ee6896f2efebffb4a2cce5a7610cdf1eddbbbe 08-Oct-2008 Steve Naroff <snaroff@apple.com> - Add BlockDecl AST node.
- Modify BlockExpr to reference the BlockDecl.

This is "cleanup" necessary to improve our lookup semantics for blocks (to fix <rdar://problem/6272905> clang block rewriter: parameter to function not imported into block?).

Still some follow-up work to finish this (forthcoming).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
01e6779faca1e3a3164c697d6e2dfee0881a6981 20-Aug-2008 Ted Kremenek <kremenek@apple.com> Added ObjCAtDefsFieldDecl to represent FieldDecls created by @defs.
This fixes an ownership issue where FieldDecls could be owned both by an ObjCInterfaceDecl and a RecordDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
226e04a9b7790a7311aff2aa9df340c1841e20e3 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Ident class tree in DeclBase properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
a34ea072371154c9042ce86321d17fbb4df1f84d 05-Aug-2008 Ted Kremenek <kremenek@apple.com> Nico Weber:

"the attached patch fixes some typos, 80 cols violations, etc. in comments."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54328 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
69c8f0aab655257e9e532d9d53756acf4f7a2d78 31-Jul-2008 Ted Kremenek <kremenek@apple.com> Remove getCodeBody() from Decl, and hoist getBody() into Decl as a virtual function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54247 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
09c31b0d78fc4e7f1d1828d01d9977cc3e242ea3 25-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Set CXXClassVar to identifier namespace IDNS_Ordinary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
1ce6eadf80453d132d378ee031f3fbf5259a7d2a 25-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Set CXXMethod to identifier namespace IDNS_Ordinary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
792481eec23d8c1aa92173be589e2ae9d02514a5 20-Jun-2008 Ted Kremenek <kremenek@apple.com> Added "Decl::getCodyBody()", a virtual method that returns the root AST node (Stmt*) that the Decl wraps (if any). Currently this only returns a non-null value for FunctionDecl and ObjCMethodDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52552 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
4111024be81e7c0525e42dadcc126d27e5bf2425 17-Jun-2008 Chris Lattner <sabre@nondot.org> Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl.
Patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
7643536c36b0449256d5ee2efc03a7e4a784a0b3 10-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Add DeclChain member to DeclContext.
-ScopedDecls get chained to their DeclContext.
-DeclContext's DeclChain replaces FunctionDecl's DeclChain and EnumDecl's ElementList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.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/DeclBase.h
9141bee299a05349924a34a7153d7064c9e0a107 02-Jun-2008 Nuno Lopes <nunoplopes@sapo.pt> fix decl attributes cleaning
this plugs the leak of attributes and also fixes a crash in the test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
27f8a28bee33bb0e857cfe1a61c281bbc234b338 20-May-2008 Ted Kremenek <kremenek@apple.com> Try to plug some memory leaks...

1) Sema::ParseAST now constructs a TranslationUnit object to own the top-level Decls, which releases the top-level Decls upon exiting ParseAST.

2) Bug fix: TranslationUnit::~TranslationUnit handles the case where a Decl is added more than once as a top-level Decl.

3) Decl::Destroy is now a virtual method, obviating the need for a special dispatch based on DeclKind.

3) FunctionDecl::Destroy now releases its Body using its Destroy method.

4) Added Stmt::Destroy and Stmt::DestroyChildren, which recursively delete the child ASTs of a Stmt and call their dstors. We may need to special case dstor/Destroy methods for particular Stmt subclasses that own other dynamically allocated objects besides AST nodes.

5) REGRESSION: We temporarily are not deallocating attributes; a FIXME is provided.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
a212c56e9b7533bcc2d6be90efd52ad241bf894e 04-May-2008 Chris Lattner <sabre@nondot.org> Simplify FunctionDecl::AddRedeclaration a bit by using std::swap.
Fix 'swapping' of attributes to not insert null values into the
DeclAttrs map.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
2d1c5d313cd0c229cc614e74baa4c5756a4b46f4 27-Apr-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Parsing of namespaces:

-NamespaceDecl for the AST
-Checks for name clashes between namespaces and tag/normal declarations.

This commit doesn't implement proper name lookup for namespaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
ef177820100ab583b08fd3056e2a5a52ee4b1629 17-Apr-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Addition of TranslationUnitDecl to the AST:

-Added TranslationUnitDecl class to serve as top declaration context
-ASTContext gets a TUDecl member and a getTranslationUnitDecl() function
-All ScopedDecls get the TUDecl as DeclContext when declared at global scope


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
61d46159af2a740207de8dc024211d531ae290d9 17-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> New AST class for property implementation declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
248a753f6b670692523c99afaeb8fe98f7ae3ca7 16-Apr-2008 Steve Naroff <snaroff@apple.com> Remove FileVarDecl and BlockVarDecl. They are replaced by VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl().

This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
2ce52f3fb95bf544db6bd3d91a72bce7d9cceb6c 13-Apr-2008 Douglas Gregor <dgregor@apple.com> Introduce support for finding class and enum names via ordinary name lookup in C++

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
1bb19638f2ec0d63ed131b51ca8d9542d1a9afee 11-Apr-2008 Sam Bishop <sam@bishop.dhs.org> Invoke destructors in Decl::Destroy().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
bb45c512e0dfbe96bfe377ac642e726c0ba0affa 11-Apr-2008 Sam Bishop <sam@bishop.dhs.org> Stub out and start using a Decl::Destroy() method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
670aa9d7639278f507930e95dc89c12032ab7c7e 08-Apr-2008 Sam Bishop <sam@bishop.dhs.org> Changed the Decl::Kind enum of the ObjCPropertyDecl class, so that it follows
the pattern of the other Decl classes.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
b048c9835969c4f7fe06264748be18ed4b442116 06-Apr-2008 Chris Lattner <sabre@nondot.org> This patch contains these changes:

-Renamed ContextDecl -> DeclContext
-Removed DeclContext pointer from FieldDecl
-EnumDecl inherits from DeclContext, instead of TagDecl

Patch by Argiris Kirtzidis!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/DeclBase.h
0ed844b04ea4387caa4e1cf3dc375d269657536b 04-Apr-2008 Chris Lattner <sabre@nondot.org> Introduce ContextDecl, patch by Argiris Kirtzidis!

-Added ContextDecl (no TranslationUnitDecl)
-ScopedDecl class has a ContextDecl member
-FieldDecl class has a ContextDecl member, so that a Field or a ObjCIvar can be traced back to their RecordDecl/ObjCInterfaceDecl easily
-FunctionDecl, ObjCMethodDecl, TagDecl, ObjCInterfaceDecl inherit from ContextDecl. With TagDecl as ContextDecl, enum constants have a EnumDecl as their context.
-Moved Decl class to a "DeclBase.h" along with ContextDecl class
-CurContext is handled by Sema




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