ef8225444452a1486bd721f3285301fe84643b00 |
|
21-Jul-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for rebase to r212749. This also fixes a small issue with arm_neon.h not being generated always. Includes a cherry-pick of: r213450 - fixes mac-specific header issue r213126 - removes a default -Bsymbolic on Android Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/lib/AST/Decl.cpp
|
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 |
|
29-May-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for 3.5 rebase (r209713). Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/AST/Decl.cpp
|
651f13cea278ec967336033dd032faef0e9fc2ec |
|
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/AST/Decl.cpp
|
525f2f5437929a324a37697f2934fda78931c66a |
|
09-Dec-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r196712: ------------------------------------------------------------------------ r196712 | rafael | 2013-12-07 17:13:22 -0800 (Sat, 07 Dec 2013) | 12 lines Fix pr18174. Clang outputs LLVM one top level decl at a time. This combined with the visibility computation code looking for the newest NamespaceDecl would cause it to produce different results for nested namespaces. The two options for producing consistent results are * Delay codegen of anything inside a namespace until the end of the file. * Don't look for the newest NamespaceDecl. This patch implements the second option. This matches the gcc behavior too. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
b8110d4e00a973c3238e23110e3d405da55fa7d3 |
|
27-Nov-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r195768: ------------------------------------------------------------------------ r195768 | rafael | 2013-11-26 08:09:08 -0800 (Tue, 26 Nov 2013) | 3 lines Don't call getMostRecentDecl when we know we have it. On a Release build this takes the testcase in pr18055 from 0m3.892s to 0m1.452s. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
3cebc73895daccea85984d8881b5b45c8f8df9c6 |
|
05-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++1y sized deallocation: if we have a use, but not a definition, of a sized deallocation function (and the corresponding unsized deallocation function has been declared), emit a weak discardable definition of the function that forwards to the corresponding unsized deallocation. This allows a C++ standard library implementation to provide both a sized and an unsized deallocation function, where the unsized one does not just call the sized one, for instance by putting both in the same object file within an archive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
2d023ecb2b9204a3dbc3b88ad9564b0a5bc211f6 |
|
02-Nov-2013 |
Warren Hunt <whunt@google.com> |
Wraps lazily generated builtins in an extern "C" context Differential Revision: http://llvm-reviews.chandlerc.com/D2082 Adds a lang_c LinkageSpecDecl to lazily generated builtins. This enforces correct behavior for builtins in a variety of cases without special treatment elsewhere within the compiler (special treatment is removed by the patch). It also allows for C++ overloads of builtin functions, which Microsoft uses in their headers e.g. _InterlockedExchangeAdd is an extern C builtin for the long type but an inline wrapper for int type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
885d8bf8d06ddaf79ffe45a96aaa42621db44241 |
|
23-Oct-2013 |
David Majnemer <david.majnemer@gmail.com> |
AST: Mangle fields in anonymous structs/unions The Itanium mangler couldn't cope with mangling an IndirectFieldDecl. Instead, mangle the field the IndirectFieldDecl refers to. Further, give IndirectFieldDecl no linkage just like FieldDecl. N.B. Decl.cpp:getLVForNamespaceScopeDecl tried to calculate linkage for data members of anonymous structs/unions. However, this seems impossible so turn it into an assertion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
b1c0e204046b72828e513bad369ab03252b2c42e |
|
22-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Treat aliases as definitions. This fixes pr17639. Before this patch clang would consider void foo(void) __attribute((alias("__foo"))); a declaration. It now correctly handles it as a definition. Initial patch by Alp Toker. I added support for variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
87bcee88d9b49de8214aa23d07c96f7bec3198e0 |
|
19-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Simplify some implementations of get*Decl. * NamedDecl and CXXMethodDecl were missing getMostRecentDecl. * The const version can just forward to the non const. * getMostRecentDecl can use cast instead of cast_or_null. This then removes some casts from the callers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
65d1096dcfaf5f1f58ed8859e30db735a057e962 |
|
19-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Simplify FunctionDecl::getBody. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
bc6509175e1ce5cc1b48d1b97ac8d23d8b74167c |
|
17-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Rename some functions for consistency. Every other function in Redeclarable.h was using Decl instead of Declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ffc63a8f8ca7c2ccc525c876aa9ba9031176f782 |
|
08-Oct-2013 |
Faisal Vali <faisalv@yahoo.com> |
Fix linkage calculation of auto member functions returning lambdas As described by Richard in https://groups.google.com/a/isocpp.org/d/msg/std-discussion/S1kmj0wF5-g/fb6agEYoL2IJ we should allow: template<typename S> struct A { template<typename T> static auto default_lambda() { return [](const T&) { return 42; }; } template<class U = decltype(default_lambda<S>())> U func(U u = default_lambda<S>()) { return u; } }; int run2 = A<double>{}.func()(3.14); int run3 = A<char>{}.func()('a'); This patch allows the code using the same trickery that was used to allow the code in non-member functions at namespace scope. Please see http://llvm-reviews.chandlerc.com/D1844 for richard's approval. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
4ed0122c1b795379cc4e11dfd62312358dcbf506 |
|
07-Oct-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When merging class definitions across modules in C++, merge together fields. This change doesn't go all the way to making fields redeclarable; instead, it makes them 'mergeable', which means we can find the canonical declaration, but not much else (and for a declaration that's not from a module, the canonical declaration is always that declaration). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
de8eaa2bf22ab0a59118289ee8b97f6ac6a97196 |
|
01-Oct-2013 |
Faisal Vali <faisalv@yahoo.com> |
Fix computation of linkage within nested lambdas. When nested C++11 lambdas are used in NSDMI's - this patch prevents infinite recursion by computing the linkage of any nested lambda by determining the linkage of the outermost enclosing lambda (which might inherit its linkage from its parent). See http://llvm-reviews.chandlerc.com/D1783 for Doug's approval. [On a related note, I need this patch so as to pass tests of transformations of nested lambdas returned from member functions] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
c6867ddf541925c4dede00295fa2d06e8a39e89c |
|
29-Sep-2013 |
Faisal Vali <faisalv@yahoo.com> |
Revert the linkage fix. I got a bunch of buildbot failures that i don't understand - sorry. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191647 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
99229cd81825a9c1df20ed8971d10608e5793521 |
|
29-Sep-2013 |
Faisal Vali <faisalv@yahoo.com> |
Fix computation of linkage within nested lambdas. When nested lambdas are used in NSDMI's - this prevents infinite recursion. See http://llvm-reviews.chandlerc.com/D1783 for Doug's approval regarding the code, and then request for some tests. [On a related note, I need this patch so as to pass tests of transformations of nested lambdas returned from member functions] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
4cb295d3b32cb04215f87948fbf944ee4c31de1b |
|
29-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement C++1y sized deallocation (n3778). This is not enabled by -std=c++1y; instead, it's enabled by the -cc1 flag -fsized-deallocation, until we sort out the backward-compatibility issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d0629eb137d06bf6d46a430abdb7fa044909298b |
|
27-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Variable templates: handle instantiation of static data member templates appropriately, especially when they appear within class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
aa82461f696ced36b0cd817dfa492b6c93d15447 |
|
18-Sep-2013 |
David Majnemer <david.majnemer@gmail.com> |
Revert "Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately"" This reverts commit r190895 which reverted r190892. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1f7fd68131872707a297335e6bc71beef47f9d73 |
|
18-Sep-2013 |
David Majnemer <david.majnemer@gmail.com> |
Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately" This reverts commit r190892. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
075404782734005e4742621ba4fa29e334cd4987 |
|
18-Sep-2013 |
David Majnemer <david.majnemer@gmail.com> |
[-cxx-abi microsoft] Mangle local TagDecls appropriately Summary: When selecting a mangling for an anonymous tag type: - We should first try it's typedef'd name. - If that doesn't work, we should mangle in the name of the declarator that specified it as a declaration specifier. - If that doesn't work, fall back to a static mangling of <unnamed-type>. This should make our anonymous type mangling compatible. This partially fixes PR16994; we would need to have an implementation of scope numbering to get it right (a separate issue). Reviewers: rnk, rsmith, rjmccall, cdavis5x CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1540 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
e9f6f33f0cf98a3e39025a57a0079cd316ed98f8 |
|
17-Sep-2013 |
David Majnemer <david.majnemer@gmail.com> |
[-cxx-abi microsoft] Correctly identify Win32 entry points Summary: This fixes several issues with the original implementation: - Win32 entry points cannot be in namespaces - A Win32 entry point cannot be a function template, diagnose if we it. - Win32 entry points cannot be overloaded. - Win32 entry points implicitly return, similar to main. Reviewers: rnk, rsmith, whunt, timurrrr Reviewed By: rnk CC: cfe-commits, nrieck Differential Revision: http://llvm-reviews.chandlerc.com/D1683 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
13b572c9e84729b4bd5f00d0f1452a4b93211cde |
|
20-Aug-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix name lookup with dependent using decls. We previously mishandled UnresolvedUsingValueDecls in NamedDecl::declarationReplaces, which caused us to forget decls when there are multiple dependent using decls for the same name. Fixes PR16936. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
3f32210598ff678fbaa462422770bdbace895ac8 |
|
01-Aug-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix assert when instantiating a default argument of a template defined in a module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ddcff1b310b80b63f1a9ba88f2befeab40c3648f |
|
22-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Tighten up the set of operator new/operator delete calls we're permitted to optimize, to follow the permissions granted in N3664. Under those rules, only calls generated by new-expressions and delete-expressions are permitted to be optimized, and direct calls to ::operator new and ::operator delete must be treated as normal calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
07369dde9d72213bf8a48288cd8b29999af9a40c |
|
01-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix mangling for block literals. Blocks, like lambdas, can be written in contexts which are required to be treated as the same under ODR. Unlike lambdas, it isn't possible to actually take the address of a block, so the mangling of the block itself doesn't matter. However, objects like static variables inside a block do need to be mangled in a consistent way. There are basically three components here. One, block literals need a consistent numbering. Two, objects/types inside a block literal need to be mangled using it. Three, objects/types inside a block literal need to have their linkage computed correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
49bab4c0046e8300c79e79b7ca9a479696c7e87a |
|
27-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove bogus VarDecl::extendsLifetimeOfTemporary function and inline it into its only caller with a FIXME explaining why it's bogus. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
cd06f26835033e879a9278941f4f6e6a4086976d |
|
26-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Rewrite record layout for ms_struct structs. The old implementation of ms_struct in RecordLayoutBuilder was a complete mess: it depended on complicated conditionals which didn't really reflect the underlying logic, and placed a burden on users of the resulting RecordLayout. This commit rips out almost all of the old code, and replaces it with simple checks in RecordLayoutBuilder::LayoutBitField. This commit also fixes <rdar://problem/14252115>, a bug where class inheritance would cause us to lay out bitfields incorrectly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
12df246d6dea2ee1f92c186f922f1afcf499647a |
|
24-Jun-2013 |
Reid Kleckner <reid@kleckner.net> |
[AST] Introduce a new DecayedType sugar node The goal of this sugar node is to be able to look at an arbitrary FunctionType and tell if any of the parameters were decayed from an array or function type. Ultimately this is necessary to implement Microsoft's C++ name mangling scheme, which mangles decayed arrays differently from normal pointers. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1014 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
9610d77508bdca13e0475783ff404428611c9683 |
|
17-Jun-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Cleanup linkage computation for static locals. With this patch we assign VisibleNoLinkage to static locals in inline functions. This lets us simplify CodeGen a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ec0d96f8fa33a56cf4b9ea7d63bff8c0abcdd13c |
|
04-Jun-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix linkage computation for local types in template functions. Template functions (and member functions of class templates) present the same problem as inline functions. They need to be uniqued, so we need to assign VisibleNoLinkage linkage to types defined in them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f0f353b36f173ea282209070fcdbbedab84c19db |
|
03-Jun-2013 |
Manuel Klimek <klimek@google.com> |
Fix memory leak for APValues that do memory allocation. This patch ensures that APValues are deallocated with the ASTContext by registering a deallocation function for APValues to the ASTContext. Original version of the patch by James Dennett. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
e98089083f2504a4b1f55a9f00a2a2df63cb72e0 |
|
30-May-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix PR16060. The testcase in PR16060 points out that while template arguments can show that a type is not externally visible, the standards still says they have external linkage. In terms of our implementation, it means that we should merge just the isExternallyVisible bit, not the formal linkage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
74caf012521be0651fb4f65db37796b900fcdac6 |
|
29-May-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't compute the visibility unless we really have to. This brings the number of linkage computations in "clang -cc1" in SemaExpr.ii from 58426 to 43134. With -emit-llvm the number goes from 161045 to 145461. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
dc0705645276258afddb06cdf0fd7c8840251ee0 |
|
28-May-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Check the linkage cache at every recursive step. Before this patch the linkage cache was only used by the entry level function (getLinkage). The function that does the actual computation (getLVForDecl), never looked at it. This means that we would not reuse an entry in the cache when getLVForDecl did a recursive call. This patch fixes that by adding another computation enum value for when we don't care about the linkage at all and having getLVForDecl check the cache in that case. When running "clang -cc1" over SemaExpr.ii this brings the number of linkage computations from 93749 to 58426. When running "clang -cc1 -emit-llvm -O3" it goes from 198708 to 161444. For SemaExpr.ii at least linkage computation is a small enough percentage of the work that the time difference was in the noise. When asserts are enabled this patch also causes clang to check the linkage cache even on recursive calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
e8328540cffa6b5b5f7d07e2e7d2f3503500a383 |
|
28-May-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Propagate VisibleNoLinkage down to class members. Fixes PR16114. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
24639c421a36acaa5d0924664c52b9bf2b1c8b91 |
|
28-May-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
use getLVForDecl for consistency. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182749 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
bdf2bba1cb8c6347f43a3caa36e801b1d86450d0 |
|
27-May-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix the linkage of local types in inline VisibleNoLinkage functions. We were handling only local types in inline External functions before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
88ce12aaf6f0a5a55a458ad152218b4072456ee6 |
|
27-May-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Move 3 helper function to Linkage.h This removes a duplicate from Decl.cpp and a followup patch will use isExternallyVisible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a99ecbcc4c431d52df0b01539035ab5281d54656 |
|
25-May-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix linkage computation for derived types in inline functions. John noticed that the fix for pr15930 (r181981) didn't handle indirect uses of local types. For example, a pointer to local struct, or a function that returns it. One way to implement this would be to recursively look for local types. This would look a lot like the linkage computation itself for types. To avoid code duplication and utilize the existing linkage cache, this patch just makes the computation of "type with no linkage but externally visible because it is from an inline function" part of the linkage computation itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ac8b151c4f0478c76a61f2044445b9367fa1a299 |
|
18-May-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Handle local enum types too. Thanks to John McCall for pointing this out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182182 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1229e20dfa837998541aa3c6fafcc188981acd2f |
|
16-May-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix pr15930. In the case of inline functions, we have to special case local types when they are used as template arguments to make sure the template instantiations are still uniqued in case the function itself is inlined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7247c88d1e41514a41085f83ebf03dd5220e054a |
|
15-May-2013 |
David Blaikie <dblaikie@gmail.com> |
Use only explicit bool conversion operator The most common (non-buggy) case are where such objects are used as return expressions in bool-returning functions or as boolean function arguments. In those cases I've used (& added if necessary) a named function to provide the equivalent (or sometimes negative, depending on convenient wording) test. DiagnosticBuilder kept its implicit conversion operator owing to the prevalent use of it in return statements. One bug was found in ExprConstant.cpp involving a comparison of two PointerUnions (PointerUnion did not previously have an operator==, so instead both operands were converted to bool & then compared). A test is included in test/SemaCXX/constant-expression-cxx1y.cpp for the fix (adding operator== to PointerUnion in LLVM). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
181e3ecc0907ae0103586a9f4db52241995a8267 |
|
13-May-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Cleanup handling of UniqueExternalLinkage. This patch renames getLinkage to getLinkageInternal. Only code that needs to handle UniqueExternalLinkage specially should call this. Linkage, as defined in the c++ standard, is provided by getFormalLinkage. It maps UniqueExternalLinkage to ExternalLinkage. Most places in the compiler actually want isExternallyVisible, which handles UniqueExternalLinkage as internal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d248e586d60a3fe971369089e763d5e8f669b7a9 |
|
13-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix stack overflow in linkage computation when a function with a deduced return type returns a lambda defined within itself. The computation of linkage for the function looked at the linkage of the lambda, and vice versa. This is solved by not checking whether an 'auto' in a function return type deduces to a type with unique external linkage. We don't need this check, because the type deduced for 'auto' doesn't affect whether two otherwise-identical declarations would name different functions, so we don't need to give an ostensibly external-linkage function internal linkage for this reason. (We also don't need unique-external linkage in C++11 onwards at all, but that's not implemented yet.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
5543169296beeb183b9c9392debc774fcf493eeb |
|
05-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Replace ArrayRef<T>() with None, now that we have an implicit ArrayRef constructor from None Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
dc5be4f54d6415cb88b2f8a7c5bc9011e332b9b8 |
|
03-May-2013 |
Ben Langmuir <ben.langmuir@intel.com> |
Serialization for captured statements Add serialization for captured statements and captured decls. Also add a const_capture_iterator to CapturedStmt. Test contributed by Wei Pan Differential Revision: http://llvm-reviews.chandlerc.com/D727 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8c045ace381972f41d385b0a661ccf172834f459 |
|
03-May-2013 |
Ben Langmuir <ben.langmuir@intel.com> |
Move CapturedStmt parameters to CapturedDecl Move the creation of CapturedStmt parameters out of CodeGen and into Sema, making it easier to customize the outlined function. The ImplicitParamDecls are stored in the CapturedDecl using an ASTContext-allocated array. Differential Revision: http://llvm-reviews.chandlerc.com/D722 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
e5e575ded9cd4b80229fb299a2d97e9d44728eda |
|
26-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add r180263 back, but fix hasBraces() to be correct during parsing. Original commit message: Fix a case in linkage computation that should check for single line extern "C". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d247842acdbded335f03f91ba0153bc36e65eb39 |
|
26-Apr-2013 |
Bill Wendling <isanbard@gmail.com> |
Revert r180263. It's causing failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f49d9c9b858973eb10717f4b3936a4a4384bd355 |
|
25-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix a case in linkage computation that should check for single line extern "C". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
65dfa2b31794ff4013cb3f9a8178305b56a3d549 |
|
25-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't mark 'extern "C" void f(void)' as having extern storage class. Instead, we check for one line extern "C" context in linkage computation and when deciding if a variable is a definition. This hopefully completes the transition to having "as written" semantics for hasExternalStorage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
673c5d5e22b0af17bb9e903862f39e8a23d9e47f |
|
17-Apr-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Correct the range returned by ParmVarDecl::getSourceRange(), for parameters in ObjC methods with postfix types. For a parameter in a method like this: -(int)methodWithFn:(void (*)(int *p))fn; we would return the source range of the type and not include the parameter name. Fixes rdar://13668626. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.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/Decl.cpp
|
90cc390c4955029dd56d125af5512e68efa0c2b2 |
|
15-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove hasExternalLinkageUncached. It was being used correctly, but it is a very dangerous API to have around. Instead, move the logic from the filtering to when we are deciding if we should link two decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
c855ce7ab97aa25c609a5f83e19b27289fede21a |
|
04-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add hasExternalLinkageUncached back with the test that Richard provided, but keep the call at the current location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
6a7664c4a8b378da5a7f58d940d39b76fb0d6673 |
|
04-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Avoid computing the linkage instead of avoiding caching it. This mostly reverts 178733, but keeps the tests. I don't claim to understand how hidden sub modules work or when we need to see them (is that documented?), but this has the same semantics and avoids adding hasExternalLinkageUncached which has the same foot gun potential as the old hasExternalLinkage. Last but not least, not computing linkage when it is not needed is more efficient. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d613ac9c57936d219d9eecba1d061a45ff7a3ae8 |
|
04-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix 41 of the 61 tests which fail with modules enabled: we were computing and caching the linkage for a declaration before we set up its redeclaration chain, when determining whether a declaration could be a redeclaration of something from an unimported submodule. We actually want to look at the declaration as if it were not a redeclaration here, so compute the linkage but don't cache it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.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/Decl.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/Decl.cpp
|
2d1b09641ecf2e754bf3fd244dc45dbf3e460c1b |
|
14-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Avoid computing the linkage too early. Don't invalidate it. Before this patch we would compute the linkage lazily and cache it. When the AST was modified in ways that could change the value, we would invalidate the cache. That was fairly brittle, since any code could ask for the a linkage before the correct value was available. We should change the API to one where the linkage is computed explicitly and trying to get it when it is not available asserts. This patch is a first step in that direction. We still compute the linkage lazily, but instead of invalidating a cache, we assert that the AST modifications didn't change the result. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
2d9e8838712f3fcacedaf898fd85654cd2bb3600 |
|
12-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Whitespace cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
77e430df036060ba360a3e378deb4bbb3f691580 |
|
12-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Correctly compute linkage of decls forward declared extern C. This fixes a crash in namespace { struct X {}; } extern "C" X test2_b; X test2_b before we would assign different linkages to each of the test2_b decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
83972f128e9218c051692bf96361327a701aeb79 |
|
09-Mar-2013 |
John McCall <rjmccall@apple.com> |
Add TagDecl::hasNameForLinkage(), which is true if the tag is non-anonymous or is defined in a typedef of itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
377830097aec41c0cd80ef5972b4e850b44afefd |
|
07-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add a hasExternalStorageAsWritten helper. No functionality change. It is possible that some of the current uses of "getStorageClassAsWritten() == SC_Extern" should use this but I don't know enough about SC_PrivateExtern to change and test them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f127eb8aeb3ce861f3dbc1adbb3362bfd98461e1 |
|
27-Feb-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Rename methods to comply with the LLVM Coding Standards. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
18895dc4fd29f0071eeb591be820338f16407906 |
|
27-Feb-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Change Type::getLinkageAndVisibility to return a LinkageInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
2beda12c3fbaa9125831b7f818680978c596b205 |
|
27-Feb-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Move LinkageInfo out of NamedDecl so that it can be used in Type.h. Everything that cares about visibility also cares about linkage, so I just moved it to Visibility.h instead of creating a new .h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d3b2f0ac1cedad284d860acd652f28a05bcbcbed |
|
26-Feb-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use the most recent decl in getExplicitVisibility. Now that implicitly hidden template arguments can make an instantiation hidden, it is important to look at more than just the canonical decl of the argument in order to see if an attribute is available in a more recent decl. This has the disadvantage of exposing when getExplicitVisibility is called, but lets us handle cases like template <typename T> struct __attribute__((visibility("default"))) barT { static void zed() {} }; class foo; class __attribute__((visibility("default"))) foo; template struct barT<foo>; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.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/Decl.cpp
|
5eada844fa70b6e2bc941dd7306f7a4fb1e8529d |
|
22-Feb-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Streamify getNameForDiagnostic and remove the string versions of PrintTemplateArgumentList. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d9bd83e0af720733e7564b125c1c9d495318b9e2 |
|
22-Feb-2013 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Decl.cpp/mergeTemplateLV(): Tweak a description. [-Wdocumentation] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175859 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
3892d022f36ee5bf3be4a55ea01c08d323ef6235 |
|
22-Feb-2013 |
John McCall <rjmccall@apple.com> |
Ignore visibility from enclosing template arguments for explicit member specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
66874fb18afbffb8b2ca05576851a64534be3352 |
|
21-Feb-2013 |
David Blaikie <dblaikie@gmail.com> |
Use None rather than Optional<T>() where possible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
dc84cd5efdd3430efb22546b4ac656aa0540b210 |
|
20-Feb-2013 |
David Blaikie <dblaikie@gmail.com> |
Include llvm::Optional in clang/Basic/LLVM.h Post-commit CR feedback from Jordan Rose regarding r175594. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d4c3d66be70ae2d0bd828329022dc428cc277a1c |
|
20-Feb-2013 |
John McCall <rjmccall@apple.com> |
Add a new 'type_visibility' attribute to allow users to control the visibility of a type for the purposes of RTTI and template argument restrictions independently of how visibility propagates to its non-type member declarations. Also fix r175326 to not ignore template argument visibility on a template explicit instantiation when a member has an explicit attribute but the instantiation does not. The type_visibility work is rdar://11880378 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a880b19aa6ef1dc95936f5de052be7a7d6ee6814 |
|
19-Feb-2013 |
John McCall <rjmccall@apple.com> |
Add support for -fvisibility-ms-compat. We treat this as an alternative to -fvisibility=<?> which changes the default value visibility to "hidden" and the default type visibility to "default". Expose a -cc1 option for changing the default type visibility, repurposing -fvisibility as the default value visibility option (also setting type visibility from it in the absence of a specific option). rdar://13079314 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
5a758de93fa2a28a84eb0d918a31d9522472990c |
|
16-Feb-2013 |
John McCall <rjmccall@apple.com> |
Rework the visibility computation algorithm in preparation for distinguishing type vs. value visibility. The changes to the visibility of explicit specializations are intentional. The change to the "ugly" test case is a consequence of a sensible implementation, and I am happy to argue that this is better behavior. Other changes may or may not be intended; it is quite difficult to divine intent from some of the code I altered. I've left behind a comment which I hope explains the philosophy behind visibility computation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a574c8909748fc0d2fd723a48334d6d2c72c8227 |
|
15-Feb-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make helper functions static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d2fdd4256a2efc41365ccdd27a210d1d99a1fe3a |
|
14-Feb-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
merge hasCLanguageLinkage and isExternC. Keep the shorter name. I added hasCLanguageLinkage while fixing some language linkage bugs some time ago so that I wouldn't have to check all users of isExternC. It turned out to be a much longer detour than expected, but this patch finally merges the two again. The isExternC function now implements just the standard notion of having C language linkage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175119 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
ad0e27b18b0cefab049121d4bfd7b12216e7de6e |
|
12-Feb-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix a bug reduced from a crash when trying to use modules with libc++. We check the linkage of functions and variables while merging declarations from modules, and we don't necessarily have enough of the rest of the AST loaded at that point to allow us to compute linkage, so serialize it instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
f8c12146fa2153a6d97b7c92d27d2ece0cd26e79 |
|
03-Feb-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Remove unneeded const_casts git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174287 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7586a6e6b7d79d4be031d2d0d6a35d5996cd0db9 |
|
30-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Semantic analysis and CodeGen support for C11's _Noreturn. This is modeled as an attribute for consistency with our other noreturn mechanisms. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
3ac83d69c61238cd0d38e90fcdd03390530ab2fb |
|
26-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
patch for PR9027 and // rdar://11861085 Title: [PR9027] volatile struct bug: member is not loaded at -O; This is caused by last flag passed to @llvm.memcpy being false, not honoring that aggregate has at least one 'volatile' data member (even though aggregate itself has not been qualified as 'volatile'. As a result, optimization optimizes away the memcpy altogether. Patch review by John MaCall (I still need to fix up a test though). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d4497dde6fc8f5ce79e0ec37682b8dc920bbbef0 |
|
25-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Clean up: since we have FunctionDecl::IsInline, make it store the right value for template instantiations, and use it to simplify the implementation of FunctionDecl::isInlined(). This incidentally changes the result of isInlined on a declared-but-not-defined non-inline member function from true to false. This is sort of a bug fix, but currently isInlined is only called on function definitions, so it has no visible effects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
3a344f9fc7a62ad0a8d26b2a1ccf5e4989720d0c |
|
22-Jan-2013 |
Nico Weber <nicolasweber@gmx.de> |
Fix a bug in VarDecl::getSourceRange() for static member arrays with an element type with an implicit initializer expression. Patch from Will Wilson <will@indefiant.com>! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
cd8ab51a44e80625d84126780b0d85a7732e25af |
|
17-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement C++11 semantics for [[noreturn]] attribute. This required splitting it apart from [[gnu::noreturn]] / __attribute__((noreturn)), since their semantics are not equivalent (for instance, we treat [[gnu::noreturn]] as affecting the function type, whereas [[noreturn]] does not). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
6dcea67483a72e47db0a382e8d073340927ac27f |
|
12-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
comment git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
508276c8895d0a52198a0fa5dd01471236a94d50 |
|
12-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
bar git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
838dc597e25614c653a062a124b06a04d6b7f5eb |
|
12-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Disable caching of visibility. The testcase in pr14929 shows that this is extremely hard to do. If we choose to apply the attribute, that causes the visibility of some decls to change and that can happen really late (during codegen). Current gcc warns and ignores the attribute in this testcase with a warning. This suggest that the correct solution is to find a point in the compilation where we can compute the visibility and * assert it was never computed before * reject any attempts to compute it again in the future (with warnings). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
abe75ef905626d00358427a7a3c59480c1f03361 |
|
09-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Handle static functions being redeclared in function scope. Fixes pr14861. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
6acc4bc44db341d499a925cfe68bea89390039a4 |
|
05-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Assert that redeclarations have the same linkage. It is somewhat hard to test linkage, so I decided to try to add an assert. This already found some interesting cases where there were different. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7ac928b4dc15b5eeb13ea62e96330a145cc71068 |
|
04-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Style fix: We don't use lowercase-and-underscored template parameter names. Thanks for dgregor for noticing it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
2b721f52655bc75f8b9d5dcc761298829d5a7c8e |
|
04-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix typo. Thanks to dgregor for noticing it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
80ad52f327b532bded5c5b0ee38779d841c6cd35 |
|
02-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
s/CPlusPlus0x/CPlusPlus11/g git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
9f0c692c4db9012248c65fab6cb703f2ce444dfe |
|
30-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't get confused if a extern "C" builtin function is redeclared without the extern "C". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
78eeba8c7d53b6b2983c76b77b23b45b89ed939d |
|
28-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Reject overloading of two static extern C functions. This patch moves hasCLanguageLinkage to be VarDecl and FunctionDecl methods so that they can be used from SemaOverload.cpp and then fixes the logic in Sema::IsOverload. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
140aadf5b927ae294388c680a7db44e5de39578a |
|
25-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add 171048 back but invalidate the cache of all redeclarations when setting the body of a functions. The problem was that hasBody looks at the entire chain and causes problems to -fvisibility-inlines-hidden if the cache was not invalidated. Original message: Cache visibility of decls. This unifies the linkage and visibility caching. I first implemented this when working on pr13844, but the previous fixes removed the performance advantage of this one. This is still a step in the right direction for making linkage and visibility cheap to use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
eaf5ec43ec52f650a00254d1c20d51fb7671aead |
|
25-Dec-2012 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Revert r171048, "Cache visibility of decls." It broke stage2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
dfb316613a40d0efc033c7bd0a49da59c915fc63 |
|
25-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Cache visibility of decls. This unifies the linkage and visibility caching. I first implemented this when working on pr13844, but the previous fixes removed the performance advantage of this one. This is still a step in the right direction for making linkage and visibility cheap to use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a7a2f2a96dc9d2e66a5e6ee7ca50cb04931f4c98 |
|
18-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Merge storage classes even when contexts don't match. This fixes the storage class of extern decls that are merged with file level statics. The patch also fixes the linkage computation so that they are considered internal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
372df4548267ce5d6ecf1da68902f0d793271a4f |
|
17-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix isThisDeclarationADefinition for extern following tentative. An extern declaration following a tentative definition should not itself be considered a tentative definition. Fixes pr14614. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ac71351acdefc9de0c770c1d717e621ac9e684bf |
|
08-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Properly compute triviality for explicitly-defaulted or deleted special members. Remove pre-standard restriction on explicitly-defaulted copy constructors with 'incorrect' parameter types, and instead just make those special members non-trivial as the standard requires. This required making CXXRecordDecl correctly handle classes which have both a trivial and a non-trivial special member of the same kind. This also fixes PR13217 by reimplementing DiagnoseNontrivial in terms of the new triviality computation technology. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.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/Decl.cpp
|
b2829203384ab529c0ba13696acca68f7c79d000 |
|
29-Nov-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Now that the underlying problem has been fixed, add r168411 back. Original commit message: Remove redundant code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8272be5ed3bf7c7ac5d32fa9fd83f9229bf455d0 |
|
27-Nov-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert r168411 for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
16c8cf1c3c5e4265b90103a7b5e924e567ab5cd1 |
|
21-Nov-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove redundant code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
5175861336cf35cce8b2889282d9b55394a4380c |
|
21-Nov-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove redundant code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
66cff7257698d5528632917d38f9a3037bb1506d |
|
14-Nov-2012 |
David Blaikie <dblaikie@gmail.com> |
Provide the correct mangling and linkage for certain unnamed nested classes. This corrects the mangling and linkage of classes (& their member functions) in cases like this: struct foo { struct { void func() { ... } } x; }; we were accidentally giving this nested unnamed struct 'no' linkage where it should've had the linkage of the outer class. The mangling was incorrecty too, mangling as TU-wide unnamed type mangling of $_X rather than class-scoped mangling of UtX_. This also fixes -Wunused-member-function which would incorrectly diagnose 'func' as unused due to it having no linkage & thus appearing to be TU-local when in fact it might be correctly used in another TU. Similar mangling should be applied to function local classes in similar cases but I've deferred that for a subsequent patch. Review/discussion by Richard Smith, John McCall, & especially Eli Friedman. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
c6b82c353bef4cbc0d1dde8580abf8d0a266e64b |
|
12-Nov-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove calls to getMostRecentDecl. The case they were added for in r117526 are now covered by attribute merging. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
538fb98685522bb7234c693f12e82b8893e290ff |
|
12-Nov-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
In Sema::MergeVarDecl we handle merging of storage classes and visibility attributes. In cases where the merged declaration is fully equivalent to the two original ones, some of the code was getLVForDecl was duplicated. Cases that are still handled in getLVForDecl are things like __private_extern__ int N; int N; For which we cannot produce a single merged decl with all the information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8c7a185dd84a7d44b1c83f66fd60629372efd498 |
|
27-Oct-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix indentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
820e9a7e29a01bd4a91537a6c6d4524834da622b |
|
19-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
DR1511: A const volatile global does not implicitly get internal linkage like a const non-volatile global does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
5f608aedb6c5d32d2f7c51f9354a75b21f1eeaee |
|
13-Oct-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make -mms-bitfields behave consistently. Patch by Jeremiah Zanin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
0142f0cf0859c1622f66edaaaafddcdfb8918376 |
|
11-Oct-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Handle gnu_inline in c++ in a gcc compatible way. Original patch by Tobias Grosser. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d69f31ce4c33577396dbdc8f4f149baf0e68b68c |
|
09-Oct-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In VarDecl::getSourceRange() make sure to check that the source location of the initializer is valid before using it. Fixes rdar://12455002&12449015 where local variables of objc objects in ARC mode were not annotated because of the ImplicitValueInitExpr initializer having invalid source range, resulting in the SourceRange of the VarDecl having invalid end location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165456 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d7a6b1640e565487d163023a6a2e83f55476ae96 |
|
26-Sep-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix the AST representation for non-type template arguments to encode enough information so we can mangle them correctly in cases involving dependent parameter types. (This specifically impacts cases involving null pointers and cases involving parameters of reference type.) Fix the mangler to use this information instead of trying to scavenge it out of the parameter declaration. <rdar://problem/12296776>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
22cd9ac42a730a7776e323bc1210df2d457d8377 |
|
11-Sep-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[PCH] When loading fields from external storage make sure to also load in the IndirectField declarations as well. Field designators in initializer lists depend on traversing the fields decl chain to find the indirect fields. Fixes rdar://12239321 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163552 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
482466b76174738def05d4ae3c3240bc83b57426 |
|
31-Aug-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Switch a couple getAs uses to castAs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
98499013bd70ec584f4c01c45106ec3e8203f16c |
|
31-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Consider the visibility of template template arguments. GCC doesn't, but it also fails to consider the linkage, which we were already considering. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161070 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
bed28ac1d1463adca3ecf24fca5c30646fa9dbb2 |
|
23-Jul-2012 |
Sylvestre Ledru <sylvestre@debian.org> |
Fix a typo (the the => the) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
0bab9da90f1e087dabe3aaf4e32ab99297d11017 |
|
14-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Move option test earlier in the function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
b04b73122064641d3acd637c26ea76bd3573041b |
|
13-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use -fvisibility-inlines-hidden in inline functions too. This matches gcc behavior since gcc pr30066. Thanks to Benjamin Kramer for pointing it out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d3d02dd0ae17eabc8e0b8972ac6a3863534b39d2 |
|
13-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix a bug in my previous commit. The problem is not that we were not using the canonical decl for the template, but that we were not merging attributes for templates at all! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
23458208b25acd7d2dfa003b029299e30124fe5f |
|
12-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use the canonical template decl when trying to find if it has a visibility attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a5335769ab676c455543d8e705e72ece6bf15cfb |
|
02-Jul-2012 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Reintroduced FieldDecl public methods setBitWidth and removeBitWidth. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
edb4b626130cc8268b1d7a3f9a9fdc7fb4c3a2bb |
|
11-Jun-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
We were computing the visibility and linkage of template parameters, but only using the linkage. Use and test both, documenting that considering the visibility and linkage of template parameters is a difference from gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158309 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ca5233044ef679840d1ad1c46a36b16e2ee8a6e1 |
|
10-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13064: Store whether an in-class initializer uses direct or copy initialization, and use that information to produce the right kind of initialization during template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
3f5f558a4ca08fe952cbbdf69b87487163c9a719 |
|
08-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13051: If a constructor is explicitly defaulted, it isn't marked as being constexpr until we get to the end of the class definition. When that happens, be sure to remember that the class actually does have a constexpr constructor. This is a stopgap solution, which still doesn't cover the case of a class with multiple copy constructors (only some of which are constexpr). We should be performing constructor lookup when implicitly defining a constructor in order to determine whether all constructors it invokes are constexpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
41be8cd0593f2e08e41eed218e1b91f419e829a1 |
|
25-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't ignore linkage when ignoring visibility in the instantiation of a method template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
9db614f339f7596e2c0e0e04d6c714cd264ce883 |
|
25-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't ignore linkage when ignoring visibility in the instantiation of a function template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
20831e21ae00ee10e9d9d906f565a66f9fe1d2d1 |
|
25-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Consider the linkage for member class templates even when we have to ignore the visibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ad359beadbe2b91acf6888546e39083ae74321d9 |
|
25-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
When ignoring visibility in an instantiation, still consider the linkage. Similar fixes for function and member template to follow as I write the testcases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
59073bb1b430286d3c392134312c0b6c4f69a2b5 |
|
25-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Whitespace fixes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
cae1c623b638f91e848ed81a2510b86b403992e4 |
|
21-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Function template version of the previous patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
0b0ad0abd8518742c57d0c6fc01c79982ba2bfdf |
|
21-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Produce a hidden symbol for zed in struct HIDDEN foo { }; template <class P> struct bar { }; template <> struct HIDDEN bar<foo> { DEFAULT static void zed(); }; void bar<foo>::zed() { } Before we would produce a hidden symbol in struct HIDDEN foo { }; template <class P> struct bar { }; template <> struct bar<foo> { DEFAULT static void zed(); }; void bar<foo>::zed() { } But adding HIDDEN to the specialization would cause us to produce a default symbol. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
797105a45a838a7c1cefd05dec3fd0cbaeb0a215 |
|
16-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix the visibility of instantiations of static data members. Fixes pr12835. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156897 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
31c195ac0f3869e742d42f9d02b6cd33442fb630 |
|
15-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix our handling of visibility in explicit template instantiations. * Don't copy the visibility attribute during instantiations. We have to be able to distinguish struct HIDDEN foo {}; template<class T> DEFAULT void bar() {} template DEFAULT void bar<foo>(); from struct HIDDEN foo {}; template<class T> DEFAULT void bar() {} template void bar<foo>(); * If an instantiation has an attribute, it takes precedence over an attribute in the template. * With instantiation attributes handled with the above logic, we can now select the minimum visibility when looking at template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7ad5c996e9519ed4e9afd1f0166be1cd2be8415a |
|
05-May-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use raw_ostream in TypePrinter and eliminate uses of temporary std::strings. Part of rdar://10796159 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
262bc18e32500558af7cb0afa205b34bd37bafed |
|
30-Apr-2012 |
David Blaikie <dblaikie@gmail.com> |
Remove the ref/value inconsistency in filter_decl_iterator. filter_decl_iterator had a weird mismatch where both op* and op-> returned T* making it difficult to generalize this filtering behavior into a reusable library of any kind. This change errs on the side of value, making op-> return T* and op* return T&. (reviewed by Richard Smith) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
923b0c93375db7e75a02bceb487f6f3d3da2766f |
|
23-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix visibility when we have two types with explicit visibility in a template argument list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
38c47674399daac540083a71703d61f66158cbf0 |
|
23-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Inline helper function into only caller. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f6a8b9cba4893b552704f64dd279b4cdc8c13f6f |
|
22-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
An attribute in a explicit template installation should take precedence over the tempale arguments in deciding the visibility. This agrees with gcc 4.7. Found by trying to build chrome with component=shared_library with 155314 reverted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
60115a0453ecfbfe215fdb10aceab983e5f802ef |
|
22-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix handling of template parameters. Found by inspection. GCC 4.7 agrees with this testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1266b613e48bb9fc8155b3ac486a6ac06a75291f |
|
22-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
All the members of LVFlags always have the same value, replace the class with a boolean. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
c7e606086a8d44c4e84ac3d47289288534c79bc6 |
|
19-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
In mergeVisibility, if we already have an explicit visibility, keep it. This fixes the included testcase and lets us simplify the code a bit. It does require using mergeWithMin when merging class information to its members. Expand the comments to explain why that works. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d70d20a361b877d7156291acd1a83b5b1ac2655a |
|
19-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Now that we check visibility attributes in an appropriate order, there is no need for mergeVisibily to ever increase the visibility. Not doing so lets us replace an incorrect use of mergeVisibilityWithMin. The testcase struct HIDDEN RECT { int top; }; DEFAULT RECT foo = {0}; shows that we should give preference to one of the attributes instead of keeping the minimum. We still get this testcase wrong because mergeVisibily handles two explicit visibilities incorrectly, but this is a step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
4fc149057248a565ec9e539be66eeec42216282c |
|
19-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Check ConsiderGlobalVisibility before using -fvisibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
415745474c3057cb135a8a0fb2655901b90f3170 |
|
19-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
The explicit bit in LV already tracks exactly the same information as DHasExplicitVisibility. Simplify the code a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ff2579816bd9318fbda49d8bf9af301ff00371a7 |
|
19-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Move the point in the code where we handle -fvisibility=hidden. With the current implementation this should be a nop as explicit visibility takes precedence in mergeVisibility. The location chosen is such that attributes checked above it can force a symbol to be default. For example, an attribute is the variable or function. Attributes checked after this point, can only make the visibility more restrictive. An attribute in a type for example. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
5727cf50bfb8dda767585acb75f26ccfc7f61a4f |
|
19-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Make setVisibility private and change users to mergeVisibility. This is currently a nop as those users are the first merge or are a merge of a hidden explicit visibility, which always wins in the current implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
074c1919167a272860a65f861c81d7d3ff37cd72 |
|
18-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Calling setVisibility directly only makes (some) sense when the visibility is explicit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
54881cb78e2c9054188c002c012b72175429e79b |
|
17-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Simplify calls to mergeVisibility* by passing in the LinkageInfo. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
e9836a27cf93a58305ff3cf6d75ddc399c7d8ebf |
|
16-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert r154749 for now at John McCall's request. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154846 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
0f90590c96375052c67116f620fafa2b1eadb41e |
|
16-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use ordering and the explicit visibility bit instead of modifying ConsiderGlobalVisibility. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
62d9f110b83dfa5dcd4a945e3b5f2e9c73d3aa4a |
|
16-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add another constructor to LVFlags and use it to simplify the code a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
767f7c7558779e7feb4fe10960726dbf01e69a9f |
|
14-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Consider visibility attributes last, so that they take precedence. I am working on a cleaner fix, but this gets the case in PR12552 passing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154749 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1e1e9722cb4ea6027e2c4885c7a8f26d3726ca7d |
|
28-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
When we form a new function/class template specialization, we first search for the specialization (in a folding set) and, if not found form a *Decl that is then inserted into that folding set. In rare cases, the folding set may be reallocated between the search and the insertion, causing a crash. No test case, because triggering rehashing consistently in a small test case is not feasible. Fixes <rdar://problem/11115071>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ba1030698dbc276db86b11c5329a1edee8a1805e |
|
28-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new libclang API to determine the parent context of a code completion item. For example, if the code completion itself represents a declaration in a namespace (say, std::vector), then this API retrieves the cursor kind and name of the namespace (std). Implements <rdar://problem/11121951>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1af83c444e5a2f6f50a6e1c15e6ebc618ae18a5f |
|
23-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Support for definitions of member enumerations of class templates outside the class template's definition, and for explicit specializations of such enum members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f1c66b40213784a1c4612f04c14cafa2b0e89988 |
|
15-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Instantiating a class template should not instantiate the definition of any scoped enumeration members. Later uses of an enumeration temploid as a nested name specifier should cause its instantiation. Plus some groundwork for explicit specialization of member enumerations of class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
2f47c366bcc28f54f22df6b4266b5d14de302ced |
|
10-Mar-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
The type of a definition should not increase its visibility. Fixes PR12221. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
3d13c5a1e72ed8f8be9c083791d30643d1b1ec43 |
|
09-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
[AST] Reduce Decl::getASTContext() calls. - This function is not at all free; pass it around along some hot paths instead of recomputing it deep inside various VarDecl methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
56757e9eaff77fb106662fa88793af866a6267d0 |
|
08-Mar-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Untangle getUnderlyingDeclImpl, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
6daffa5d6031eee8b25fc2c745dd6b58b039a6eb |
|
08-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
[AST] Change NamedDecl::getUnderlyingDecl() to inline the fast (and incredibly common) path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
5bc37f6e0c932e7a8e0af92b6266372dc7b94cd9 |
|
08-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
Loosen the precondition of isCXXInstanceMember() to simply return "false" for declarations that aren't members of classes. Fixes PR12106. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
047da195aee797341c86d38cc7e3a7e619274dab |
|
07-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
[AST] VarDecl::hasDefinition() - Early exit if we find a strong definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
60d302a707fb35b9acf41bf5495296c4af947045 |
|
07-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
[AST] FunctionDecl::getBuiltinID() - Eliminate spurious calls to getASTContext -- which is very much not free -- in the common case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
16581335fc32abcbc6ab14eda7af38cf759664b7 |
|
02-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Ensure that we instantiate static reference data members of class templates early, since their values can be used in constant expressions in C++11. For odr-use checking, the opposite change is required, since references are odr-used whether or not they satisfy the requirements for appearing in a constant expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
16f1f717af196b1448258857b2e6dcfe144b39d0 |
|
29-Feb-2012 |
James Molloy <james.molloy@arm.com> |
Reapply r151638 and r151641. The bug that was caught by Apple's internal buildbots was valid and also showed another bug in my implementation. These are now fixed, with regression tests added to catch them both (not Darwin-specific). Original log: ==================== Revert r151638 because it causes assertion hit on PCH creation for Cocoa.h Original log: --------------------- Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped. This fixes code such as: enum e {x, y}; int f(enum {y, x} n) { return 0; } This finally fixes PR5464 and PR5477. --------------------- I also reverted r151641 which was enhancement on top of r151638. ==================== git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
32a9a7543f0296b0ae141899005f788bbe4262ca |
|
29-Feb-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Revert r151638 because it causes assertion hit on PCH creation for Cocoa.h Original log: --------------------- Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped. This fixes code such as: enum e {x, y}; int f(enum {y, x} n) { return 0; } This finally fixes PR5464 and PR5477. --------------------- I also reverted r151641 which was enhancement on top of r151638. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
fbcf0405b7da1c8606e4223b4f91835643ecd5b4 |
|
28-Feb-2012 |
James Molloy <james.molloy@arm.com> |
Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped. This fixes code such as: enum e {x, y}; int f(enum {y, x} n) { return 0; } This finally fixes PR5464 and PR5477. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
860097c4ee7a365b6d462436659082c8355e03fd |
|
23-Feb-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Two fixes to how we compute visibility: * Handle some situations where we should never make a decl more visible, even when merging in an explicit visibility. * Handle attributes in members of classes that are explicitly specialized. Thanks Nico for the report and testing, Eric for the initial review, and dgregor for the awesome test27 :-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
5878cbcfaa90b8515550db86033fd5a0efab971d |
|
21-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement non-internal linkage for lambda closure types that need a stable mangling, since these lambdas can end up in multiple translation units. Sema is responsible for deciding when this is the case, because it's already responsible for choosing the mangling number. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d7a3e2c5f61cd4893f95b69a424fe4def3aa0f69 |
|
07-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Revert my patches which removed Diagnostic.h includes by moving some operator overloads out of line. This seems to negatively affect compile time onsome ObjC tests (which use a lot of partial diagnostics I assume). I have to come up with a way to keep them inline without including Diagnostic.h everywhere. Now adding a new diagnostic requires a full rebuild of e.g. the static analyzer which doesn't even use those diagnostics. This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99. This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789. This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7. This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f. This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a3b9fa2024accdc38e0c8458b5ffd6b5ec0580d5 |
|
07-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make FunctionDecl::doesDeclarationForceExternallyVisibleDefinition use the same logic as FunctionDecl::isInlineDefinitionExternallyVisible to figure out whether to emit a definition. Based on work by Anton Yartsev. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
210386eb619ea9feef425636150bdffc0538574d |
|
06-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix the result of VarDecl::checkInitIsICE so it is consistently accurate in C++11 mode. PR11928. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
00bd44d5677783527d7517c1ffe45e4d75a0f56f |
|
04-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move various diagnostic operator<< overloads out of line and remove includes of Diagnostic.h. Fix all the files that depended on transitive includes of Diagnostic.h. With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
c36bedc90c687caa71748480c60707ea4608b092 |
|
01-Feb-2012 |
Anna Zaks <ganna@apple.com> |
Add a new compiler warning, which flags anti-patterns used as the size argument in strncat. The warning is ignored by default since it needs more qualification. TODO: The warning message and the note are messy when strncat is a builtin due to the macro expansion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
9392d4e4da695e2e1a5befbb3a074793a7265471 |
|
18-Jan-2012 |
Anna Zaks <ganna@apple.com> |
Constify FunctionDecl::getmemoryFunctionKind(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
0a151a137a68bb656acbcce7ff2407613bb80cfc |
|
17-Jan-2012 |
Anna Zaks <ganna@apple.com> |
Use Builtin ID as the return value for FunctionDecl::getMemoryFunctionKind(). This is a follow up on the Chris's review for r148142: We don't want to pollute FunctionDecl with an extra enum. (To make this work, added memcmp and family to the library builtins.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
750dc2b16fffa579f96ad053f061976a15ed4665 |
|
15-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Change linkage computation so it doesn't depend on FunctionDecl::isExternC or VarDecl::isExternC, and instead queries what it actually cares about: whether the given declaration is inside an extern "C" context. Fundamentally, figuring out whether a function/variable uses C linkage requires knowing the linkage, and the logic in FunctionDecl::isExternC and VarDecl::isExternC was getting it wrong. Given that, fix FunctionDecl::isExternC and VarDecl::isExternC to use much simpler implementations that depend on the fixed linkage computation. Fixes a regression to test/SemaCXX/linkage.cpp caused by a new warning exposing the fact that the internal state was wrong. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
2d6a5670465cb3f1d811695a9f23e372508240d2 |
|
14-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr irgen: Add irgen support for APValue::Struct, APValue::Union, APValue::Array and APValue::MemberPointer. All APValue values can now be emitted as constants. Add new CGCXXABI entry point for emitting an APValue MemberPointer. The other entrypoints dealing with constant member pointers are no longer necessary and will be removed in a later change. Switch codegen from using EvaluateAsRValue/EvaluateAsLValue to VarDecl::evaluateValue. This performs caching and deals with the nasty cases in C++11 where a non-const object's initializer can refer indirectly to previously-initialized fields within the same object. Building the intermediate APValue object incurs a measurable performance hit on pathological testcases with huge initializer lists, so we continue to build IR directly from the Expr nodes for array and record types outside of C++11. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
093ecc92afb70f6125d249eef31f40c0c57b7d24 |
|
14-Jan-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remember if a type has its visibility set explicitly or implicitly. With that, centralize the way we merge visibility, always preferring explicit over implicit and then picking the most restrictive one. Fixes pr10113 and pr11690. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d9b859a74ecaede23a78d37f364498102ef418c9 |
|
13-Jan-2012 |
Anna Zaks <ganna@apple.com> |
Move identification of memory setting and copying functions (memset, memcmp, strncmp,..) out of Sema and into FunctionDecl so that the logic could be reused in the analyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
73076431605556fdbf28d287d084a73a24a8b8d4 |
|
05-Jan-2012 |
John McCall <rjmccall@apple.com> |
The value of a const weak variable is not an integer constant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7a537404f039d4b7d063bbdc3c8c924be977dff2 |
|
04-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Test "merging" of typedef types across distinct modules. At present, the AST reader doesn't actually perform a merge, because name lookup knows how to merge identical typedefs together. As part of this, teach C/Objective-C name lookup to return multiple results in all cases, rather than first digging through the attributes to see if the value is overloadable. This way, we'll catch ambiguous lookups in C/Objective-C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
5948ae1021122164b22f74353bb7fe325a64f616 |
|
03-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce a non-uglified syntax for module imports in Objective-C: @import identifier [. identifier]* ; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
b5d763d87c8ffb969b4d4a59ed98a2e3516e0850 |
|
02-Jan-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Small cosmetic cleanups in code I will change anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
71cb8a2e10c3f75ca50e2b4f205cbd4cec40ad5e |
|
01-Jan-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Consider visibility attributes in namespaces as being explicit. I.e., they take precedence over command line options. Fixes PR10113. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147405 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
6f26b5eeb4cf130b2602bdc93597da4f3419e7e5 |
|
01-Jan-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Replace a isa+cast with a dyn_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
fedb6ecbed93c6bf12a02d61b2421d6f0da3b4fc |
|
27-Dec-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix the visibility of methods of explicit template instantiation definition when using -fvisibility-inlines-hidden. This matches gcc's behavior and documentation. Fixes PR11642. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1d238ea926bbdd04356ce475934fcd4cac654c4b |
|
21-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++11 half of r147023: In C++11, additionally eagerly instantiate: - constexpr function template instantiations - variables of reference type - constexpr variables git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
99ba9e3bd70671f3441fb974895f226a83ce0e66 |
|
20-Dec-2011 |
David Blaikie <dblaikie@gmail.com> |
Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
099e7f647ccda915513f2b2ec53352dc756082d3 |
|
19-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr handling improvements. Produce detailed diagnostics when a 'constexpr' variable is initialized by a non-constant expression, and pass in the variable being declared so that earlier-initialized fields' values can be used. Rearrange VarDecl init evaluation to make this possible, and in so doing fix a long-standing issue in our C++ constant expression handling, where we would mishandle cases like: extern const int a; const int n = a; const int a = 5; int arr[n]; Here, n is not initialized by a constant expression, so can't be used in an ICE, even though the initialization expression would be an ICE if it appeared later in the TU. This requires computing whether the initializer is an ICE eagerly, and saving that information in PCH files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
93ebfa6139bbca4d446c7343e3afc8e5ec777484 |
|
03-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
When we treat an #include or #import as a module import, create an implicit ImportDecl in the translation unit to record the presence of the import. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
f8d34ed0d0933350323d9f7a8521011d73dc98d5 |
|
01-Dec-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
ParmVarDecls have no linkage. Previously we would report that parameters in type signatures have external linkage. Fixes rdar://10058317. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
75df4eeede7b91c22c1d63fafd4dd4142844e3b9 |
|
01-Dec-2011 |
Ted Kremenek <kremenek@apple.com> |
Further tweak -Wurneachable-code and templates by allowing the warning to run on explicit template specializations (which represent actual functions somebody wrote). Along the way, refactor some other code which similarly cares about whether or not they are looking at a template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
180f47959a066795cc0f409433023af448bb0328 |
|
10-Nov-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Constant expression evaluation: support for evaluation of structs and unions of literal types, as well as derived-to-base casts for lvalues and derived-to-virtual-base casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
80ee6e878a169e6255d4686a91bb696151ff229f |
|
10-Nov-2011 |
John McCall <rjmccall@apple.com> |
There's no good reason to track temporaries in ExprWithCleanups, but it is sometimes useful to track blocks. Do so. Also optimize the storage of these expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
b8989f27f116ff2400e92a52c067a69846119eb5 |
|
14-Oct-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Change operator<< for raw_ostream and NamedDecl to take a reference instead of a pointer. Passing a pointer was a bad idea as it collides with the overload for void*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8a1d6a5eec8287729084e2a79b39fac96a9c75cd |
|
12-Oct-2011 |
Eli Friedman <eli.friedman@gmail.com> |
PR11062: Make C99 inlining work properly for names with associated builtin libcalls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a6b8b2c09610b8bc4330e948ece8b940c2386406 |
|
10-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Constant expression evaluation refactoring: - Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions, and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert behaviour. - Factor out evaluation of bitfield bit widths. - Fix a few places which would evaluate an expression twice: once to determine whether it is a constant expression, then again to get the value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
5e1cdac63c3d9c9b32fa41fa0b2d242a58a20d49 |
|
07-Oct-2011 |
John McCall <rjmccall@apple.com> |
Rename TagDecl::isDefinition -> isCompleteDefinition for better self-documenting code, since the semantics are subtly different from getDefinition(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d211cb709510fbe7e75167b9feee0050851d001a |
|
06-Oct-2011 |
Ted Kremenek <kremenek@apple.com> |
Use a sidetable in ASTContext for ParmVarDecls whose index exceeds the 8 bits reserved for that value in VarDecl. Fixes PR 10538. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.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/Decl.cpp
|
71a7605977113c795edd44fcbd2302ad49506653 |
|
22-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't use TemplateArgumentListInfo inside AST nodes because it may leak. Use ASTTemplateArgumentListInfo instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
4278c654b645402554eb52a48e9c7097c9f1233a |
|
21-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
ArrayRef-ifying Function/BlockDecl's setParams git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8be0c74e4a779b13c2d8fd8482dcd438eeb089d3 |
|
20-Sep-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Remove redundant break statements, and replace asserts with llvm_unreachable Per John's review comments for r140068. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8c25fc584ce27d59df9923f153e8a132dde58d04 |
|
19-Sep-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
OpenCL: introduce support for function scope __local variables git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
3060178ad9df29789505c1e6debcfc80a3a13587 |
|
18-Aug-2011 |
Chad Rosier <mcrosier@apple.com> |
Fix else style. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
af1fc7af351758b0ea0d285bdfe5640128109a4e |
|
15-Aug-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Track in the AST whether a function is constexpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
d330e23f183cedb9e6c1cbb809407576f7bbab71 |
|
05-Aug-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed FieldDecl source range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1b39dc8b1c7509aba7deaca3b7c4f8be931f53e2 |
|
30-Jul-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Not sure why we bother updating FunctionDecl's EndRangeLoc in FunctionDecl::setParams. EndRangeLoc should always be set to at least the ending paren or brace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
0bfe83b5a98ce37bf3a10274bca6f93ca4cb9696 |
|
30-Jul-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Annotation of parameters that got default args from a previous declarations was broken because the end location of the parameter was the end location of the default arg, resulting in a source range that could begin in one file and end in another. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136572 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
f57ef0516c011237a1b6a5b2585b99caf0396bd7 |
|
18-Jul-2011 |
Nick Lewycky <nicholas@mxc.ca> |
Don't crash when codegen'ing an empty redecl of a function in C99 mode, when neither was inline. Fixes bug introduced in r135377. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
dce67a70a86db8758c926a76fdd980f5369d5746 |
|
18-Jul-2011 |
Nick Lewycky <nicholas@mxc.ca> |
In C99, emit an inline function when encountering an extern redeclaration. Fixes PR10233! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
dbd3c85825ad59896292ac7d326fe1985768f1e3 |
|
07-Jul-2011 |
Cameron Zwarich <zwarich@apple.com> |
r134634 causes a failure on MultiSource/Benchmarks/Olden/bh with TEST=nightly, so roll it out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
2357aeec0da2740838963880edd97e43f14cb6fd |
|
07-Jul-2011 |
Nick Lewycky <nicholas@mxc.ca> |
A redeclaration of an inline method in C99 mode should trigger emission of that function. Fixes PR10233! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
6ce51ee94bd300c5f30930d96436fd53e4ea89a7 |
|
28-Jun-2011 |
John McCall <rjmccall@apple.com> |
Don't factor in visibility for templates and template arguments for explicit specializations with their own explicit visibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
0b5810882bd34183c2b764676cafa4c2ce324740 |
|
21-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
A few tweaks to MaterializeTemporaryExpr suggested by John. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
03e80030515c800d1ab44125b9052dfffd1bd04c |
|
21-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new AST node describing reference binding to temporaries. MaterializeTemporaryExpr captures a reference binding to a temporary value, making explicit that the temporary value (a prvalue) needs to be materialized into memory so that its address can be used. The intended AST invariant here is that a reference will always bind to a glvalue, and MaterializeTemporaryExpr will be used to convert prvalues into glvalues for that binding to happen. For example, given const int& r = 1.0; The initializer of "r" will be a MaterializeTemporaryExpr whose subexpression is an implicit conversion from the double literal "1.0" to an integer value. IR generation benefits most from this new node, since it was previously guessing (badly) when to materialize temporaries for the purposes of reference binding. There are likely more refactoring and cleanups we could perform there, but the introduction of MaterializeTemporaryExpr fixes PR9565, a case where IR generation would effectively bind a const reference directly to a bitfield in a struct. Addresses <rdar://problem/9552231>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
c7c9058f4977ef4584d68718e23f34504b150ef4 |
|
16-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Move computation of __private_extern__ visibilty to getLVForNamespaceScopeDecl(). // rdar://9609649 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133182 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
204e13395d83524e9a557c3f3fd6df2e2f353b9d |
|
16-Jun-2011 |
John McCall <rjmccall@apple.com> |
Introduce a utility routine for checking whether a block's captures include a specific variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7a614d8380297fcd2bc23986241905d97222948c |
|
11-Jun-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement support for C++11 in-class initialization of non-static data members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
fb3f4aad0436a9c40e9130598162150890c405b5 |
|
02-Jun-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Implement -fgnu89-inline. Fixes PR10041. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
cd10dec673680fd18a2e5a27646173780c059d32 |
|
24-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement explicit specialization of explicitly-defaulted constructors. The general out-of-line case (including explicit instantiation mostly works except that the definition is being lost somewhere between the AST and CodeGen, so the definition is never emitted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
5587803dfdb862d573289782f0c695872d9297a1 |
|
15-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
main() exists in hosted, not freestanding implementations. Fixes the build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
23c608d6815f188cb0bd3444c9708383c6461036 |
|
15-May-2011 |
John McCall <rjmccall@apple.com> |
Add a method for checking whether a function is one of the reserved global placement allocation or deallocation functions. These functions cannot be replaced by the user and are exempt from the normal requirements on allocation functions (e.g. that they must return unaliased memory). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ffb945ffb5d29b80fd93649c3572b6d87abce3fc |
|
15-May-2011 |
Anders Carlsson <andersca@mac.com> |
When emitting the destructor for a class with a vtable, if we can determine that the destructor body is trivial and that all member variables also have either trivial destructors or trivial destructor bodies, we don't need to initialize the vtable pointers since no virtual member functions will be called on the destructor. Fixes PR9181. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
10620eb5164e31208fcbf0437cd79ae535ed0559 |
|
06-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Modify some deleted function methods to better reflect reality: - New isDefined() function checks for deletedness - isThisDeclarationADefinition checks for deletedness - New doesThisDeclarationHaveABody() does what isThisDeclarationADefinition() used to do - The IsDeleted bit is not propagated across redeclarations - isDeleted() now checks the canoncial declaration - New isDeletedAsWritten() does what it says on the tin. - isUserProvided() now correct (thanks Richard!) This fixes the bug that we weren't catching void foo() = delete; void foo() {} as being a redefinition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
855a8e79f42e670b405b31efd3963f4d89732aff |
|
03-May-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Finish off rules for z-length bitfields in ms_struct structs. // rdar://8823265 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
340fa242130c2d8d74c83edca0952e771aebe0e6 |
|
02-May-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
More rule enforcement of zero bitfields for ms_struct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f1e4fbf3112f33ec5b7bc5c57ec148445190d0a8 |
|
01-May-2011 |
John McCall <rjmccall@apple.com> |
Compress some bits. Only matters for MSVC, or if we ever devirtualize Decl (because bits can't get laid out in base classes if the base is POD). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
07a8a21c3376f3a2ee470bfa3549c6f3ac4e236d |
|
29-Apr-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
ms_struct patch for initialization and field access irgen. // rdar://8823265 - wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8387e2a41eef6fa17fb140a18c29b6eee9dd2b8a |
|
23-Apr-2011 |
Francois Pichet <pichet2000@gmail.com> |
Add -fdelayed-template-parsing option. Using this option all templated function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup. Using this flag is necessary for compatibility with Microsoft template code. This also provides some parsing speed improvement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
db57a4cdb0a6abf3239f3a794a900ce312c5887b |
|
19-Apr-2011 |
Daniel Dunbar <daniel@zuster.org> |
ADT/Triple: Switch to using .isOSDarwin() predicate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
5bbcdbf36f8cf79d99703ef20848c55960065e43 |
|
14-Apr-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Chained PCH: Remember when additional specializations are added to a function template from a previous PCH. Fixes the only crasher when using massive chains on Clang's Sema component. We still have some incomplete codegen there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
4421d2b341d041df44013769f23c306308bbab83 |
|
26-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
On Mac OS X, the presence of an 'availability' attribute for that platform implies default visibility. To achieve these, refactor our lookup of explicit visibility so that we search for both an explicit VisibilityAttr and an appropriate AvailabilityAttr, favoring the VisibilityAttr if it is present. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
78951941f31d3c63c4178a1275e1a2db2e20da11 |
|
22-Mar-2011 |
John McCall <rjmccall@apple.com> |
Fix a test case and teach ClearLinkageCache() to clear the linkage of a function template decl's pattern, which was suddenly exposed by my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7f0a915eb546d353071be08c8adec155e5d9a0dc |
|
18-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed inconsistency when adding TemplateParameterListsInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127876 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ba877adeb49ed6dc17f27fa3a3bcd0cca713fd68 |
|
09-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed InnerLocStart. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a2026c96d3935e7909e049ad9096762844544ed6 |
|
08-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed source range for StaticAssertDecl and LinkageSpecDecl. Fixed source range for declarations using postfix types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
acba90f30876b4140b738f0d3dd0e50724053a96 |
|
08-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed NamespaceDecl source range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f2cf562cec11dec926c0a29a71769a27fed02962 |
|
08-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed bitfields source range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ff676cb48fe8bf7be2feaa251dc7c5fb15af4730 |
|
08-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed source range for all DeclaratorDecl's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
344577e6b58f42d18dc8118c8903b49a85dc005e |
|
06-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed TypedefDecl and TemplateTypeParameter source range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127119 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
6784304db526cde59046d613c4175ce2caf93e44 |
|
05-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed LabelDecl source range and cleaned creation code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1a0918ade0a3490c7aff243f9cd519156dfcb0bd |
|
04-Mar-2011 |
John McCall <rjmccall@apple.com> |
Don't consider visibility from template parameter lists if we're computing for a nested decl with explicit visibility. This is all part of the general philosophy of explicit visibility attributes, where any information that was obviously available at the attribute site should probably be ignored. Fixes PR9371. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
203548ba4b72e7e59320d352afc1eb0b5ab131de |
|
03-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed source range for LabelDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
21e006e51a7f9889f55f5bc7b3ca8b50d17571ec |
|
03-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed source range for FileScopeAsmDecl. Others source range fixes will follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
db9924191092b4d426cc066637d81698211846aa |
|
25-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Push nested-name-specifier source location information into using directives. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
c22b5fff39a7520207f165fb16a27a34b944bd9c |
|
25-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Use NestedNameSpecifierLoc within out-of-line variables, function, and tag definitions. Also, add support for template instantiation of NestedNameSpecifierLocs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
dc355713be51fcb4ee52d9fd6b4548ceff47fadf |
|
25-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Update UsingDecl, UnresolvedUsingTypenameDecl, and UnresolvedUsingValueDecl to use NestedNameSpecifierLoc rather than the extremely-lossy NestedNameSpecifier/SourceRange pair it used to use, improving source-location information. Various infrastructure updates to support NestedNameSpecifierLoc: - AST/PCH (de-)serialization - Recursive AST visitor - libclang traversal (including the first tests of this functionality) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
10aad449dfbb5b43611d45b99c88dfc26db7fac9 |
|
25-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix the rest of PR9316 along with some other bugs spotted by inspection. I tried to add test cases for these, but I can't because variables aren't warned on the way functions are and the codegen layer appears to use different logic for determining that 'a' and 'g' in the test case should receive C mangling. I've included the test so that if we ever switch the codegen layer to use these functions, we won't regress due to latent bugs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
094b64336495496ca29bc1e4774f5e2ceed79096 |
|
24-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Likely fix for PR9316 and other unknown bugs: don't use the anonynmous namespace blanket rule for variables and functions declared 'extern "C"'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126400 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
201e519ad9cc2863bc94cf799e407a81ed29181f |
|
22-Feb-2011 |
John McCall <rjmccall@apple.com> |
Give ImplicitParamDecl a public constructor so that it can be allocated on the stack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
15e310a3b970b64a84cb30f0005bc396b4d978cb |
|
19-Feb-2011 |
John McCall <rjmccall@apple.com> |
Warn about code that uses variables and functions with internal linkage without defining them. This should be an error, but I'm paranoid about "uses" that end up not actually requiring a definition. I'll revisit later. Also, teach IR generation to not set internal linkage on variable declarations, just for safety's sake. Doing so produces an invalid module if the variable is not ultimately defined. Also, fix several places in the test suite where we were using internal functions without definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
2ae442a8a0974aee1da389a69857a4b6f2823c1a |
|
17-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Devirtualize TagDecl::completeDefinition(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125755 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
afdfdc05fe8b2442713f0150a5985a9c6d852cee |
|
17-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Devirtualize DeclaratorDecl::getInnerLocStart() and TagDecl::getInnerLocStart(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125754 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ebe5a9bcc51bff434f38d94748b08e9160609ed9 |
|
17-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Devirtualize NamedDecl::getNameForDiagnostic(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.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/Decl.cpp
|
af8ca37a7fa45bff84831706c6d85f9e5b4e1d15 |
|
10-Feb-2011 |
John McCall <rjmccall@apple.com> |
Move the check that gives functions with unique-external types unique-external linkage into Decl.cpp. Disable this logic for extern "C" functions, because the operative rule there is weaker. Fixes rdar://problem/8898466 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f76b092e1a6f0df4a5c64aae3c71d6e81e4b717c |
|
08-Feb-2011 |
John McCall <rjmccall@apple.com> |
Clear the linkage cache recursively. Fixes PR8926. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
6b5a61b6dc400027fd793dcadceeb9da944a37ea |
|
07-Feb-2011 |
John McCall <rjmccall@apple.com> |
A few more tweaks to the blocks AST representation: - BlockDeclRefExprs always store VarDecls - BDREs no longer store copy expressions - BlockDecls now store a list of captured variables, information about how they're captured, and a copy expression if necessary With that in hand, change IR generation to use the captures data in blocks instead of walking the block independently. Additionally, optimize block layout by emitting fields in descending alignment order, with a heuristic for filling in words when alignment of the end of the block header is insufficient for the most aligned field. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
469a1eb996e1cb0be54f9b210f836afbddcbb2cc |
|
02-Feb-2011 |
John McCall <rjmccall@apple.com> |
An insomniac stab at making block declarations list the variables they close on, as well as more reliably limiting invalid references to locals from nested scopes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ba4f5d5754c8291690d01ca9581926673d69b24c |
|
20-Jan-2011 |
John McCall <rjmccall@apple.com> |
Fix the computation of alignment for fields of packed+aligned structs. Part of the fix for PR8413. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
6952f1e4256c5b43aee5e98cea4e9b663bd1d413 |
|
19-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement support for non-type template parameter packs whose type is a pack expansion, e.g., the parameter pack Values in: template<typename ...Types> struct Outer { template<Types ...Values> struct Inner; }; This new implementation approach introduces the notion of an "expanded" non-type template parameter pack, for which we have already expanded the types of the parameter pack (to, say, "int*, float*", for Outer<int*, float*>) but have not yet expanded the values. Aside from creating these expanded non-type template parameter packs, this patch updates template argument checking and non-type template parameter pack instantiation to make use of the appropriate types in the parameter pack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f4c7371fb1d3cebcfb40abad4537bb82515704ea |
|
19-Jan-2011 |
John McCall <rjmccall@apple.com> |
Change QualType::getTypePtr() to return a const pointer, then change a thousand other things which were (generally inadvertantly) relying on that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
4ba2a17694148e16eaa8d3917f657ffcd3667be4 |
|
12-Jan-2011 |
Jay Foad <jay.foad@gmail.com> |
PR3558: mark "logically const" accessor methods in ASTContext as const, and mark the fields they use as mutable. This allows us to remove a few const_casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7d5c0c1273bdc1cb3dff1cb5a62d07b1439e82c7 |
|
11-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the last bullet of [temp.deduct.type]p5 and part of the last sentence of [temp.deduct.call]p1, both of which concern the non-deducibility of parameter packs not at the end of a parameter-type-list. The latter isn't fully implemented yet; see the new FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8dbfbf4c95251c69a455d4d016d6c7890c932007 |
|
10-Jan-2011 |
Bob Wilson <bob.wilson@apple.com> |
Fix a comment typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f5c65ffbd7374b6c8d9f1e361041578640cab320 |
|
06-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement template argument deduction from a call to a function template whose last parameter is a parameter pack. This allows us to form a call to, e.g., template<typename ...Args1, typename ...Args2> void f(std::pair<Args1, Args2> ...pairs); given zero or more instances of "pair". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
a7fc901a2e39bfe55bfcff5934b2d9fdf9656491 |
|
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Replace the representation of template template argument pack expansions with something that is easier to use correctly: a new template argment kind, rather than a bit on an existing kind. Update all of the switch statements that deal with template arguments, fixing a few latent bugs in the process. I"m happy with this representation, now. And, oh look! Template instantiation and deduction work for template template argument pack expansions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a0e27f00158c9306d53b0003b94182e415380ea9 |
|
22-Dec-2010 |
Francois Pichet <pichet2000@gmail.com> |
Redesign the way anonymous fields are handled in designated-initializers. Previously designated anonymous fields were found via name lookup. This redesign uses the fact that an IndirectFieldDecl declaration will always follow an anonymous implicit field to remove the special case of name lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122387 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
2fcbceff97e065cff499e6cc563ca25c762bf547 |
|
21-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement BlockDecl::getSourceRange(). The bogus source-range information caused token-annotation to fail in funny ways. Fixes <rdar://problem/8595386>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7f1b98760d419a09b2261c1ef901f6bc1ff33e19 |
|
18-Dec-2010 |
John McCall <rjmccall@apple.com> |
Apply attributes to explicit specializations. Specializations which don't provide their own explicit visibility attributes should get them from the template. Fixes rdar://problem/8778497. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122136 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
90f1450c109fbbd333001165bbd986061f7c4513 |
|
10-Dec-2010 |
John McCall <rjmccall@apple.com> |
Treat visibility on an enclosing namespace as a non-explicit source of visibility. Fixes PR8713. I've disabled a test which was testing that you can #pragma pop visibility to get out of a namespace's visibility attribute. We should probably just diagnose that as an error unless it's instrumental to someone's system headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8f1509446fc51db0473ea1241910c06353a153b8 |
|
09-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
When an "inline" declaration was followed by a definition not marked "inline", we weren't giving the definition weak linkage because the "inline" bit wasn't propagated. This was a longstanding FIXME that, somehow, hadn't triggered a bug in the wild. Fix this problem by tracking whether any declaration was marked "inline", and clean up the semantics of GNU's "extern inline" semantics calculation based on this change. Fixes <rdar://problem/8740363>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
56ed7927232256516efcf6afb7bd59bad1e7af71 |
|
07-Dec-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Cast CachedLinkage to linkage to avoid "comparison between signed and unsigned integer" warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
89d63e5e4f4423455f7ee6b1e85143c34d088128 |
|
06-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Use the unused merge() function, fixing an minor, unintended change I introduced in r121023. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
381d34e0b205ca27bcc7e7c1652561941c437965 |
|
06-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Re-implement caching for the linkage calculation of declarations. My previous attempt at solving the compile-time problem with many redeclarations of the same entity cached both linkage and visibility, while this patch only tackles linkage. There are several reasons for this difference: - Linkage is a language concept, and is evaluated many times during semantic analysis and codegen, while visibility is only a code-generation concept that is evaluated only once per (unique) declaration. Hence, we *must* optimize linkage calculations but don't need to optimize visibility computation. - Once we know the linkage of a declaration, subsequent redeclarations can't change that linkage. Hence, cache invalidation is far simpler than for visibility, where a later redeclaration can completely change the visibility. - We have 3 spare bits in Decl to store the linkage cache, so the cache doesn't increase the size of declarations. With the visibility+linkage cache, NamedDecl got larger. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
4765fa05b5652fcc4356371c2f481d0ea9a1b007 |
|
06-Dec-2010 |
John McCall <rjmccall@apple.com> |
Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoretical reason this is limited to C++, and it's certainly not limited to temporaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ec276bf91627058a61adc9ba9175dd10d4c1a5aa |
|
04-Dec-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Silence "comparison between signed and unsigned integer expressions" warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120897 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a88cefd266c428be33cc06f7e8b00ff8fc97c1ff |
|
03-Dec-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added struct/class syntactic info for c++0x scoped enum. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
d98114647e16796a976b04af79975b4f0eacf22b |
|
21-Nov-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Fix a bunch of IndirectFieldDecl-related warnings. - Negative ChainingSize doesn't make sense, make it unsigned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
910f8008fea79120489a53593fe971b0b8a4a740 |
|
08-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove broken support for variadic templates, along with the various abstractions (e.g., TemplateArgumentListBuilder) that were designed to support variadic templates. Only a few remnants of variadic templates remain, in the parser (parsing template type parameter packs), AST (template type parameter pack bits and TemplateArgument::Pack), and Sema; these are expected to be used in a future implementation of variadic templates. But don't get too excited about that happening now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
752c2e930a3ec30b5e338845fd5e7baae532ee69 |
|
05-Nov-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Put class into an anonymous namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
c80117e7971c34088f3e254c849ec3a40205d2c3 |
|
04-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't be so eager to replace UsingDecls in a DeclContext's lookup table; check that the TargetNestedNameDecl is the same first. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
35cebc3eea898637057b10b5cf7dd08b1d788980 |
|
02-Nov-2010 |
John McCall <rjmccall@apple.com> |
Unbreak private_extern, which apparently we had zero tests for. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
3698748400478880d2a146ef9eaa111cd0e60522 |
|
02-Nov-2010 |
John McCall <rjmccall@apple.com> |
Ignore attributes on classes when calculating visibility for members with their own explicit visibility attributes. Basically we only want to apply a single visibility attribute from any particular ancestry. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
66cbcf3f150d075fead7c5935b6e9c61a32cf3d4 |
|
01-Nov-2010 |
John McCall <rjmccall@apple.com> |
Only apply -fvisibility-inlines-hidden to definitions. Apparently isInlined() just gives meaningless results for non-definitions. Fixes rdar://problem/8614470 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
af14603ca61757cf4361b583b45639a04c57e651 |
|
30-Oct-2010 |
John McCall <rjmccall@apple.com> |
Better solution: calculate the visibility of functions and variables independently of whether they're definitions, then teach IR generation to ignore non-explicit visibility when emitting declarations. Use this to make sure that RTTI, vtables, and VTTs get the right visibility. More of rdar://problem/8613093 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ee30102a9ef32cdbf0afe0e4c07a53d265a18f98 |
|
30-Oct-2010 |
John McCall <rjmccall@apple.com> |
GCC faithfully calculates visibility for variables independently of whether it's a declaration or not, then ignores that information for declarations unless it was explicitly given. It's not totally clear how that should be mapped into a sane system, but make an effort. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
110e8e56af30363072c140285961592b0107f789 |
|
30-Oct-2010 |
John McCall <rjmccall@apple.com> |
Restore r117644, this time properly ignoring -fvisibility and type visibility for namespace-scope variable declarations. Apply visibility in IR gen to variables that are merely declared and never defined. We were previously emitting these with default visibility unless they were declared with private_extern. Ignore global visibility settings when computing visibility for a declaration's context, and key several conditions on whether a visibility attribute exists anywhere in the hierarchy as opposed to whether it exists at the current level. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
034f55c1eb93aee61cef5a015eb1d5ba06d3b3d4 |
|
29-Oct-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert r117644, "Apply visibility in IR gen to variables that are merely declared", it breaks things. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
87a4ed905e2febe64021dcdfcdc7f00b27e92f32 |
|
29-Oct-2010 |
John McCall <rjmccall@apple.com> |
Apply visibility in IR gen to variables that are merely declared and never defined. We were previously emitting these with default visibility unless they were declared with private_extern. Ignore global visibility settings when computing visibility for a declaration's context, and key several conditions on whether a visibility attribute exists anywhere in the hierarchy as opposed to whether it exists at the current level. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
0df9587ab011c12968fcbe3518666b2117afe350 |
|
29-Oct-2010 |
John McCall <rjmccall@apple.com> |
When computing the visibility of a class member, calculate the visibility of its context without considering global settings like -fvisibility=hidden. Fixes PR8492. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
479edbc8d0777e1bcf30ec3c90ebfb81bd5f4f28 |
|
28-Oct-2010 |
John McCall <rjmccall@apple.com> |
Don't apply -fvisibility-inlines-hidden to extern templates. Part 2 of rdar://problem/8595231 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
67fa6d5ea630c800c3c96e129129aba93d1487c2 |
|
28-Oct-2010 |
John McCall <rjmccall@apple.com> |
Abandon the type-visibility optimization for functions. GCC doesn't do it, and it's too much trouble to push for. Fixes PR8478. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
e7bc9722c807030409178d4af8ce8d1260bbd821 |
|
28-Oct-2010 |
John McCall <rjmccall@apple.com> |
When computing visibility, use the latest declaration's explicit visibility attribute. Part of rdar://problem/8595231 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
6f4ac4b18fdfc410b547c82457fd7b229e48ec16 |
|
28-Oct-2010 |
John McCall <rjmccall@apple.com> |
Don't override explicit visibility attributes on class members with type-based visibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
06c919300ce39e50ed7f6dff5025c8ed96dcf221 |
|
27-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Lazily load the "next" namespace in the chain of NamespaceDecls, to eliminate some excessive recursion and deserialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
565bf30bf5607b9740d288d8d9c45cf38ea75298 |
|
24-Oct-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Start fleshing out ASTMutationListener; notify when a tag definition is completed. In that case a chained PCH will record the updates to the DefinitionData pointer of forward references. If a forward reference mutated into a definition re-write it into the chained PCH, this is too big of a change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1fb0caaa7bef765b85972274e3b434af2572c141 |
|
22-Oct-2010 |
John McCall <rjmccall@apple.com> |
Substantially revise how clang computes the visibility of a declaration to more closely parallel the computation of linkage. This gets us to a state much closer to what gcc emits, modulo bugs, which will undoubtedly arise in abundance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
0bab54cf82cd679152197c7a2eb938f8aa9f07dd |
|
21-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Always treat 'main' as an extern "C" function, so that we detect redeclarations of main appropriately rather than allowing it to be overloaded. Also, disallowing declaring main as a template. Fixes GCC DejaGNU g++.old-deja/g++.other/main1.C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
220a9c82dc76a83a7f930879bf176783866c0514 |
|
19-Oct-2010 |
Andrew Trick <atrick@apple.com> |
Putting back safe fixes 116836,116837,116838 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7cffb55ef5845f86b41b83c332e4b453ee4dcb16 |
|
19-Oct-2010 |
Andrew Trick <atrick@apple.com> |
Reverting 116836,116837,116838 until we resolve the getLangStandardForKind failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116859 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
0a2e0976d60264724b9a1e39d3f63660c94b607d |
|
19-Oct-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Minor optimization; if we have a CXXRecordDecl we can get the definition decl directly without iterating over the redeclarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.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/Decl.cpp
|
2138664dd2cff39de52ff11ca35f653c20b2e4b0 |
|
28-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach FunctionDecl::setPure() to (indirectly) mark the Abstract bit in CXXRecordDecl::DefinitionData, rather than having Sema mark the bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a626a3d0fb74455651f742c0938902a42e6e71c8 |
|
09-Sep-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix C++ PCH issue. Another beating by boost in this test case: http://llvm.org/PR8117 A function specialization wasn't properly initialized if it wasn't canonical. I wish there was a nice little test case but this was boost. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
6b5415196327fa8ef00f028ba175fafef1738ae1 |
|
08-Sep-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix C++ PCH issues. PCH got a severe beating by the boost-using test case reported here: http://llvm.org/PR8099 Fix issues like: -When PCH reading, make sure Decl's getASTContext() doesn't get called since a Decl in the parent hierarchy may be initializing. -In ASTDeclReader::VisitFunctionDecl VisitRedeclarable should be called before using FunctionDecl's isCanonicalDecl() -In ASTDeclReader::VisitRedeclarableTemplateDecl CommonOrPrev must be initialized before anything else. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8e7139c9554230df64325f70fe202c83491ba7f5 |
|
01-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix the source-range information for an EnumConstantDecl; previously, it did not include the initializer expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
d931b086984257de68868a64a235c2b4b34003fb |
|
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
De-memberify the VarDecl and FunctionDecl StorageClass enums. This lets us remove Sema.h's dependency on Expr.h and Decl.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
45975531e3e93033b41e04974340e4e8f7481d61 |
|
17-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
A member function never has "C" linkage. Fixes <rdar://problem/8318976>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
3cdfc4d1862b7195159c376a4542b440037dac6a |
|
13-Aug-2010 |
John McCall <rjmccall@apple.com> |
Properly give unique-external linkage to members of member templates instantiated with unique-external parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
2577743c5650c646fb705df01403707e94f2df04 |
|
12-Aug-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added locations and type source info for DeclarationName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ed48a8faa10b6750f334540711c7b3949bbfb3ae |
|
02-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Remove mutable data on TagType and InjectedClassNameType, by instead walking the declaration chain in search of a definition. This is necessary for a sane chained PCH implementation. No observable performance change on Carbon.h syntax-only, and bootstraps cleanly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.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/Decl.cpp
|
2c853e401ca406d417eb916e867226050e7be06b |
|
20-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Hide FunctionTemplateDecl's specializations folding set as implementation detail and introduce FunctionTemplateDecl::findSpecialization. Redeclarations of specializations will not cause the previous decl to be removed from the set, the set will keep the canonical decl. findSpecialization will return the most recent redeclaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
1693e154bef16ca060b5e3786d8528ddc11f5637 |
|
06-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve the accuracy of getSourceRange() for DeclaratorDecl and TagDecl subclasses when out-of-line template declaration information is available, from Peter Collingbourne! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7b081c8604efd33bc7f7e5c1e9427a031eedb2b4 |
|
05-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Read/write some source location for PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
b8b03e6df1cc89e701a809c6a47c41f31b7a9e50 |
|
02-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add some side-effect free Create methods for TypeDecl subclasses and use them for PCH reading. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
94d228d3454a3f6436526d15b2ad7fc90246fe54 |
|
23-Jun-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Modify ClassTemplateSpecializationDecl and ClassTemplatePartialSpecializationDecl to allow PCH read/write. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d0913557c800c8a712fb554032a833619f23bc56 |
|
22-Jun-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make it easier to read/write the template part of FunctionDecl. Introduce: -FunctionDecl::getTemplatedKind() which returns an enum signifying what kind of templated FunctionDecl it is. -An overload of FunctionDecl::setFunctionTemplateSpecialization() which accepts arrays of TemplateArguments and TemplateArgumentLocs -A constructor to TemplateArgumentList which accepts an array of TemplateArguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
2bf6d7b1f7406ca4dfe841d4f6ef4b91dce195e4 |
|
21-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a corner case bug whereby declaring and defining an extern variable in a particular sequence causes its definition to not be generated in the object file. (fixes radar 8071804). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
c722ea4fbf886d6460b256b5e819a4ee751d5fff |
|
15-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Allocate template parameter lists for out-of-line definitions via the ASTContext rather than via the normal heap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f0ed9ef428a051bafc914b9935dcd1d1aa30cf3f |
|
14-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
Fix: Decl.cpp:716:28: warning: initialization of pointer of type 'clang::VarDecl *' from literal 'false' [-Wbool-conversions] VarDecl *LastTentative = false; ^ RewriteRope.cpp:535:12: warning: initialization of pointer of type '<anonymous>::RopePieceBTreeNode *' from literal 'false' [-Wbool-conversions] return false; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
9b9348889d85fc9daf943c64e3ac3fb021a4f028 |
|
12-Jun-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added template parameters info for out-of-line definitions of class template methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
4e449836c0deee9cfd92d32cb7d843759fa6452b |
|
29-May-2010 |
John McCall <rjmccall@apple.com> |
Copy source information for the inner type of an elaborated type; fixes some valgrind problems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105062 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
2b7baf0816a40af3fde3a3e174192a549b785a50 |
|
28-May-2010 |
John McCall <rjmccall@apple.com> |
Roll back r104941. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1d0a5856d066f9030efbe3e0d9bbbb50ea597b99 |
|
28-May-2010 |
John McCall <rjmccall@apple.com> |
Add a new attribute on records, __attribute__((adl_invisible)), and define the x86-64 __va_list_tag with this attribute. The attribute causes the affected type to behave like a fundamental type when considered by ADL. (x86-64 is the only target we currently provide with a struct-based __builtin_va_list) Fixes PR6762. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
bc365c53606ab90537576cb48d93a54ce3fb0cb5 |
|
21-May-2010 |
John McCall <rjmccall@apple.com> |
Introduce a method to get from an anonymous struct or union record declaration to the associated object declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104309 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
e03db98d67111ebf7622d9086951aacc24406b66 |
|
20-May-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added TemplateArgumentListInfo to FunctionTemplateSpecializationInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
bd054dba8a3023821f2a0951b0fae05e3522a7c9 |
|
20-May-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Renamed misleading getSourceRange -> getLocalSourceRange and getFullSourceRange -> getSourceRange for TypeLoc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104220 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
60e7064d78f1a29cf969f255a19a9ae25e6bc128 |
|
19-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Cache the linkage of a type within its canonical type, eliminating some seriously non-linear performance with deeply nested template instantiations, as shown in PR6998. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
6cfacfe54c75baa4d67f1fbdf4f80644b662818e |
|
17-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Determine when the instantiation of a friend function defined inside a class template conflicts with an existing (non-template) definition. This is another part of PR6952. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
465d41b92b2c862f3062c412a0538db65c6a2661 |
|
11-May-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Merged Elaborated and QualifiedName types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
3c385c28cf1f27b193a620d2e51f814873362ceb |
|
06-May-2010 |
John McCall <rjmccall@apple.com> |
Push TypeSourceInfo::getTypeLoc() into a header file so that it's inlineable. That header file has to be TypeLoc.h, which means that TypeLoc.h needs to depend on Decl.h because TypeSourceInfo doesn't have its own header. That could be remedied, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1b5a618c59025898806160ed5e7f0ff5bb79e482 |
|
06-May-2010 |
John McCall <rjmccall@apple.com> |
Remember the number of positive and negative bits used by the enumerators of an enum in the enum decl itself. Use some spare bits from TagDecl for this purpose. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a8426972609c908b529ab26c69c35586d8bc06a8 |
|
06-May-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Mark a variable as used in the absence of asserts to silence a GCC warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
9ffce2182e4fe72052d620698d272207f494b1cf |
|
30-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When we start the definition of a class template, set the InjectedClassNameType's Decl to point at the definition. It's a little messy, but we do the same thing with classes and their record types, since much of Clang expects that the TagDecl* one gets out of a type is the definition. Fixes several Boost.Proto failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
9498d388810d284d3970aef0d69fa4d069fd6caf |
|
29-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Add FunctionDecl::isVariadic() to match BlockDecl::isVariadic() and ObjCMethodDecl::isVariadic(). Do some minor refactoring along the way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
68eebbb6279cf5d5133963b1474f0765c589cf3a |
|
28-Apr-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Reduce string trashing in getQualifiedNameAsString. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
becc308ff32df8c5738ffb958f8033189d62d6f2 |
|
21-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Specify linkage for Objective-C declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
16573fa9705b546b7597c273b25b85d6321e2b33 |
|
20-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Keep track of the actual storage specifier written on a variable or function declaration, since it may end up being changed (e.g., "extern" can become "static" if a prior declaration was static). Patch by Enea Zaffanella and Paolo Bolzoni. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f6cde77d7bc34bbee26b086ff192637af8e9da59 |
|
17-Apr-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add printName to DeclarationName which prints the human-readable name on a raw_ostream. Use it in getAsString and NamedDecl's raw_ostream operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
900fc6388e803868a34b9483510c345e9b49d7eb |
|
17-Apr-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream. The next step is to print the name directly into the stream, avoiding a temporary std::string copy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
21c0160959961b3a6ab3308608ee3fde182ecb49 |
|
14-Apr-2010 |
John McCall <rjmccall@apple.com> |
Fix an embarrasing memory error. I was apparently very tired when I wrote this code the first time. Fixes PR6827. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
af2094e7cecadf36667deb61a83587ffdd979bd3 |
|
08-Apr-2010 |
John McCall <rjmccall@apple.com> |
Implement dependent friend function template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
161755a09898c95d21bfff33707da9ca41cd53c5 |
|
06-Apr-2010 |
John McCall <rjmccall@apple.com> |
Implement the protected access restriction ([class.protected]), which requires that protected members be used on objects of types which derive from the naming class of the lookup. My first N attempts at this were poorly-founded, largely because the standard is very badly worded here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
2243288c4826905b5a0837f6f21d9d821688652e |
|
26-Mar-2010 |
John McCall <rjmccall@apple.com> |
Properly account for redeclarations when explicitly instantiating class templates. What happens here is that we actually turn the first declaration into a definition, regardless of whether it was actually originally a definition, and furthermore we do this all after we've instantiated all the declarations. This exposes a bug in my DefinitionData patch where it was only setting the DefinitionData for previous declarations, not future declarations. Fortunately, there's an iterator for that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8472af4df9292e02fb25c952d25a81f3ca296252 |
|
16-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement -Wshadow. Based on a patch by Mike M.! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
b6217665c6a987f2d6c8665fd70365d7719ac4df |
|
15-Mar-2010 |
John McCall <rjmccall@apple.com> |
Remember declaration scope qualifiers in the AST. Imposes no memory overhead on unqualified declarations. Patch by Enea Zaffanella! Minimal adjustments: allocate the ExtInfo nodes with the ASTContext and delete them during Destroy(). I audited a bunch of Destroy methods at the same time, to ensure that the correct teardown was being done. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98540 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8761d680eaa7386e03f51286f4b84a1ffe575e2e |
|
21-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Make Decl::isOutOfLine() virtual, and use that to determine when definitions are for out of line declarations more easily. This simplifies the logic and handles the case of out-of-line class definitions correctly. Fixes PR6107. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
3d2c43e9a7ca55f5ddc1f0c77d8f5e5ea7c1b573 |
|
11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Remove use of 'std::string' from Attr objects, using instead a byte array allocated using the allocator in ASTContext. This addresses these strings getting leaked when using a BumpPtrAllocator (in ASTContext). Fixes: <rdar://problem/7636765> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
838db383b69b9fb55f55c8e9546477df198a4faa |
|
11-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate a bunch of unnecessary ASTContexts from members functions of Decl subclasses. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
952b017601f9c82b51119c3a1600f1312a833db9 |
|
11-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the ASTContext parameter from RecordDecl::getDefinition() and CXXRecordDecl::getDefinition(); it's totally unnecessary. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
5cfa011e61e14e6f2e1659047d809706c0e4c6a3 |
|
05-Feb-2010 |
John McCall <rjmccall@apple.com> |
Always start tag definitions before completing them. Assert same. Fixes latent and not-so-latent objc++ and blocks++ bugs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
86ff308724171494395a840fd2efbe25e62f352e |
|
04-Feb-2010 |
John McCall <rjmccall@apple.com> |
Extract a common structure for holding information about the definition of a C++ record. Exposed a lot of problems where various routines were silently doing The Wrong Thing (or The Acceptable Thing in The Wrong Order) when presented with a non-definition. Also cuts down on memory usage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
0b6bc8bd7a1d2a7d7478d13d78cff94cacad61fc |
|
03-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
When a function or variable somehow depends on a type or declaration that is in an anonymous namespace, give that function or variable internal linkage. This change models an oddity of the C++ standard, where names declared in an anonymous namespace have external linkage but, because anonymous namespace are really "uniquely-named" namespaces, the names cannot be referenced from other translation units. That means that they have external linkage for semantic analysis, but the only sensible implementation for code generation is to give them internal linkage. We now model this notion via the UniqueExternalLinkage linkage type. There are several changes here: - Extended NamedDecl::getLinkage() to produce UniqueExternalLinkage when the declaration is in an anonymous namespace. - Added Type::getLinkage() to determine the linkage of a type, which is defined as the minimum linkage of the types (when we're dealing with a compound type that is not a struct/class/union). - Extended NamedDecl::getLinkage() to consider the linkage of the template arguments and template parameters of function template specializations and class template specializations. - Taught code generation to rely on NamedDecl::getLinkage() when determining the linkage of variables and functions, also considering the linkage of the types of those variables and functions (C++ only). Map UniqueExternalLinkage to internal linkage, taking out the explicit checks for isInAnonymousNamespace(). This fixes much of PR5792, which, as discovered by Anders Carlsson, is actually the reason behind the pass-manager assertion that causes the majority of clang-on-clang regression test failures. With this fix, Clang-built-Clang+LLVM passes 88% of its regression tests (up from 67%). The specific numbers are: LLVM: Expected Passes : 4006 Expected Failures : 32 Unsupported Tests : 40 Unexpected Failures: 736 Clang: Expected Passes : 1903 Expected Failures : 14 Unexpected Failures: 75 Overall: Expected Passes : 5909 Expected Failures : 46 Unsupported Tests : 40 Unexpected Failures: 811 Still to do: - Improve testing - Check whether we should allow the presence of types with InternalLinkage (in addition to UniqueExternalLinkage) given variables/functions internal linkage in C++, as mentioned in PR5792. - Determine how expensive the getLinkage() calls are in practice; consider caching the result in NamedDecl. - Assess the feasibility of Chris's idea in comment #1 of PR5792. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
e2c52d29e483b4167bd5d8e3265c2fb7c38fbcd5 |
|
02-Feb-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix a C++ regression where redefinitions weren't diagnosed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95096 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
31310a21fb2a9f13950f864f681c86080b05d5b2 |
|
01-Feb-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
In C++, an initializer on a variable doesn't necessarily mean it's the definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
e9d12b6c50c1e9b05443db099e21026c5991a93b |
|
31-Jan-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add VarDecl::isThisDeclarationADefinition(), which properly encapsulates the logic for when a variable declaration is a (possibly tentativ) definition. Add a few functions building on this, and shift C tentative definition handling over to this new functionality. This shift also kills the Sema::TentativeDefinitions map and instead simply stores all declarations in the renamed list. The correct handling for multiple tentative definitions is instead shifted to the final walk of the list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7783bfc066776a63d6a2cd28329d4d149647bfdc |
|
26-Jan-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Bring some semblance of order into Decl.h and Decl.cpp. While at it, fix some typo comments and remove an unused and unimplemented function prototype. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
33e9abd21083a0191a7676a04b497006d2da184d |
|
22-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach CIndex's cursor visitor to restrict its traversal to a specific region of interest (if provided). Implement clang_getCursor() in terms of this traversal rather than using the Index library; the unified cursor visitor is more complete, and will be The Way Forward. Minor other tweaks needed to make this work: - Extend Preprocessor::getLocForEndOfToken() to accept an offset from the end, making it easy to move to the last character in the token (rather than just past the end of the token). - In Lexer::MeasureTokenLength(), the length of whitespace is zero. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a6c058dd75c5563cced821fc16766a7cc179e00c |
|
13-Jan-2010 |
Sean Hunt <rideau3@gmail.com> |
Implement semantic checking for C++ literal operators. This now rejects literal operators that don't meet the requirements. Templates are not yet checked for. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1e5fd7f8e90e0953e5c59cbbbc130633d84a1e37 |
|
06-Jan-2010 |
Mike Stump <mrs@apple.com> |
Fix spelling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
5126fd0dd92c4ec211c837ee78d5ce59c68dcbd5 |
|
30-Dec-2009 |
John McCall <rjmccall@apple.com> |
Typedefs can be redeclared. That seems like something we should record in the AST lest we run into some crazy canonicalization bug like PR5874. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
3521d01aed2f55b66c7ce2ad47541a9974079699 |
|
28-Dec-2009 |
Sam Weinig <sam.weinig@gmail.com> |
Fix for PR5871. Make __PRETTY_FUNCTION__ work for member functions defined in a class local to a function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
6be112049b24ffaa8508646aa695834b4b5ca2b2 |
|
25-Dec-2009 |
Sam Weinig <sam.weinig@gmail.com> |
Fix for PR5844. Be explicit about anonymous struct/class/union/namespaces in __PRETTY_FUNCTION__ predefined expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
337cba4b3e17b98cfa512dfd12e57f4ccb0859be |
|
15-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
If a ParmVarDecl's default argument is a CXXExprWithTemporaries, return the underlying expr instead. Add getNumDefaultArgTemporaries and getDefaultArgTemporary which returns the temporaries a default arg creates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
156c78e4ef14e5f7ba251554ea8f2dbec573fef3 |
|
13-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
More improvements to checking allocation and deallocation functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
9f61aa9e280adea9fbf3365f0e4f6ed568c9885a |
|
12-Dec-2009 |
Jeffrey Yasskin <jyasskin@google.com> |
Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave no extra safety anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
842aef8d942a880eeb9535d40de31a86838264cb |
|
09-Dec-2009 |
John McCall <rjmccall@apple.com> |
First pass at implementing C++ enum semantics: calculate (and store) an "integer promotion" type associated with an enum decl, and use this type to determine which type to promote to. This type obeys C++ [conv.prom]p2 and is therefore generally signed unless the range of the enumerators forces it to be unsigned. Kills off a lot of false positives from -Wsign-compare in C++, addressing rdar://7455616 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a93c934af4fbf97cbe8e649d82e68ccacfe57c95 |
|
07-Dec-2009 |
John McCall <rjmccall@apple.com> |
DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated variables, but the results are imperfect. For posterity, I did: cat <<EOF > $cmdfile s/DeclaratorInfo/TypeSourceInfo/g s/DInfo/TInfo/g s/TypeTypeSourceInfo/TypeSourceInfo/g s/SourceTypeSourceInfo/TypeSourceInfo/g EOF find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \; find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \; find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
48eda2c5d6d2a5c95775a1a3a8a22428bb6869c6 |
|
04-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Be a little more clever about inline member functions that are marked inline in the inline class declaration but not in the actual definition: class A { inline void f(); } void A::f() { } This is not the most ideal solution, since it doesn't work 100% with regular functions (as my FIXME comment states). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
e9d6554ba78fb81e810fdaec9b2c98ab96526e83 |
|
26-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Slight tweak to the algorithm for getLinkage(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d85b5b9b8fcf53906d9a61649b3657ca0d902017 |
|
25-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement the rules in C++ [basic.link] and C99 6.2.2 for computing the linkage of a declaration. Switch the lame (and completely wrong) NamedDecl::hasLinkage() over to using the new NamedDecl::getLinkage(), along with the "can this declaration be a template argument?" check that started all of this. Fixes -fsyntax-only for PR5597. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
7d9c3c92c90ae36d58ec21bc53c4c08e02ac3555 |
|
28-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement proper linkage for explicit instantiation declarations of inlined functions. For example, given template<typename T> class string { unsigned Len; public: unsigned size() const { return Len; } }; extern template class string<char>; we now give the instantiation of string<char>::size available_externally linkage (if it is ever instantiated!), as permitted by the C++0x standard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7ced9c8529b734e313f62a3b81189d6f402f6713 |
|
27-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce FunctionDecl::isInlined() to tell whether a function should be inlined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
0130f3cc4ccd5f46361c48d5fe94133d74619424 |
|
27-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Rename FunctionDecl::isInline/setInline to FunctionDecl::isInlineSpecified/setInlineSpecified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
3b846b6c252972a6f142aa226c1e65aebd0feeca |
|
27-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Explicit instantiation suppresses the instantiation of non-inline function template specializations and member functions of class template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
0d03514da06dffb39a260a1228ea3fd01d196fa4 |
|
27-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
An explicit instantiation definition only instantiations those class members that have a definition. Also, use CheckSpecializationInstantiationRedecl as part of this instantiation to make sure that we diagnose the various kinds of problems that can occur with explicit instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ba6a9bd384df475780be636ca45bcef5c5bbd19f |
|
24-Oct-2009 |
John McCall <rjmccall@apple.com> |
Preserve type source information in TypedefDecls. Preserve it across template instantiation. Preserve it through PCH. Show it off to the indexer. I'm healthily ignoring the vector type cases because we don't have a sensible TypeLoc implementation for them anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
e013d685c6689ac7ae103ee88acf573422d1ed6a |
|
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Move clients to use IdentifierInfo::getNameStart() instead of getName() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
51bd803fbdade51d674598ed45da3d54190a656c |
|
18-Oct-2009 |
John McCall <rjmccall@apple.com> |
Clone the full Type hierarchy into the TypeLoc hierarchy. Normalize TypeLoc class names to be $(Type classname)Loc. Rewrite the visitor. Provide skeleton implementations for all the new TypeLocs. Handle all cases in PCH. Handle a few more cases when inserting location information in SemaType. It should be extremely straightforward to add new location information to existing TypeLoc objects now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
0a897e32a09d290aa5b375444fe33928e47168bb |
|
15-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Simplify checking of explicit template specialization/explicit instantiation redeclaration semantics for function template specializations and member functions of class template specializations. Also, record the point of instantiation for explicit-instantiated functions and static data members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1028c9f0afc1cc5f4951b39b7067fa57c1fea07b |
|
14-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Give explicit and implicit instantiations of static data members of class templates the proper linkage. Daniel, please look over the CodeGenModule bits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
663b5a0be7261c29bc4c526a71cffcfa02d4153e |
|
14-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Testing and some minor fixes for explicit template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
fd056bc86a8b22a9421b5d921bbca276d0f9d0f7 |
|
13-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
When explicitly specializing a member that is a template, mark the template as a specialization. For example, this occurs with: template<typename T> struct X { template<typename U> struct Inner { /* ... */ }; }; template<> template<typename T> struct X<int>::Inner { T member; }; We need to treat templates that are member specializations as special in two contexts: - When looking for a definition of a member template, we look through the instantiation chain until we hit the primary template *or a member specialization*. This allows us to distinguish between the primary "Inner" definition and the X<int>::Inner definition, above. - When computing all of the levels of template arguments needed to instantiate a member template, don't add template arguments from contexts outside of the instantiation of a member specialization, since the user has already manually substituted those arguments. Fix up the existing test for p18, which was actually wrong (but we didn't diagnose it because of our poor handling of member specializations of templates), and add a new test for member specializations of templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
b3ae4fcd4314a9c1c46d41b200883599c32025b4 |
|
12-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Diagnose the declaration of explicit specializations after an implicit instantiation has already been required. To do so, keep track of the point of instantiation for anything that can be instantiated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f36e02d4aff98bf2e52e342e0038d4172fbb5e64 |
|
09-Oct-2009 |
John McCall <rjmccall@apple.com> |
Refactor the LookupResult API to simplify most common operations. Require users to pass a LookupResult reference to lookup routines. Call out uses which assume a single result. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
251b4ff2578e26959a4c036140ccd61c5e9292f2 |
|
08-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
For instantiations of static data members of class templates, keep track of the kind of specialization or instantiation. Also, check the scope of the specialization and ensure that a specialization declaration without an initializer is not a definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83533 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
2db323294ac02296125e1e0beb4c3595992e75bb |
|
08-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Keep track of whether a member function instantiated from a member function of a class template was implicitly instantiated, explicitly instantiated (declaration or definition), or explicitly specialized. The same MemberSpecializationInfo structure will be used for static data members and member classes as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
b735471f3848065120d7210e557b5f0d37ed4c43 |
|
29-Sep-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
-Introduce TypeLoc::getOpaqueData() -Make TypeLoc's constructor public. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
740256bafbba6c5b5cb95a5c5bd7db161f3b2833 |
|
29-Sep-2009 |
Mike Stump <mrs@apple.com> |
Fix http://llvm.org/PR5090. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83035 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
b9aa6b214c8fbc3e081dde575eef1f0913d48bdc |
|
25-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
WIP implementation of explicit function template specialization. This first implementation recognizes when a function declaration is an explicit function template specialization (based on the presence of a template<> header), performs template argument deduction + ambiguity resolution to determine which template is being specialized, and hooks There are many caveats here: - We completely and totally drop any explicitly-specified template arguments on the floor - We don't diagnose any of the extra semantic things that we should diagnose. - I haven't looked to see that we're getting the right linkage for explicit specializations On a happy note, this silences a bunch of errors that show up in libstdc++'s <iostream>, although Clang still can't get through the entire header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
183700f494ec9b6701b6efe82bcb25f4c79ba561 |
|
22-Sep-2009 |
John McCall <rjmccall@apple.com> |
Change all the Type::getAsFoo() methods to specializations of Type::getAs(). Several of the existing methods were identical to their respective specializations, and so have been removed entirely. Several more 'leaf' optimizations were introduced. The getAsFoo() methods which imposed extra conditions, like getAsObjCInterfacePointerType(), have been left in place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1fc09a92d0bffda20e06fa882388c01e192e2069 |
|
13-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Rework the way we determine whether an externally visible symbol is generated for an inline function definition, taking into account C99 and GNU inline/extern inline semantics. This solution is simpler, cleaner, and fixes PR4536. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81670 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7814e6d6645d587891293d59ecf6576defcfac92 |
|
12-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove unnecessary ASTContext parameter from FunctionDecl::isBuiltinID git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
48a83b5e7ae4051c7c11680ac00c1fa02d610a62 |
|
12-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove unnecessary ASTContext parameters from isMain and isExternC git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
af3280fadbdab6305581955c973e1229970958eb |
|
12-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate FunctionDecl::getBodyIfAvailable git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
9f185076dc8b79c8240b20a8746da96beb3f147b |
|
11-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Tweak the semantics of FunctionDecl::isOutOfLine to consider an instantiation of a member function template or member function of a class template to be out-of-line if the definition of that function template or member function was defined out-of-line. This ensures that we get the correct linkage for explicit instantiations of out-of-line definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
6cc1518b9f15ca846b8c35518eeae9557935678d |
|
11-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Cleanup and test C++ default arguments. Improvements include: - Diagnose attempts to add default arguments to templates (or member functions of templates) after the initial declaration (DR217). - Improve diagnostics when a default argument is redefined. Now, the note will always point at the place where the default argument was previously defined, rather than pointing to the most recent declaration of the function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
136a6988960ac3aeb96f298da7a1a182db7217cd |
|
11-Sep-2009 |
John McCall <rjmccall@apple.com> |
When stringizing a NamedDecl for a diagnostic, treat the template specialization types differently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
3a082d81006e7a2e01a6e431a22e21c78490ff8f |
|
08-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Vastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam Weinig! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d0e3daf2b980b505e535d35b432c938c6d0208ef |
|
05-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve the AST representation and semantic analysis for extern templates. We now distinguish between an explicit instantiation declaration and an explicit instantiation definition, and know not to instantiate explicit instantiation declarations. Unfortunately, there is some remaining confusion w.r.t. instantiation of out-of-line member function definitions that causes trouble here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f1bbbb49f06a7462476cd88166fccda5feb15cab |
|
04-Sep-2009 |
John McCall <rjmccall@apple.com> |
Correctly handle elaborated template ids. Still not handled properly for friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a5d82000f7b173a0a5ce34dc8c09a03f98d9e439 |
|
21-Aug-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use DeclaratorInfo to get this information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a1d5662d96465f0fddf8819d245da4d19b892eff |
|
19-Aug-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema interfaces. DeclaratorDecl contains a DeclaratorInfo* to keep type source info. Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl. EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo. Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
b17166c8077cd900cca83a895c43b30ea6660598 |
|
19-Aug-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce DeclaratorInfo and TypeLoc, intended to be used for storing and reading source information for types. DeclaratorInfo will contain a flat memory block for source information about a type that came out of a declarator. TypeLoc and its subclasses will be used by clients as wrappers to "traverse" the memory block and read the information. Both DeclaratorInfo and TypeLoc are not utilized in this commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
07a5c22bb6fb0674c95205ae189365bf8e1b695e |
|
15-Aug-2009 |
John McCall <rjmccall@apple.com> |
Disable all recognition of main() in -ffreestanding. Addresses bug #4720. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79070 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
e5bb6d49522f5119740a2c87e466725300fee88f |
|
30-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
There's no point in going through the getAs<TagType> stuff to find the definition of a tag, since tags rarely have more than one or two declarations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8e9e9ef5348bce1a8f0741a5684fac3de9701c28 |
|
30-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Make tag declarations redeclarable. This change has three purposes: 1) Allow the Index library (and any other interested client) to walk the set of declarations for a given tag (enum, union, class, whatever). At the moment, this information is not readily available. 2) Reduce our dependence on TagDecl::TypeForDecl being mapped down to a TagType (for which getDecl() will return the tag definition, if one exists). This property won't exist for class template partial specializations. 3) Make the canonical declaration of a TagDecl actually canonical, e.g., so that it does not change when the tag is defined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
7caa6825f42a0f7e97d6fc06233133c42b218e46 |
|
24-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for static data members that are defined out-of-line. Note that this also fixes a bug that affects non-template code, where we were not treating out-of-line static data members are "file-scope" variables, and therefore not checking their initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
741dd9a7e1d63e4e385b657e4ce11c5d96d44f72 |
|
21-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Add the location of the tag keyword into TagDecl. From Enea Zaffanella, with tweaks from Abramo Bagnara. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1e4bc099882626059f14d687ed7a1a5518b7f3c2 |
|
18-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce a redecl_iterator in Decl class, so that we can do a "iterate over all declarations of the same decl" without knowing the exact type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f23e839e9ddea324c743d26da43fb767f90ca223 |
|
18-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce the Redeclarable template class, which serves as a base type defining the common interface for Decls that can be redeclared. Make FunctionDecl and VarDecl use it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f00068bd7540639405130ff658025d863da41744 |
|
18-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove getFirstDeclaration/getLatestDeclaration from FunctionDecl and VarDecl. Their usefulness is questionable since redecl_iterator was introduced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
b57a4fe73b8227c0dba651818b8495dfca61e530 |
|
18-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Move the functionality of ASTContext::getCanonicalDecl(), into a virtual method Decl::getCanonicalDecl(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.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/Decl.cpp
|
ea218b8e8f9ba82d1c76bcb7e86d121a5f65ebed |
|
14-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Add a "TypeSpecStartLoc" to FieldDecl. Patch contributed by Enea Zaffanella. Note: One day, it might be useful to consider adding this info to DeclGroup (as the comments in FunctionDecl/VarDecl suggest). For now, I think this works fine. I considered moving this to ValueDecl (a common ancestor of FunctionDecl/VarDecl/FieldDecl), however this would add overhead to EnumConstantDecl (which would burn memory and isn't necessary). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
c37929c9e0dba89770dc5f0fbcfa0c9046da0b06 |
|
14-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce redecl_iterator, used for iterating over the redeclarations of a FunctionDecl or VarDecl. It iterates over all the redeclarations, regardless of the starting point. For example: 1) int f(); 2) int f(); 3) int f(); if you have the (2) FunctionDecl and call redecls_begin/redecls_end to iterate, you'll get this sequence: (2) (1) (3) The motivation to introduce this was that, previously, if (3) was a function definition, and you called getBody() at (2), it would not return it, since getBody() iterated over the previous declarations only, so it would only check (2) and (1). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75604 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
03d5e3d03117a56097cea98f53198fb20de1eb35 |
|
14-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce FunctionDecl::getLatestDeclaration() and VarDecl::getLatestDeclaration(). For multiple redeclarations they return the last one. Also, add some non const versions of methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7bf792fdde4641d865eba4a068d862d5300bd1e4 |
|
14-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce FunctionDecl::getFirstDeclaration() and VarDecl::getFirstDeclaration(). For multiple redeclarations they return the first one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f602c8b6ce1a269c0bf8b3f049e923f4ea5c18e2 |
|
14-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add the SourceLocation for the right brace in TagDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
082b02e8403d3ee9d2ded969fbe0e5d472f04cd8 |
|
08-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Implemented memmove_collectable API for Next runtime when struct variables with GC'able members are copied into. Will provide a test case later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
fc7e2a8fbb08f0f496ac6cea0721fe72db8ce240 |
|
06-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce the virtual method Decl::getPrimaryDecl(). When a Decl subclass can have multiple re-declarations in the same declaration context (like FunctionDecl), getPrimaryDecl() will return a particular Decl that all of them will point to as the "primary" declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.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/Decl.cpp
|
e4f2142d00fa5fdb580c4e2413da91882d955381 |
|
30-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Key decisions about 'bool' vs '_Bool' to be based on a new flag in langoptions. This is simple enough, but then I thought it would be nice to make PrintingPolicy get a LangOptions so that various things can key off "bool" and "C++" independently. This spiraled out of control. There are many fixme's, but I think things are slightly better than they were before. One thing that can be improved: CFG should probably have an ASTContext pointer in it, which would simplify its clients. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1fd2dd145d9bcdf0b8d60a88e1795b6ae83656f5 |
|
30-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve code generation for function template specializations: - Track implicit instantiations vs. the not-yet-supported explicit specializations - Give implicit instantiations of function templates (and member functions of class templates) linkonce_odr linkage. - Improve name mangling for function template specializations, including the template arguments of the instantiation and the return type of the function. Note that our name-mangling is improved, but not correct: we still don't mangle substitutions, although the manglings we produce can be demangled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
127102b5196ffe04bdb70fd553fe62c265ab10a9 |
|
29-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Keep track of function template specializations, to eliminate redundant, implicit instantiations of function templates and provide a place where we can hang function template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74454 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
16e8be2ac532358d4e413fdfa2643b1876edda78 |
|
29-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Move FunctionDecl::TemplateSpecializationInfo out into its own class, FunctionTemplateSpecializationInfo, in DeclTemplate.h. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
e136e0e1b74760d7ec3ede38e0e739d5c52a3c0a |
|
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Add NamedDecl::getUnderlyingDecl that can see through UsingDecl and ObjCCompatibleAliasDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1637be727f2a0434c1ed7aa385ea1c18328b0ccd |
|
26-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Implicit instantiation for function template specializations. For a FunctionDecl that has been instantiated due to template argument deduction, we now store the primary template from which it was instantiated and the deduced template arguments. From this information, we can instantiate the body of the function template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74232 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
cb5f8f59322c352f51714c3de5d8047e70895165 |
|
23-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't use operator overload '<' for SourceLocation, it has not semantic meaning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
96888cc2515e55c9b5dd6798063bf4be2c22983a |
|
23-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add a comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1a5364e0fa0482d8d477d6f136d52e503bbe13f4 |
|
22-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Addressing Doug's suggestions: -Added comment for FunctionDecl::EndRangeLoc -Removed a redundant check from FunctionDecl::setBody git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
55d608cbadf1e9c05064f9287c057d50b7df65b4 |
|
20-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce Decl::getSourceRange() which, like Stmt::getSourceRange(), represents the range that the declaration covers. Add initial support for NamespaceDecl, VarDecl, and FunctionDecl: -NamespaceDecl range is from name to '}' -VarDecl is from name to possible init expression -FunctionDecl is from name to last parameter name or to end of its function body. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
1b63e4f732dbc73d90abf886b4d21f8e3a165f6d |
|
14-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Sink the BuiltinInfo object from ASTContext into the preprocessor and initialize it early in clang-cc. This ensures that __has_builtin works in all modes, not just when ASTContext is around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ae0b4e7be78cf0dc2a6a333e865c2be9265774f9 |
|
06-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Make ParmVarDecl::getDefaultArg() more robust, it now asserts that the argument is not unparsed. Add a new hasDefaultArg() and use it in places where getDefaultArg() was called when the argument was unparsed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d249e1d1f1498b81314459ceda19d6ff25c278ad |
|
29-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Create a new PrintingPolicy class, which we pass down through the AST printing logic to help customize the output. For now, we use this rather than a special flag to suppress the "struct" when printing "struct X" and to print the Boolean type as "bool" in C++ but "_Bool" in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
78d1583d0b36b7d6d8d10234cdc19ab94adf765a |
|
26-May-2009 |
Douglas Gregor <dgregor@apple.com> |
When evaluating a VarDecl as a constant or determining whether it is an integral constant expression, maintain a cache of the value and the is-an-ICE flag within the VarDecl itself. This eliminates exponential-time behavior of the Fibonacci template metaprogram. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f3e7ce4bd9837cdab6a096235922865f95467d3d |
|
18-May-2009 |
Douglas Gregor <dgregor@apple.com> |
When instantiating the definition of a member function of a class template, introduce that member function into the template instantiation stack. Also, add diagnostics showing the member function within the instantiation stack and clean up the qualified-name printing so that we get something like: note: in instantiation of member function 'Switch1<int, 2, 2>::f' requested here in the template instantiation backtrace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a75e8534f2b7c2480c48f31f301bd00b241c5499 |
|
14-May-2009 |
Anders Carlsson <andersca@mac.com> |
Improvements to the FunctionDecl getters/setters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
42af25f865a82022a04bedeb483ac251c4412e29 |
|
11-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement the notions of the "current instantiation" and "unknown specialization" within a C++ template, and permit name lookup into the current instantiation. For example, given: template<typename T, typename U> struct X { typedef T type; X* x1; // current instantiation X<T, U> *x2; // current instantiation X<U, T> *x3; // not current instantiation ::X<type, U> *x4; // current instantiation X<typename X<type, U>::type, U>: *x5; // current instantiation }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71471 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7da97d0f31e1ec16998d3de2cfd2e88fe3736673 |
|
11-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement the semantics of the injected-class-name within a class template. The injected-class-name is either a type or a template, depending on whether a '<' follows it. As a type, the injected-class-name's template argument list contains its template parameters in declaration order. As part of this, add logic for canonicalizing declarations, and be sure to canonicalize declarations used in template names and template arguments. A TagType is dependent if the declaration it references is dependent. I'm not happy about the rather complicated protocol needed to use ASTContext::getTemplateSpecializationType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
9f9bf258f8ebae30bfb70feb9d797d6eb67b0460 |
|
28-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve compatibility with GCC regarding inline semantics in GNU89 mode and in the presence of __gnu_inline__ attributes. This should fix both PR3989 and PR4069. As part of this, we now keep track of all of the attributes attached to each declaration even after we've performed declaration merging. This fixes PR3264. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
2dbd285f5033ca6dea25babfd1c43d9fec35e7e5 |
|
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix PR4049, a crash on invalid, by making sema install the right number of parameters in a functiondecl, even if the decl is invalid and has a confusing Declarator. On the testcase, we now emit one beautiful diagnostic: t.c:2:1: error: unknown type name 'unknown_type' unknown_type f(void*) ^ GCC 4.0 produces: t.c:2: error: syntax error before ‘f’ t.c: In function ‘f’: t.c:2: error: parameter name omitted and GCC 4.2: t.c:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘f’ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1ad9b28e3217c2349a04f3d3bf14f9c73a99afa7 |
|
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
rename getNumParmVarDeclsFromType back to getNumParams(), remove a special case that was apparently for typeof() and generalize the code in SemaDecl that handles typedefs to handle any sugar type (including typedef, typeof, etc). Improve comment to make it more clear what is going on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
11ddb7dc22bb398a6727318729680630bfcefaae |
|
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
add a new helper function to FunctionDecl instead of it being static in Decl.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
b6c8c8bd8d362c8a6cdb767415b0d21e62b77eb2 |
|
21-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Explictly track tentative definitions within Sema, then hand those tentative definitions off to the ASTConsumer at the end of the translation unit. Eliminate CodeGen's internal tracking of tentative definitions, and instead hook into ASTConsumer::CompleteTentativeDefinition. Also, tweak the definition-deferal logic for C++, where there are no tentative definitions. Fixes <rdar://problem/6808352>, and will make it much easier for precompiled headers to cope with tentative definitions in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
250fc9c859fdeed3f200ae911a7e7ea338f38436 |
|
18-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Lazy deserialization of function bodies for PCH files. For the Carbon "Hello, World!", this takes us from deserializing 6469 statements/expressions down to deserializing 1 statement/expression. It only translated into a 1% improvement on the Carbon-prefixed 403.gcc, but (a) it's the right thing to do, and (b) we expect this to matter more once we lazily deserialize identifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7297134f128423fce2e88f92421ed135bded7d4e |
|
18-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
FunctionDecl::getBody() is getting an ASTContext argument for use in lazy PCH deserialization. Propagate that argument wherever it needs to be. No functionality change, except that I've tightened up a few PCH tests in preparation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
b286a78c8cce4592306dae6abc3656daf6379c77 |
|
14-Apr-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add VarDecl::getStorageClassSpecifierString (StorageClass -> const char*). - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8499f3f5ff8d5f95ece8047780030a3daad1b6fa |
|
31-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement -Wmissing-prototypes. Fixes PR3911. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68110 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
c9b5b4074bd73d4af76e69cccf8ecd365fdd1008 |
|
25-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Predicate to detect when a RecordDecl is really the injected-class-name git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
082d936a5b8323ac2c04558d8bca277a647831a3 |
|
20-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Fix <rdar://problem/6704086> by allowing the format string checking in Sema to allow non-literal format strings that are variables that (a) permanently bind to a string constant and (b) whose string constants are resolvable within the same translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
879d27ad4670716c7cea7f86274f6096f6868fe1 |
|
14-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
BlockDecl::Destroy now deallocates BlockDecl's array of ParmVarDecl*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
e78b809bbcd92928a63da81f2cd843faad3e4dfd |
|
13-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6675489> BlockDecl should not use llvm::smallvector. Also changed BlockDecl API to be more consistent (wrt FunctionDecl). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
eaab20669b6a9910a5deb0110fdd8f7581d86a36 |
|
12-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
API fix: All "bodies" for functions, Objective-C methods, blocks, are assumed to be CompoundStmts. I think this is a valid assumption, and felt that the API should reflect it. Others please validate this assumption to make sure I didn't break anything. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
275a369f003f25bd22c00c1c0fc0251c7208caf4 |
|
11-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Add type checking for tentative definitions at the end of the translation unit. Thread the various declarations of variables via VarDecl::getPreviousDeclaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
0b2b6e1cb1573bb295c0a65813dc4df8d57f305b |
|
04-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
Switch attributes to be allocated from the declcontext bump pointer just like decls. This reduces the number of calls to malloc on cocoa.h with pth and -disable-free from 15958 to 12444 times (down ~3500). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
6393519272ce727f4d26e71bbefb5de712274d0e |
|
02-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Rework the way we find locally-scoped external declarations when we need them to evaluate redeclarations or call a function that hasn't already been declared. We now keep a DenseMap of these locally-scoped declarations so that they are not visible but can be quickly found, e.g., when we're looking for previous declarations or before we go ahead and implicitly declare a function that's being called. Fixes PR3672. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
72564e73277e29f6db3305d1f27ba408abb7ed88 |
|
27-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Create a new TypeNodes.def file that enumerates all of the types, giving them rough classifications (normal types, never-canonical types, always-dependent types, abstract type representations) and making it far easier to make sure that we've hit all of the cases when decoding types. Switched some switch() statements on the type class over to using this mechanism, and filtering out those things we don't care about. For example, CodeGen should never see always-dependent or non-canonical types, while debug info generation should never see always-dependent types. More switch() statements on the type class need to be moved over to using this approach, so that we'll get warnings when we add a new type then fail to account for it somewhere in the compiler. As part of this, some types have been renamed: TypeOfExpr -> TypeOfExprType FunctionTypeProto -> FunctionProtoType FunctionTypeNoProto -> FunctionNoProtoType There shouldn't be any functionality change... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
2224f84658fb9b3725a31f2680edb64ae73bf705 |
|
25-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
C99 DR #316 implies that the function parameter types that are known only from a function definition (that does not have a prototype) are only used to determine the compatible with other declarations of that same function. In particular, when referencing the function we pretend as if it does not have a prototype. Implement this behavior, which fixes PR3626. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d6f7e9dccd0fa8a5a15d7478324c0ae229fc5e1e |
|
24-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
When we're declaring an object or function with linkage, teach name lookup to skip over names without linkage. This finishes <rdar://problem/6127293>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
04495c859f81e440748a9b86baa2913461652bb0 |
|
24-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve merging of function declarations. Specifically: - When we are declaring a function in local scope, we can merge with a visible declaration from an outer scope if that declaration refers to an entity with linkage. This behavior now works in C++ and properly ignores entities without linkage. - Diagnose the use of "static" on a function declaration in local scope. - Diagnose the declaration of a static function after a non-static declaration of the same function. - Propagate the storage specifier to a function declaration from a prior declaration (PR3425) - Don't name-mangle "main" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
0de21fd85d79bccd32f04256f5b3328ab5ed7c95 |
|
22-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Contains the following (related to problems found while investigting <rdar://problem/6497631> Message lookup is sometimes different than gcc's). - Implement instance/class overloading in ObjCContainerDecl (removing a FIXME). This involved hacking NamedDecl::declarationReplaces(), which took awhile to figure out (didn't realize replace was the default). - Changed Sema::ActOnInstanceMessage() to remove redundant warnings when dealing with protocols. For now, I've omitted the "protocol" term in the diagnostic. It simplifies the code flow and wan't always 100% accurate (e.g. "Foo<Prot>" looks in the class interface, not just the protocol). - Changed several test cases to jive with the above changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
9add31798f621f843233dbff8bba103fca64447b |
|
17-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Static variables and functions won't collide with standard library functions, so if we're declaring a static we should implicitly declare a library function by the same name (e.g., malloc, strdup). Fixes PR3592. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
3c385e5f8d9008fff18597ca302be19fa86e51f6 |
|
14-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Add hook to add attributes to function declarations that we know about, whether they are builtins or not. Use this to add the appropriate "format" attribute to NSLog, NSLogv, asprintf, and vasprintf, and to translate builtin attributes (from Builtins.def) into actual attributes on the function declaration. Use the "printf" format attribute on function declarations to determine whether we should do format string checking, rather than looking at an ad hoc list of builtins and "known" function names. Be a bit more careful about when we consider a function a "builtin" in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
3e41d60eb627dc227c770f1c1c87d06909cf05fd |
|
14-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Implicitly declare certain C library functions (malloc, strcpy, memmove, etc.) when we perform name lookup on them. This ensures that we produce the correct signature for these functions, which has two practical impacts: 1) When we're supporting the "implicit function declaration" feature of C99, these functions will be implicitly declared with the right signature rather than as a function returning "int" with no prototype. See PR3541 for the reason why this is important (hint: GCC always predeclares these functions). 2) If users attempt to redeclare one of these library functions with an incompatible signature, we produce a hard error. This patch does a little bit of work to give reasonable error messages. For example, when we hit case #1 we complain that we're implicitly declaring this function with a specific signature, and then we give a note that asks the user to include the appropriate header (e.g., "please include <stdlib.h> or explicitly declare 'malloc'"). In case #2, we show the type of the implicit builtin that was incorrectly declared, so the user can see the problem. We could do better here: for example, when displaying this latter error message we say something like: 'strcpy' was implicitly declared here with type 'char *(char *, char const *)' but we should really print out a fake code line showing the declaration, like this: 'strcpy' was implicitly declared here as: char *strcpy(char *, char const *) This would also be good for printing built-in candidates with C++ operator overloading. The set of C library functions supported by this patch includes all functions from the C99 specification's <stdlib.h> and <string.h> that (a) are predefined by GCC and (b) have signatures that could cause codegen issues if they are treated as functions with no prototype returning and int. Future work could extend this set of functions to other C library functions that we know about. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
df2d3cf2be8b91e1e21234ff5a3aa4f820e7001a |
|
05-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix the symptom of the regression, by having the CXXConditionDeclExpr not destroy its Decl. However, the cause still remains: the Decl is linked into the chain of its DeclContext and remains there despite being deleted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
47b9a1ca55e61e37f5a368740e29de190345acc6 |
|
04-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Some name-lookup-related fixes, from Piotr Rak! - Changes Lookup*Name functions to return NamedDecls, instead of Decls. Unfortunately my recent statement that it will simplify lot of code, was not quite right, but it simplifies some... - Makes MergeLookupResult SmallPtrSet instead of vector, following Douglas suggestions. - Adds %qN format for printing qualified names to Diagnostic. - Avoids searching for using-directives in Scopes, which are not DeclScope, during unqualified name lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.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/Decl.cpp
|
c0ac4923f08b25ae973a8ee7942cf3eb89da57b7 |
|
28-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Finish making AST BumpPtrAllocation runtime configurable (based on -disable-free). snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m 0.179u 0.051s 0:00.23 95.6% 0+0k 0+0io 0pf+0w snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m -disable-free 0.169u 0.052s 0:00.22 95.4% 0+0k 0+0io 0pf+0w git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.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/Decl.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/Decl.cpp
|
460b0ac80382fa73337d21dd052c1f18b27435d8 |
|
18-Jan-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix deallocation of FunctionDecl::ParamInfo git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
fc767615bc67d3a7587b1fb2e0494c32c9dbd7a5 |
|
14-Jan-2009 |
Ted Kremenek <kremenek@apple.com> |
FunctionDecl::setParams() now uses the allocator associated with ASTContext to allocate the array of ParmVarDecl*'s. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.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/Decl.cpp
|
6b3945f4bc757bdadd3e443180cf32c2cccb52a0 |
|
07-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Finished semantic analysis of anonymous unions in C++. Duplicate-member checking within classes is still a little messy, and anonymous unions are still completely broken in C. We'll need to unify the handling of fields in C and C++ to make this code applicable in both languages. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.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/Decl.cpp
|
4306d3cb9116605728252e2738df24b9f6ab53c3 |
|
21-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Finish up saving original parameter type and using it in ObjC's method parameter encoding. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
73da9e462576faedc2cdf96b37a1c072b404b73d |
|
20-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
introducing ParmVarWithOriginalTypeDecl class to keep track of the original parameter decl. types. This is work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
99f06ba988922ea721035a89e6d3c66ba100ba8a |
|
18-Dec-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix leakage of var's initializers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
45579f5e2904590ff9a4f48c7fbf2e60dccb0426 |
|
17-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Make sure that enumerators show up within the enumeration declaration. Fixes. PR clang/3220 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7df7b6bb800e1987951285ea192e4f347e1b603a |
|
15-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Create new EnumDecl nodes for redeclarations of enums, linking them together in the same way that we link RecordDecl/CXXRecordDecl nodes. Unify ActOnTag and ActOnTagStruct. Fixes PR clang/2753. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
e94ca9e4371c022329270436b3dd77adc4ddfa8f |
|
18-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Extend DeclarationName to support C++ overloaded operators, e.g., operator+, directly, using the same mechanism as all other special names. Removed the "special" identifiers for the overloaded operators from the identifier table and IdentifierInfo data structure. IdentifierInfo is back to representing only real identifiers. Added a new Action, ActOnOperatorFunctionIdExpr, that builds an expression from an parsed operator-function-id (e.g., "operator +"). ActOnIdentifierExpr used to do this job, but operator-function-ids are no longer represented by IdentifierInfo's. Extended Declarator to store overloaded operator names. Sema::GetNameForDeclarator now knows how to turn the operator name into a DeclarationName for the overloaded operator. Except for (perhaps) consolidating the functionality of ActOnIdentifier, ActOnOperatorFunctionIdExpr, and ActOnConversionFunctionExpr into a common routine that builds an appropriate DeclRefExpr by looking up a DeclarationName, all of the work on normalizing declaration names should be complete with this commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
10bd36882406cdf4805e35add1ce2f11ab9ae152 |
|
17-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Eliminate all of the placeholder identifiers used for constructors, destructors, and conversion functions. The placeholders were used to work around the fact that the parser and some of Sema really wanted declarators to have simple identifiers; now, the code that deals with declarators will use DeclarationNames. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
2e1cd4264d363ca869bf37ef160902f211d21b8c |
|
17-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Introduction the DeclarationName class, as a single, general method of representing the names of declarations in the C family of languages. DeclarationName is used in NamedDecl to store the name of the declaration (naturally), and ObjCMethodDecl is now a NamedDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
5239304ff761b8b03eefb772bd5d830a9b9f1aea |
|
10-Nov-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce ScopedDecl::getLexicalDeclContext() which is different from ScopedDecl::getDeclContext() when there are nested-names. e.g.: namespace A { void f(); // SemanticDC (getDeclContext) == LexicalDC (getLexicalDeclContext) == 'namespace A' } void A::f(); // SemanticDC == namespace 'A' // LexicalDC == global namespace git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1cd1b1e987f5e2f060d7972b13d83239b36d77d6 |
|
06-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Parsing, ASTs, and semantic analysis for the declaration of overloaded operators in C++. Overloaded operators can be called directly via their operator-function-ids, e.g., "operator+(foo, bar)", but we don't yet implement the semantics of operator overloading to handle, e.g., "foo + bar". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
21ef7ae45c8b91f23cf5eab2263421bb398a644b |
|
04-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
LinkageSpecDecl is c++ specific, move it to DeclCXX git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
4f03fd61ee45245dd3a1552a023e730d56c2e697 |
|
29-Oct-2008 |
Ted Kremenek <kremenek@apple.com> |
Fix crash reported in PR2923 where a function declared using typeof(another_function) would have FunctionDecl::getNumParams() return the number of parameters in the original function type and not the number of parameters in the actual FunctionDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.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/Decl.cpp
|
1c90bfcbd7ff5d09694acf50a32dbb716a968b61 |
|
08-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Instantiate the BlockDecl in ActOnBlockStart() so we can use it as a DeclContext. This required changes to attach the compound statement later on (like we do for functions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
0eb07bfde0deedcb35cf3d118b3488f5d8db32ec |
|
03-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Add getTypeSpecStartLoc() to VarDecls and FunctionDecls. This is a temporary solution to help with the block rewriter (though it certainly has general utility). Once DeclGroup's are implemented, this SourceLocation should be stored with it (since it applies to all the decls). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
4b7c98378ae0c1a3635f0b7756848b4a9923f8bc |
|
05-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Change struct forward declarations and definitions to use unique RecordDecls, as opposed to creating a single RecordDecl and reusing it. This change effects both RecordDecls and CXXRecordDecls, but does not effect EnumDecls (yet). The motivation of this patch is as follows: - Capture more source information, necessary for refactoring/rewriting clients. - Pave the way to resolve ownership issues with RecordDecls with the forthcoming addition of DeclGroups. Current caveats: - Until DeclGroups are in place, we will leak RecordDecls not explicitly referenced by the AST. For example: typedef struct { ... } x; The RecordDecl for the struct will be leaked because the TypedefDecl doesn't refer to it. This will be solved with DeclGroups. - This patch also (temporarily) breaks CodeGen. More below. High-level changes: - As before, TagType still refers to a TagDecl, but it doesn't own it. When a struct/union/class is first referenced, a RecordType and RecordDecl are created for it, and the RecordType refers to that RecordDecl. Later, if a new RecordDecl is created, the pointer to a RecordDecl in RecordType is updated to point to the RecordDecl that defines the struct/union/class. - TagDecl and RecordDecl now how a method 'getDefinition()' to return the TagDecl*/RecordDecl* that refers to the TagDecl* that defines a particular enum/struct/class/union. This is useful from going from a RecordDecl* that defines a forward declaration to the RecordDecl* that provides the actual definition. Note that this also works for EnumDecls, except that in this case there is no distinction between forward declarations and definitions (yet). - Clients should no longer assume that 'isDefinition()' returns true from a RecordDecl if the corresponding struct/union/class has been defined. isDefinition() only returns true if a particular RecordDecl is the defining Decl. Use 'getDefinition()' instead to determine if a struct has been defined. - The main changes to Sema happen in ActOnTag. To make the changes more incremental, I split off the processing of enums and structs et al into two code paths. Enums use the original code path (which is in ActOnTag) and structs use the ActOnTagStruct. Eventually the two code paths will be merged, but the idea was to preserve the original logic both for comparison and not to change the logic for both enums and structs all at once. - There is NO CHAINING of RecordDecls for the same RecordType. All RecordDecls that correspond to the same type simply have a pointer to that type. If we need to figure out what are all the RecordDecls for a given type we can build a backmap. - The diff in CXXRecordDecl.[cpp,h] is actually very small; it just mimics the changes to RecordDecl. For some reason 'svn' marks the entire file as changed. Why is CodeGen broken: - Codegen assumes that there is an equivalence between RecordDecl* and RecordType*. This was true before because we only created one RecordDecl* for a given RecordType*, but it is no longer true. I believe this shouldn't be too hard to change, but the patch was big enough as it is. I have tested this patch on both the clang test suite, and by running the static analyzer over Postgresql and a large Apple-internal project (mix of Objective-C and C). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55839 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
df042e6c2bf06b2d9ed53c52469599ac1bd93a3f |
|
05-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Remove "NextDecl" from RecordDecl. This change touches many files that where RecordDecl or CXXRecordDecl was constructed, always with an argument of 'NULL' for the previous declaration. The motivation behind this change is that chaining the RecordDecls is simply unnecessary. Once we create multiple RecordDecls for the same struct/union/class, clients that care about all the declarations of the same struct can build a back map by seeing which Decls refer to the same RecordType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
6359792ca92e7ca2f416cb804c6604358174e994 |
|
02-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
RecordDecl: - Remove method 'isForwardDecl'; this functionality is already provided by 'isDefinition()' - Move method definitions to be co-located with other RecordDecl methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a39da065766bdfeee3421a2e71f60ae579170fef |
|
02-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
RecordDecl: - Added method 'isForwardDeclaration', a predicate method that returns true if a RecordDecl represents a forward declaration. - Added method 'getDefinitionDecl', a query method that returns a pointer to the RecordDecl that provides the actual definition of a struct/union. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
df91eca19bd9738abd9a3b84791f39750e27ad36 |
|
02-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
CXXRecordDecl and RecordDecl: - Change constructor and create methods to accept a CXXRecordDecl* (RecordDecl*) instead of a ScopedDecl* for PrevDecl. This causes the type checking to be more tight and doesn't break any code. RecordDecl: - Don't use the NextDeclarator field in ScopedDecl to represent the previous declaration. This is a conflated use of the NextDeclarator field, which will be removed anyway when DeclGroups are fully implemented. - Instead, represent (a soon to be implemented) chain of RecordDecls using a NextDecl field. The last RecordDecl in the chain is always the 'defining' RecordDecl that owns the FieldDecls. The other RecordDecls in the chain are forward declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
997b6c6d73541f010afc81e28191c8eae7b24f77 |
|
08-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Destroy and delete the FieldDecl members of a RecordDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.cpp
|
9bcf44aeef91e4cf2615efdebd9d541ba567b635 |
|
17-Jun-2008 |
Ted Kremenek <kremenek@apple.com> |
Silence uninitialized value warning during Release build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
7643536c36b0449256d5ee2efc03a7e4a784a0b3 |
|
10-Jun-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
-Add DeclChain member to DeclContext. -ScopedDecls get chained to their DeclContext. -DeclContext's DeclChain replaces FunctionDecl's DeclChain and EnumDecl's ElementList. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
39ba4aeca296b1c9f04bde7d9d3cbbf129f1abd3 |
|
10-Jun-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
-Changes to TagDecl: Added TagKind enum. Added getTagKind() method. Added convenience methods: isEnum(), isStruct(), isUnion(), isClass(). -RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.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/Decl.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/Decl.cpp
|
9141bee299a05349924a34a7153d7064c9e0a107 |
|
02-Jun-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix decl attributes cleaning this plugs the leak of attributes and also fixes a crash in the test git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
2742496d75ecb733c07c65c9a35cbfaa88ca81e4 |
|
27-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Don't swap function decls, and add them to the scope as they are encountered. Mixing up the decls is unintuitive, and confuses the AST destruction code. Fixes PR2360. Note that there is a need to look up the characteristics and declarations of a function associated with a particular name or decl, but the original swapping code doesn't solve it properly. http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-May/001644.html is one suggestion for how to fix that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ebf27b1831e6c4d7f4bc30e111a4d6340ff690d1 |
|
24-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Call the correct destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
466c2e3af049964f3a573917bd04d6b6ce1d121d |
|
23-May-2008 |
Steve Naroff <snaroff@apple.com> |
Tweak AST dumper for ObjC ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d1ac17ae7d61a9244ee5e658d6f63b8fa3da3127 |
|
20-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Reclaim memory from chains of ScopedDecls, and reclaim memory for the initializers of EnumConstantDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
b65cf41707d190d5ce3d48b9e5bd2dc9d7b4a4c0 |
|
20-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Reclaim memory allocated for ParmVarDecl's in FunctionDecl::Destroy. Fixed a bug in ParmVarDecl::param_end(): Handle the case where there are no ParmVarDecls for a FunctionDecl, but its function prototype has formal arguments (can happen with typedefs). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
75a13a50ce1d7d4bf3c859d65ae4659d6e6e4b9a |
|
20-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Remove unnecessary #include (introduced by a recent patch of mine). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
27f8a28bee33bb0e857cfe1a61c281bbc234b338 |
|
20-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Try to plug some memory leaks... 1) Sema::ParseAST now constructs a TranslationUnit object to own the top-level Decls, which releases the top-level Decls upon exiting ParseAST. 2) Bug fix: TranslationUnit::~TranslationUnit handles the case where a Decl is added more than once as a top-level Decl. 3) Decl::Destroy is now a virtual method, obviating the need for a special dispatch based on DeclKind. 3) FunctionDecl::Destroy now releases its Body using its Destroy method. 4) Added Stmt::Destroy and Stmt::DestroyChildren, which recursively delete the child ASTs of a Stmt and call their dstors. We may need to special case dstor/Destroy methods for particular Stmt subclasses that own other dynamically allocated objects besides AST nodes. 5) REGRESSION: We temporarily are not deallocating attributes; a FIXME is provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
a212c56e9b7533bcc2d6be90efd52ad241bf894e |
|
04-May-2008 |
Chris Lattner <sabre@nondot.org> |
Simplify FunctionDecl::AddRedeclaration a bit by using std::swap. Fix 'swapping' of attributes to not insert null values into the DeclAttrs map. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
2d1c5d313cd0c229cc614e74baa4c5756a4b46f4 |
|
27-Apr-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Parsing of namespaces: -NamespaceDecl for the AST -Checks for name clashes between namespaces and tag/normal declarations. This commit doesn't implement proper name lookup for namespaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
9fdf9c6d3530bb85f3166e6460d841e2ff8e1a2c |
|
22-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
"This patch renames DeclContext *CtxDecl -> DeclContext *DeclCtx DeclContext *CD -> DeclContext *DC It makes the code more consistent." Patch by Zhongxing Xu! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
f009795057dc8ca254f5618c80a0a90f07cd44b4 |
|
21-Apr-2008 |
Douglas Gregor <dgregor@apple.com> |
Clean up handling of function redeclarations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
ef177820100ab583b08fd3056e2a5a52ee4b1629 |
|
17-Apr-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Addition of TranslationUnitDecl to the AST: -Added TranslationUnitDecl class to serve as top declaration context -ASTContext gets a TUDecl member and a getTranslationUnitDecl() function -All ScopedDecls get the TUDecl as DeclContext when declared at global scope git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
61d46159af2a740207de8dc024211d531ae290d9 |
|
17-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
New AST class for property implementation declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
248a753f6b670692523c99afaeb8fe98f7ae3ca7 |
|
16-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Remove FileVarDecl and BlockVarDecl. They are replaced by VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl(). This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1b30cb27f894687c6021e7331265ae21aeb57d3f |
|
13-Apr-2008 |
Sam Bishop <sam@bishop.dhs.org> |
Use static_cast<> instead of cast<> in Decl::Destroy(). Suggestion by Argiris Kirtzidis! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
9e979557eea3875c9e3d100c68188233dd7f46c0 |
|
13-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Default argument cleanups and minor improvements, patch by Doug Gregor! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1bb19638f2ec0d63ed131b51ca8d9542d1a9afee |
|
11-Apr-2008 |
Sam Bishop <sam@bishop.dhs.org> |
Invoke destructors in Decl::Destroy(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
bb45c512e0dfbe96bfe377ac642e726c0ba0affa |
|
11-Apr-2008 |
Sam Bishop <sam@bishop.dhs.org> |
Stub out and start using a Decl::Destroy() method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8123a95c33b792d35c2e4992ba6e27882748fb0d |
|
10-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Several improvements from Doug Gregor related to default argument handling. I'll fix up the c89 (void) thing next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
670aa9d7639278f507930e95dc89c12032ab7c7e |
|
08-Apr-2008 |
Sam Bishop <sam@bishop.dhs.org> |
Changed the Decl::Kind enum of the ObjCPropertyDecl class, so that it follows the pattern of the other Decl classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
04421087832a031c90bd58f128c7c0e741db8dd2 |
|
08-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Add support for C++ default arguments, and rework Parse-Sema interaction for function parameters, fixing PR2046. Patch by Doug Gregor! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
d8bdba5d3534b87cae606d559933bc62752e8828 |
|
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
remove a use of getCanonicalType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
b048c9835969c4f7fe06264748be18ed4b442116 |
|
06-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
This patch contains these changes: -Renamed ContextDecl -> DeclContext -Removed DeclContext pointer from FieldDecl -EnumDecl inherits from DeclContext, instead of TagDecl Patch by Argiris Kirtzidis! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
b6e64c57e45e52a46b63acc10d7f468cf1339746 |
|
04-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Rename ScopedDecl::getContext() -> getContextDecl(). Two motivations: #1: To be consistent with FieldDecl::getContextDecl(), which serves the same purpose. #2: From my perspective, getContext() is too general (and used by several other classes for different purposes). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
0ed844b04ea4387caa4e1cf3dc375d269657536b |
|
04-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Introduce ContextDecl, patch by Argiris Kirtzidis! -Added ContextDecl (no TranslationUnitDecl) -ScopedDecl class has a ContextDecl member -FieldDecl class has a ContextDecl member, so that a Field or a ObjCIvar can be traced back to their RecordDecl/ObjCInterfaceDecl easily -FunctionDecl, ObjCMethodDecl, TagDecl, ObjCInterfaceDecl inherit from ContextDecl. With TagDecl as ContextDecl, enum constants have a EnumDecl as their context. -Moved Decl class to a "DeclBase.h" along with ContextDecl class -CurContext is handled by Sema git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8266d7f62019c3366254461cec2275999e69999c |
|
03-Apr-2008 |
Sam Bishop <sam@bishop.dhs.org> |
Call "delete" on the body of FunctionDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
e8043c39176e7f253fbd92982b077eca6bf2fd59 |
|
02-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Fairly large "cleaup" related to changing ObjCCompatibleAliasDecl superclass (to inherit from NamedDecl, instead of ScopedDecl). - Added a DenseMap to associate an IdentifierInfo with the ObjCCompatibleAliasDecl. - Renamed LookupScopedDecl->LookupDecl and changed it's return type to Decl. Also added lookup for ObjCCompatibleAliasDecl's. - Removed Sema::LookupInterfaceDecl(). Converted clients to used LookupDecl(). - Some minor indentation changes. Will deal with ObjCInterfaceDecl and getObjCInterfaceDecl() in a separate commit... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8a934233d1582b5bde9d270bc0705aa81e471a79 |
|
31-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
rename Decl::CompatibleAlias -> ObjCCompatibleAlias. Fix objc ivar lookup. Ivar lookup should occur between lookup of method-local values and lookup of globals. Emulate this with some logic in the handling of Sema::ActOnIdentifierExpr. Two todo's left: 1) sema shouldn't turn a bare reference to an ivar into "self->ivar" in the AST. This is a hack. 2) The new ScopedDecl::isDefinedOutsideFunctionOrMethod method does not correctly handle typedefs and enum constants yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
1e03a561f4bd96910cb31a8af53a6ad321a12b51 |
|
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Split objc decl implementation out into DeclObjC.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
8e25d8681822d8094bfeb97b2239363552548171 |
|
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
switch the rest of the C decl classes to do their allocation through ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48403 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|
bda0b626e74513950405c27525af87e214e605e2 |
|
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Make a major restructuring of the clang tree: introduce a top-level lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Decl.cpp
|