4967a710c84587c654b56c828382219c3937dacb |
|
20-Sep-2016 |
Pirama Arumuga Nainar <pirama@google.com> |
Update aosp/master Clang for rebase to r275480 Bug: http://b/31320715 This merges commit ac9cc4764cf47a6c3f031687d8592e080c9f5001 from aosp/dev. Test: Build AOSP and run RenderScript tests (host tests for slang and libbcc, RsTest, CTS) Change-Id: Ic2875e5c3673c83448cd7d1013861e42947b1b55
/external/clang/lib/Sema/Sema.cpp
|
87d948ecccffea9e9e37d0d053b246e2d6d6c47b |
|
04-Mar-2016 |
Pirama Arumuga Nainar <pirama@google.com> |
Update aosp/master clang for rebase to r256229 http://b/26987366 Change-Id: I5d349c9843ea5c24d6e455956f8a446393b6873d
/external/clang/lib/Sema/Sema.cpp
|
b6d6993e6e6d3daf4d9876794254d20a134e37c2 |
|
01-Jul-2015 |
Pirama Arumuga Nainar <pirama@google.com> |
Update aosp/master clang for rebase to r239765 Change-Id: I0393bcc952590a7226af8c4b58534a8ee5fd2d99
/external/clang/lib/Sema/Sema.cpp
|
3ea9e33ea25e0c2b12db56418ba3f994eb662c04 |
|
08-Apr-2015 |
Pirama Arumuga Nainar <pirama@google.com> |
Update aosp/master clang for rebase to r233350 Change-Id: I12d4823f10bc9e445b8b86e7721b71f98d1df442
/external/clang/lib/Sema/Sema.cpp
|
0e2c34f92f00628d48968dfea096d36381f494cb |
|
23-Mar-2015 |
Stephen Hines <srhines@google.com> |
Update aosp/master clang for rebase to r230699. Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
/external/clang/lib/Sema/Sema.cpp
|
176edba5311f6eff0cad2631449885ddf4fbc9ea |
|
01-Dec-2014 |
Stephen Hines <srhines@google.com> |
Update aosp/master Clang for rebase to r222490. Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/lib/Sema/Sema.cpp
|
c568f1e98938584c0ef0b12ae5018ff7d90a4072 |
|
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/Sema/Sema.cpp
|
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 |
|
29-May-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for 3.5 rebase (r209713). Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/Sema/Sema.cpp
|
651f13cea278ec967336033dd032faef0e9fc2ec |
|
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/Sema/Sema.cpp
|
126bd8f29558535f97511603769f9c81288c0c57 |
|
12-Nov-2013 |
Faisal Vali <faisalv@yahoo.com> |
COSMETIC: Right justify an asterix in the previous refactoring. Hopefully Richard won't notice this terrible egregiocity - clearly the work of a malevolent poltergeist - fixed now ;) No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d78d6591fa2556b037d3571fde3631d0243c08d7 |
|
12-Nov-2013 |
Faisal Vali <faisalv@yahoo.com> |
REFACTOR: Have PushLambdaScope return the LambdaScopeInfo that it creates. No Functionality change. This refactoring avoids having to call getCurLambda right after PushLambdaScope, to obtain the LambdaScopeInfo that was created during the call to PushLambdaScope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194438 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
08235661cf457978ba4645ec8e22697aebabe4fa |
|
18-Oct-2013 |
Alp Toker <alp@nuanti.com> |
Fix missed exception spec checks and crashes Delayed exception specification checking for defaulted members and virtual destructors are both susceptible to mutation during iteration so we need to swap and process the worklists. This resolves both accepts-invalid and rejects-valid issues and moreover fixes potential invalid memory access as the contents of the vectors change during iteration and recursive template instantiation. Checking can be further delayed where parent classes aren't yet fully defined. This patch adds two assertions at end of TU to ensure no specs are left unchecked as was happenning before the fix, plus a test case from Marshall Clow for the defaulted member crash extracted from the libcxx headers. Reviewed by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
682a56b15ae01cc8154d4800d29498da93911981 |
|
17-Oct-2013 |
Alp Toker <alp@nuanti.com> |
Revert "Fix missed exception spec checks and crashes" The changes caused the sanitizer bot to hang: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/2311 Needs investigation. This reverts commit r192914. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
bb81f880aa77cfd09dedfc72a9b87262889ae75c |
|
17-Oct-2013 |
Alp Toker <alp@nuanti.com> |
Fix missed exception spec checks and crashes Delayed exception specification checking for defaulted members and virtual destructors are both susceptible to mutation during iteration so we need to process the worklists fully. This resolves both accepts-invalid and rejects-valid issues and moreover fixes potential invalid memory access as the contents of the vectors change during iteration and recursive template instantiation. This patch also adds two assertions at end of TU to ensure no specs are left unchecked as was happenning before the fix, plus a test case from Marshall Clow for the defaulted member crash extracted from the libcxx headers. Reviewed by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
f0d5861d2db5e3075bd722ff7874e88c4bfedaae |
|
08-Oct-2013 |
Ted Kremenek <kremenek@apple.com> |
Convert anachronistic use of 'void *' to 'DeclContext *' in Scope that was a holdover from the long-dead Action interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
fad9e13f3cb85198f0ee5af620ba81cd78574faa |
|
26-Sep-2013 |
Faisal Vali <faisalv@yahoo.com> |
Implement a rudimentary form of generic lambdas. Specifically, the following features are not included in this commit: - any sort of capturing within generic lambdas - generic lambdas within template functions and nested within other generic lambdas - conversion operator for captureless lambdas - ensuring all visitors are generic lambda aware (Although I have gotten some useful feedback on my patches of the above and will be incorporating that as I submit those patches for commit) As an example of what compiles through this commit: template <class F1, class F2> struct overload : F1, F2 { using F1::operator(); using F2::operator(); overload(F1 f1, F2 f2) : F1(f1), F2(f2) { } }; auto Recursive = [](auto Self, auto h, auto ... rest) { return 1 + Self(Self, rest...); }; auto Base = [](auto Self, auto h) { return 1; }; overload<decltype(Base), decltype(Recursive)> O(Base, Recursive); int num_params = O(O, 5, 3, "abc", 3.14, 'a'); Please see attached tests for more examples. This patch has been reviewed by Doug and Richard. Minor changes (non-functionality affecting) have been made since both of them formally looked at it, but the changes involve removal of supernumerary return type deduction changes (since they are now redundant, with richard having committed a recent patch to address return type deduction for C++11 lambdas using C++14 semantics). Some implementation notes: - Add a new Declarator context => LambdaExprParameterContext to clang::Declarator to allow the use of 'auto' in declaring generic lambda parameters - Add various helpers to CXXRecordDecl to facilitate identifying and querying a closure class - LambdaScopeInfo (which maintains the current lambda's Sema state) was augmented to house the current depth of the template being parsed (id est the Parser calls Sema::RecordParsingTemplateParameterDepth) so that SemaType.cpp::ConvertDeclSpecToType may use it to immediately generate a template-parameter-type when 'auto' is parsed in a generic lambda parameter context. (i.e we do NOT use AutoType deduced to a template parameter type - Richard seemed ok with this approach). We encode that this template type was generated from an auto by simply adding $auto to the name which can be used for better diagnostics if needed. - SemaLambda.h was added to hold some common lambda utility functions (this file is likely to grow ...) - Teach Sema::ActOnStartOfFunctionDef to check whether it is being called to instantiate a generic lambda's call operator, and if so, push an appropriately prepared LambdaScopeInfo object on the stack. - various tests were added - but much more will be needed. There is obviously more work to be done, and both Richard (weakly) and Doug (strongly) have requested that LambdaExpr be removed form the CXXRecordDecl LambdaDefinitionaData in a future patch which is forthcoming. A greatful thanks to all reviewers including Eli Friedman, James Dennett, and especially the two gracious wizards (Richard Smith and Doug Gregor) who spent hours providing feedback (in person in Chicago and on the mailing lists). And yet I am certain that I have allowed unidentified bugs to creep in; bugs, that I will do my best to slay, once identified! Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
ddd2dfc1d3f4a36cbe8cd775c588623a17049f9f |
|
24-Sep-2013 |
Daniel Jasper <djasper@google.com> |
Module use declarations (II) Review: http://llvm-reviews.chandlerc.com/D1546. I have picked up this patch form Lawrence (http://llvm-reviews.chandlerc.com/D1063) and did a few changes. From the original change description (updated as appropriate): This patch adds a check that ensures that modules only use modules they have so declared. To this end, it adds a statement on intended module use to the module.map grammar: use module-id A module can then only use headers from other modules if it 'uses' them. This enforcement is off by default, but may be turned on with the new option -fmodules-decluse. When enforcing the module semantics, we also need to consider a source file part of a module. This is achieved with a compiler option -fmodule-name=<module-id>. The compiler at present only applies restrictions to the module directly being built. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
9bd3cdc3b78653275a36f15df81e1def3b2db8db |
|
13-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13657 (and duplicates): When a comma occurs in a default argument or default initializer within a class, disambiguate whether it is part of the initializer or whether it ends the initializer. The way this works (which I will be proposing for standardization) is to treat the comma as ending the default argument or default initializer if the following token sequence matches the syntactic constraints of a parameter-declaration-clause or init-declarator-list (respectively). This is both consistent with the disambiguation rules elsewhere (where entities are treated as declarations if they can be), and should have no regressions over our old behavior. I think it might also disambiguate all cases correctly, but I don't have a proof of that. There is an annoyance here: because we're performing a tentative parse in a situation where we may not have seen declarations of all relevant entities (if the comma is part of the initializer, lookup may find entites declared later in the class), we need to turn off typo-correction and diagnostics during the tentative parse, and in the rare case that we decide the comma is part of the initializer, we need to revert all token annotations we performed while disambiguating. Any diagnostics that occur outside of the immediate context of the tentative parse (for instance, if we trigger the implicit instantiation of a class template) are *not* suppressed, mirroring the usual rules for a SFINAE context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
71fcba874e399eb33e0ebf7c6b19bc2a5e876993 |
|
11-Sep-2013 |
Daniel Jasper <djasper@google.com> |
Split -Wunused-variable warning. With r190382, -Wunused-variable warns about unused const variables when appropriate. For codebases that use -Werror, this poses a problem as existing unused const variables need to be cleaned up first. To make the transistion easier, this patch splits -Wunused-variable by pulling out an additional -Wunused-const-variable (by default activated along with -Wunused-variable). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
1507bf55c958bdd4b14a3ee49f66af874f179cf2 |
|
10-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix regression from r190382. Make sure we perform the correct "referenced-but-not-used" check for static member constants. Fixes bug reported on cfe-commits by Alexey Samsonov. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
39bd371610af27b073c792c54c6c28133329f6ad |
|
10-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Make -Wunused warning rules more consistent. This patch does a few different things. This patch improves unused var diags for const vars: we no longer unconditionally suppress diagnostics for const vars, instead only suppressing the diagnostic when the declaration appears to be useful. This patch also makes us more consistently use whether a variable/function is declared in the main file to suppress diagnostics where appropriate. Fixes <rdar://problem/14907887>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190382 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
0c018357b8bbb1f96bbf622a5807421e626b4228 |
|
06-Sep-2013 |
Alexey Bataev <a.bataev@hotmail.com> |
OpenMP: Data-sharing attributes analysis and clause 'shared' (fixed test threadprivate_messages.cpp) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
4367829b41e89d2f3dfae94a97af40ffa01c56c9 |
|
03-Sep-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert "OpenMP: Data-sharing attributes analysis and clause 'shared'" This reverts commit r189795. threadprivate_messages.cpp is faling on windows. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189811 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
8f1a2db8649eb151ee620273dcf34b700176430f |
|
03-Sep-2013 |
Alexey Bataev <a.bataev@hotmail.com> |
OpenMP: Data-sharing attributes analysis and clause 'shared' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
344472ebeded2fca2ed5013b9e87f81d09bfa908 |
|
23-Aug-2013 |
Robert Wilhelm <robert.wilhelm@gmx.net> |
Use pop_back_val() instead of both back() and pop_back(). No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
152b4e4652baedfceba1cd8115515629225e713f |
|
22-Aug-2013 |
Manuel Klimek <klimek@google.com> |
Revert "Implement a rudimentary form of generic lambdas." This reverts commit 606f5d7a99b11957e057e4cd1f55f931f66a42c7. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
ecb5819a9e64fb654d46a3b270a286cc570c58ff |
|
22-Aug-2013 |
Faisal Vali <faisalv@yahoo.com> |
Implement a rudimentary form of generic lambdas. Specifically, the following features are not included in this commit: - any sort of capturing within generic lambdas - nested lambdas - conversion operator for captureless lambdas - ensuring all visitors are generic lambda aware As an example of what compiles: template <class F1, class F2> struct overload : F1, F2 { using F1::operator(); using F2::operator(); overload(F1 f1, F2 f2) : F1(f1), F2(f2) { } }; auto Recursive = [](auto Self, auto h, auto ... rest) { return 1 + Self(Self, rest...); }; auto Base = [](auto Self, auto h) { return 1; }; overload<decltype(Base), decltype(Recursive)> O(Base, Recursive); int num_params = O(O, 5, 3, "abc", 3.14, 'a'); Please see attached tests for more examples. Some implementation notes: - Add a new Declarator context => LambdaExprParameterContext to clang::Declarator to allow the use of 'auto' in declaring generic lambda parameters - Augment AutoType's constructor (similar to how variadic template-type-parameters ala TemplateTypeParmDecl are implemented) to accept an IsParameterPack to encode a generic lambda parameter pack. - Add various helpers to CXXRecordDecl to facilitate identifying and querying a closure class - LambdaScopeInfo (which maintains the current lambda's Sema state) was augmented to house the current depth of the template being parsed (id est the Parser calls Sema::RecordParsingTemplateParameterDepth) so that Sema::ActOnLambdaAutoParameter may use it to create the appropriate list of corresponding TemplateTypeParmDecl for each auto parameter identified within the generic lambda (also stored within the current LambdaScopeInfo). Additionally, a TemplateParameterList data-member was added to hold the invented TemplateParameterList AST node which will be much more useful once we teach TreeTransform how to transform generic lambdas. - SemaLambda.h was added to hold some common lambda utility functions (this file is likely to grow ...) - Teach Sema::ActOnStartOfFunctionDef to check whether it is being called to instantiate a generic lambda's call operator, and if so, push an appropriately prepared LambdaScopeInfo object on the stack. - Teach Sema::ActOnStartOfLambdaDefinition to set the return type of a lambda without a trailing return type to 'auto' in C++1y mode, and teach the return type deduction machinery in SemaStmt.cpp to process either C++11 and C++14 lambda's correctly depending on the flag. - various tests were added - but much more will be needed. A greatful thanks to all reviewers including Eli Friedman, James Dennett and the ever illuminating Richard Smith. And yet I am certain that I have allowed unidentified bugs to creep in; bugs, that I will do my best to slay, once identified! Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
24146975f1af8c1b4b14e8545f218129d0e7dfeb |
|
22-Aug-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Split isFromMainFile into two functions. Basically, isInMainFile considers line markers, and isWrittenInMainFile doesn't. Distinguishing between the two is useful when dealing with files which are preprocessed files or rewritten with -frewrite-includes (so we don't, for example, print useless warnings). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
f96df620402f41ce9f1a97c0d286c2b42637d5b9 |
|
21-Aug-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Fix the end sourcelocation of the call expression in a member access when recovering by adding empty parenthesis. Fixes PR16676! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
ac32d9044b9c1e7492cef929a322d23ce899d276 |
|
07-Aug-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR9992: Serialize and deserialize the token sequence for a function template in -fdelayed-template-parsing mode. Patch by Will Wilson! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
b316dc517d9721ac9047819e4eeaa0eb59c4020a |
|
31-Jul-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC arc: Move check for type conversions in arc out of ImpCastExprToType and to the caller site as appropriate. This is in prep. to do more work for // rdar://14569171 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
b775100fea6d8955149897dae1adca50ca471d17 |
|
26-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When we perform dependent name lookup during template instantiation, it's not sufficient to only consider names visible at the point of instantiation, because that may not include names that were visible when the template was defined. More generally, if the instantiation backtrace goes through a module M, then every declaration visible within M should be available to the instantiation. Any of those declarations might be part of the interface that M intended to export to a template that it instantiates. The fix here has two parts: 1) If we find a non-visible declaration during name lookup during template instantiation, check whether the declaration was visible from the defining module of all entities on the active template instantiation stack. The defining module is not the owning module in all cases: we look at the module in which a template was defined, not the module in which it was first instantiated. 2) Perform pending instantiations at the end of a module, not at the end of the translation unit. This is general goodness, since it significantly cuts down the amount of redundant work that is performed in every TU importing a module, and also implicitly adds the module containing the point of instantiation to the set of modules checked for declarations in a lookup within a template instantiation. There's a known issue here with template instantiations performed while building a module, if additional imports are added later on. I'll fix that in a subsequent commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d739c4ecf7d7f2222f6f1c8de9e234d1c8a0468c |
|
09-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix crash typo-correcting dependent member func. PR16561. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c8fa525b5b81eeb7a62294dd3218ca2a6ccf0a6a |
|
22-Jun-2013 |
David Blaikie <dblaikie@gmail.com> |
Provide suggested no-arg calls for overloaded member functions missing calls Reviewed by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
cac18add73d095eaab600aefe27ea7174aec4922 |
|
20-Jun-2013 |
Nico Weber <nicolasweber@gmx.de> |
Lazily provide a __float128 dummy type in -std=gnu++11 mode. This is needed to parse libstdc++ 4.7's type_traits, see PR13530. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
08dc71f4f2a75fd9869ee91b12f36695b700adfc |
|
19-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Delete dead code. (Array element types are always complete in C.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c2fe81898b1b3b948791ca4ababd3d495601f22a |
|
04-Jun-2013 |
David Blaikie <dblaikie@gmail.com> |
Bound member function diagnostic - suggest no-args calls and note overload candidates Still missing cases for templates, but this is a step in the right direction. Also omits suggestions that would be ambiguous (eg: void func(int = 0); + void func(float = 0); func;) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
69f86d92ae940c5c8d979951d9c55fe9111627a0 |
|
31-May-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: Fixes an ivar lookup bug where 'ivar' was used inside a record/union used as argument to __typeof. // rdar14037151 pr5984 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
009735db957ac4bcca8f5ad1a5c01354b1b57fbd |
|
06-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add missing initialization for Sema::CurScope. This is important for AST consumers which don't create a Parser. Pointed out by Tom Honermann. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
62ed889272d7e9da8e367d8682fdcdeeec0d83b5 |
|
05-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Replace 'MultiExprArg()' with 'None' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
676ea9dce44ed2d1dc3d7f431824045764d8a3e9 |
|
30-Apr-2013 |
Daniel Jasper <djasper@google.com> |
Fix very confusing indent in Sema.cpp. This came up during my Euro LLVM 2013 talk on clang-format and I was asked to submit it :-). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
3a2f91280a49f4747063f983dc6a3296bd9359d2 |
|
29-Apr-2013 |
Ben Langmuir <ben.langmuir@intel.com> |
Small CapturedStmt improvements Add a CapturedStmt.h similar to Lambda.h to reduce the typing required to get to the CapturedRegionKind enum. This also allows codegen to access this enum without including Sema/ScopeInfo.h. Also removes some duplicated code for capturing 'this' between CapturedStmt and Lambda. Differential Revision: http://llvm-reviews.chandlerc.com/D712 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
6fd7d3067dd06584ef3940e88e31fea1a0e83588 |
|
10-Apr-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Add an option to parse all comments as documentation comments Patch by Amin Shali. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
19b6a707a86302adc80d64464cbc3cb8a7a7f3a6 |
|
10-Apr-2013 |
Matt Beaumont-Gay <matthewbg@google.com> |
Suppress -Wunused-variable for variables declared in headers, which may in fact be defined and used in another TU. Reshuffle some test cases because we suppress -Wunused-variable after we've emitted an error. This fixes PR15558. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.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/Sema/Sema.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/Sema/Sema.cpp
|
906d66acc5cf2679453e10a4f0a67feedd765b21 |
|
20-Mar-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/12368093> Extend module maps with a 'conflict' declaration, and warn when a newly-imported module conflicts with an already-imported module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
57f8da506a0db208a936e26a8cb77267f638b26b |
|
14-Mar-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't try to typo-correct 'super' in an objc method. This created 2 issues: 1) Performance issue, since typo-correction with PCH/modules is rather expensive. 2) Correctness issue, since if it managed to "correct" 'super' then bogus compiler errors would be emitted, like this: 3.m:8:3: error: unknown type name 'super'; did you mean 'super1'? super.x = 0; ^~~~~ super1 t3.m:5:13: note: 'super1' declared here typedef int super1; ^ t3.m:8:8: error: expected identifier or '(' super.x = 0; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
975d353997a13f7dfdaf4ec7a547fe1adb15f35e |
|
14-Mar-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[modules] Check for delegating constructor cycles when building a module and don't write them out to the module file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
531db82c6ecfb4772c6870731c06ad8718f1e0ce |
|
07-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add a hasExternalLinkage helper. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
9818a1d443e97677dd3422305de9cc2b1fb2a8c1 |
|
20-Feb-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[preprocessor] Split the MacroInfo class into two separate concepts, MacroInfo class for the data specific to a macro definition (e.g. what the tokens are), and MacroDirective class which encapsulates the changes to the "macro namespace" (e.g. the location where the macro name became active, the location where it was undefined, etc.) (A MacroDirective always points to a MacroInfo object.) Usually a macro definition (MacroInfo) is where a macro name becomes active (MacroDirective) but splitting the concepts allows us to better model the effect of modules to the macro namespace (also as a bonus it allows better modeling of push_macro/pop_macro #pragmas). Modules can have their own macro history, separate from the local (current translation unit) macro history; MacroDirectives will be used to model the macro history (changes to macro namespace). For example, if "@import A;" imports macro FOO, there will be a new local MacroDirective created to indicate that "FOO" became active at the import location. Module "A" itself will contain another MacroDirective in its macro history (at the point of the definition of FOO) and both MacroDirectives will point to the same MacroInfo object. Introducing the separation of macro concepts is the first part towards better modeling of module macros. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
cd0655b17249c4c4908ca91462657f62285017e6 |
|
01-Feb-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Add a new -Wundefined-inline warning for inline functions which are used but not defined. Fixes PR14993! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
995e26b0523ac8e3b6199a509b871b81fa5df6ee |
|
31-Jan-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Remove elements from Sema.UndefinedInternals as functions are defined. Also filter the elements before emitting them into a PCH. No user-visible functionality change, except that PCH files may be smaller? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
4ceaf337be78fa89b4a97f351be6d0bda962d7de |
|
31-Jan-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Fix ODR-use of a MemberExpr to check before marking a pure function used. Remove a workaround for this bug from the -Wundefined-internals warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
87827616cd5540a4893e0c2c285c90dedb50fb91 |
|
26-Jan-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Remove function that is newly dead as of r173538. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
01a41140cd8ec9475ed0c33384310fbdd3b6de11 |
|
26-Jan-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Preserve Sema::UndefinedInternals across PCH boundaries. Fixes -Wundefined-internal warnings with PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d5617eeafc93209a26b9f88276c88cf997c3a0a7 |
|
25-Jan-2013 |
John McCall <rjmccall@apple.com> |
The standard ARM C++ ABI dictates that inline functions are never key functions. We did not implement that rule for the iOS ABI, which was driven by what was implemented in gcc-4.2. However, implement it now for other ARM-based platforms. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
0116a40116616701282e12f3d92cf2949102d76a |
|
20-Jan-2013 |
Michael Gottesman <mgottesman@apple.com> |
Fixed trailing whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
b9725cfb0a50731930a6331beb70f361b4d52a29 |
|
08-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Mark all subsequent decls used. In the source static void f(); static void f(); template<typename T> static void g() { f(); } static void f() { } void h() { g<int>(); } the call to f refers to the second decl, but it is only marked used at the end of the translation unit during instantiation, after the third f decl has been linked in. With this patch we mark all subsequent decls used, so that it is easy to check if a symbol is used or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
87b8127c2c65c8229e5b874c10a33f1ce13493ad |
|
30-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't warn on unused member functions that are extern because of a typedef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
9f409549fa36f1a69042d4793321e82004dbfea9 |
|
30-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't warn for undefined but used decls that are external because of a typedef. This fixes pr14736. It is fairly ugly, but I don't think we can do much better as we have to wait at least until the end of the typedef to know if the function will have external linkage or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
137d6625eb61a41e776d89b39f3cb958d4a21140 |
|
26-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix a regression from the previous commit. Template instantiation can set the canonical decl to used after subsequent decls have been chained, so we have to check that too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
485458aa998c12e43bc9883b49060425d58b351d |
|
26-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use the most recent redecl to decide if it is needed. This fixes pr14691, which I think is a regression from r168519. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171077 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
84268904947ada7e251932a6f5b0f4364df7a2c7 |
|
29-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Reject uses of __int128 on platforms that don't support it. Also move the ugly 'getPointerWidth(0) >= 64' test to be a method on TargetInfo, ready to be properly cleaned up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
dc7b641574a733624489bd87fc7061771edf2113 |
|
24-Oct-2012 |
Douglas Gregor <dgregor@apple.com> |
Use a .def file for most of the diagnostic options. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
e4851f26eb7be1f71f919bb5890da7e3583f727d |
|
23-Oct-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add a new warning -Wmissing-variable-declarations, to warn about variables defined without a previous declaration. This is similar to -Wmissing-prototypes, but for variables instead of functions. Patch by Ed Schouten. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
0ec56b7add7be643f490ea9b430823570f01b4e2 |
|
18-Oct-2012 |
Axel Naumann <Axel.Naumann@cern.ch> |
From Vassil Vassilev: enable Sema to deal with multiple ExternalSemaSources. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
a55d32d1b8f799bf58c02540983976368c42d895 |
|
29-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
Pull ScopeInfo implementation into its own file. The infrastructure for -Warc-repeated-use-of-weak got a little too heavy to leave sitting at the top of Sema.cpp. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
7a2704800943fbb69207e125d28186278712af36 |
|
29-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
-Warc-repeated-use-of-weak: check ivars and variables as well. Like properties, loading from a weak ivar twice in the same function can give you inconsistent results if the object is deallocated between the two loads. It is safer to assign to a strong local variable and use that. Second half of <rdar://problem/12280249>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
58b6bdcdeb683a3504f2248a409e1f4e85876cee |
|
29-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
Add a warning (off by default) for repeated use of the same weak property. The motivating example: if (self.weakProp) use(self.weakProp); As with any non-atomic test-then-use, it is possible a weak property to be non-nil at the 'if', but be deallocated by the time it is used. The correct way to write this example is as follows: id tmp = self.weakProp; if (tmp) use(tmp); The warning is controlled by -Warc-repeated-use-of-receiver, and uses the property name and base to determine if the same property on the same object is being accessed multiple times. In cases where the base is more complicated than just a single Decl (e.g. 'foo.bar.weakProp'), it picks a Decl for some degree of uniquing and reports the problem under a subflag, -Warc-maybe-repeated-use-of-receiver. This gives a way to tune the aggressiveness of the warning for a particular project. The warning is not on by default because it is not flow-sensitive and thus may have a higher-than-acceptable rate of false positives, though it is less noisy than -Wreceiver-is-weak. On the other hand, it will not warn about some cases that may be legitimate issues that -Wreceiver-is-weak will catch, and it does not attempt to reason about methods returning weak values. Even though this is not a real "analysis-based" check I've put the bug emission code in AnalysisBasedWarnings for two reasons: (1) to run on every kind of code body (function, method, block, or lambda), and (2) to suggest that it may be enhanced by flow-sensitive analysis in the future. The second (smaller) half of this work is to extend it to weak locals and weak ivars. This should use most of the same infrastructure. Part of <rdar://problem/12280249> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
e49ff3ef3459e97fa76502bd9eae4ed9170fd048 |
|
25-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix crash when a decltype expression in a trailing return type refers to the function being instantiated. An error recovery codepath was recursively performing name lookup (and triggering an unbounded stack of template instantiations which blew out the stack before hitting the depth limit). Patch by Wei Pan! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
127ff2ea6440c3da4b47f9c8b3b190254a97e7b5 |
|
13-Sep-2012 |
Ted Kremenek <kremenek@apple.com> |
Conditionally parse documentation comments in system headers by passing -fretain-comments-from-system-headers. By default, the compiler no longer parses such documentation comments, as they can result in a noticeable compile time/PCH slowdown. Fixes <rdar://problem/11860820>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
5354e77e60e82828c7c2361f5c688c2667ab59cc |
|
24-Aug-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Now that ASTMultiPtr is nothing more than a array reference, make it a MutableArrayRef. This required changing all get() calls to data() and using the simpler constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d82f5eb1f98825ad888fb0ab45e5d8ef2e0ec6a2 |
|
18-Aug-2012 |
Douglas Gregor <dgregor@apple.com> |
When code completion is enabled, don't do any work in Sema::ActOnEndOfTranslationUnit(). This is a (minor) optimization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
95aac15936e8362aeb4813f95bc255dee6473592 |
|
01-Aug-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix an assertion failure instantiating a constexpr function from within a -dealloc method. PR13401. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c50a0e3900f1b44503be48457508af372f4dd05a |
|
04-Jul-2012 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Renamed RawComment kinds to avoid name clash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159706 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
12d2cc71bfeb1e7be9ce00fc52feab50941cac24 |
|
27-Jun-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
patch to suggest 'static' function should be 'static inline' when it appears to be unused and occurs in a header. // rdar://11202617 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159282 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
9dda4746867a747c1c3421d8a04a1b666aeb5809 |
|
22-Jun-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Add a warning about almost-Doxygen trailing comments: //< and /*< ... */ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
aa0cd85838f2a024e589ea4e8c2094130065af21 |
|
20-Jun-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Structured comment parsing, first step. * Retain comments in the AST * Serialize/deserialize comments * Find comments attached to a certain Decl * Expose raw comment text and SourceRange via libclang git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c5613b26a24a33d7450e3d0bf315c6ccc920ce7b |
|
16-Jun-2012 |
Meador Inge <meadori@codesourcery.com> |
Explicitly build __builtin_va_list. The target specific __builtin_va_list types are now explicitly built instead of injecting strings into the preprocessor input. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
0e9e9f8d17e38b3c44f6e1323be3a812a793bdd1 |
|
14-Jun-2012 |
Daniel Jasper <djasper@google.com> |
Look at incomplete FunctionTemplateDecls in order to determine whether a CXXRecordDecl is complete. Fixes Bug 13086. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
f8cc02e50553b5c3bc6570bff0c47ac7db85fe8d |
|
06-Jun-2012 |
Daniel Jasper <djasper@google.com> |
Introduce -Wunused-private-field. If enabled, this warning detects unused private fields of classes that are fully defined in the current translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
b8590f3572158bde97f14037c4cc8f4a57c8d810 |
|
07-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When we suppress an error due to SFINAE, stash the diagnostic away with the overload candidate, and include its message in any subsequent 'candidate not viable due to substitution failure' note we may produce. To keep the note small (since the 'overload resolution failed' diagnostics are often already very verbose), the text of the SFINAE diagnostic is included as part of the text of the note, and any notes which were attached to it are discarded. There happened to be spare space in OverloadCandidate into which a PartialDiagnosticAt could be squeezed, and this patch goes to lengths to avoid unnecessary PartialDiagnostic copies, resulting in no slowdown that I could measure. (Removal in passing of some PartialDiagnostic copies has resulted in a slightly smaller clang binary overall.) Even on a torture test, I was unable to measure a memory increase of above 0.2%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
13489673b84fafaaf49cf5ae4e3bb9a945524dcb |
|
07-May-2012 |
John McCall <rjmccall@apple.com> |
Change how we suppress access control in explicit instantiations so that we actually accumulate all the delayed diagnostics. Do this so that we can restore those diagnostics to good standing if it turns out that we were wrong to suppress, e.g. if the tag specifier is actually an elaborated type specifier and not a declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
9257664568bf375b7790131a84d9a4fa30a5b7e3 |
|
07-May-2012 |
John McCall <rjmccall@apple.com> |
Refactor DelayedDiagnostics so that it keeps diagnostics in separate pools owned by the RAII objects that keep pushing decl state. This gives us quite a bit more flexibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
471131a05d4f9dca7f9f4f5109f2a9a4ce80bf65 |
|
22-Apr-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Initialize NSString method cache members. Found by valgrind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155324 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
cefc3afac14d29de5aba7810cc8fe6c858949e9d |
|
16-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement C++11 [expr.prim.general]p3, which permits the use of 'this' in the declaration of a non-static member function after the (optional) cv-qualifier-seq, which in practice means in the exception specification and late-specified return type. The new scheme here used to manage 'this' outside of a member function scope is more general than the Scope-based mechanism previously used for non-static data member initializers and late-parsesd attributes, because it can also handle the cv-qualifiers on the member function. Note, however, that a separate pass is required for static member functions to determine whether 'this' was used, because we might not know that we have a static function until after declaration matching. Finally, this introduces name mangling for 'this' and for the implicit 'this', which is intended to match GCC's mangling. Independent verification for the new mangling test case would be appreciated. Fixes PR10036 and PR12450. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
393eed7fb901e49085c8583ff0439d1273b6f2fe |
|
14-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
[Sema] Fix SemaDiagnosticBuilder to be inline. - As with DiagnosticBuilder, it is very important that SemaDiagnosticBuilder be completely inline to ensure that the compiler can rip it apart and sink it to registers. This is good for another 30k reduction in code size. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
00b43848e4a320b0845c1004694fa50920096c75 |
|
13-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
Spelling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
ebcb57a8d298862c65043e88b2429591ab3c58d3 |
|
06-Mar-2012 |
Ted Kremenek <kremenek@apple.com> |
Add clang support for new Objective-C literal syntax for NSDictionary, NSArray, NSNumber, and boolean literals. This includes both Sema and Codegen support. Included is also support for new Objective-C container subscripting. My apologies for the large patch. It was very difficult to break apart. The patch introduces changes to the driver as well to cause clang to link in additional runtime support when needed to support the new language features. Docs are forthcoming to document the implementation and behavior of these features. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.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/Sema/Sema.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/Sema/Sema.cpp
|
76f3f69db1416425070177243e9f390122c553e0 |
|
22-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement C++11 [expr.call]p11: If the operand to a decltype-specifier is a function call (or a comma expression with a function call on its right-hand side), possibly parenthesized, then the return type is not required to be complete and a temporary is not bound. Other subexpressions inside a decltype expression do not get this treatment. This is implemented by deferring the relevant checks for all calls immediately within a decltype expression, then, when the expression is fully-parsed, checking the relevant constraints and stripping off any top-level temporary binding. Deferring the completion of the return type exposed a bug in overload resolution where completion of the argument types was not attempted, which is also fixed by this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
ccc1b5eebc6ca8a904c58c0468b9a71483b7c7cf |
|
21-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement name mangling for lambda expressions that occur within the default arguments of function parameters. This simple-sounding task is complicated greatly by two issues: (1) Default arguments aren't actually a real context, so we need to maintain extra state within lambda expressions to track when a lambda was actually in a default argument. (2) At the time that we parse a default argument, the FunctionDecl doesn't exist yet, so lambda closure types end up in the enclosing context. It's not clear that we ever want to change that, so instead we introduce the notion of the "effective" context of a declaration for the purposes of name mangling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
625bb569df0c34feec0d52c0ec5215f21ef2e054 |
|
14-Feb-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Generalize -Wempty-body: warn when statement body is empty (closes: PR11329) * if, switch, range-based for: warn if semicolon is on the same line. * for, while: warn if semicolon is on the same line and either next statement is compound statement or next statement has more indentation. Replacing the semicolon with {} or moving the semicolon to the next line will always silence the warning. Tests from SemaCXX/if-empty-body.cpp merged into SemaCXX/warn-empty-body.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
215e4e17d00e12c38687a95502506d8f2ca3e646 |
|
12-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Lambdas have a deleted default constructor and a deleted copy assignment operator, per C++ [expr.prim.lambda]p19. Make it so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
76e3da57b0e8cf72d221f44d54566ef206341668 |
|
08-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
When completing a lambda expression, make sure to check and attach the body of the lambda to the function call operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
849639d8b548519cc5a00c0c9253f0c0d525060d |
|
07-Feb-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make parsing of objc @implementations more robust. Parsing of @implementations was based on modifying global state from the parser; the logic for late parsing of methods was spread in multiple places making it difficult to have a robust error recovery. -it was difficult to ensure that we don't neglect parsing the lexed methods. -it was difficult to setup the original objc container context for parsing the lexed methods after completing ParseObjCAtImplementationDeclaration and returning to top level context. Enhance parsing of @implementations by centralizing it in Parser::ParseObjCAtImplementationDeclaration(). ParseObjCAtImplementationDeclaration now returns only after an @implementation is fully parsed; all the data and logic for late parsing of methods is now in one place. This allows us to provide code-completion for late parsed methods with mis-matched braces. rdar://10775381 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
5ac4b6917aa34fae6da64036539023a6155a3d48 |
|
25-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Rework the external Sema source's ReadMethodPool() so that it doesn't return pre-built lists. Instead, it feeds the methods it deserializes to Sema so that Sema can unique them, which keeps the chains shorter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
395e04dbd7294bae4640aef1705cec3d052578b0 |
|
17-Jan-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add Sema::isStdInitializerList, which will be necessary for the upcoming operations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
a6ea10e22b600d92e084f6b11b9b9a92d0eb2412 |
|
17-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Delay the creation of the built-in Objective-C class 'Protocol' by moving it from a "special type" to a predefined declaration, as we do for id, Class, and SEL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
ea8c59aaa6bd19976879142296f8fd12f8926738 |
|
17-Jan-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce a CodeCompletionResult::CreateCodeCompletionString() that does not depend on Sema, it accepts an ASTContext and a Preprocessor. Step towards making clang_getCursorCompletionString not depend on Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
15e17aed79163d0d40ed7914f7fe992c400d93dd |
|
10-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Per John's comment, it makes sense to ask isLambda on any CXXRecordDecl; make sure that's safe. Get rid of a check which is now unnecessary in Sema::getFunctionLevelDeclContext(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
72899c34e3d1abfffa241ad0ce5c4bf175e5ea51 |
|
07-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
More lambda work: semantic analysis of capturing 'this'. It's a bit complicated, but we have to be careful about when exactly captures are marked given PotentiallyPotentiallyEvaluated contexts. (Actually, it's not 100% correct yet, but it's close enough for the moment.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
906a7e1c0f272f7e539c82dda01f4644031ce637 |
|
06-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
More lambda work. Fixes a minor bug Richard pointed out, makes lookup for lambda parameters work correctly, recording more information into the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
ec9ea7200718478e8a976529defbe21942a11c9c |
|
05-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
More lambda work. Tweak the Sema interface slightly. Start adding the pieces to build the lambda class and its call operator. Create an actual scope for the lambda body. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
b7a7819473709c01ea024a2dc15e99d38f0f8760 |
|
05-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Store the submodules of a module in source order, as they are stored in the module map. This provides a bit more predictability for the user, as well as eliminating the need to sort the submodules when serializing them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
0af550115df1f57f17a4f125ff0e8b34820c65d1 |
|
16-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix chaining of ObjCInterfaceDecl redeclarations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
90db26000aefe9335370013eec64c85232d80227 |
|
02-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Implementing parsing and resolution of module export declarations within module maps, which will (eventually) be used to re-export a module from another module. There are still some pieces missing, however. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c8d7f586180995ba33d03c0f6115b6a7bdefe326 |
|
29-Nov-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Revert r145244. It causes us to create broken ASTs with missing type information for some cast expressions. Original commit message: Removed useless ImplicitCast nodes in explicit cstyle and static casts git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
56f5d36fd13c5e271ebd05192c25c88d28e77f8d |
|
28-Nov-2011 |
Nicola Gigante <nicola.gigante@gmail.com> |
Removed useless ImplicitCast nodes in explicit cstyle and static casts git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
f7a73a0428ad4819ef945ced4f38b3b6b1c39e72 |
|
26-Nov-2011 |
Nicola Gigante <nicola.gigante@gmail.com> |
Test commit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
9c0e1ec7b3afd833c1b958ce2aeedff71c7eb4c5 |
|
15-Nov-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed plausible overloads location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
acdfa4d504a8f2514d60569f9ce55d45f11795b9 |
|
11-Nov-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implicit casts from rvalue to lvalue are not meaningful. Don't accidentally add them when performing a const conversion on the implicit object argument for a member operator call on an rvalue. No change to the testsuite: the test for this change is that the added assertion does not fire any more. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
9c129f818038e0269ba6b095722aa70176dc321d |
|
28-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add (hopefully) the last missing lvalue-to-rvalue conversion. Add an assertion to catch some future implicit lvalue-to-rvalue casts of inappropriate kinds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143182 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
eee242ff426bf79149f221798966e58688383c1e |
|
27-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Make the loading of information attached to an IdentifierInfo from an AST file more lazy, so that we don't eagerly load that information for all known identifiers each time a new AST file is loaded. The eager reloading made some sense in the context of precompiled headers, since very few identifiers were defined before PCH load time. With modules, however, a huge amount of code can get parsed before we see an @import, so laziness becomes important here. The approach taken to make this information lazy is fairly simple: when we load a new AST file, we mark all of the existing identifiers as being out-of-date. Whenever we want to access information that may come from an AST (e.g., whether the identifier has a macro definition, or what top-level declarations have that name), we check the out-of-date bit and, if it's set, ask the AST reader to update the IdentifierInfo from the AST files. The update is a merge, and we now take care to merge declarations before/after imports with declarations from multiple imports. The results of this optimization are fairly dramatic. On a small application that brings in 14 non-trivial modules, this takes modules from being > 3x slower than a "perfect" PCH file down to 30% slower for a full rebuild. A partial rebuild (where the PCH file or modules can be re-used) is down to 7% slower. Making the PCH file just a little imperfect (e.g., adding two smallish modules used by a bunch of .m files that aren't in the PCH file) tips the scales in favor of the modules approach, with 24% faster partial rebuilds. This is just a first step; the lazy scheme could possibly be improved by adding versioning, so we don't search into modules we already searched. Moreover, we'll need similar lazy schemes for all of the other lookup data structures, such as DeclContexts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
77faa365cb2322cfc8edf58a4f5d68f2370cc39a |
|
19-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
-Wc++98-compat: warn if a SFINAE substitution in C++11 suppresses an access control diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
aa93a875605536d72a10359a0098396192b7d4ec |
|
17-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
For modules, all macros that aren't include guards are implicitly public. Add a __private_macro__ directive to hide a macro, similar to the __module_private__ declaration specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
64a371ff8d525880e519a43fc522cbdc79fc4a89 |
|
13-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
HasFormOfMemberPointer implies IsAddressOfOperand for an overload set. Simplify git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
ee697e69a2063b65bfd0534248e4848461aca3f4 |
|
13-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Allow calling an overloaded function set by taking the address of the functions, e.g., (&f)(0). Fixes <rdar://problem/9803316>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141877 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
6dbba4fc128e2e2f5b26be996392bd32c0707f13 |
|
12-Oct-2011 |
John McCall <rjmccall@apple.com> |
Catch placeholder types in DefaultLvalueConversion and DefaultFunctionArrayLvalueConversion. To prevent significant regression for should-this-be-a-call fixits, and to repair some such regression from the introduction of bound member placeholders, make those placeholder checks try to build calls appropriately. Harden the build-a-call logic while we're at it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
3a387441ae339363ee5b254658f295e97bd9e913 |
|
07-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When using an unavailable/deprecated interface Foo inside Foo's interface/implementation don't emit unavailable errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
8987b2385d9ba63ada66e1344ace79b04d5cb5c3 |
|
28-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Only print _Bool as 'bool' when 'bool' is defined as an object-like macro whose only replacement token is '_Bool'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c1c0dfb376b829b94d4c61e9f358ce23e6aa3169 |
|
27-Sep-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Get rid of useless helper Sema::CastCategory. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
40847cfb58acc3cac7d68727df9455ac45f2e118 |
|
26-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Rename DiagnosticInfo to Diagnostic as per issue 5397 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d6471f7c1921c7802804ce3ff6fe9768310f72b9 |
|
26-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Rename Diagnostic to DiagnosticsEngine as per issue 5397 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
f7572a64a1e5f6f700527583ec5206a58ce6d9b6 |
|
20-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce an egregious hack for modules to cope with headers that come from unfriendly (== not at all modularized) directories. This is temporary, and it only affects module construction until I'll figured out how to deal with system headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
1d9b3b25f7ac0d0195bba6b507a684fe5e7943ee |
|
09-Sep-2011 |
John McCall <rjmccall@apple.com> |
Give conversions of block pointers to ObjC pointers a different cast kind than conversions of C pointers to ObjC pointers. In order to ensure that we've caught every case, add asserts to CastExpr that strictly determine which cast kind is used for which kind of bit cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
80cb6e69d9e85231588ae604e4bc2bc9a07389af |
|
29-Aug-2011 |
Nico Weber <nicolasweber@gmx.de> |
Warn on missing [super finalize] calls. This matches gcc's logic. Second half of PR10661. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
467dc88512b4ba4bb16e274ea3771dc1415d31da |
|
26-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a -cc1 option "-emit-module", that creates a binary module from the given source. -emit-module behaves similarly to -emit-pch, except that Sema is somewhat more strict about the contents of -emit-module. In the future, there are likely to be more interesting differences. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
9a1ecf0522ccb7a45577f856150c15af0ee1df2a |
|
22-Aug-2011 |
Nico Weber <nicolasweber@gmx.de> |
Warn on missing [super dealloc] calls. This matches gcc's logic. Half of PR10661. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
772eeaefef2c883aabe35caf4543e7e32d290183 |
|
12-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Switch the __int128_t and __uint128_t types over to predefined types in the AST format, which are built lazily by the ASTContext when requested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
7a27ea52b7bd635c89bec5a9c521a3bf7d204238 |
|
12-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Switch the Objective-C 'SEL' type over to a predefined type in the AST file format, lazily generating the actual declaration in ASTContext as needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
79d6726921897811232554ed94c5d77b5b7b3fc0 |
|
12-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Switch the Objective-C 'Class' type over to a predefined type in the AST file format, lazily generating the actual declaration in ASTContext as needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
4dfd02a17c6d604c72e6936527c5e1c56d3ecb7a |
|
12-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Move the creation of the predefined typedef for Objective-C's 'id' type over into the AST context, then make that declaration a predefined declaration in the AST format. This ensures that different AST files will at least agree on the (global) declaration ID for 'id', and eliminates one of the "special" types in the AST file format. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137429 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
01a4cf11777bb34c35f5d251a9e95eb736d0842b |
|
11-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Encapsulate the Objective-C id/Class/SEL "redefinition" types in ASTContext with accessors/mutators. The only functional change is that the AST writer won't bother writing the id/Class/SEL redefinition type if it hasn't been explicitly set; previously, it ended up being written as a synonym for the built-in id/Class/SEL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
31e37b2d7b4815fdea6a35d49f33005562f0d494 |
|
28-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Make Sema::WeakUndeclaredIdentifiers lazily deserialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
a126f17ca83b985300c1f65cee647bea108db657 |
|
28-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Switch Sema::DynamicClasses over to LazyVector git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
a2ee20aa9660851080135219cac5b31fbac08b78 |
|
27-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Switch Sema::UnusedFileScopedDecls over to a LazyVector. - Added LazyVector::erase() to support this use case. - Factored out the LazyDecl-of-Decls to RecordData translation in the ASTWriter. There is still a pile of code duplication here to eliminate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
a862320972e63349524dc9aa744dec1b95f54ba1 |
|
27-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new data structure, LazyVector, which is a vector whose contents are lazily loaded on demand from an external source (e.g., an ExternalASTSource or ExternalSemaSource). The "loaded" entities are kept separate from the "local" entities, so that the two can grow independently. Switch Sema::TentativeDefinitions from a normal vector that is eagerly populated by the ASTReader into one of these LazyVectors, making the ASTReader a bit more like me (i.e., lazy). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
108f756bebd991eaa980cfb9994353612a2e5ff6 |
|
26-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Cleanup the stray comments and variables I could dig out of Sema to refer to 'expansion' instead of 'instantiation'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
402785357ab053dd53f4fdd858b9630a5e0f8bad |
|
25-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Mechanically rename SourceManager::getInstantiationLoc and FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part of the API and documentation update from 'instantiation' as the term for macros to 'expansion'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
5d98994c7749312a43ce6adf45537979a98e7afd |
|
06-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Build up statistics about the work done for analysis based warnings. Special detail is added for uninitialized variable analysis as this has serious performance problems than need to be tracked. Computing some of this data is expensive, for example walking the CFG to determine its size. To avoid doing that unless the stats data is going to be used, we thread a bit into the Sema object to track whether detailed stats should be collected or not. This bit is used to avoid computations whereever the computations are likely to be more expensive than checking the state of the flag. Thus, counters are in some cases unconditionally updated, but the more expensive (and less frequent) aggregation steps are skipped. With this patch, we're able to see that for 'gcc.c': *** Analysis Based Warnings Stats: 232 functions analyzed (0 w/o CFGs). 7151 CFG blocks built. 30 average CFG blocks per function. 1167 max CFG blocks per function. 163 functions analyzed for uninitialiazed variables 640 variables analyzed. 3 average variables per function. 94 max variables per function. 96409 block visits. 591 average block visits per function. 61546 max block visits per function. And for the reduced testcase in PR10183: *** Analysis Based Warnings Stats: 98 functions analyzed (0 w/o CFGs). 8526 CFG blocks built. 87 average CFG blocks per function. 7277 max CFG blocks per function. 68 functions analyzed for uninitialiazed variables 1359 variables analyzed. 19 average variables per function. 1196 max variables per function. 2540494 block visits. 37360 average block visits per function. 2536495 max block visits per function. That last number is the somewhat scary one that indicates the problem in PR10183. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d8bba9c15230d2b1b3893e272106aa79efc50251 |
|
28-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Add support for C++ namespace-aware typo correction, e.g., correcting vector<int> to std::vector<int> Patch by Kaelyn Uhrain, with minor tweaks + PCH support from me. Fixes PR5776/<rdar://problem/8652971>. Thanks Kaelyn! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
f85e193739c953358c865005855253af4f68a497 |
|
16-Jun-2011 |
John McCall <rjmccall@apple.com> |
Automatic Reference Counting. Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
8155910a192dafa423d6b932b7d127d48e4641e8 |
|
31-May-2011 |
Nick Lewycky <nicholas@mxc.ca> |
Whenever we instantiate a static data member, make sure to define any new vtables! Fixes PR10020 This also allows us to revert the part of r130023 which added a big loop around the template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
7822ee3ef9f0d5cfd289258614ac31be70097449 |
|
12-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement CWG1170, which makes access-control errors into template argument deduction failures. Only implemented in C++0x, since this is a significant change in behavior from C++98/03. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
9389ddc29ec60931e4dc418541ba3470b6b9fbe0 |
|
05-May-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Look through block pointers and ObjC object pointers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c1598700010cea9364a58a65e967b0b56361b6aa |
|
05-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Change cycle detection to be based off of a warning flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c9366ba8fff6461a5b7f0fd2626d1bce3e98e629 |
|
05-May-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Implement Sema::isExprCallable. We can use this to produce nice diagnostics (and try to fixit-and-recover) in various cases where we might see "MyFunction" instead of "MyFunction()". The changes in SemaExpr are an example of how to use isExprCallable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
fe57eef44cc80e5bb51e4f484835be08b8d84256 |
|
04-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement a better version of delegating constructor cycle detection. This is more efficient as it's all done at once at the end of the TU. This could still get expensive, so a flag is provided to disable it. As an added bonus, the diagnostics will now print out a cycle. The PCH test is XFAILed because we currently can't deal with a note emitted in the header and I, being tired, see no other way to verify the serialization of delegating constructors. We should probably address this problem /somehow/ but no good solution comes to mind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
62c9258f4a71569a66d805fc7776526a2c76b34e |
|
25-Apr-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Recognize gcc's ms_struct pragma (and ignore for now). This is wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
58a2cd8c0d52e710cbcc57a67eac7b51b0b831c4 |
|
24-Apr-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Synthesizing the definition of an implicit member is an AST modification, so notify any mutation listeners of it. This fixes a crasher in chained PCH, where an implicit destructor in a PCH gets a definition in a chained PCH, which is then lost. However, any further use of the destructor would cause its definition to be regenerated in the final file, hiding the bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
788440378c442562497c09610939cbe6218ab43d |
|
23-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
At the end of the translation unit, defining a vtable can introduce new templates that need to be instantiated and vice-versa. Iterate until we've instantiated all required templates and defined all required vtables. Fixed PR9325 / <rdar://problem/9055177>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
6b6b42aed07726178f61954ac6e51f47da00275c |
|
19-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
We regard a function as 'unused' from the codegen perspective, so our warnings diverge from gcc's unused warnings which don't get emitted if the function is referenced even in an unevaluated context (e.g. in templates, sizeof, etc.). Also, saying that a function is 'unused' because it won't get codegen'ed is somewhat misleading. - Don't emit 'unused' warnings for functions that are referenced in any part of the user's code. - A warning that an internal function/variable won't get emitted is useful though, so introduce -Wunneeded-internal-declaration which will warn if a function/variable with internal linkage is not "needed" ('used' from the codegen perspective), e.g: static void foo() { } template <int> void bar() { foo(); } test.cpp:1:13: warning: function 'foo' is not needed and will not be emitted static void foo() { } ^ Addresses rdar://8733476. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
429bb276991ff2dbc7c5b438828b9b7737cb15eb |
|
08-Apr-2011 |
John Wiegley <johnw@boostpro.com> |
Use ExprResult& instead of Expr *& in Sema This patch authored by Eric Niebler. Many methods on the Sema class (e.g. ConvertPropertyForRValue) take Expr pointers as in/out parameters (Expr *&). This is especially true for the routines that apply implicit conversions to nodes in-place. This design is workable only as long as those conversions cannot fail. If they are allowed to fail, they need a way to report their failures. The typical way of doing this in clang is to use an ExprResult, which has an extra bit to signal a valid/invalid state. Returning ExprResult is de riguour elsewhere in the Sema interface. We suggest changing the Expr *& parameters in the Sema interface to ExprResult &. This increases interface consistency and maintainability. This interface change is important for work supporting MS-style C++ properties. For reasons explained here <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-February/013180.html>, seemingly trivial operations like rvalue/lvalue conversions that formerly could not fail now can. (The reason is that given the semantics of the feature, getter/setter method lookup cannot happen until the point of use, at which point it may be found that the method does not exist, or it may have the wrong type, or overload resolution may fail, or it may be inaccessible.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
737d5447b5d20633992ee5388eca5270c28c8ae7 |
|
07-Apr-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
In C++ the argument of logical not should always be bool. Added missing implicit cast for scalars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
834e3f6c77d9ac03997a3f0c56934edcf406a355 |
|
08-Mar-2011 |
John McCall <rjmccall@apple.com> |
Fix my earlier commit to work with escaped newlines and leave breadcrumbs in case we want to make a world where we can check intermediate instantiations for this kind of breadcrumb. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
48b89590f61575cbf365ba996a2bd1ba1561a4ab |
|
03-Mar-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't emit unused warning for deleted functions. Fixes rdar://8365684 & http://llvm.org/PR9391. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
351ba91eaa6d30e523587b2d7ed676a5172c6e56 |
|
23-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Enhance Sema::DiagRuntimeBehavior() to delay some diagnostics to see if the related code is reachable. This suppresses some diagnostics that occur in unreachable code (e.g., -Warray-bound). We only pay the cost of doing the reachability analysis when we issue one of these diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
283a358aecb75e30fcd486f2206f6c03c5e7f11d |
|
23-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Have IdempotentOperationsChecker pull its CFGStmtMap from AnalysisContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
3ed6fc08a9cd293d012fa49ab2a615e618d7c3fa |
|
23-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Issue AnalysisBasedWarnings as part of calling Sema::PopBlockOrFunctionScope(). No real functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126287 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
483b9f3bc05c5409e2c6643f1c9d91e21c8ff9d2 |
|
21-Feb-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Tweaks to C++0x deduced auto type support: * Flag indicating 'we're parsing this auto typed variable's initializer' moved from VarDecl to Sema * Temporary template parameter list for auto deduction is now allocated on the stack. * Deduced 'auto' types are now uniqued. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
337e550218128e7d922c09bb354fbc71de90c568 |
|
18-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
Switch labels over to using normal name lookup, instead of their own weird little DenseMap. Hey look, we now emit unused label warnings deterministically, amazing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c24e4b9ce213c1ea4cb50865ff7901f06dc26d6a |
|
17-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
add a fixme git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
57ad37823e198f977cac605dbfbaefb4daf325e9 |
|
17-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
Step #2/N of __label__ support: keep pushing LabelDecl forward, making them be template instantiated in a more normal way and make them handle attributes like other decls. This fixes the used/unused label handling stuff, making it use the same infrastructure as other decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
eee1d5434ebfa955ffc3c493aecd68bb7b3f4838 |
|
14-Feb-2011 |
John McCall <rjmccall@apple.com> |
When parsing an out-of-line member function declaration, we must delay access-control diagnostics which arise from the portion of the declarator following the scope specifier, just in case access is granted by friending the individual method. This can also happen with in-line member function declarations of class templates due to templated-scope friend declarations. We were really playing fast-and-loose before with this sort of thing, and it turned out to work because *most* friend functions are in file scope. Making us delay regardless of context exposed several bugs with how we were manipulating delay. I ended up needing a concept of a context that's independent of the declarations in which it appears, and then I actually had to make some things save contexts correctly, but delay should be much cleaner now. I also encapsulated all the delayed-diagnostics machinery in a single subobject of Sema; this is a pattern we might want to consider rolling out to other components of Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
321b8179afaf803dcc56b2a19f7b0891a03c92c8 |
|
14-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Move support for "#pragma STDC FP_CONTRACT" to Parser; add Sema actions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
86c05f3f28bcf07c97dfb1881686fc43be2f47c2 |
|
01-Feb-2011 |
John McCall <rjmccall@apple.com> |
Perform the bad-address-space conversions check as part of CheckPointerTypesForAssignment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
43f0a7c8e06e55092b43d4dd46fe09a4d57298e9 |
|
31-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
If there were errors, disable 'unused' warnings since they will mostly be noise. Fixes rdar://8736362. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
1eee5dc0465c0ab4810e21d365e881152d7f53c0 |
|
27-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach the evaluation of the __is_convertible_to trait to translate access control errors into SFINAE errors, so that the trait provides enough support to implement the C++0x std::is_convertible type trait. To get there, the SFINAETrap now knows how to set up a SFINAE context independent of any template instantiations or template argument deduction steps, and (separately) can set a Sema flag to translate access control errors into SFINAE errors. The latter can also be useful if we decide that access control errors during template argument deduction should cause substitution failure (rather than a hard error) as has been proposed for C++0x. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
418df343bb50802586d20aae3b83e2eb44c6c828 |
|
27-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Separate the access-control diagnostics from other diagnostics that do not have SFINAE behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
a5c6c2a84cde5c9b8f8ec0610a9f89ffd54f44ee |
|
25-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Don't insert class templates into the DynamicClasses vector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
8491ffe86c50241b47c6d7ef8cd9ee00f5e675da |
|
20-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement basic support for template instantiation of pack expansions whose patterns are template arguments. We can now instantiate, e.g., typedef tuple<pair<OuterTypes, InnerTypes>...> type; where OuterTypes and InnerTypes are template type parameter packs. There is a horrible inefficiency in TemplateArgumentLoc::getPackExpansionPattern(), where we need to create copies of TypeLoc data because our interfaces traffic in TypeSourceInfo pointers where they should traffic in TypeLocs instead. I've isolated in efficiency in this one routine; once we refactor our interfaces to traffic in TypeLocs, we can eliminate it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
aee543a1a3d70de38cd2607fd2f3179551febc93 |
|
12-Dec-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Move the functionality to mark all vtables of key functions as used within a translation unit to the ActOnEndOfTranslationUnit function instead of doing it at the start of DefineUsedVTables. The latter is now called *recursively* during template instantiation, which causes an absolutely insane number of walks of every record decl in the translation unit. After this patch, an extremely template instantiation heavy test case's compile time drops by 10x, and we see between 15% and 20% improvement in average compile times across a project. This is just recovering a regression, it doesn't make anything faster than it was several weeks ago. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
2a5f99eb4e2af771faacfceb9f78e230129c5e5a |
|
25-Nov-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Tie DefineVTablesUsed() in with recursive function instantiation so that we emit a useful template instantiation stack. Fixes PR8640. This also causes a slight change to where the "instantianted from" note shows up in truly esoteric cases (see the change to test/SemaCXX/destructor.cpp), but that isn't directly the fault of this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
8fc32d272bd57b0a59f61c874cb7b56d9005e89e |
|
19-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Refactoring. Get FunctionScopeInfo to use DiagnosticErrorTrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119764 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
33e4e70c8c0a17e0ccb7465d96556b077a68ecb1 |
|
18-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Refactoring of Diagnostic class. -Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class. -DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units. -The rest of the state in Diagnostic object is considered related and tied to one translation unit. -Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a SourceLocation instead of a FullSourceLoc. -Reflect the changes to various interfaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
b535041ee33c5eff255832bc5541c8d52aae8254 |
|
13-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a silly bug in the suppression of non-error diagnostics in a SFINAE context, where we weren't getting the right diagnostic argument count. I blame DiagnosticBuilder's weirdness. Fixes PR8372. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
9b623639378d53a675921ddfa7316034d571881e |
|
13-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce support for emitting diagnostics (warnings + their notes) that are suppressed during template argument deduction. This change queues diagnostics computed during template argument deduction. Then, if the resulting function template specialization or partial specialization is chosen by overload resolution or partial ordering (respectively), we will emit the queued diagnostics at that point. This addresses most of PR6784. However, the check for unnamed/local template arguments (which existed before this change) is still only skin-deep, and needs to be extended to look deeper into types. It must be improved to finish PR6784. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
8c84571f3e262569ba51d107db7ab31a23de79b3 |
|
28-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Move ExternalSemaSource::ReadMethodPool's implementation to Sema.cpp so that the header can get away with forward declarations only for ObjCMethodList and Selector. Fixes <rdar://8467631>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
4eb4f0f96289cbece50c1270e02af3caf8779705 |
|
09-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a few minor issues with parsing and semantic analysis of C++ typeid expressions: - make sure we have a proper source location for the closing ')' - cache the declaration of std::type_info once we've found it git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
b7566d8346ed8040a5cb7cefe96bd6ccbf015595 |
|
08-Sep-2010 |
Bill Wendling <isanbard@gmail.com> |
Initialize the MSVCGuidDecl variable in the correct order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
01b7c3028da5bbcb9f8e52ba67e4613070de0e60 |
|
08-Sep-2010 |
Francois Pichet <pichet2000@gmail.com> |
Microsoft's __uuidof operator implementation part 1. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
8c465e6494d16a19127873dc9bdc55177ac6b6fd |
|
03-Sep-2010 |
John McCall <rjmccall@apple.com> |
Devirtualize Sema, kill off DeleteExpr and DeleteStmt, and reformat. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
f312b1ea179f1c44371f9ee0cd0bc006f612de11 |
|
27-Aug-2010 |
John McCall <rjmccall@apple.com> |
One who seeks knowledge learns something new every day. One who seeks the Tao unlearns something new every day. Less and less remains until you arrive at non-action. When you arrive at non-action, nothing will be left undone. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
9c3087b0b0bea2fd782205c1274ebfc4290265e0 |
|
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
Restore r112114 now that SmallVector<...,0> is safe. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
0ad106fec9dd188e20026c80d814f836e15780e3 |
|
26-Aug-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert r112114, "Pull DelayedDiagnostic and AccessedEntity out into their own header.", it is teh broken. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
679063472244a6cb6d4b52894ac020022690620d |
|
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
Pull DelayedDiagnostic and AccessedEntity out into their own header. This works courtesy of the new SmallVector<..., 0> specialization that doesn't require a complete type. Note that you'll need to pull at least SmallVector.h from LLVM to compile successfully. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
2d88708cbe4e4ec5e04e4acb6bd7f5be68557379 |
|
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
Split out a header to hold APIs meant for the Sema implementation from Sema.h. Clients of Sema don't need to know (for example) the list of diagnostics we support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c1a3e5e73859ece9f106ae9d84c78bef4111956a |
|
25-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Initialize the translation-unit scope before lexing the first token. The first token might be something that ends up triggering code completion, which in turn requires a valid Scope. Test case forthcoming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
2de56d1d0c3a504ad1529de2677628bdfbb95cd4 |
|
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
GCC didn't care for my attempt at API compatibility, so brute-force everything to the new constants. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112047 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
5baba9d98364a3525d6afa15a04cdad82fd6dd30 |
|
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
More incremental progress towards not including Expr.h in Sema.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
62c78d54bee499dd87f768f48b21c9b5ec15e516 |
|
25-Aug-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Rename *PendingImplicitInstantiations to *PendingInstantiations. No functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
781472fe99a120098c631b0cbe33c89f8cef5e70 |
|
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
Split FunctionScopeInfo and BlockScopeInfo into their own header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
384aff8b94bb0d1ad6c5667b90621e5699815bb2 |
|
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
Remove Sema.h's dependency on DeclCXX.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
aab0132698c7550d0095986fb1fb4887bf18c3e8 |
|
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
Sema doesn't need these STL headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
5f1e0942a32657b625702aa52f82430d0120f424 |
|
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
More header elimination. The goal of all this is to allow Parser to #include Sema.h while keeping all the AST declarations opaque. That may not be reasonably attainable, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c43b54cbc10654ed59de797898042e1a05265246 |
|
19-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Rename PCHReader to ASTReader. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
42cbd782cf17223076e5b6c0607414d9d68aae19 |
|
18-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Rename -Wunused-method -> -Wunused-member-function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
3d27b107c515ab1a8fd47b33c41adcf5a65f465b |
|
17-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce -Wunused-method option for warning on unused class methods in anonymous namespace. This option is not part of the Unused diagnostic group until the warnings on llvm codebase are fixed and we are ready to turn it on. Suggestion by Daniel. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
bbc6454bb98d6a6ecbaafa715222c5db834307f2 |
|
15-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Commit improved version of 111026 & 111027. Unused warnings for functions: -static functions -functions in anonymous namespace -class methods in anonymous namespace -class method specializations in anonymous namespace -function specializations in anonymous namespace Unused warnings for variables: -static variables -variables in anonymous namespace -static data members in anonymous namespace -static data members specializations in anonymous namespace Reveals lots of opportunities for dead code removal in llvm codebase that will interest my esteemed colleagues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
87c08a5d6b9e1e44ae6f554df40139d3a6f60b33 |
|
14-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement caching of code-completion results for macro definitions when the CXTranslationUnit_CacheCompletionResults option is given to clang_parseTranslationUnit(). Essentially, we compute code-completion results for macro definitions after we have parsed the file, then store an ASTContext-agnostic version of those results (completion string, cursor kind, priority, and active contexts) in the ASTUnit. When performing code completion in that ASTUnit, we splice the macro definition results into the results provided by the actual code-completion (which has had macros turned off) before libclang gets those results. We use completion context information to only splice in those results that make sense for that context. With a completion involving all of the macros from Cocoa.h and a few other system libraries (totally ~8500 macro definitions) living in a precompiled header, we get about a 9% performance improvement from code completion, since we no longer have to deserialize all of the macro definitions from the precompiled header. Note that macro definitions are merely the canary; the cache is designed to also support other top-level declarations, which should be a bigger performance win. That optimization will be next. Note also that there is no mechanism for determining when to throw away the cache and recompute its contents. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
05eac86d547892847ca95b5350e28d681150fa68 |
|
13-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Revert 111026 & 111027, build breakage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
30c0dd86f0dc3c1a1fba29581d04e8ed0bdb659d |
|
13-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
The unused warnings extravaganza continues. Warn for: -static variables -variables in anonymous namespace (fixes rdar://7794535) -static data members in anonymous namespace -static data members specializations in anonymous namespace git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
f6d1d43d68016e975f22264343631a55b9701495 |
|
13-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Expand the unused warnings for functions. Warn for: -static function declarations -functions in anonymous namespace -class methods in anonymous namespace -class method specializations in anonymous namespace -function specializations in anonymous namespace git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
49b96d1a382ae9f31456166f1a734d3f7f30b992 |
|
13-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Change Sema's UnusedStaticFuncs to UnusedFileScopedDecls to allow also keeping track of unused file scoped variables. This is only preparation, currently only static function definitions are tracked, as before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
914ed9d30e9abf829a62aa996b083b1e47c19ff6 |
|
13-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach ASTUnit to hold on to the Sema object and ASTConsumer that are used when parsing (or re-parsing) a file. Also, when loading a precompiled header into ASTUnit, create a Sema object that holds onto semantic-analysis information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111003 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
46ea32a4b54481b7575499cb9f8d275f1d4cdd54 |
|
13-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Add a ParseAST overload that takes a Sema object, so that the caller can create (and hold on to) the Sema object. Also, move Sema-related initialization/finalization with its various consumers and external sources into the Sema constructor and destructor, rather than placing it in ParseAST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d69fd7f34fd2de35845e834e987009efec09b937 |
|
12-Aug-2010 |
John McCall <rjmccall@apple.com> |
Fixing the build isn't good enough; back out r110956 and r110953. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
e783d000b13283ca45fbf56e735404e86c9e990d |
|
12-Aug-2010 |
John McCall <rjmccall@apple.com> |
dgregor should write code that compiles. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
0eeb81baac6e82b065c0b03ad28ad1e580e78790 |
|
12-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Add a ParseAST overload that takes a Sema object, so that the caller can create (and hold on to) the Sema object. Also, move Sema-related initialization/finalization with its various consumers and external sources into the Sema constructor and destructor, rather than placing it in ParseAST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
e737f5041a36d0befb39ffeed8d50ba15916d3da |
|
12-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Move Sema's headers into include/clang/Sema, renaming a few along the way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
deacbdca554298ccdf636f19c6094a8825ec6b34 |
|
11-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Speculatively revert r110610 " Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for forward declarations and the definition," which appears to be causing significant Objective-C breakage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110803 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
74c730ad1f6818b676b0bad46d806a9176950328 |
|
09-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
- Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for forward declarations and the definition. - Eagerly create ObjCInterfaceTypes for declarations. - The two above changes lead to a 0.5% increase in memory use and no speed regression when parsing Cocoa.h. On the other hand, now chained PCH works when there's a forward declaration in one PCH and the interface definition in another. - Add HandleInterestingDecl to ASTConsumer. PCHReader passes the "interesting" decls it finds to this function instead of HandleTopLevelDecl. The default implementation forwards to HandleTopLevelDecl, but ASTUnit's handler for example ignores them. This fixes a potential crash when lazy loading of PCH data would cause ASTUnit's "top level" declaration collection to change while being iterated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
f871d0cc377a1367b519a6cce26be74607566eba |
|
07-Aug-2010 |
John McCall <rjmccall@apple.com> |
Store inheritance paths after CastExprs instead of inside them. This takes some trickery since CastExpr has subclasses (and indeed, is abstract). Also, smoosh the CastKind into the bitfield from Expr. Drops two words of storage from Expr in the common case of expressions which don't need inheritance paths. Avoids a separate allocation and another word of overhead in cases needing inheritance paths. Also has the advantage of not leaking memory, since destructors for AST nodes are never run. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
0e0363866792b309d70e9c8e92b4c239773af89c |
|
05-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Store the pending implicit instantiations in the PCH and perform them at the end of the translation unit that included the PCH, as God intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110324 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
72b90571b1783b17c3f2204cec5ca440edc38bee |
|
05-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Support #pragma weak for PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
aa8b0d19244a6e7e8e5798fcc6aef003c274d3e0 |
|
05-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Implement #pragma GCC visibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
76c38d385447b7acdff2d7e6b13fa8580e7174a7 |
|
02-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Read/write in PCH Sema's StdNamespace and StdBadAlloc and use a LazyDeclPtr for them that will deserialize them when needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
b60a77e453d32db0ab1914d28e175c2defc0eb65 |
|
01-Aug-2010 |
John McCall <rjmccall@apple.com> |
Only run the jump-checker if there's a branch-protected scope *and* there's a switch or goto somewhere in the function. Indirect gotos trigger the jump-checker regardless, because the conditions there are slightly more elaborate and it's too marginal a case to be worth optimizing. Turns off the jump-checker in a lot of cases in C++. rdar://problem/7702918 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
906082edf2aea1c6de2926f93a8d7121e49d2a54 |
|
20-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Update ImplicitCastExpr to be able to represent an XValue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
cddc69fc3fe17b043a287a41e3706766c3d09a79 |
|
09-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
When looking for an entity's Scope, don't consider scopes that can't contain declarations. Fixes PR7594. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
006113841bdae1edb77aef75ba1ffdf2e55a3094 |
|
04-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't try to install the __[u]int128_t identifier if it is already installed by PCHReader. Currently, adding it to visible decls of a PCH'ed translation unit has no effect because adding visible decls before deserialization has no effect (the decls won't be visible). This will be fixed in a future commit; then it will force deserialization of visible decls, so avoid pointlessly installing it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
23c94dbb6631fecdb55ba401aa93722803d980c6 |
|
02-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Move the "current scope" state from the Parser into Action. This allows Sema some limited access to the current scope, which we only use in one way: when Sema is performing some kind of declaration that is not directly driven by the parser (e.g., due to template instantiatio or lazy declaration of a member), we can find the Scope associated with a DeclContext, if that DeclContext is still in the process of being parsed. Use this to make the implicit declaration of special member functions in a C++ class more "scope-less", rather than using the NULL Scope hack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
926c4b486a08f698cd3a367fd6f1a3a07604358d |
|
28-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Partial fix for PR7267 based on comments by John McCall on an earlier patch. This is more targeted, as it simply provides toggle actions for the parser to turn access checking on and off. We then use these to suppress access checking only while we parse the template-id (included scope specifier) of an explicit instantiation and explicit specialization of a class template. The specialization behavior is an extension, as it seems likely a defect that the standard did not exempt them as it does explicit instantiations. This allows the very common practice of specializing trait classes to work for private, internal types. This doesn't address instantiating or specializing function templates, although those apparently already partially work. The naming and style for the Action layer isn't my favorite, comments and suggestions would be appreciated there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c070cc602d6eefea881f71a60de09e05b54c3fdd |
|
18-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Given Decl::isUsed() a flag indicating when to consider the "used" attribute as part of the calculation. Sema::MarkDeclReferenced(), and a few other places, want only to consider the "used" bit to determine, e.g, whether to perform template instantiation. Fixes a linkage issue with Boost.Serialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
76bd1f387e6a7b7abfe53f63b3bd429b97bb80f0 |
|
01-Jun-2010 |
John McCall <rjmccall@apple.com> |
Alter the ExternalASTSource interface to permit by-name lookups. PCH continues to bring in the entire lookup table at once. Also, give ExternalSemaSource's vtable a home. This is important because otherwise any reference to it will cause RTTI to be emitted, and since clang is compiled with -fno-rtti, that RTTI will contain unresolved references (to ExternalASTSource's RTTI). So this change makes it possible to subclass ExternalSemaSource from projects compiled with RTTI, as long as the subclass's home is compiled with -fno-rtti. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c7e04dad588a30c94648b9bd70cdbe25688d7629 |
|
28-May-2010 |
John McCall <rjmccall@apple.com> |
A more minimal fix for PR6762. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d9008318fe395dcbb9049cfb4f2b87cfb5a75f3a |
|
22-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When determining whether we can use "this", make sure to look through enum contexts (along with block contexts, which we already did). Fixes PR7196. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104444 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c12c5bba6ceb6acd4e51e7a0fc03257da9cfd44e |
|
15-May-2010 |
John McCall <rjmccall@apple.com> |
Substantially alter the design of the Objective C type AST by introducing ObjCObjectType, which is basically just a pair of one of {primitive-id, primitive-Class, user-defined @class} with a list of protocols. An ObjCObjectPointerType is therefore just a pointer which always points to one of these types (possibly sugared). ObjCInterfaceType is now just a kind of ObjCObjectType which happens to not carry any protocols. Alter a rather large number of use sites to use ObjCObjectType instead of ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather than hashing them in a FoldingSet. Remove some number of methods that are no longer used, at least after this patch. By simplifying ObjCObjectPointerType, we are now able to easily remove and apply pointers to Objective-C types, which is crucial for a certain kind of ObjC++ metaprogramming common in WebKit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
5077c3876beeaed32280af88244e8050078619a8 |
|
15-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement semantic analysis and an AST representation for the named return value optimization. Sema marks return statements with their NRVO candidates (which may or may not end up using the NRVO), then, at the end of a function body, computes and marks those variables that can be allocated into the return slot. I've checked this locally with some debugging statements (not committed), but there won't be any tests until CodeGen comes along. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
6fb745bdf1ff1e32caf07e42093a7920726892c1 |
|
13-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Rework when and how vtables are emitted, by tracking where vtables are "used" (e.g., we will refer to the vtable in the generated code) and when they are defined (i.e., because we've seen the key function definition). Previously, we were effectively tracking "potential definitions" rather than uses, so we were a bit too eager about emitting vtables for classes without key functions. The new scheme: - For every use of a vtable, Sema calls MarkVTableUsed() to indicate the use. For example, this occurs when calling a virtual member function of the class, defining a constructor of that class type, dynamic_cast'ing from that type to a derived class, casting to/through a virtual base class, etc. - For every definition of a vtable, Sema calls MarkVTableUsed() to indicate the definition. This happens at the end of the translation unit for classes whose key function has been defined (so we can delay computation of the key function; see PR6564), and will also occur with explicit template instantiation definitions. - For every vtable defined/used, we mark all of the virtual member functions of that vtable as defined/used, unless we know that the key function is in another translation unit. This instantiates virtual member functions when needed. - At the end of the translation unit, Sema tells CodeGen (via the ASTConsumer) which vtables must be defined (CodeGen will define them) and which may be used (for which CodeGen will define the vtables lazily). From a language perspective, both the old and the new schemes are permissible: we're allowed to instantiate virtual member functions whenever we want per the standard. However, all other C++ compilers were more lazy than we were, and our eagerness was both a performance issue (we instantiated too much) and a portability problem (we broke Boost test cases, which now pass). Notes: (1) There's a ton of churn in the tests, because the order in which vtables get emitted to IR has changed. I've tried to isolate some of the larger tests from these issues. (2) Some diagnostics related to implicitly-instantiated/implicitly-defined virtual member functions have moved to the point of first use/definition. It's better this way. (3) I could use a review of the places where we MarkVTableUsed, to see if I missed any place where the language effectively requires a vtable. Fixes PR7114 and PR6564. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
197113b2c41f49224c83f901c2bb0d822b75d480 |
|
13-May-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Delete a dead function at sabre's request. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
323ed74658bc8375278eabf074b4777458376540 |
|
06-May-2010 |
John McCall <rjmccall@apple.com> |
Rearchitect -Wconversion and -Wsign-compare. Instead of computing them "bottom-up" when implicit casts and comparisons are inserted, compute them "top-down" when the full expression is finished. Makes it easier to coordinate warnings and thus implement -Wconversion for signedness conversions without double-warning with -Wsign-compare. Also makes it possible to realize that a signedness conversion is okay because the context is performing the inverse conversion. Also simplifies some logic that was trying to calculate the ultimate comparison/result type and getting it wrong. Also fixes a problem with the C++ explicit casts which are often "implemented" in the AST with a series of implicit cast expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
cee22421929c91b481f4d1bb85cd48c0f6b7510b |
|
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Add base paths to CK_UncheckedDerivedToBase and CK_DerivedToBaseMemberPointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
f1b48b7014992155286d58bb1676f9f51031d18b |
|
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
CastExpr should not hold a pointer to the base path. More cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
7ab9d574d27ecee1f130e5755aa403e5ab529b6b |
|
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Rename InheritancePath to BasePath, rename CastExpr::CXXBaseVector to CXXBaseSpecifierArray. More to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102245 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
88465d3e996e627bbaa11099b039ddab66d5af2c |
|
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Add an InheritancePath parameter to the ImplicitCastExpr constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
47268a3f2843a8d64f3a6fef1e9a9dde1feb4a8c |
|
09-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove all "used" static functions *after* we have performed all of the implicit template instantiations we need to perform. Otherwise, we end up erroneously diagnosing static functions as used if they were only used within an implicit template instantiation. Fixes a bunch of spurious failures when building Clang with Clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
eab5d1eaaa662c849f1f9920dc8c6a31d7c32d47 |
|
25-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach the diagnostic engine to provide more detailed information about how to handle a diagnostic during template argument deduction, which may be "substitution failure", "suppress", or "report". This keeps us from, e.g., emitting warnings while performing template argument deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d064fdc4b7b64ca55b40b70490c79d6f569df78e |
|
23-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Only perform CFG-based warnings on 'static inline' functions that are called (transitively) by regular functions/blocks within a translation untion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99233 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c6fbbedb3e90ff2f04828c36fd839e01468679f5 |
|
19-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove the capture, serialization, and deserialization of comment ranges as part of the ASTContext. This code is not and was never used, but contributes ~250k to the size of the Cocoa.h precompiled header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
9ea9bdbc14374f7bacdb50d3e52c664ff12150ff |
|
02-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Keep an explicit stack of function and block scopes, each element of which has the label map, switch statement stack, etc. Previously, we had a single set of maps in Sema (for the function) along with a stack of block scopes. However, this lead to funky behavior with nested functions, e.g., in the member functions of local classes. The explicit-stack approach is far cleaner, and we retain a 1-element cache so that we're not malloc/free'ing every time we enter a function. Fixes PR6382. Also, tweaked the unused-variable warning suppression logic to look at errors within a given Scope rather than within a given function. The prior code wasn't looking at the right number-of-errors count when dealing with blocks, since the block's count would be deallocated before we got to ActOnPopScope. This approach works with nested blocks/functions, and gives tighter error recovery. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97518 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
6d97e5e4b7abdae710c2548b51f4ed0298e86d80 |
|
01-Mar-2010 |
Chris Lattner <sabre@nondot.org> |
Implement jump checking for initialized c++ variables, implementing a fixme and PR6451. Only perform jump checking if the containing function has no errors, and add the infrastructure needed to do this. On the testcase in the PR, we produce: t.cc:6:3: error: illegal goto into protected scope goto later; ^ t.cc:7:5: note: jump bypasses variable initialization X x; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
e6bbc01d1c4ec5241df36042e0a4a12a6711934b |
|
12-Feb-2010 |
Tanya Lattner <tonic@nondot.org> |
Implementing unused function warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
79a9a3417929e340e84dcbc06ed9c3a277cad959 |
|
09-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Move the diagnostic argument formatting function out of Sema and make it available within the AST library, of which Sema is one client. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d0ed44812057f1adf0ebe38f3fab55973c4efaeb |
|
02-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Add a stop gap to Sema::CorrectTypo() to correct only up to 20 typos. This is to address a serious performance problem observed when running 'clang -fsyntax-only' on really broken source files. In one case, repeatedly calling CorrectTypo() caused one source file to be rejected after 2 minutes instead of 1 second. This patch causes typo correction to take neglible time on that file while still providing correction results for the first 20 cases. I felt this was a reasonable number for moderately broken source files. I don't claim this is the best solution. Comments welcome. It is necessary for us to address this issue because it is a serious performance problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
64f7e258e9c43eefb7f82dfcd600abeed48dc395 |
|
13-Jan-2010 |
John McCall <rjmccall@apple.com> |
Don't a.k.a. through the primary typedef of an anonymous tag decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
82d0a418c8699fc6f4a9417457ffe93d43bba1c1 |
|
10-Jan-2010 |
Anton Korobeynikov <asl@math.spbu.ru> |
Generalize target weirdness handling having proper layering in mind: 1. Add helper class for sema checks for target attributes 2. Add helper class for codegen of target attributes As a proof-of-concept - implement msp430's 'interrupt' attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
51313c39c84407dd6a323be99a8c322bf8d052a9 |
|
05-Jan-2010 |
John McCall <rjmccall@apple.com> |
Move the -Wconversion logic into SemaChecking.cpp. There's a fair amount of overlap between this and -Wsign-compare, which is why I want them in the same place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
f5f7d864f5067d1ea4bff7fcf41b53a43b7b48ba |
|
29-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Get rid of FixedWidthIntType, as suggested by Chris and Eli. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92246 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
db0ee1da16e9dbec19b144c9cd96ee9f55fe0c53 |
|
19-Dec-2009 |
John McCall <rjmccall@apple.com> |
Kill off PreDeclaratorDC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d6a637f8c8a93863509fc1bc555513ff6504957d |
|
07-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Rework how virtual member functions are marked. If a class has no key function, we now wait until the end of the translation unit to mark its virtual member functions as references. This lays the groundwork for fixing PR5557. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
2afce7248b7a362f1e322ad18e43484d575b9c9d |
|
26-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor our handling of expression evaluation contexts, so that Sema maintains a stack of evaluation contexts rather than having the parser do it. This change made it simpler to track in which contexts temporaries were created, so that we could... "Forget" about temporaries created within unevaluated contexts, so that we don't build a CXXExprWithTemporaries and, therefore, destroy the integral-constness of our expressions. Fixes PR5609. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
369a3bd9979cf529eed529aa037de713c213e47d |
|
26-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow user re-definition of SEL as well as accessing its fields. This fixes pr5611. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
04765ac135e0c4e6b78651c2a287d80a32b2b8b9 |
|
23-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Make 'SEL' pointer to a builtin type and not an objective-c pointer type. This was a serious mishap and luckily, Ted's test caught that (and patch fixes the test case). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
13dcd00615de5c4279d97bdf63cd5f0a14fd9dcc |
|
21-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch implements objective-c's 'SEL' type as a built-in type and fixes a long-standing code gen. crash reported in at least two PRs and a radar. (radar 7405040 and pr5025). There are couple of remaining issues that I would like for Ted. and Doug to look at: Ted, please look at failure in Analysis/MissingDealloc.m. I have temporarily added an expected-warning to make the test pass. This tests has a declaration of 'SEL' type which may not co-exist with the new changes. Doug, please look at a FIXME in PCHWriter.cpp/PCHReader.cpp. I think the changes which I have ifdef'ed out are correct. They need be considered for in a few Indexer/PCH test cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
10324db994455a9a1520be6cfe5bb29685cde141 |
|
19-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Do not enter forward class 'Protocol' in decl context. Will do it later. Fixes pr5552. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
3a2838d14251427089c39caec90c8abbc27f7a14 |
|
13-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
Rework Sema code completion interface. - Provide Sema in callbacks, instead of requiring it in constructor. This eliminates the need for a factory function. Clients now just pass the object to consume the results in directly. - CodeCompleteConsumer is cheap to construct, so building it whenever we are doing code completion is reasonable. Doug, please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
8406aedf4782771e520614ee379594dc0a4f7d5f |
|
11-Nov-2009 |
John McCall <rjmccall@apple.com> |
Fix PR 5422: handle lvalue results when evaluating 'based' ptrtoints as part of the -Wconversion check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
f35f828f9883123772a9731af190a608f3236ef4 |
|
11-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics when a default template argument does not match with its corresponding template parameter. This can happen when we performed some substitution into the default template argument and what we had doesn't match any more, e.g., template<int> struct A; template<typename T, template<T> class X = A> class B; B<long> b; Previously, we'd emit a pretty but disembodied diagnostic showing how the default argument didn't match the template parameter. The diagnostic was good, but nothing tied it to the *use* of the default argument in "B<long>". This commit fixes that. Also, tweak the counting of active template instantiations to avoid counting non-instantiation records, such as those we create for (surprise!) checking default arguments, instantiating default arguments, and performing substitutions as part of template argument deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
dc767a1f560ae936a08eeead8164be6f82b6b0f7 |
|
07-Nov-2009 |
John McCall <rjmccall@apple.com> |
Support -Wshorten-64-to-32 for integer types only, which seems to satisfy the core requirements. Fixes rdar://problem/6389954 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
e8babd198c28bf1a443ef6a989dd2fe0ab58cc08 |
|
07-Nov-2009 |
John McCall <rjmccall@apple.com> |
Improve -Wconversion by permitting binary operations on values of the target type (or smaller) to stay "closed" within the type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
680523a91dd3351389667c8de17121ba7ae82673 |
|
07-Nov-2009 |
John McCall <rjmccall@apple.com> |
Implement -Wconversion. Off by default, in the non-gcc group. There's significant work left to be done to reduce the false-positive rate here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
54abf7d4fa3123b8324c09d2a4dfb789fd818403 |
|
04-Nov-2009 |
John McCall <rjmccall@apple.com> |
Change our basic strategy for avoiding deprecation warnings when the decl use appears in a deprecated context. In the new strategy, we emit the warnings as usual unless we're currently parsing a declaration, where "declaration" is restricted to mean a decl group or a few special cases in Objective C. If we *are* parsing a declaration, we queue up the deprecation warnings until the declaration has been completely parsed, and then emit them only if the decl is not deprecated. We also standardize the bookkeeping for deprecation so as to avoid special cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
0a026af6deb4a9e9f30ff047e04db56eb4333741 |
|
20-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
Implement PR5242: don't desugar a type more than once in a diagnostic. This implements a framework that allows us to use information about previously substituted values to simplify subsequent ones. Maybe this would be useful for C++'y stuff, who knows. We now get: t.c:4:21: error: invalid operands to binary expression ('size_t' (aka 'unsigned long *') and 'size_t') return (size_t) 0 + (size_t) 0; ~~~~~~~~~~ ^ ~~~~~~~~~~ on the testcase. Note that size_t is only aka'd once. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84604 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
b54d8af9a66cc20a6a9a9219c7eaea8df7ee7fd4 |
|
20-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
teach FormatDiagnostic to aggregate previously formatted arguments and pass them down into the ArgToStringFn implementation. This allows redundancy across operands to a diagnostic to be eliminated. This isn't used yet, so no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
9cf9f868a5a39099d6a9cf57d5d5693c30486d8d |
|
20-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
code cleanup, convert if tree to switch etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
49a832bd499d6f61c23655f1fac99f0dd229756e |
|
18-Oct-2009 |
John McCall <rjmccall@apple.com> |
When performing template-substitution into a type, don't just replace the TemplateTypeParmType with the substituted type directly; instead, replace it with a SubstTemplateTypeParmType which will note that the type was originally written as a template type parameter. This makes it reasonable to preserve source information even through template substitution. Also define the new SubstTemplateTypeParmType class, obviously. For consistency with current behavior, we stringize these types as if they were the underlying type. I'm not sure this is the right thing to do. At any rate, I paled at adding yet another clause to the don't-desugar 'if' statement, so I extracted a function to do it. The new function also does The Right Thing more often, I think: e.g. if we have a chain of typedefs leading to a vector type, we will now desugar all but the last one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
46a617a792bfab0d9b1e057371ea3b9540802226 |
|
16-Oct-2009 |
John McCall <rjmccall@apple.com> |
Remove the ConstantArrayType subtypes. This information is preserved in the TypeLoc records for declarations; it should not be necessary to represent it directly in the type system. Please complain if you were using these classes and feel you can't replicate previous functionality using the TypeLoc API. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
a786fdbf6c1d8ff08c3e61c7eb6bf2872895e2b4 |
|
14-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics when the parser encounters a declarator with an unknown type name, e.g., foo::bar x; when "bar" does not refer to a type in "foo". With this change, the parser now calls into the action to perform diagnostics and can try to recover by substituting in an appropriate type. For example, this allows us to easily diagnose some missing "typename" specifiers, which we now do: test/SemaCXX/unknown-type-name.cpp:29:1: error: missing 'typename' prior to dependent type name 'A<T>::type' A<T>::type A<T>::f() { return type(); } ^~~~~~~~~~ typename Fixes PR3990. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
3f09327b26033d0a9676d52d80cf92c48f581aff |
|
13-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Unify our diagnostic printing for errors of the form, "we didn't like what we found when we looked into <blah>", where <blah> is a DeclContext*. We can now format DeclContext*'s in nice ways, e.g., "namespace N", "the global namespace", "'class Foo'". This is part of PR3990, but we're not quite there yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
bf1cc05907ceb2081e8158b26f3d3f48b31caad3 |
|
30-Sep-2009 |
John McCall <rjmccall@apple.com> |
Desugaring optimizations. Add single-step desugaring methods to all concrete types. Use unqualified desugaring for getAs<> and sundry. Fix a few users to either not desugar or use qualified desugar, as seemed appropriate. Removed Type's qualified desugar method, as it was easy to accidentally use instead of QualType's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
0953e767ff7817f97b3ab20896b229891eeff45b |
|
24-Sep-2009 |
John McCall <rjmccall@apple.com> |
Refactor the representation of qualifiers to bring ExtQualType out of the Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our use of qualifiers and fix a few places that weren't dealing with qualifiers quite right; many more remain. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
81b747b7fcc91c2fba9a3183d8fac80adbfc1d3e |
|
17-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial implementation of a code-completion interface in Clang. In essence, code completion is triggered by a magic "code completion" token produced by the lexer [*], which the parser recognizes at certain points in the grammar. The parser then calls into the Action object with the appropriate CodeCompletionXXX action. Sema implements the CodeCompletionXXX callbacks by performing minimal translation, then forwarding them to a CodeCompletionConsumer subclass, which uses the results of semantic analysis to provide code-completion results. At present, only a single, "printing" code completion consumer is available, for regression testing and debugging. However, the design is meant to permit other code-completion consumers. This initial commit contains two code-completion actions: one for member access, e.g., "x." or "p->", and one for nested-name-specifiers, e.g., "std::". More code-completion actions will follow, along with improved gathering of code-completion results for the various contexts. [*] In the current -code-completion-dump testing/debugging mode, the file is truncated at the completion point and EOF is translated into "code completion". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
7adb10fa317cd7eacb0959f775e77353d4f24ad1 |
|
16-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
When implicitly declaring operators new, new[], delete, and delete[], give them the appropriate exception specifications. This, unfortunately, requires us to maintain and/or implicitly generate handles to namespace "std" and the class "std::bad_alloc". However, every other approach I've come up with was more hackish, and this standard requirement itself is quite the hack. Fixes PR4829. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
4c5fad3f73957420b0410f7370cbd63b09f32a1c |
|
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Only reuse an already existing ImplicitCastExpr if the cast kinds are the same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c0a2fd8f092722c8f78b566ac4506a21437040e9 |
|
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Get rid of the CastInfo struct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81839 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.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/Sema/Sema.cpp
|
63d65f873fdfcb04b216ea9c648d1df5992aed1c |
|
08-Sep-2009 |
Chris Lattner <sabre@nondot.org> |
Fix PR4922, where Sema would complete tentative definitions in nondeterminstic order because it was doing so while iterating over a densemap. There are still similar problems in other places, for example WeakUndeclaredIdentifiers is still written to the PCH file in a nondeterminstic order, and we emit warnings about #pragma weak in nondeterminstic order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
2191b20bfb31fc0e22a158f6b4204cd0b7dbd0fd |
|
05-Sep-2009 |
John McCall <rjmccall@apple.com> |
Start emitting ElaboratedTypes in C++ mode. Support the effort in various ways: remove elab types during desugaring, enhance pretty-printing to allow tags to be suppressed without suppressing scopes, look through elab types when associating a typedef name with an anonymous record type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
639bfc7b1e55e01dd38d2ef399366b5efa55a9a7 |
|
30-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Improve missing error messages as suggested by Doug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
f4d84b663ef7dda959cbe45561d90e59760cbb74 |
|
30-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Improve diagnostics for missing members. This renames the err_typecheck_no_member to err_typecheck_no_member_deprecated. The idea is that err_typecheck_no_member_deprecated should be phased out and any call sites that reference it should call DiagnoseMissingMember instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
91a0cc913ecc5619b76d2e40742fd09725be8c56 |
|
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add a RequireCompleteType variant that takes a PartialDiagnostic. The old RequireCompleteType now creates a PartialDiagnostic and calls the new function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
dacd434c49658286c380c7b4c357d76d53cb4aa1 |
|
26-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics and recovery when the nested-name-specifier of a qualified name does not actually refer into a class/class template/class template partial specialization. Improve printing of nested-name-specifiers to eliminate redudant qualifiers. Also, make it possible to output a nested-name-specifier through a DiagnosticBuilder, although there are relatively few places that will use this leeway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
0f436560640a1cff5b6d96f80f540770f139453f |
|
17-Aug-2009 |
David Chisnall <csdavec@swan.ac.uk> |
Initial patch to support definitions of id and Class from headers in Objective-C code. This currently breaks test/SemaObjC/id-isa-ref.m and issues some spurious warnings when you attempt to assign a struct objc_class* value to a Class variable. The test case probably should fail as it's written, because without the definition of Class the compiler should not assume struct objc_class* is a valid receiver type, but it's left broken because it would be nice if we could get that passing too for the special case of isa. Approved by snaroff. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
bd0fb30fa2a039439d1a30a83ea896801394d780 |
|
10-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add a CastInfo struct that will be used for cast information when constructing cast expressions. Right now it only stores the cast kind, but in the future it might store conversion functions and constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
fb7ef75a28af7b6a7f666df2a5db53cf90d957b1 |
|
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
getFunctionLevelDeclContext needs to get the previous DeclContext if EnterDeclaratorContext has been called. Fixes PR4694. (Doug, please review) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
8517d9b731f065cdfc55ec0f3ddf5d564d988648 |
|
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Factor some code to get the "function level" DeclContext out into a separate function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
3503d041ca8a3535a1c1a30005a6b18ae7aed5db |
|
31-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Add CK_DerivedToBase and use it PerformObjectMemberConversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
cdef2b75aa60cde1ca00e0aa3f89139ac89c6ae4 |
|
31-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Add a CastKind enum to CastExpr. Right now it's not used for much but it will be :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
e25ff83fb7eee9eeda89b6f2371bc33a37bf1028 |
|
30-Jul-2009 |
Ryan Flynn <pizza@parseerror.com> |
PR3679 - handle #pragma weak git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
de2e22d33afec98324a66a358dfe0951b3c7259a |
|
15-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Implement the ObjC pseudo built-in types as clang "BuiltinType's". I say pseudo built-in types, since Sema still injects a typedef for recognition (i.e. they aren't truly built-ins from a parser perspective). This removes the static data/methods on ObjCObjectPointerType while preserving the nice API (no need to fiddle with ASTContext:-). This patch also adds Type::isObjCBuiltinType(). This should be the last fairly large patch related to recrafting the ObjC type system. The follow-on patches should be fairly small. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
14108da7f7fc059772711e4ffee1322a27b152a7 |
|
11-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
This patch includes a conceptually simple, but very intrusive/pervasive change. The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches. This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic. By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
7e7eb3da052a6d80ddf2377cab0384c798f73f75 |
|
06-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Keep track of the Expr used to describe the size of an array type, from Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
2e22253e03e175144aeb9d13350a12fd83f858be |
|
02-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Add support for retrieving the Doxygen comment associated with a given declaration in the AST. The new ASTContext::getCommentForDecl function searches for a comment that is attached to the given declaration, and returns that comment, which may be composed of several comment blocks. Comments are always available in an AST. However, to avoid harming performance, we don't actually parse the comments. Rather, we keep the source ranges of all of the comments within a large, sorted vector, then lazily extract comments via a binary search in that vector only when needed (which never occurs in a "normal" compile). Comments are written to a precompiled header/AST file as a blob of source ranges. That blob is only lazily loaded when one requests a comment for a declaration (this never occurs in a "normal" compile). The indexer testbed now supports comment extraction. When the -point-at location points to a declaration with a Doxygen-style comment, the indexer testbed prints the associated comment block(s). See test/Index/comments.c for an example. Some notes: - We don't actually attempt to parse the comment blocks themselves, beyond identifying them as Doxygen comment blocks to associate them with a declaration. - We won't find comment blocks that aren't adjacent to the declaration, because we start our search based on the location of the declaration. - We don't go through the necessary hops to find, for example, whether some redeclaration of a declaration has comments when our current declaration does not. Similarly, we don't attempt to associate a \param Foo marker in a function body comment with the parameter named Foo (although that is certainly possible). - Verification of my "no performance impact" claims is still "to be done". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d7f37bf8b9a211455c5037df7b7e88e5a9510119 |
|
23-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement implicit instantiation of the member functions of a class template specialization. At present, all implicit instantiations occur at the end of the translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
ac7610dad6653bad02dd42de198ca358b6fb1f1d |
|
22-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Rework the way we track which declarations are "used" during compilation, and (hopefully) introduce RAII objects for changing the "potentially evaluated" state at all of the necessary places within Sema and Parser. Other changes: - Set the unevaluated/potentially-evaluated context appropriately during template instantiation. - We now recognize three different states while parsing or instantiating expressions: unevaluated, potentially evaluated, and potentially potentially evaluated (for C++'s typeid). - When we're in a potentially potentially-evaluated context, queue up MarkDeclarationReferenced calls in a stack. For C++ typeid expressions that are potentially evaluated, we will play back these MarkDeclarationReferenced calls when we exit the corresponding potentially potentially-evaluated context. - Non-type template arguments are now parsed as constant expressions, so they are not potentially-evaluated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
e0762c92110dfdcdd207db461a4ea17afd168f1e |
|
20-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Keep track of when declarations are "used" according to C and C++. This logic is required to trigger implicit instantiation of function templates and member functions of class templates, which will be implemented separately. This commit includes support for -Wunused-parameter, printing warnings for named parameters that are not used within a function/Objective-C method/block. Fixes <rdar://problem/6505209>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d1b3c2dd5bc1f3103bee6137957aa7c5f8f2f0bc |
|
18-Jun-2009 |
Steve Naroff <snaroff@apple.com> |
First step toward fixing <rdar://problem/6613046> refactor clang objc type representation. Add a type (ObjCObjectPointerType) and remove a type (ObjCQualifiedIdType). This large/tedious patch is just a first step. Next step is to remove ObjCQualifiedInterfaceType. After that, I will remove the magic TypedefType for 'id' (installed by Sema). This work will enable various simplifications throughout clang (when dealing with ObjC types). No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
cb83c530ee82c0107720129473fa78336b6f4879 |
|
16-Jun-2009 |
Steve Naroff <snaroff@apple.com> |
Add a comment to Sema::ActOnTranslationUnitScope(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
bb2604122f4186b6f666481f699b27c7e7a95790 |
|
14-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce a SFINAE "trap" that keeps track of the number of errors that were suppressed due to SFINAE. By checking whether any errors occur at the end of template argument deduction, we avoid the possibility of suppressing an error (due to SFINAE) and then recovering so well that template argument deduction never detects that there was a problem. Thanks to Eli for the push in this direction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
5e9f35c7cb61aea46f56d46c77cbcf47c0cf28ba |
|
14-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Update LLVM. Implement support for C++ Substitution Failure Is Not An Error (SFINAE), which says that errors that occur during template argument deduction do *not* produce diagnostics and do not necessarily make a program ill-formed. Instead, template argument deduction silently fails. This is currently implemented for template argument deduction during matching of class template partial specializations, although the mechanism will also apply to template argument deduction for function templates. The scheme is simple: - If we are in a template argument deduction context, any diagnostic that is considered a SFINAE error (or warning) will be suppressed. The error will be propagated up the call stack via the normal means. - By default, all warnings and errors are SFINAE errors. Add the NoSFINAE class to a diagnostic in the .td file to make it a hard error (e.g., for access-control violations). Note that, to make this fully work, every place in Sema that emits an error *and then immediately recovers* will need to check Sema::isSFINAEContext() to determine whether it must immediately return an error rather than recovering. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
7c94c4bb7b875dc1a2b23f77f1ed8013cf94abdb |
|
03-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use "()" instead of "(void)" when pretty-printing a parameter-less function type for C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
48dd19b19ddb9e105f8cf0bf6f0732ca4e6a385b |
|
14-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce a stack of instantiation scopes that are used to store the mapping from variable declarations that occur within templates to their instantiated counterparts git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
4d150c84514dbf15975960a3ea46bdf6b7f16a5b |
|
30-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
only support int128_t on 64-bit and larger targets. 32-bit targets don't have support for __divti3 and friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
2df9ced9fd1e8c7d7b38443db07e0e811de22571 |
|
30-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
initial support for __[u]int128_t, which should be basically compatible with VC++ and GCC. The codegen/mangling angle hasn't been fully ironed out yet. Note that we accept int128_t even in 32-bit mode, unlike gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
f0aaf7a59729a4ae0146e3464ee987745be95829 |
|
24-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
PCH support for the global method pool (= instance and factory method pools, combined). The methods in the global method pool are lazily loaded from an on-disk hash table when Sema looks into its version of the hash tables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
319ac896a0fef7365d5589b8021db7e41207fe42 |
|
24-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
PCH support for all of the predefined Objective-C types, such as id, SEL, Class, Protocol, CFConstantString, and __objcFastEnumerationState. With this, we can now run the Objective-C methods and properties PCH tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
21e072b7faed62268074664e2b56e37d069200a7 |
|
22-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate Sema::KnownFunctionIDs, so that Sema doesn't end up pulling in a bunch of declarations from the PCH file. We're down to loading very few declarations in Carbon-prefixed "Hello, World!": *** PCH Statistics: 6/20693 types read (0.028995%) 7/59230 declarations read (0.011818%) 50/44914 identifiers read (0.111324%) 0/32954 statements read (0.000000%) 5/6187 macros read (0.080815%) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69825 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
dbb4f21125699f207ce7accfc52fdd99f47ce352 |
|
15-Apr-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add warning when a tentative array definition is assumed to have one element. - Also, fixed one to actually be one (instead of zero). :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
f807fe0d1a865f4c6ba7e494cf4ae360c4173521 |
|
14-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
When building a PCH file, don't perform end-of-translation-unit wrap-up (e.g., turning tentative definitions into definitions). Also, very that, when we actually use the PCH file, we get the ride code generation for tentative definitions and definitions that show up in the PCH file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
969c689d893a248eca4f049f5b89f747e66e4bff |
|
01-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Give Type::getDesugaredType a "for-display" mode that can apply more heuristics to determine when it's useful to desugar a type for display to the user. Introduce two C++-specific heuristics: - For a qualified type (like "foo::bar"), only produce a new desugred type if desugaring the qualified type ("bar", in this case) produces something interesting. For example, if "foo::bar" refers to a class named "bar", don't desugar. However, if "foo::bar" refers to a typedef of something else, desugar to that something else. This gives some useful desugaring such as "foo::bar (aka 'int')". - Don't desugar class template specialization types like "basic_string<char>" down to their underlying "class basic_string<char, char_traits<char>, allocator<char>>, etc."; it's better just to leave such types alone. Update diagnostics.html with some discussion and examples of type preservation in C++, showing qualified names and class template specialization types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
b28317a8e5e0e2953d1e5406d753d6c3c7f1e7d2 |
|
28-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
Introduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a pointer. Its purpose in life is to be a glorified void*, but which does not implicitly convert to void* or other OpaquePtr's with a different UID. Introduce Action::DeclPtrTy which is a typedef for OpaquePtr<0>. Change the entire parser/sema interface to use DeclPtrTy instead of DeclTy*. This makes the C++ compiler enforce that these aren't convertible to other opaque types. We should also convert ExprTy, StmtTy, TypeTy, AttrTy, BaseTy, etc, but I don't plan to do that in the short term. The one outstanding known problem with this patch is that we lose the bitmangling optimization where ActionResult<DeclPtrTy> doesn't know how to bitmangle the success bit into the low bit of DeclPtrTy. I will rectify this with a subsequent patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
25a88bbf042317976f0d9cbfa87dfe89426e8393 |
|
20-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate post-diagnostic hooks. Instead, implement a Sema-specific variant of DiagnosticBuilder that emits the template instantiation backtrace when needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
caaacecb2b64e6d2e402533baffda4cb540f4145 |
|
13-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Remove ActiveScope (revert http://llvm.org/viewvc/llvm-project?view=rev&revision=65694 and http://llvm.org/viewvc/llvm-project?view=rev&revision=66741). Will replace with something better today... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
f3cf89737965352ee02026992e2dc735824e185e |
|
28-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6451399> problems with labels and blocks. - Move the 'LabelMap' from Sema to Scope. To avoid layering problems, the second element is now a 'StmtTy *', which makes the LabelMap a bit more verbose to deal with. - Add 'ActiveScope' to Sema. Managed by ActOnStartOfFunctionDef(), ObjCActOnStartOfMethodDef(), ActOnBlockStmtExpr(). - Changed ActOnLabelStmt(), ActOnGotoStmt(), ActOnAddrLabel(), and ActOnFinishFunctionBody() to use the new ActiveScope. - Added FIXME to workaround in ActOnFinishFunctionBody() (for dealing with C++ nested functions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
92dd386e3f05d176b45a638199d51f536bd9d1c4 |
|
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
replace a dirty hack with a clean solution. Too bad we can't use Blocks for our callbacks ;-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d0344a4a6182ad704881cbbaa21cca14913d2296 |
|
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Fix a long standard problem with clang retaining "too much" sugar information about types. We often print diagnostics where we say "foo_t" is bad, but the user doesn't know how foo_t is declared (because it is a typedef). Fix this by expanding sugar when present in a diagnostic (and not one of a few special cases, like vectors). Before: t.m:5:2: error: invalid operands to binary expression ('typeof(P)' and 'typeof(F)') MAX(P, F); ^~~~~~~~~ t.m:1:78: note: instantiated from: #define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) ^ After: t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float')) MAX(P, F); ^~~~~~~~~ t.m:1:78: note: instantiated from: #define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
370ab3f1373841d70582feac9e35c3c6b3489f63 |
|
14-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Make it possible for builtins to expression FILE* arguments, so that we can define builtins such as fprintf, vfprintf, and __builtin___fprintf_chk. Give a nice error message when we need to implicitly declare a function like fprintf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
a316e7b735b12ce6b34961a9dcfaae34f4b08d29 |
|
14-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Extend builtin "attribute" syntax to include a notation for printf-like functions, both builtin functions and those in the C library. The function-call checker now queries this attribute do determine if we have a printf-like function, rather than scanning through the list of "known functions IDs". However, there are 5 functions they are not yet "builtins", so the function-call checker handles them specifically still: - fprintf and vfprintf: the builtins mechanism cannot (yet) express FILE* arguments, so these can't be encoded. - NSLog: the builtins mechanism cannot (yet) express NSString* arguments, so this (and NSLogv) can't be encoded. - asprintf and vasprintf: these aren't part of the C99 standard library, so we really shouldn't be defining them as builtins in the general case (and we don't seem to have the machinery to make them builtins only on certain targets and depending on whether extensions are enabled). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
8189cde56b4f6f938cd65f53c932fe1860d0204c |
|
07-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
Overhaul of Stmt allocation: - Made allocation of Stmt objects using vanilla new/delete a *compiler error* by making this new/delete "protected" within class Stmt. - Now the only way to allocate Stmt objects is by using the new operator that takes ASTContext& as an argument. This ensures that all Stmt nodes are allocated from the same (pool) allocator. - Naturally, these two changes required that *all* creation sites for AST nodes use new (ASTContext&). This is a large patch, but the majority of the changes are just this mechanical adjustment. - The above changes also mean that AST nodes can no longer be deallocated using 'delete'. Instead, one most do StmtObject->Destroy(ASTContext&) or do ASTContextObject.Deallocate(StmtObject) (the latter not running the 'Destroy' method). Along the way I also... - Made CompoundStmt allocate its array of Stmt* using the allocator in ASTContext (previously it used std::vector). There are a whole bunch of other Stmt classes that need to be similarly changed to ensure that all memory allocated for ASTs comes from the allocator in ASTContext. - Added a new smart pointer ExprOwningPtr to Sema.h. This replaces the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used 'delete' to free memory instead of a Stmt's 'Destroy' method. Big thanks to Doug Gregor for helping with the acrobatics of making 'new/delete' private and the new smart pointer ExprOwningPtr! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
eeb15d499f032bb89773ddaca2d17475122a37bb |
|
04-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement semantic analysis for the GNU flexible array initialization extension. The interaction with designated initializers is a bit... interesting... but we follow GNU's lead and don't permit too much crazy code in this area. Also, make the "excess initializers" error message a bit more informative. Addresses PR2561: http://llvm.org/bugs/show_bug.cgi?id=2561 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
500d3297d2a21edeac4d46cbcbe21bc2352c2a28 |
|
29-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
move library-specific diagnostic headers into library private dirs. Reduce redundant #includes. Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
20c6b3b85e186cd52d5d99489132d71d498159eb |
|
27-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Split the single monolithic DiagnosticKinds.def file into one .def file for each library. This means that adding a diagnostic to sema doesn't require all the other libraries to be rebuilt. Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
53ebff34243161e5b18cbec5e3373661ab105d2d |
|
22-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
inline Sema::getLangOptions, rdar://6515190. This speeds up fsyntax-only with PTH by 3%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62774 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
05c13a3411782108d65aab3c77b1a231a4963bc0 |
|
22-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial implementation of semantic analysis and ASTs for C99 designated initializers. This implementation should cover all of the constraints in C99 6.7.8, including long, complex designations and computing the size of incomplete array types initialized with a designated initializer. Please see the new test-case and holler if you find cases where this doesn't work. There are still some wrinkles with GNU's anonymous structs and anonymous unions (it isn't clear how these should work; we'll just follow GCC's lead) and with designated initializers for the members of a union. I'll tackle those very soon. CodeGen is still nonexistent, and there's some leftover code in the parser's representation of designators that I'll also need to clean up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
6fe7c8aa8c7546743ecd0ac0138c2cf5d8155386 |
|
18-Jan-2009 |
Nate Begeman <natebegeman@mac.com> |
Vector codegen improvements git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d04341000d35c8808a72838b057eed7bf13b7661 |
|
09-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Addressed the issue in <rdar://problem/6479085>, where we failed to rewrite @class declarations that showed up within linkage specifications because those @class declarations never made it any place where the rewriter could find them. Moved all of the ObjC*Decl nodes over to ScopedDecls, so that they can live in the appropriate top-level or transparent DeclContext near the top level, e.g., TranslationUnitDecl or LinkageSpecDecl. Objective-C declarations now show up in a traversal of the declarations in a DeclContext (they didn't before!). This way, the rewriter finds all Objective-C declarations within linkage specifications. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
0701bbb228dfd87e1fe82a0a4b7b9facfecb43da |
|
08-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
This is a large/messy diff that unifies the ObjC AST's with DeclContext. - ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts. - ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext). - ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-) - Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective. - Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch(). - Simplified Sema::ActOnAtEnd() considerably. Still more work to do. - Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl. - Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl. This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
cfb664c308fcfe5bf17d2fe430bcedf1f3707a28 |
|
22-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Expr and Stmt must be destroyed with Destroy, not delete. Fixes PR/3245. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
371f258e61e1365b951b17931a3c5ac1530fd1a0 |
|
05-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
change getCurFunctionDecl to skip through Block contexts to find the containing block. Introduce a new getCurFunctionOrMethodDecl method to check to see if we're in a function or objc method. Minor cleanups to other related places. This fixes rdar://6405429. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
b5a57a69e5fdac6dd9a92be717e279486c4a0128 |
|
03-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Overload resolution for the operator new function. Member version is still untested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
077bf5e2f48acfa9e7d69429b6e4ba86ea14896d |
|
24-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Rename Selector::getName() to Selector::getAsString(), and add a new NamedDecl::getAsString() method. Change uses of Selector::getName() to just pass in a Selector where possible (e.g. to diagnostics) instead of going through an std::string. This also adds new formatters for objcinstance and objcclass as described in the dox. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
011bb4edf731d529da1cbf71c7c2696aaf5a054f |
|
23-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
add support for inserting a DeclarationName into a diagnostic directly without calling getAsString(). This implicitly puts quotes around the name, so diagnostics need to be tweaked to accommodate this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
3fdf4b071dc79fae778fb5f376485480756c76a3 |
|
23-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Genericize the qualtype formating callback to support any diag argument. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
22caddc91d2f6186739c6b20ec58ed38cd68e595 |
|
23-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Add support for sending QualType's directly into diags and convert two diags over to use this. QualTypes implicitly print single quotes around them for uniformity and future extension. Doing this requires a little function pointer dance to prevent libbasic from depending on libast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
3cfa928f9c9bdc5a12f4c4902cd932babc9c7bc1 |
|
22-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
move the Diag method for Sema to be inline. This shrinks the release-asserts clang executable (when built with gcc 4.2 on the mac) from 14519740 to 14495028 bytes. This shrinks individual object files as well: SemaChecking from 23580->22248, SemaDeclObjc from 61368->57376, SemaExpr from 115628->110516, as well as several others. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
3cbfe2c4159e0a219ae660d50625c013aa4afbd0 |
|
22-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Split the DiagnosticInfo class into two disjoint classes: one for building up the diagnostic that is in flight (DiagnosticBuilder) and one for pulling structured information out of the diagnostic when formatting and presenting it. There is no functionality change with this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
f3a41af4d5c98a72a1d6720bbbfd658e57ef2541 |
|
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove the last old-fashioned Diag method. Transition complete! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
5dc266abe0e8de69788ba67e38047a919f4bc383 |
|
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove another old Diag method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d3a94e24ddf3fb90de76b17bd176d9ed61e66f2c |
|
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove another old-school Diag method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
572af49cc0052931e7b06902d99c72f04b75704e |
|
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove the type_info identifier cache. Compared to the cost of doing the lookup_decl, the hash lookup is cheap. Also, typeid doesn't happen enough in real world code to worry about it. I'd like to eventually get rid of KnownFunctionIDs from Sema also, but today is not that day. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
8edea83d4d45d912191eac97b861309af6c74acd |
|
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
compared to the rest of the code in Sema::GetStdNamespace(), looking up the "std" identifier is trivial. Just do it, particularly since this is only done if the namespace hasn't already been looked up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
2bac0f6b3724734d7bb7bf8231bd8511cb49570f |
|
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove some other identifiers that are looked up really early and only used in one cold place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
8469265156c6344fa1100a6a7bf6349acc187d9f |
|
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
instead of looking up super at startup time, just check for it when needed. It doesn't incur real cost in any hot paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
dcd5ef12488e4c7ea844327835896ca86b609a97 |
|
19-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove one more old-style Diag method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
fa25bbb351f4fdd977f51254119cdfc2b525ce90 |
|
19-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Switch several more Sema Diag methods over. This simplifies the __builtin_prefetch code to only emit one diagnostic per builtin_prefetch. While this has nothing to do with the rest of the patch, the code seemed like overkill when I was updating it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c9c7c4e06bba5dce053162ea1ead5743d7bba35b |
|
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
start converting Sema over to using its canonical Diag method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
ebf5ddfbf7df93c9c885c176ac2152669e39cfbf |
|
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
introduce the one true Diag method for Sema. Next up: kill all the others off. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
0a14eee528a901c16f0e288fbc10a3abc1660d87 |
|
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
This reworks some of the Diagnostic interfaces a bit to change how diagnostics are formed. In particular, a diagnostic with all its strings and ranges is now packaged up and sent to DiagnosticClients as a DiagnosticInfo instead of as a ton of random stuff. This has the benefit of simplifying the interface, making it more extensible, and allowing us to do more checking for things like access past the end of the various arrays passed in. In addition to introducing DiagnosticInfo, this also substantially changes how Diagnostic::Report works. Instead of being passed in all of the info required to issue a diagnostic, Report now takes only the required info (a location and ID) and returns a fresh DiagnosticInfo *by value*. The caller is then free to stuff strings and ranges into the DiagnosticInfo with the << operator. When the dtor runs on the DiagnosticInfo object (which should happen at the end of the statement), the diagnostic is actually emitted with all of the accumulated information. This is a somewhat tricky dance, but it means that the accumulated DiagnosticInfo is allowed to keep pointers to other expression temporaries without those pointers getting invalidated. This is just the minimal change to get this stuff working, but this will allow us to eliminate the zillions of variant "Diag" methods scattered throughout (e.g.) sema. For example, instead of calling: Diag(BuiltinLoc, diag::err_overload_no_match, typeNames, SourceRange(BuiltinLoc, RParenLoc)); We will soon be able to just do: Diag(BuiltinLoc, diag::err_overload_no_match) << typeNames << SourceRange(BuiltinLoc, RParenLoc)); This scales better to support arbitrary types being passed in (not just strings) in a type-safe way. Go operator overloading?! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
2383b7f6aea2cb2bf2b5bfc0ec730f9354fecbbf |
|
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Change the diagnostics interface to take an array of pointers to strings instead of array of strings. This reduces string copying in some not-very-important cases, but paves the way for future improvements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d7612e183bb09d04677d0ddde89ee29130ffb715 |
|
17-Nov-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6320086> parser rejects block capturing ivar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59444 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
eb8f3063257a392f15aea48d42fb73ec51afc548 |
|
12-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Implement support for operator overloading using candidate operator functions for built-in operators, e.g., the builtin bool operator==(int const*, int const*) can be used for the expression "x1 == x2" given: struct X { operator int const*(); } x1, x2; The scheme for handling these built-in operators is relatively simple: for each candidate required by the standard, create a special kind of candidate function for the built-in. If overload resolution picks the built-in operator, we perform the appropriate conversions on the arguments and then let the normal built-in operator take care of it. There may be some optimization opportunity left: if we can reduce the number of built-in operator overloads we generate, overload resolution for these cases will go faster. However, one must be careful when doing this: GCC generates too few operator overloads in our little test program, and fails to compile it because none of the overloads it generates match. Note that we only support operator overload for non-member binary operators at the moment. The other operators will follow. As part of this change, ImplicitCastExpr can now be an lvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c42e1183846228a7fa5143ad76507d6d60f5c6f3 |
|
11-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement C++ 'typeid' parsing and sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
ef6e647b8d3268a765c2c4dd7f8a73cad281a8e6 |
|
08-Nov-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Implement Sema support for C++ nested-name-specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
f7be9448af88e0ebb204bdcebfc13f4cb2b9d8e1 |
|
04-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Some cleanup of the cast checkers. Don't canonicalize types when not needed. Use distinct diagnostics for distinct errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
2f639b9f3c6b081f076d2ac6d75115ce44bfa249 |
|
24-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Semantic analysis for C++ reinterpret_cast and const_cast. Patch by Sebastian Redl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
4cde927072a70f3156d72c6431e7a5d95bf62366 |
|
14-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add Sema implementation of #pragma pack stack. - Follows the MSVC (original) implementation, including support of pack(show) (useful for testing). - Implements support for named pack records which gcc seems to ignore (or implements incorrectly). - Not currently wired to anything, only functionality change is the type checking of the pragma. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
de45428f923b38d80407dbb9ede0df504256f9f6 |
|
02-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add support for format string checking of object-size checking versions of sprintf and friends. - Added FIXME that this mechanism should be generalized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
eb7c388bc7ce19fffb8b4b440cee0173297e8490 |
|
09-Sep-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add a LangOptions member to IdentifierResolver. Make Sema pass the LangOptions to IdentifierResolver's constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
2b255c4dabe6a04314e3659a0f8b61e1382ec287 |
|
09-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Tweak implementation for allowing ObjC builtin type redefinitions. - Replace string comparisons with pre-defined idents. - Avoid calling isBuiltinObjCType() to avoid two checks. - Remove isBuiltinObjCType(), since it was only used in Sema::MergeTypeDefDecl(). - Have Sema::MergeTypeDefDecl() set the new type. This is a moidified version of an patch by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
3a2c7449e356ed74552450bc1dd50691c8202770 |
|
04-Sep-2008 |
Mon P Wang <wangmp@apple.com> |
Generate error if we try to implicit cast between different address spaces git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
4eb206bebcdab28ababe8df55c6185cec2cdc071 |
|
03-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Add semantic analysis for "blocks". Highlights... - 4 new AST nodes, BlockExpr, BlockStmtExpr, BlockExprExpr, BlockDeclRefExpr. - Sema::ActOnBlockStart(), ActOnBlockError(), ActOnBlockStmtExpr(), ActOnBlockExprExpr(), ActOnBlockReturnStmt(). Next steps... - hack Sema::ActOnIdentifierExpr() to deal with block decl refs. - add attribute handler for byref decls. - add test cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
a88b509d233d3f42382130c159c05cafa006b3e0 |
|
24-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Pass SourceRanges by reference to the various Diag methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c303606a8e2c1b7f8c985d0e7adf9fb9bb818070 |
|
24-Aug-2008 |
Anders Carlsson <andersca@mac.com> |
Make sure to create CXX record decls for the implicit Obj-C type declarations. This lets us compile Cocoa.h as Objective-C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
9299f3fa85796613cc787a2062c9562d07c8613e |
|
23-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
make sure that ParseAST invokes the action for end of translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
06f548596beef4c0a227a45cba996497f99566c0 |
|
23-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
minor cleanup, remove finalize method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
662e8b5647adbb1bc9eeceece7b64600cfa87471 |
|
15-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Change Parser & Sema to use interned "super" for comparions. - Added as private members for each because it is not clear where to put the common definition. Perhaps the IdentifierInfos all of these "pseudo-keywords" should be collected into one place (this would KnownFunctionIDs and Objective-C property IDs, for example). Remove Token::isNamedIdentifier. - There isn't a good reason to use strcmp when we have interned strings, and there isn't a good reason to encourage clients to do so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
acc5f3e42334525bf28c86471551f83dfce222d5 |
|
11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
More #include cleaning - Kill unnecessary #includes in .cpp files. This is an automatic sweep so some things removed are actually used, but happen to be included by a previous header. I tried to get rid of the obvious examples and this was the easiest way to trim the #includes in one fell swoop. - We now return to regularly scheduled development. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
c4a1dea2dc56bd1357ec91b829a0b9e68229a13e |
|
11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
More #include cleaning - Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h - Moved Sema::getCurMethodDecl() out of line (dependent on ObjCMethodDecl via dyn_cast). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
b77792eabf5882cf9af8cc810599b20432fda6c2 |
|
27-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
change more instances of QualType::getCanonicalType to call ASTContext::getCanonicalType instead (PR2189) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
b6ccaac65ca72f72954eb3893bbd940bedd23f00 |
|
25-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Move isObjCObjectPointerType() from Sema to ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
b752f289026ad8e5f44851b20e009a27ed61eefc |
|
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Switch initialization of the protocol list for an interface decl to use the standard "set these as the list of protocols" interface instead of a strange "set this as the size and then set each one to the value" interface. The problem with the later is that it a) is completely different from everything else, b) is awkward, and c) doesn't handle the case when a referenced protocol is invalid: it set it to null. This meant that all clients downstream would have to handle null protocols in the protocol list, and empirically they didn't. Fix this by not setting invalid protocols in the referenced protocol list, fixing the crash on test/Sema/objc-interface-1.m While I'm at it, clean up some locations so that we produce: t.m:1:25: error: cannot find interface declaration for 'NSObject', superclass of 'NSWhatever' @interface NSWhatever : NSObject <NSCopying> ~~~~~~~~~~~~~~~~~~~~~ ^ instead of: t.m:1:1: error: cannot find interface declaration for 'NSObject', superclass of 'NSWhatever' @interface NSWhatever : NSObject <NSCopying> ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53846 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
b49b572aa35a867f30ec710ce8447ab3a1e2a3c2 |
|
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
improve comments yet again, now I know what this does :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
0b6d1e6070394f2a5d6a600351f0e8c3fd371119 |
|
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
minor rename, also, reject pointer to qualified id. id<NSCopyable>* is not an "objc pointer type", id<NSCopyable> is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
17af2a62f31ec9e09c4df20873a717bb5f0ad99e |
|
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Fix a crash that can happen when you have typedefs for pointers to interfaces. Just because they x->isPointerType() doesn't mean it is valid to just cast to a pointertype. We have to handle typedefs etc as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
22e684a148c566dc72dad4a0eef5e2431e7303ea |
|
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
simplify this predicate, only checking isObjCQualifiedIdType once. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
07952324dda0e758c17f8bc3015793c65c51c48c |
|
01-Jul-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add Sema support for C++ classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
53d0ea5f5bfa647ec23418bf3a3b7c183b51e4bd |
|
28-Jun-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Replace CurFunctionDecl and CurMethodDecl with methods getCurFunctionDecl() and getCurMethodDecl() that return the appropriate Decl through CurContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
27933c17617efe4902a7d4a9f52c751f85a7d92f |
|
22-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
add a fixme back git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
6ee1f9c0142e0c374f32fc86312630cd901247cf |
|
21-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
"This moves built-in Objective-C types up the scope chains to where they can be replaced by versions included from the runtime library's headers." This makes it ok to use @"foo" without a declaration for NSConstantString. Patch by David Chisnall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
7ff22b259d4d4729f701679e3a7f0e242365e07f |
|
16-Jun-2008 |
Ted Kremenek <kremenek@apple.com> |
Introduce preliminary support for NSString format-string checking. Patch by Nikita Zhuk! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
e6fe5d46b26f407d78d1f12ece9cb103e4d19b82 |
|
04-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Give the "isa" slot a name! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
3e4177f23326305e206e6b7134c66f681e59f9d6 |
|
27-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Add FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.cpp
|
87f3ff0c27be71cfd0eaf4628eb64538e84ee6ce |
|
12-Apr-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Added PushOnScopeChains method to Sema, that adds a decl to both the IdResolver and the Scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
d6a07aaf62b40cdfbd96f6b874d02b06fc22d015 |
|
11-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Add class and super class location info to ObjCInterfaceDecl... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.cpp
|
7f925cc1071117ebe3191db33bbdfd706af297e9 |
|
11-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Switch sema to maintaining its own scope chain information for variable shadowing, instead of threading it through the AST. This patch contributed by Argiris Kirtzidis! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.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/Sema/Sema.cpp
|
0e77ba0bf769e2e5a4a93c079f241b02aeb3ef93 |
|
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Add create methods for ObjCIvarDecl and ObjCInterfaceDecl git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/Sema.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/Sema/Sema.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/Sema/Sema.cpp
|