3ea9e33ea25e0c2b12db56418ba3f994eb662c04 |
|
08-Apr-2015 |
Pirama Arumuga Nainar <pirama@google.com> |
Update aosp/master clang for rebase to r233350 Change-Id: I12d4823f10bc9e445b8b86e7721b71f98d1df442
/external/clang/lib/AST/DeclBase.cpp
|
0e2c34f92f00628d48968dfea096d36381f494cb |
|
23-Mar-2015 |
Stephen Hines <srhines@google.com> |
Update aosp/master clang for rebase to r230699. Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
/external/clang/lib/AST/DeclBase.cpp
|
176edba5311f6eff0cad2631449885ddf4fbc9ea |
|
01-Dec-2014 |
Stephen Hines <srhines@google.com> |
Update aosp/master Clang for rebase to r222490. Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/lib/AST/DeclBase.cpp
|
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 |
|
29-May-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for 3.5 rebase (r209713). Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/AST/DeclBase.cpp
|
651f13cea278ec967336033dd032faef0e9fc2ec |
|
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
b7165589b2eafc4b48d09a5914e21604ae580256 |
|
09-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++ modules: fix a bug where loading a declaration with some name would prevent name lookup from lazily deserializing the other declarations with the same name, by tracking a bit to indicate whether a name in a DeclContext might have additional external results. This also allows lazier reconciling of the lookup table if a module import adds decls to a pre-existing DC. However, this exposes a pre-existing bug, which causes a regression in test/Modules/decldef.mm: if we have a reference to a declaration, and a later-imported module adds a redeclaration, nothing causes us to load that redeclaration when we use or emit the reference (which can manifest as a reference to an undefined inline function, a use of an incomplete type, and so on). decldef.mm has been extended with an additional testcase which fails with or without this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
4e9686b1f9947f1747b4f4316deb2087a7f56282 |
|
09-Aug-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement [class.friend]p11's special name lookup rules for friend declarations of local classes. We were previously handling this by performing qualified lookup within a function declaration(!!); replace it with the proper scope lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
ef4579cda09b73e3d4d98af48201da25adc29326 |
|
06-Aug-2013 |
Larisse Voufo <lvoufo@google.com> |
Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
096a394f3d5b4938640e1ac92d9b439a2bad0a23 |
|
24-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Avoid adding entries to the DeclContext lookup table multiple times when lazily constructing a lookup table. Previously, buildLookup would add lookup table entries for each item lexically within the DC, and adding the first entry with a given name would trigger the external source to add all its entries with that name. Then buildLookup would carry on and re-add those entries all over again. Instead, follow a simple rule: a declaration from an external source is only ever made visible by the external source. One exception to this: since we don't usually build a lookup table for the TU in C, and we never serialize one, we don't expect the external source to provide lookups in the TU in C, so we build those ones ourselves. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
ddb10f767604d8efa5e491076d6fdd23a19db86c |
|
24-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When setting the external visible declarations for a decl context, check whether they replace any existing lookups in the context, rather than accumulating a bunch of lookup results referring to the same entity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
000817b3b2ab95c5b9cbb76950cd01b79fe93f55 |
|
03-May-2013 |
John McCall <rjmccall@apple.com> |
Micro-optimization: check the overloaded operator kind before checking for a lambda. Thanks to Jordan for the pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
76da55d3a49e1805f51b1ced7c5da5bcd7f759d8 |
|
16-Apr-2013 |
John McCall <rjmccall@apple.com> |
Basic support for Microsoft property declarations and references thereto. Patch by Tong Shen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
d2615cc53b916e8aae45783ca7113b93de515ce3 |
|
03-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add 178663 back. http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb went back green before it processed the reverted 178663, so it could not have been the culprit. Revert "Revert 178663." This reverts commit 4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41 |
|
03-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert 178663. Looks like it broke http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb Revert "Don't compute a patched/semantic storage class." This reverts commit 8f187f62cb0487d31bc4afdfcd47e11fe9a51d05. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
8f187f62cb0487d31bc4afdfcd47e11fe9a51d05 |
|
03-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't compute a patched/semantic storage class. For variables and functions clang used to store two storage classes. The one "as written" in the code and a patched one, which, for example, propagates static to the following decls. This apparently is from the days clang lacked linkage computation. It is now redundant and this patch removes it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
c640058aa7f224a71ce3b1d2601d84e1b57f82d3 |
|
22-Mar-2013 |
Alexey Bataev <a.bataev@hotmail.com> |
OpenMP threadprivate directive parsing and semantic analysis git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
b063ef0222a99ee168631afa7b5a882d494b8fde |
|
23-Feb-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add streamed versions of getQualifiedNameAsString. Move the cold virtual method getNameForDiagnostic out of line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
684aa73192d92850a926870be62a1787eb5b7ed9 |
|
22-Feb-2013 |
Michael Han <fragmentshaders@gmail.com> |
[Sema] Semantic analysis for empty-declaration and attribute-declaration. Introduce a new AST Decl node "EmptyDecl" to model empty-declaration. Have attributes from attribute-declaration appertain to the EmptyDecl node by creating the AST representations of these attributes and attach them to the EmptyDecl node so these attributes can be sema checked just as attributes attached to "normal" declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
2bb07c1dfeda50d7edcee512932b86a1a65c6e69 |
|
08-Feb-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix stack overflow and improve performance when a module contains many overloads of a name by claiming that there are no lookup results for that name in modules while loading the names from the module. Lookups in deserialization really don't want to find names which they themselves are in the process of introducing. This also has the pleasant side-effect of automatically caching PCH lookups which found no names. The runtime here is still quadratic in the number of overloads, but the constant is lower. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
3646c68676c3c46a026b23d52188ef6e0d856178 |
|
07-Feb-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Simplify FindExternalVisibleDeclsByName by making it return a bool indicating if it found any decls, rather than returning a list of found decls. This removes a returning-ArrayRef-to-deleted-storage bug from MultiplexExternalSemaSource (in code not exercised by any of the clang binaries), reduces the work required in the found-no-decls case with PCH, and importantly removes the need for DeclContext::lookup to be reentrant. No functionality change intended! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
cfa88f893915ceb8ae4ce2f17c46c24a4d67502f |
|
12-Jan-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Remove useless 'llvm::' qualifier from names like StringRef and others that are brought into 'clang' namespace by clang/Basic/LLVM.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
55fc873017f10f6f566b182b70f6fc22aefa3464 |
|
04-Dec-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Sort all of Clang's files under 'lib', and fix up the broken headers uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
2fa67efeaf66a9332c30a026dc1c21bef6c33a6c |
|
01-Dec-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't pull in all the generated Attr code. Required to pull some functions out of line, but this shouldn't have a perf impact. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
8dbf697cf5e10824659bc5061ebf470fa43716fa |
|
25-Nov-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add r168519 back, but with a fix to also merge the used flag in variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
6df81a94fca403c7aa66918404caab19cffbca35 |
|
25-Nov-2012 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Revert r168519, "Merge used flags so that we don't have to iterate on isUsed. With this change" It brought bunch of (possibly false) warnings. llvm/unittests/VMCore/PassManagerTest.cpp:60:22: warning: variable 'ID' is not needed and will not be emitted [-Wunneeded-internal-declaration] char ModuleNDNM::ID=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:86:22: warning: variable 'ID' is not needed and will not be emitted [-Wunneeded-internal-declaration] char ModuleNDM2::ID=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:106:21: warning: variable 'ID' is not needed and will not be emitted [-Wunneeded-internal-declaration] char ModuleDNM::ID=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:217:16: warning: variable 'initcount' is not needed and will not be emitted [-Wunneeded-internal-declaration] int LPass::initcount=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:218:16: warning: variable 'fincount' is not needed and will not be emitted [-Wunneeded-internal-declaration] int LPass::fincount=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:259:16: warning: variable 'inited' is not needed and will not be emitted [-Wunneeded-internal-declaration] int BPass::inited=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:260:16: warning: variable 'fin' is not needed and will not be emitted [-Wunneeded-internal-declaration] int BPass::fin=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:283:24: warning: variable 'ID' is not needed and will not be emitted [-Wunneeded-internal-declaration] char OnTheFlyTest::ID=0; ^ 8 warnings generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
919b7e69781daf68766bb9af11ca1b9f246ce935 |
|
23-Nov-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Merge used flags so that we don't have to iterate on isUsed. With this change "clang -cc1 -fsyntax-only" on the preprocessed output of #define M extern int a; #define M2 M M #define M4 M2 M2 #define M8 M4 M4 #define M16 M8 M8 #define M32 M16 M16 #define M64 M32 M32 #define M128 M64 M64 #define M256 M128 M128 #define M512 M256 M256 #define M1024 M512 M512 #define M2048 M1024 M1024 #define M4096 M2048 M2048 #define M8192 M4096 M4096 #define M16384 M8192 M8192 M16384 goes from 2.994s to 1.416s. GCC is at 0.022s, so we still have a long way to go. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168519 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
385e1d9fd05cdebf00924489788409f6853579bf |
|
23-Nov-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove redundant check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
1ad23d62007162df82b58bca31b4aa277a5f6586 |
|
10-Sep-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Remove redundant semicolons which are null statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
93ed7cf05f900b9150dcf59c0e0f37f3bd325f62 |
|
17-Jul-2012 |
Douglas Gregor <dgregor@apple.com> |
Teach the ASTImporter how to handle anonymous structs/unions better. Fixes <rdar://problem/11466212>; the test (and back-ported version of this code) were committed to LLDB in r160186. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
0b92fcb1353d2d8b31b6c485e6caa14568aca43b |
|
20-Jun-2012 |
John McCall <rjmccall@apple.com> |
Introduce ObjCRuntime::hasWeakClassImport() and use it in the appropriate places. I've turned this off for the GNU runtimes --- I don't know if they support weak class import, but it's easy enough for them to opt in. Also tweak a comment per review by Jordan. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
260611a32535c851237926bfcf78869b13c07d5b |
|
20-Jun-2012 |
John McCall <rjmccall@apple.com> |
Restructure how the driver communicates information about the target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
65daef179790a02eab1b5a989f53984375a06483 |
|
13-Mar-2012 |
Nick Lewycky <nicholas@mxc.ca> |
It never makes sense to do a lookup into a LinkageSpecDecl, so assert that we don't, and clean up the places that do it. The change to ASTWriter is surprising, but the deleted code is a no-op as of r152608. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d |
|
11-Mar-2012 |
David Blaikie <dblaikie@gmail.com> |
Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
ba50b3e8bc68bace2f6715111bbbb8510965be01 |
|
09-Mar-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Allow serializing an invalid ParmVarDecl and don't set access to public for invalid ParmVarDecls. Part of rdar://11007039. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
f4b7de1cef3007cc0479775638198287384d9af1 |
|
21-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of lambda expressions that occur within default arguments. There are two aspects to this: - Make sure that when marking the declarations referenced in a default argument, we don't try to mark local variables, both because it's a waste of time and because the semantics are wrong: we're not in a place where we could capture these variables again even if it did make sense. - When a lambda expression occurs in a default argument of a function template, make sure that the corresponding closure type is considered dependent, so that it will get properly instantiated. The second bit is a bit of a hack; to fix it properly, we may have to rearchitect our handling of default arguments, parsing them only after creating the function definition. However, I'd like to separate that work from the lambdas work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
3026348bd4c13a0f83b59839f64065e0fcbea253 |
|
20-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
More dead code removal (using -Wunreachable-code) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
561d3abc881033776ece385a01a510e1cbc1fa92 |
|
17-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
Remove unnecessary default cases in switches over enums. This allows -Wswitch-enum to find switches that need updating when these enums are modified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
5d1f496f86305b4738d465031a517b5be49f9ebd |
|
06-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Always allocate an extra 8 bytes for a deserialized declaration, since some code in Clang expects 8-byte alignment of declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147626 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
bd9482d859a74bf2c45ef8b8aedec61c0e1c8374 |
|
01-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Eliminate ObjCForwardProtocolDecl, which is redundant now that ObjCProtocolDecl modules forward declarations properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
1d784b277cdfd4eba03680715d2a082b3f28d295 |
|
01-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce the core infrastructure needed to model redeclaration chains for Objective-C protocols, including: - Using the first declaration as the canonical declaration - Using the definition as the primary DeclContext - Making sure that all declarations have a pointer to the definition data, and that we know which declaration is the definition - Serialization support for redeclaration chains and for adding definitions to already-serialized declarations. However, note that we're not taking advantage of much of this code yet, because we're still re-using ObjCProtocolDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
375bb1413c041055262c8a416f20d10474a5eda9 |
|
27-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDecl covers both declarations (@class) and definitions (@interface) of an Objective-C class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
53df7a1d34f21d8f2309311d1067d463e9064c60 |
|
15-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce the core infrastructure needed to model a complete redeclaration chain for Objective-C classes, including: - Using the first declaration as the canonical declaration. - Using the definition as the primary DeclContext - Making sure that all declarations have a pointer to the definition data, and the definition knows that it is the definition. - Serialization support for when a definition gets added to a declaration that comes from an AST file. However, note that we're not taking advantage of much of this code yet, because we're still re-using ObjCInterfaceDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
006e42f0c8b65b783d565ef10b938a9e82fc02e3 |
|
10-Dec-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Add ability to supply additional message to availability macros, // rdar://10095131 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
e664977aca2a05a77abab5a06dc0fb69e870cfb9 |
|
03-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Keep track of all of the import declarations that are parsed or implicitly generated in a translation unit. Modules will need this information to identify the actual imports that occurred. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
15de72cf580840c61e5704c2f8a2b56f9d0638e1 |
|
03-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a module import declaration, so that we properly represent, e.g., __import_module__ std.vector; in the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145725 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
d9d137e6bc54bad6a7aa64b667aea22230e8264b |
|
08-Nov-2011 |
Axel Naumann <Axel.Naumann@cern.ch> |
From Vassil Vassilev: add checks for removing Decls for more use cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
4b9c2d235fb9449e249d74f48ecfec601650de93 |
|
06-Nov-2011 |
John McCall <rjmccall@apple.com> |
Change the AST representation of operations on Objective-C property references to use a new PseudoObjectExpr expression which pairs a syntactic form of the expression with a set of semantic expressions implementing it. This should significantly reduce the complexity required elsewhere in the compiler to deal with these kinds of expressions (e.g. IR generation's special l-value kind, the static analyzer's Message abstraction), at the lower cost of specifically dealing with the odd AST structure of these expressions. It should also greatly simplify efforts to implement similar language features in the future, most notably Managed C++'s properties and indexed properties. Most of the effort here is in dealing with the various clients of the AST. I've gone ahead and simplified the ObjC rewriter's use of properties; other clients, like IR-gen and the static analyzer, have all the old complexity *and* all the new complexity, at least temporarily. Many thanks to Ted for writing and advising on the necessary changes to the static analyzer. I've xfailed a small diagnostics regression in the static analyzer at Ted's request. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
eb2d1f1c88836bd5382e5d7aa8f6b85148a88b27 |
|
23-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Removing a bunch of dead returns/breaks after llvm_unreachables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 |
|
23-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Switch assert(0/false) llvm_unreachable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
45df9c68b4d8eb2206b884c38e89f56d41452c83 |
|
09-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use ArrayRef in ExternalASTSource::SetExternalVisibleDeclsForName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
bcfd1f55bfbb3e5944cd5e03d07b343e280838c4 |
|
02-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Extend the ASTContext constructor to delay the initialization of builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
95ed7784a335aca53b0c6e952cf31a4cfb633360 |
|
27-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Treat top-level objective-c declarations , such as list of forward @class decls, in a DeclGroup node. Deal with its consequence throught clang. This is in preparation for more Sema work ahead. // rdar://8843851. Feel free to reverse if it breaks something important and I am unavailable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
9fc18c97991b1267221ee71d13d8fb2f036b387b |
|
26-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
When we're deserializing declarations lexically stored in a RecordDecl after having already deserialized the fields, clear out the fields first. This makes sure that we keep all of the declarations in the lexical context (including those implicitly added by later type-checking) within the same list. A test case for this behavior is coming as part of another commit; testing for this problem in isolation is a nightmare. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
02368d0d1a778b73fd73600496fcde4557b2973f |
|
26-Aug-2011 |
Axel Naumann <Axel.Naumann@cern.ch> |
From Vassil Vassilev: unnamed decls cannot be removed from the lookup map. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
203ba053ef3a7ccab513963118b4632b358c7e89 |
|
25-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Remove long-dead FIXME git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
bc84532e762a41141bd94037cd5d1133f234088e |
|
17-Aug-2011 |
Francois Pichet <pichet2000@gmail.com> |
Add serialization support for ClassScopeFunctionSpecializationDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
af0f4d0b2e38c810effc8b024ad2fb6604eec5d3 |
|
14-Aug-2011 |
Francois Pichet <pichet2000@gmail.com> |
Implement function template specialization at class scope extension in Microsoft mode. A new AST node is introduced: ClassScopeFunctionSpecialization. This node holds a FunctionDecl that is not yet specialized; then during the class template instantiation the ClassScopeFunctionSpecialization will spawn the actual function specialization. Example: template <class T> class A { public: template <class U> void f(U p) { } template <> void f(int p) { } // <== class scope specialization }; This extension is necessary to parse MSVC standard C++ headers, MFC and ATL code. BTW, with this feature in, clang can parse (-fsyntax-only) all the MSVC 2010 standard header files without any error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
5f9e272e632e951b1efe824cd16acb4d96077930 |
|
23-Jul-2011 |
Chris Lattner <sabre@nondot.org> |
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports them into the clang namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
ba6ffaf21e465c0926d7fc5fa294ea52f8d45faf |
|
15-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Augment the interface of ExternalASTSource::FindExternalLexicalDecls() to allow clients to specify that they've already (correctly) loaded declarations, and that no further action is needed. Also, make sure that we clear the "has external lexical declarations" bit before calling FindExternalLexicalDecls(), to avoid infinite recursion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
b43c8ec359293df0c1fc250201930f4461c835f8 |
|
04-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Switch the Decl and Stmt stats printing to use llvm::errs() instead of fprintf, and to be more consistent in formatting with the other stats printing routines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
7b3f853c6f684c1df423e994482681844c396342 |
|
23-Jun-2011 |
John McCall <rjmccall@apple.com> |
Apparently at some point in the past I forgot how 'continue' works in a 'while(false)' loop. Simplify this code; it was complicated only in anticipation of C++0x lambdas, and it can become complicated again when those happen. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
d6bf0effa9cd397b7466628c17b5f4f8dc362780 |
|
23-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor tweak to my last patch per Doug's comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133731 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
5cb0ef4aed9a4a1741260e16a99d18682335ab9b |
|
07-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement a minor optimization by not introducing declarations into DeclContext's lookup table when they aren't in any identifier namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
3e4c6c4c79a03f5cb0c4671d7c282d623c6dc35e |
|
05-May-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement support for C++0x alias templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
c69a505cfa318d571ce8a0cd038c8d958585a735 |
|
23-Apr-2011 |
Jay Foad <jay.foad@gmail.com> |
Remove unused STL header includes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
162e1c1b487352434552147967c3dd296ebee2f7 |
|
15-Apr-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Support for C++11 (non-template) alias declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
b53e417ba487f4193ef3b0485b420e0fdae643a2 |
|
26-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Extend the new 'availability' attribute with support for an 'unavailable' argument, which specifies that the declaration to which the attribute appertains is unavailable on that platform. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128329 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
0ff8818a23db02eba7202aa373ddaeb3ddbf5280 |
|
23-Mar-2011 |
Chris Lattner <sabre@nondot.org> |
remove a dead variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
67da6f6f0c20dbfebb1c383a3efaf85d925ad33e |
|
05-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When we're deserializing a template parameter declaration, temporarily use the translation unit as its declaration context, then deserialize the actual lexical and semantic DeclContexts after the template parameter is complete. This avoids problems when the DeclContext itself (e.g., a class template) is dependent on the template parameter (e.g., for the injected-class-name). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
9a299e0575ce235f491014627c7267e2d2cd73de |
|
04-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Make sure to put template parameters into their owning template's DeclContext once we've created it. This mirrors what we do for function parameters, where the parameters start out with translation-unit context and then are adopted by the appropriate DeclContext when it is created. Also give template parameters public access and make sure that they don't show up for the purposes of name lookup. Fixes PR9400, a regression introduced by r126920, which implemented substitution of default template arguments provided in template template parameters (C++ core issue 150). How on earth could the DeclContext of a template parameter affect the handling of default template arguments? I'm so glad you asked! The link is Sema::getTemplateInstantiationArgs(), which determines the outer template argument lists that correspond to a given declaration. When we're instantiating a default template argument for a template template parameter within the body of a template definition (not it's instantiation, per core issue 150), we weren't getting any outer template arguments because the context of the template template parameter was the translation unit. Now that the context of the template template parameter is its owning template, we get the template arguments from the injected-class-name of the owning template, so substitution works as it should. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
8755836379a3f8e9848b5e770aa60d00e1fbb990 |
|
17-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Simple little optimization to Decl::getCanonicalDecl(), eliminating some heavyweight machinery and indirection that we don't need git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
ad8dcf4a9df0e24051dc31bf9e6f3cd138a34298 |
|
17-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
Step #1/N of implementing support for __label__: split labels into LabelDecl and LabelStmt. There is a 1-1 correspondence between the two, but this simplifies a bunch of code by itself. This is because labels are the only place where we previously had references to random other statements, causing grief for AST serialization and other stuff. This does cause one regression (attr(unused) doesn't silence unused label warnings) which I'll address next. This does fix some minor bugs: 1. "The only valid attribute " diagnostic was capitalized. 2. Various diagnostics printed as ''labelname'' instead of 'labelname' 3. This reduces duplication of label checking between functions and blocks. Review appreciated, particularly for the cindex and template bits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
1fe85ea697fb5c85acded3ac0ddbc19f89c2e181 |
|
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Add Decl::isParameterPack(), which covers both function and template parameter packs, along with ParmVarDecl::isParameterPack(), which looks for function parameter packs. Use these routines to fix some obvious FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
61c4d28e36cd3f1be392cb77f07436d1fa6b0f9f |
|
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement support for template template parameter packs, e.g., template<template<class> class ...Metafunctions> struct apply_to_each; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122874 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
10738d36b150aa65206890c1c845cdba076e4200 |
|
24-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Add an AST representation for non-type template parameter packs, e.g., template<typename T, unsigned ...Dims> struct multi_array; along with semantic analysis support for finding unexpanded non-type template parameter packs in types, expressions, and so on. Template instantiation involving non-type template parameter packs probably doesn't work yet. That'll come soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
87c2e121cf0522fc266efe2922b58091cd2e0182 |
|
21-Nov-2010 |
Francois Pichet <pichet2000@gmail.com> |
Major anonymous union/struct redesign. A new AST node is introduced: def IndirectField : DDecl<Value>; IndirectFields are injected into the anonymous's parent scope and chain back to the original field. Name lookup for anonymous entities now result in an IndirectFieldDecl instead of a FieldDecl. There is no functionality change, the code generated should be the same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
100050bf643bcfe2d06bdcef491e387171249260 |
|
28-Oct-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use the ASTMutationListener to track when a named decl gets added to a DeclContext, meaning we need to rewrite its name lookup table in a chained PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
1274ccd90aec0b205fc838c3d504821ccfb55482 |
|
09-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a bit by me). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
27c08ab4859d071efa158a256f7e47e13d924443 |
|
28-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Centralize the handling of CXXRecordDecl::DefinitionData::DeclaredCopyAssignment, for copy-assignment operators. Another step toward <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
5c0646b98b203d105c10ad8cc11be11cc99a4218 |
|
27-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Clean up the handling of the DeclaredDefaultConstructor and DeclaredCopyConstructor bits in CXXRecordDecl's DefinitionData structure. Rather than having Sema call addedConstructor or set the bits directly at semi-random places, move all of the logic for managing these bits into CXXRecordDecl itself and tie the addedConstructor call into DeclContext::addDecl(). This makes it easier for AST-building clients to get the right bits set in DefinitionData, and is one small part of <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
d580e5636568cdc8db0584dd3b7a53323f981e48 |
|
08-Sep-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Decl::CheckAccessDeclContext() keeps asserting. Access is not set in some cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
65b63ec1410f09e1f3cdb847018d678b8f8fc3f7 |
|
08-Sep-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Re-enable CheckAccessDeclContext and make sure it doesn't trigger assertions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
4e4d57069cf9402728e05f7fc856295a86e4801f |
|
31-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Enable inline namespaces in the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
51a8a378012b5d6a1306fdd75bd135fea3e23b7b |
|
31-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Decl::getEnclosingNamespaceContext has no reason to explicitly skip transparent contexts, and would be wrong to do so with inline namespaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
074dcc8ef8c5df7a155c85648e8eae786bee6cab |
|
20-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use the AST on-disk hash table for name lookup inside a DeclContext. *Huge* improvement over the amount of deserializing that we do for C++ lookup. e.g, if he have the Carbon header precompiled and include it on a file containing this: int x; these are the before/after stats: BEFORE: *** AST File Statistics: 578 stat cache hits 4 stat cache misses 548/30654 source location entries read (1.787695%) 15907/16501 types read (96.400223%) 53525/59955 declarations read (89.275291%) 33993/43525 identifiers read (78.099945%) 41516/51891 statements read (80.006165%) 77/5317 macros read (1.448185%) 0/6335 lexical declcontexts read (0.000000%) 1/5424 visible declcontexts read (0.018437%) AFTER using the on-disk table: *** AST File Statistics: 578 stat cache hits 4 stat cache misses 548/30654 source location entries read (1.787695%) 10/16501 types read (0.060602%) 9/59955 declarations read (0.015011%) 161/43525 identifiers read (0.369902%) 20/51891 statements read (0.038542%) 6/5317 macros read (0.112846%) 0/6335 lexical declcontexts read (0.000000%) 2/5424 visible declcontexts read (0.036873%) There's only one issue affecting mostly the precompiled preambles which I will address soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
0dbbc042518e6ba903dd6f815cbb8704595cc937 |
|
30-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When we are deserializing the lexical decls of a DeclContext from PCH, notify the PCHReader to hold off passing Decls to the consumer until the DeclContext is fully prepared. Before, due to recursive loading, we could be in a situation where we would try to deserialize the decls of a DeclContext which was already doing that, and bad things would happen. In the specific case I encountered, the lexical decls would form a cycle and we would enter infinite loop territory. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
a2da780b325e78c6c6bbbb766459a73243c3cf9e |
|
25-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove destructors from declaration nodes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
ff331c15729f7d4439d253c97f4d60f2a7ffd0c6 |
|
25-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove the vast majority of the Destroy methods from the AST library, since we aren't going to be calling them ever. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
cad8d31117800f804ee4f313134162edac8f8813 |
|
12-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Copy over attributes to instantiated variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
6717ef4e695cb37b69dead5fae486c73f8a44a28 |
|
07-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Simplify code. CompoundStmt's RBraceLoc can be found using its SourceRange too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107770 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
5586b019c18024b2967d027a17d5a05584a8b181 |
|
04-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When adding a visible decl, deserialize the visible decls and add it. Before this commit, visible decls added before deserialization were ignored. This was not an issue since name lookup (that usually comes before the addition) forces deserialization but it is an issue for lazily declared class implicit members. We can use a PCH'ed <string> now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
1827403a7138946305c0058f262e02b595cf882f |
|
03-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Lazily declare default constructors. We now delay the construction of declarations for implicit default constructors, copy constructors, copy assignment operators, and destructors. On a "simple" translation unit that includes a bunch of C++ standard library headers, we generate relatively few of these implicit declarations now: 4/159 implicit default constructors created 18/236 implicit copy constructors created 70/241 implicit copy assignment operators created 0/173 implicit destructors created And, on this translation unit, this optimization doesn't really provide any benefit. I'll do some more performance measurements soon, but this completes the implementation work for <rdar://problem/8151045>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
04aed0edee1fe0bad807afb69f484c5e807800af |
|
02-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Disable Decl::CheckAccessDeclContext() temporarily. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
6206d53f67613958ae1b023aba337ebb46f11a8b |
|
05-Jun-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added AccessSpecDecl node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
a5fdd9ce694b1c2dbfd225cb6f55ef743d1ab562 |
|
11-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Fixes for compilation with Microsoft Visual Studio 2010, from Steven Watanabe! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
baf633b41fc1cb42fd5e128954550bf1853f2a8d |
|
23-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Make TemplateDecl and ObjCContainerDecl abstract git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
db2eb5abf4c082d1f0c5c45e39d8cd0300f81e38 |
|
31-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove the AST statistics tracking I added yesterday; it didn't pan out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
f540305c5d834ad9412b41805b81a74249b7c5af |
|
30-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce new AST statistics that keep track of the number of isa (or dyn_cast) invocations for C++ and Objective-C types, declarations, expressions, and statements. The statistics will be printed when -print-stats is provided to Clang -cc1, with results such as: 277073 clang - Number of checks for C++ declaration nodes 13311 clang - Number of checks for C++ expression nodes 18 clang - Number of checks for C++ statement nodes 174182 clang - Number of checks for C++ type nodes 92300 clang - Number of checks for Objective-C declaration nodes 9800 clang - Number of checks for Objective-C expression nodes 7 clang - Number of checks for Objective-C statement nodes 65733 clang - Number of checks for Objective-C type nodes The statistics are only gathered when NDEBUG is not defined, since they introduce potentially-expensive operations into very low-level routines (isa). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
b836518bfc0a2ad5e22a670c82fa070ed83ea909 |
|
30-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
When copying a partial diagnostic into a DependentDiagnostic, allocate storage for that partial diagnostic via the ASTContext's BumpPtrAllocator rather than using up slots in the ASTContext's cache. Now that we do this, we don't have to worry about destroying dependent diagnostics when destroying a DependentStoredDeclsMap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
fe6b2d481d91140923f4541f273b253291884214 |
|
30-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Optimize PartialDiagnostic's memory-allocation behavior by placing a cache of PartialDiagnostic::Storage objects into an allocator within the ASTContext. This eliminates a significant amount of malloc traffic, for a 10% performance improvement in -fsyntax-only wall-clock time with 403.gcc's combine.c. Also, eliminate the RequireNonAbstractType hack I put in earlier, which was but a symptom of this larger problem. Fixes <rdar://problem/7806091>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
92b7f70c924cbf4514e9e434cea7def51ab49860 |
|
11-Mar-2010 |
John McCall <rjmccall@apple.com> |
Split C++ friend declarations into their own header/implementation file. I'm expecting this portion of the AST to grow and change, and I'd like to be able to do that with minimal recompilation. If this proves unnecessary when access control is fully-implemented, I'll fold the classes back into DeclCXX.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
3cb0ebd5f76abcb776f7cb4062bd79e3268c0dc4 |
|
10-Mar-2010 |
John McCall <rjmccall@apple.com> |
Create a new InjectedClassNameType to represent bare-word references to the injected class name of a class template or class template partial specialization. This is a non-canonical type; the canonical type is still a template specialization type. This becomes the TypeForDecl of the pattern declaration, which cleans up some amount of code (and complicates some other parts, but whatever). Fixes PR6326 and probably a few others, primarily by re-establishing a few invariants about TypeLoc sizes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
fdd8ab11bc40c7f206c8f1e892faa002cc6536b1 |
|
22-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't assert that we have a valid access specifier on an invalid declaration. This is the trivial part of PR6365. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
3478eb6872d836600caf45b0f81c2065d685d6e0 |
|
11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Have ~ASTContext() delete StoredDeclsMap (internal to DeclContext) by storing the set of StoredDeclsMaps in an internal vector of void*. This isn't an ideal solution, but for the time being this fixes a major memory leak with these DenseMaps not being freed. Fixes: <rdar://problem/7634755> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
7a9813ced7455b8a33a807489ca77a4f809c8a73 |
|
22-Jan-2010 |
John McCall <rjmccall@apple.com> |
Create function, block, and template parameters in the context of the translation unit. This is temporary for function and block parameters; template parameters can just stay this way, since Templates aren't DeclContexts. This gives us the nice property that everything created in a record DC should have access in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
46460a68f6508775e98c19b4bb8454bb471aac24 |
|
20-Jan-2010 |
John McCall <rjmccall@apple.com> |
First pass at collecting access-specifier information along inheritance paths. Triggers lots of assertions about missing access information; fix them. Will actually consume this information soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
9f54ad4381370c6b771424b53d219e661d6d6706 |
|
10-Dec-2009 |
John McCall <rjmccall@apple.com> |
Implement redeclaration checking and hiding semantics for using declarations. There are a couple of O(n^2) operations in this, some analogous to the usual O(n^2) redeclaration problem and some not. In particular, retroactively removing shadow declarations when they're hidden by later decls is pretty unfortunate. I'm not yet convinced it's worse than the alternative, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
6bc20135a2c46f97da15994095616a305be35c6a |
|
08-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR5710: make sure to put function template specializations into the DeclContext, so they don't completely disappear from the AST. I don't particularly like this fix, but I don't see any obviously better way to deal with it, and I think it's pretty clearly an improvement; comments welcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
51fa86f738a9768fac4e1cad7bdde53774b5b322 |
|
02-Dec-2009 |
John McCall <rjmccall@apple.com> |
r90313, in which OverloadedFunctionDecl is removed and never spoken of again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
94a39005e3733f2e498f2642be95507dda184ca1 |
|
01-Dec-2009 |
Ted Kremenek <kremenek@apple.com> |
Allocate MultipleDC objects using the allocator associated with ASTContext instead of malloc. Besides reducing malloc traffic, this also removes a source of memory leaks when using a BumpPtrAllocator for the allocator of ASTContext. There are still leaks when using MallocAllocator because Decl::Destroy() isn't fully finished. Fixes: <rdar://problem/7431556> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
2024f4d4b0d57616f79ea742fa782d633d414462 |
|
29-Nov-2009 |
Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> |
Streamline Stmt::CollectingStats() and Decl::CollectingStats(). No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
7ba107a1863ddfa1664555854f0d7bdb3c491c92 |
|
18-Nov-2009 |
John McCall <rjmccall@apple.com> |
Incremental progress on using declarations. Split UnresolvedUsingDecl into two classes, one for typenames and one for values; this seems to have some support from Doug if not necessarily from the extremely-vague-on-this-point standard. Track the location of the 'typename' keyword in a using-typename decl. Make a new lookup result for unresolved values and deal with it in most places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
321c22f1c4271c3d9a3d4d3fc18847f948ab595b |
|
18-Nov-2009 |
Ted Kremenek <kremenek@apple.com> |
Add SourceLocations to ObjCClassDecl for the class identifiers referenced by @class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
c32b1d82c1f6d0f0d6c615beb3b6bdfbfbea7098 |
|
17-Nov-2009 |
Ted Kremenek <kremenek@apple.com> |
Do not register ObjCInterfaceDecls implicitly created by @class in the current DeclContext. These "imaginary" declarations pose issues for clients searching DeclContext for actual declarations. Instead, register them for name lookup, and add the ObjCInterfaceDecl later to the DeclContext when we hit an actual @interface declaration. This also fixes a bug where the invariant that the Decls in a DeclContext are sorted in order of their appearance is no longer violated. What could happen is that an @class causes an ObjCInterfaceDecl to get added first to the DeclContext, then the ObjCClassDecl itself is added, and then later the SourceLocation of the ObjCInterfaceDecl is updated with the correct location (which is later in the file). This breaks an assumed invariant in ResolveLocation.cpp (and possibly other clients). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
58e4677a948e80c92deeebbcd3bdd9266adda798 |
|
23-Oct-2009 |
John McCall <rjmccall@apple.com> |
Remove OriginalTypeParmDecl; the original type is the one specified in the DeclaratorInfo, if one is present. Preserve source information through template instantiation. This is made more complicated by the possibility that ParmVarDecls don't have DIs, which is possibly worth fixing in the future. Also preserve source information for function parameters in ObjC method declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
dd4a3b0065b9a7e7b00073df415a798886c090f3 |
|
17-Sep-2009 |
John McCall <rjmccall@apple.com> |
Improved representation and support for friend class templates. Angst about same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
1eb4433ac451dc16f4133a88af2d002ac26c58ef |
|
09-Sep-2009 |
Mike Stump <mrs@apple.com> |
Remove tabs, and whitespace cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
d7eff68dbbbc6b3f8dfd44f6a833c2b320a96e9a |
|
02-Sep-2009 |
John McCall <rjmccall@apple.com> |
Ensure that the tag decls of friend decls aren't added to the friending class's decl list, and remove some workarounds that were due to this. Thanks to Eli for pointing this out and providing the test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
35eda446cdf5b4e95a80ffacbf6c7f7478c6d927 |
|
29-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add a workaround for decls that come from friend decls pointing to undeclared classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80438 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
5fee110ac106370f75592df024001de73edced2a |
|
29-Aug-2009 |
John McCall <rjmccall@apple.com> |
For consistency, just make friend declarations AS_public. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
54f70e19c872f5f3fa66343ce4a1a5e0c707eb09 |
|
29-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Don't assert that friend declarations must have access specifiers for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
665b49c62d637d16826036118f92d35f116f3ef3 |
|
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Check in UnresolvedUsingDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
c48fbdfb83a5e50fed693f0bdda3396e5b67051d |
|
11-Aug-2009 |
John McCall <rjmccall@apple.com> |
Add a FriendClassDecl type for holding declarations of friend types in the AST, and create such declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
6217b80b7a1379b74cced1c076338262c3c980b3 |
|
29-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Change uses of: Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsRecordType() -> Type::getAs<RecordType>() Type::getAsPointerType() -> Type::getAs<PointerType>() Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>() Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>() Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>() Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>() Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsTagType() -> Type::getAs<TagType>() And remove Type::getAsReferenceType(), etc. This change is similar to one I made a couple weeks ago, but that was partly reverted pending some additional design discussion. With Doug's pending smart pointer changes for Types, it seemed natural to take this approach. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
35366a67baa970c287c714c957cf78a4131cf60d |
|
17-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methods until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
5cad1f74469d4d8b4fc51fe53a7837778aeb6107 |
|
17-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
9b34669c672e776a24616eb01cffcf7061356d26 |
|
30-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Decl::getTranslationUnitDecl() should return itself when the Decl is a TranslationUnitDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
40b598eea1310ec9ed554d56ce3e25b34c585458 |
|
30-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove the ASTContext parameter from the attribute-related methods of Decl. The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
58badb7a655d021fc67bb7ed0af95d6ea0c63eb1 |
|
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
See through UsingDecls in more places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
68584ed35ad819a1668e3f527ba7f5dd4ae6a333 |
|
18-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
c8ab2563ac8f7dcc4fdc518b5cc7015ecbb2f003 |
|
31-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial infrastructure for class template partial specialization. Here we have the basics of declaring and storing class template partial specializations, matching class template partial specializations at instantiation time via (limited) template argument deduction, and using the class template partial specialization's pattern for instantiation. This patch is enough to make a simple is_pointer type trait work, but not much else. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72662 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
1c02101999a576790b433ac4b5195e7ac4197347 |
|
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Get rid of CXXTempVarDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
b0156ea412df1c2eb12d620054a404da71784cf5 |
|
28-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
A couple more small changes which are probably required for Cygwin builds to work (PR4088). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
9a55d3e1e52780977714e84e310831f22ec3faf0 |
|
24-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
CXXTempVarDecls aren't looked up. Fixes tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69960 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
a27e5feaab38b99a0e4473247dbd157f015ea4d1 |
|
08-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
improve compatibility with VC+, patch by John Thompson! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
5c27f2bfd2e19429dd9206f9b019e11d4a570acf |
|
07-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Allow us to ask for the access specifier of a translation unit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
5648a8a700d2a0435373da4122d32f8e6fe95656 |
|
29-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
change another PointerIntPair into a PointerUnion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
faf0e872f3409ecafbc458eabb22be76f79cb050 |
|
29-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Let getIdentifierNamespaceForKind know about aliases and have it treat them just like namespace decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
cc5814732edc0c382d0136ab57ec6149566043e2 |
|
04-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
add an a Attr::Destroy method and force clients to go through it. As part of this, make DeclBase::Destroy destroy attributes instead of the DeclBase dtor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
3daed52a57d03765223021f5f921bdc280c8f3cc |
|
02-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
improve compatibility with GCC 4.4, patch by Michel Salim (PR3697) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
fc705b84347e6fb4746a1a7e26949f64c2f2f358 |
|
26-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Make the type associated with a ClassTemplateSpecializationDecl be a nicely sugared type that shows how the user wrote the actual specialization. This sugared type won't actually show up until we start doing instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
01011d4e4d6d5146f58233a508509757382d62c3 |
|
23-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Add copy assignment operator, caught by doug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
67762a35dca6202d2272db02d0b8740728e3aa8f |
|
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
optimize the 'StoredDeclsMap' for the common case where there is exactly one decl with a specific name in a specific context. This avoids a bunch of malloc traffic and shrinks StoredDeclsMap to hold one pointer instead of 3 words (for a std::vector). This speeds up -fsyntax-only on cocoa.h with PTH by ~7.3%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
bdc3d0034d5b637b211abd01a936267df27118cc |
|
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
make the redeclaration case faster for the common instance of a redeclaration where there is exactly one existing declaration. This is common. this speeds up clang about 3% on cocoa.h for me 0.165 -> 0.160s git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65096 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
7f0be13b435ad110f99af83a24a50f43225f3083 |
|
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
80 cols git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
91942501b6f71a41d3a09bedec19be479832c718 |
|
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
slight code simplifications. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
f82328852c80a51b36a146de6ef5fd5b15e72c37 |
|
19-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
only do one DenseMap lookup instead of two (one to find out if there is already an entry and one to insert). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65030 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
ba1bd5c54d941d682ac7e946a51604f05cf470e7 |
|
19-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
minor simplification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
bd6c80037626a37ce3936a36d9ae287f475845b7 |
|
19-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
use early exit to reduce indentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
8c7250b7badebbf143d6372b6b4ab8ad2867cecc |
|
17-Feb-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Currently all DeclContexts are Decls as well; use cast<Decl> instead of dyn_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
aaba5e346dffdbad5d1c42765a89e4a7afb0da67 |
|
04-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Basic representation of C++ class templates, from Andrew Sutton. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
3e9704981d7691fdd44913bf1786e8d760d8a627 |
|
27-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Remove many references to ASTContext::getAllocator(), replacing them with calls to the recently added placement new (which uses ASTContext's allocator for memory). Also added ASTContext::Deallocate(). This will simplify runtime replacement of ASTContext's allocator. Keeping the allocator private (and removing getAllocator() entirely) is also goodness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
00ad0ef8369ee65337ff29c8db3c1841a01102c4 |
|
20-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove the TopLevelDecls from TranslationUnit, since all of those decls are owned by the ASTContext's TranslationUnitDecl. There are definitely some leaking Decls now that I'll tackle tomorrow git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
0b7a158d120ac8d78c114a823e17eedfec6b6658 |
|
17-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Teach DeclContext how to find the primary declaration for any TagDecl even when we are still defining the TagDecl. This is required so that qualified name lookup of a class name within its definition works (see the new bits in test/SemaCXX/qualified-id-lookup.cpp). As part of this, move the nested redefinition checking code into ActOnTag. This gives us diagnostics earlier (when we try to perform the nested redefinition, rather than when we try to complete the 2nd definition) and removes some code duplication. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
4c92fea0c838e0df95f7aa53c0c592b659ea1b10 |
|
14-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Fix a subtle bug in DeclContext::DestroyDecls(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
a0fc55f3e9d7d7aa8761d0a9726033947d0d6bc0 |
|
13-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Turn off some Destroy calls that are currenly causing double-destruction of ScopedDecls. We will re-enable this later, when we have time to fully solve the ownership issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62175 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
a8cc8ce044e5d2589128f0c1a84e586cce743b27 |
|
09-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that ScopedDecls passed to DeclContext::addDecl are added into their lexical context git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
4f3b8f8ac2f8c89028a2f8793df0a7887df809d4 |
|
06-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Minor tweaks to the transparent declcontext patch git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
6ed40e351a7c1fb3084434f1db19216b79623cf0 |
|
23-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Don't push OverloadedFunctionDecls onto the chain of declarations attached to an identifier. Instead, all overloaded functions will be pushed into scope, and we'll synthesize an OverloadedFunctionDecl on the fly when we need it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
4f5420d623831cceb567392067aa31ed2d3c37f6 |
|
20-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Add case for the new AST node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61287 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
0874bd31984529b71aa4ffaac73be948e2402222 |
|
15-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Don't double-destroy constructors defined out-of-line. This is a half-solution; the real solution is coming when constructors and destructors are treated like all other functions by ActOnDeclarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
e267ff35b2f4e9d2b0d8bf24109d41cc7398b61b |
|
11-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Address some comments on the name lookup/DeclContext patch from Chris git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60897 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
44b4321feab46299d3f5cfd404680884752a0fcf |
|
11-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Unifies the name-lookup mechanisms used in various parts of the AST and separates lexical name lookup from qualified name lookup. In particular: * Make DeclContext the central data structure for storing and looking up declarations within existing declarations, e.g., members of structs/unions/classes, enumerators in C++0x enums, members of C++ namespaces, and (later) members of Objective-C interfaces/implementations. DeclContext uses a lazily-constructed data structure optimized for fast lookup (array for small contexts, hash table for larger contexts). * Implement C++ qualified name lookup in terms of lookup into DeclContext. * Implement C++ unqualified name lookup in terms of qualified+unqualified name lookup (since unqualified lookup is not purely lexical in C++!) * Limit the use of the chains of declarations stored in IdentifierInfo to those names declared lexically. * Eliminate CXXFieldDecl, collapsing its behavior into FieldDecl. (FieldDecl is now a ScopedDecl). * Make RecordDecl into a DeclContext and eliminates its Members/NumMembers fields (since one can just iterate through the DeclContext to get the fields). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
72c3f314d92d65c050ee1c07b7753623c044d6c7 |
|
05-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Representation of template type parameters and non-type template parameters, with some semantic analysis: - Template parameters are introduced into template parameter scope - Complain about template parameter shadowing (except in Microsoft mode) Note that we leak template parameter declarations like crazy, a problem we'll remedy once we actually create proper declarations for templates. Next up: dependent types and value-dependent/type-dependent expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
d40910b581b09c937a8c1fdcde9b8ec724398fb9 |
|
01-Dec-2008 |
Steve Naroff <snaroff@apple.com> |
-Add several ObjC types to Decl::getDeclKindName(), a useful debug hook. -Start adding support for rewriting @synthesize. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
051c13a4a99c651e404b4a3160e1173b427eee17 |
|
19-Nov-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make DeclContext::getLexicalParent reuse DeclContext::getParent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
56ee6896f2efebffb4a2cce5a7610cdf1eddbbbe |
|
08-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
- Add BlockDecl AST node. - Modify BlockExpr to reference the BlockDecl. This is "cleanup" necessary to improve our lookup semantics for blocks (to fix <rdar://problem/6272905> clang block rewriter: parameter to function not imported into block?). Still some follow-up work to finish this (forthcoming). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
e91593ef084479340582b2ba177b44be50a717b7 |
|
11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
More #include cleaning - Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and SourceLocation.h) - Move ASTContext constructor into implementation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
55d71f9f4cf5f123db5d6dcfd20f3a8d5699c226 |
|
10-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add some C++ Decl statistics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54604 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
4111024be81e7c0525e42dadcc126d27e5bf2425 |
|
17-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl. Patch by David Chisnall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
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/lib/AST/DeclBase.cpp
|
56d29376459f88dcdbcbf6c9a83c2f77e433f1e2 |
|
07-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Fix the line endings in the newly added DeclBase.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|
e184baeaa112ceac32420f8ca127b8d4d152d109 |
|
04-Jun-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Move Decl and DeclContext implementations into a new DeclBase.cpp file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclBase.cpp
|