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/AST/Type.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/AST/Type.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/AST/Type.cpp
|
58878f85ab89b13e9eea4af3ccf055e42c557bc8 |
|
06-May-2015 |
Pirama Arumuga Nainar <pirama@google.com> |
Update aosp/master clang for rebase to r235153 Change-Id: Ia94bbcb6da7c75b6e7c2afedd1001094d62a7324
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
0e2c34f92f00628d48968dfea096d36381f494cb |
|
23-Mar-2015 |
Stephen Hines <srhines@google.com> |
Update aosp/master clang for rebase to r230699. Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
/external/clang/lib/AST/Type.cpp
|
176edba5311f6eff0cad2631449885ddf4fbc9ea |
|
01-Dec-2014 |
Stephen Hines <srhines@google.com> |
Update aosp/master Clang for rebase to r222490. Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/lib/AST/Type.cpp
|
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 |
|
29-May-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for 3.5 rebase (r209713). Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/AST/Type.cpp
|
651f13cea278ec967336033dd032faef0e9fc2ec |
|
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/AST/Type.cpp
|
a3d727ba775eaecd4fd69e1c90b81732394716a6 |
|
11-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
volatile types are not trivially copyable. PR17123. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190484 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
e7eb0c4f6e728bb62c7d7304949b8a697153ba90 |
|
05-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR17103: Scoped enumerations with signed integer types have signed integer representation. Don't emit comparisons on them as 'icmp ult'! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
e8519c31a6ef853b627d557702ac1890f18ce2c9 |
|
30-Aug-2013 |
Charles Davis <cdavis5x@gmail.com> |
Add ms_abi and sysv_abi attribute handling. Based on a patch by Benno Rice! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
ef072033876e295ec5d3402f8730a3ae358ad815 |
|
28-Aug-2013 |
Reid Kleckner <reid@kleckner.net> |
Delete CC_Default and use the target default CC everywhere Summary: Makes functions with implicit calling convention compatible with function types with a matching explicit calling convention. This fixes things like calls to qsort(), which has an explicit __cdecl attribute on the comparator in Windows headers. Clang will now infer the calling convention from the declarator. There are two cases when the CC must be adjusted during redeclaration: 1. When defining a non-inline static method. 2. When redeclaring a function with an implicit or mismatched convention. Fixes PR13457, and allows clang to compile CommandLine.cpp for the Microsoft C++ ABI. Excellent test cases provided by Alexander Zinenko! Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1231 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
32b5a1e82f535d43e94332183cd330f4a39b2dbd |
|
22-Aug-2013 |
Craig Topper <craig.topper@gmail.com> |
Constify more uses of ASTContext&. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
9db7a7eb4e23758e041752c9c0c0ec1663d5a0af |
|
22-Aug-2013 |
Craig Topper <craig.topper@gmail.com> |
Constify the ASTContext& passed to Expr creation functions. Also constify the context in couple other functions that are called from creation functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
5b92696c8f1f8ef943ad87397b95c031b5787305 |
|
19-Jul-2013 |
Reid Kleckner <reid@kleckner.net> |
Create calling convention AttributedType sugar nodes Canonical types are unchanged. The type printer had to be changed to avoid printing any non-default implicit calling convention as well as the calling convention attribute. Reviewers: rjmccall Differential Revision: http://llvm-reviews.chandlerc.com/D1132 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
e8caa30d6124b915fb6bfb3fb2d0eb4857381d08 |
|
16-Jul-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Limit number of bits in size representation so that bit size fit 64 bits. This fixes PR8256 and some others. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
0a598fd7e428b5eb28b67770a66f3976ac365e42 |
|
27-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Delete dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
c910d4cfa5042f2c9da1eb4e0b6ed59240c0eeee |
|
08-Jun-2013 |
Reid Kleckner <reid@kleckner.net> |
Revert "[Sema] Make FunctionType's TSI use unadjusted argument types" This reverts commit r183614. It broke test/Sema/block-printf-attribute-1.c on non-Windows platforms, and the fix is not trivial. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
63c9a92a805394c1ca9e4a5fd8afb3acbb918d03 |
|
08-Jun-2013 |
Reid Kleckner <reid@kleckner.net> |
[Sema] Make FunctionType's TSI use unadjusted argument types This helps preserve the type-as-written in the AST, which we need for MSVC mangling. In particular, we need to preserve the types of array parameters in function pointer types. The essence of this change is: - QualType ArgTy = Param->getType(); + QualType ArgTy = Param->getTypeSourceInfo()->getType(); ... followed by the adjustment in ActOnFunctionDeclarator(). Differential Revision: http://llvm-reviews.chandlerc.com/D883 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
9779fdd271bb6a938bdee93f901e4ef7b1a88610 |
|
24-May-2013 |
Michael J. Spencer <bigcheesegs@gmail.com> |
Replace Count{Leading,Trailing}Zeros_{32,64} with count{Leading,Trailing}Zeros. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
5705f211472f19fc38e58d81365f9261024b3ba3 |
|
23-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR14772: Support constant expression evaluation for _Atomic types. * Treat _Atomic(T) as a literal type if T is a literal type. * Evaluate expressions of this type properly. * Fix a lurking bug where we built completely bogus ASTs for converting to _Atomic types in C++ in some cases, caught by the tests for this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
bdaeaed3e3293f1915cdf336f406d4d391331039 |
|
22-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR16090: C++1y: treat undeduced 'auto' as a literal type, so that constexpr function templates can use it as a return type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
181e3ecc0907ae0103586a9f4db52241995a8267 |
|
13-May-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Cleanup handling of UniqueExternalLinkage. This patch renames getLinkage to getLinkageInternal. Only code that needs to handle UniqueExternalLinkage specially should call this. Linkage, as defined in the c++ standard, is provided by getFormalLinkage. It maps UniqueExternalLinkage to ExternalLinkage. Most places in the compiler actually want isExternallyVisible, which handles UniqueExternalLinkage as internal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
15f92bad58c8650b1306729744b1a1230197497a |
|
10-May-2013 |
Hans Wennborg <hans@hanshq.net> |
Add support for __wchar_t in -fms-extensions mode. MSVC provides __wchar_t. This is the same as the built-in wchar_t type from C++, but it is also available with -fno-wchar and in C. The commit changes ASTContext to have two different types for this: - WCharTy is the built-in type used for wchar_t in C++ and __wchar_t. - WideCharTy is the type of a wide character literal. In C++ this is the same as WCharTy, and in C it is an integer type compatible with the type in <stddef.h>. This fixes PR15815. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f9734241b141ad9c19969bab9b56dd4246e35e7d |
|
04-May-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Reverting r181004 since it has broken test/Sema/wchar.c. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
6f464bb8d316b95bf60efcdb2d21803659d3aa1b |
|
03-May-2013 |
Hans Wennborg <hans@hanshq.net> |
Support __wchar_t in -fms-extensions and -fms-compatibility modes. MSVC provides __wchar_t, either as an alias for the built-in wchar_t type, or as a separate type depending on language (C vs C++) and flags (-fno-wchar). In -fms-extensions, Clang will simply accept __wchar_t as an alias for whatever type is used for wide character literals. In -fms-compatibility, we try to mimic MSVC's behavior by always making __wchar_t a builtin type. This fixes PR15815. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
dc7a4f5d7a7e3b60d4dc4a80338d7a2728540998 |
|
30-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't treat a non-deduced 'auto' type as being type-dependent. Instead, there are now two distinct canonical 'AutoType's: one is the undeduced 'auto' placeholder type, and the other is a deduced-but-dependent type. All deduced-to-a-non-dependent-type cases are still non-canonical. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
a10b97898ee6339c3110e6ca33f178ff52f05238 |
|
22-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++1y constexpr extensions, round 1: Allow most forms of declaration and statement in constexpr functions. Everything which doesn't require variable mutation is also allowed as an extension in C++11. 'void' becomes a literal type to support constexpr functions which return 'void'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
e738fc5145984235a8f084077791271c4d266236 |
|
15-Mar-2013 |
Daniel Dunbar <daniel@zuster.org> |
[AST] Add a fast path to ConstantArrayType::getNumAddressingBits(). - This fast path is almost 100% effective on real code, and lets us avoid multiple allocations of 128-bit APSInt objects in the common case. - As with any overflow-check-skipping-code, I'd appreciate someone double checking my logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
2d1b09641ecf2e754bf3fd244dc45dbf3e460c1b |
|
14-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Avoid computing the linkage too early. Don't invalidate it. Before this patch we would compute the linkage lazily and cache it. When the AST was modified in ways that could change the value, we would invalidate the cache. That was fairly brittle, since any code could ask for the a linkage before the correct value was available. We should change the API to one where the linkage is computed explicitly and trying to get it when it is not available asserts. This patch is a first step in that direction. We still compute the linkage lazily, but instead of invalidating a cache, we assert that the AST modifications didn't change the result. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
83972f128e9218c051692bf96361327a701aeb79 |
|
09-Mar-2013 |
John McCall <rjmccall@apple.com> |
Add TagDecl::hasNameForLinkage(), which is true if the tag is non-anonymous or is defined in a typedef of itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
bea522ff43a3f11c7a2bc7949119dbb9fce19e39 |
|
08-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
ArrayRef-ize ASTContext::getFunctionType and Sema::BuildFunctionType. No (intended) functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
a2bb8923334ecd35b8f914dff7d105330abbad22 |
|
27-Feb-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't cache the visibility of types. Since r175326 an implicitly hidden template argument can cause a template installation to become hidden, even if the template itself has an explicit default visibility. This requires that we keep track of "late" additions of the visibility attribute. This is hopefully the last followup change. It just removes the caching of visibilities from types so that we can see new attributes even after a type has been used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f127eb8aeb3ce861f3dbc1adbb3362bfd98461e1 |
|
27-Feb-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Rename methods to comply with the LLVM Coding Standards. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
18895dc4fd29f0071eeb591be820338f16407906 |
|
27-Feb-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Change Type::getLinkageAndVisibility to return a LinkageInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
2beda12c3fbaa9125831b7f818680978c596b205 |
|
27-Feb-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Move LinkageInfo out of NamedDecl so that it can be used in Type.h. Everything that cares about visibility also cares about linkage, so I just moved it to Visibility.h instead of creating a new .h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
7728cddd7866fadd07f1191eee40985e3cdbc6bf |
|
23-Feb-2013 |
Peter Collingbourne <peter@pcc.me.uk> |
Revert r175912, "Add support for coldcc to clang" at John's request. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
4c67aa96401b67b5200e701cff87485067ab0792 |
|
22-Feb-2013 |
Peter Collingbourne <peter@pcc.me.uk> |
Add support for coldcc to clang git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
21f18c4fda167dc5f72feddbd6a7ac1b63200a0d |
|
07-Feb-2013 |
Guy Benyei <guy.benyei@intel.com> |
Add OpenCL samplers as Clang builtin types and check sampler related restrictions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
e6b9d802fb7b16d93474c4f1c179ab36202e8a8b |
|
20-Jan-2013 |
Guy Benyei <guy.benyei@intel.com> |
Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
838dc597e25614c653a062a124b06a04d6b7f5eb |
|
12-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Disable caching of visibility. The testcase in pr14929 shows that this is extremely hard to do. If we choose to apply the attribute, that causes the visibility of some decls to change and that can happen really late (during codegen). Current gcc warns and ignores the attribute in this testcase with a warning. This suggest that the correct solution is to find a point in the compilation where we can compute the visibility and * assert it was never computed before * reject any attempts to compute it again in the future (with warnings). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
aa46d513f47280a9786e8e9aa77f7089b3f8fee6 |
|
08-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Move ref qualifiers from Type bitfields into FunctionProtoType, stealing two bits from the number of parameters. This brings the bitfields down from 33 bits to 32 bits, reducing the size of Types by 4 bytes on 32-bit systems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
80ad52f327b532bded5c5b0ee38779d841c6cd35 |
|
02-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
s/CPlusPlus0x/CPlusPlus11/g git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
38980086c0f791e8c23cc882574f18e5b4a87db6 |
|
25-Dec-2012 |
Guy Benyei <guy.benyei@intel.com> |
Add intel_ocl_bicc calling convention as a function attribute to clang. The calling convention is already implemented in LLVM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
140aadf5b927ae294388c680a7db44e5de39578a |
|
25-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add 171048 back but invalidate the cache of all redeclarations when setting the body of a functions. The problem was that hasBody looks at the entire chain and causes problems to -fvisibility-inlines-hidden if the cache was not invalidated. Original message: Cache visibility of decls. This unifies the linkage and visibility caching. I first implemented this when working on pr13844, but the previous fixes removed the performance advantage of this one. This is still a step in the right direction for making linkage and visibility cheap to use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
eaf5ec43ec52f650a00254d1c20d51fb7671aead |
|
25-Dec-2012 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Revert r171048, "Cache visibility of decls." It broke stage2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
dfb316613a40d0efc033c7bd0a49da59c915fc63 |
|
25-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Cache visibility of decls. This unifies the linkage and visibility caching. I first implemented this when working on pr13844, but the previous fixes removed the performance advantage of this one. This is still a step in the right direction for making linkage and visibility cheap to use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
b13621d08e20ac7aa550e05896de8a57ee99c1e8 |
|
18-Dec-2012 |
Guy Benyei <guy.benyei@intel.com> |
Re-commit r170428 changes with Linux style file endings. Add OpenCL images as clang builtin types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
7f92f2d8d9b7a07900c030183bc13a9ff60057cc |
|
18-Dec-2012 |
Guy Benyei <guy.benyei@intel.com> |
Revert changes from r170428, as I accidentally changed the line endings of these files to Windows style. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
736104a7619c53ef92553780273d7357a3cdde81 |
|
18-Dec-2012 |
Guy Benyei <guy.benyei@intel.com> |
Add OpenCL images as clang builtin types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
2fa67efeaf66a9332c30a026dc1c21bef6c33a6c |
|
01-Dec-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't pull in all the generated Attr code. Required to pull some functions out of line, but this shouldn't have a perf impact. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
426391cd51af86f9d59eceb0fb1c42153eccbb9a |
|
16-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
A step towards sorting out handling of triviality of special members in C++11. Separate out the notions of 'has a trivial special member' and 'has a non-trivial special member', and use them appropriately. These are not opposites of one another (there might be no special member, or in C++11 there might be a trivial one and a non-trivial one). The CXXRecordDecl predicates continue to produce incorrect results, but do so in fewer cases now, and they document the cases where they might be wrong. No functionality changes are intended here (they will come when the predicates start producing the right answers...). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168119 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
8c88953ff0cebd861643ab92309aba71d23c306b |
|
14-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove another questionable use of hasTrivial*. The relevant thing for this test was whether the /selected/ operator= was trivial, not whether the class had any trivial (or any non-trivial) operator=s. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167897 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
263366f9241366f29ba65b703120f302490c39ff |
|
17-Oct-2012 |
Derek Schuff <dschuff@google.com> |
Add pnaclcall convention to Native Client targets. Because PNaCl bitcode must be target-independent, it uses some different bitcode representations from other targets (e.g. byval and sret for structures). This means that without additional type information, it cannot meet some native ABI requirements for some targets (e.g. passing structures containing unions by value on x86-64). To allow generation of code which uses the correct native ABIs, we also support triples such as x86_64-nacl, which uses target-dependent IR (as opposed to le32-nacl, which uses byval and sret). To allow interoperation between the two types of code, this patch adds a calling convention attribute to be used in code compiled with the target-dependent triple, which will generate code using the le32-style bitcode. This calling convention does not need to be explicitly supported in the backend because it determines bitcode representation rather than native conventions (the backend just needs to undersand how to handle byval and sret for the Native Client OS). This patch implements __attribute__((pnaclcall)) to generate calls in bitcode according to the le32 bitcode conventions, an attribute which is accepted by any Native Client target, but issues a warning otherwise. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
041ce8e00afd1185549a25d5c2b97d219ae032d9 |
|
03-Oct-2012 |
Jordan Rose <jordan_rose@apple.com> |
Teach getCXXRecordDeclForPointerType about references. Then, rename it getPointeeCXXRecordDecl and give it a nice doc comment, and actually use it. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165077 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
073819806ba2441e2a3e550107f1e756a6ee3ad0 |
|
26-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Teach Type::getAs<TemplateSpecializationType> that a TemplateSpecializationType for a type alias template can appear as sugar at any level of desugaring, just like a TypedefType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164655 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
255793d35bd5aa13ab2fd0b22f66b8e34698d8e0 |
|
05-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c++11: c++11 does not change pod-ness when type is an unqualified objc pointer in arc. Treat it just as being treated in c++98. This fixes a bogus vararg warning with -std=c++11. //rdar://12229679 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
6666ed4ed2e2bc13da5ac5d0a4947019137d45be |
|
31-Aug-2012 |
Joao Matos <ripzonetriton@gmail.com> |
Improved MSVC __interface support by adding first class support for it, instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
a6c66cedc022c9e5d45a937d6b8cff491a6bf81b |
|
31-Aug-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Change the representation of builtin functions in the AST (__builtin_* etc.) so that it isn't possible to take their address. Specifically, introduce a new type to represent a reference to a builtin function, and a new cast kind to convert it to a function pointer in the operand of a call. Fixes PR13195. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
b9d0b76e42fd2d4cdfd135220302458d03ad09fe |
|
27-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Final piece of core issue 1330: delay computing the exception specification of a defaulted special member function until the exception specification is needed (using the same criteria used for the delayed instantiation of exception specifications for function temploids). EST_Delayed is now EST_Unevaluated (using 1330's terminology), and, like EST_Uninstantiated, carries a pointer to the FunctionDecl which will be used to resolve the exception specification. This is enabled for all C++ modes: it's a little faster in the case where the exception specification isn't used, allows our C++11-in-C++98 extensions to work, and is still correct for C++98, since in that mode the computation of the exception specification can't fail. The diagnostics here aren't great (in particular, we should include implicit evaluation of exception specifications for defaulted special members in the template instantiation backtraces), but they're not much worse than before. Our approach to the problem of cycles between in-class initializers and the exception specification for a defaulted default constructor is modified a little by this change -- we now reject any odr-use of a defaulted default constructor if that constructor uses an in-class initializer and the use is in an in-class initialzer which is declared lexically earlier. This is a closer approximation to the current draft solution in core issue 1351, but isn't an exact match (but the current draft wording isn't reasonable, so that's to be expected). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
d8672ef2d343a0dbfe838724fb2d9fb4efea6041 |
|
16-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Related to PR11848 and core-21989: switch ContainsUnexpandedParameterPack from being a property of a canonical type to being a property of the fully-sugared type. This should only make a difference in the case where an alias template ignores one of its parameters, and that parameter is an unexpanded parameter pack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
912394028ddd1934d40ad3d44c6655472cae9ef7 |
|
16-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Revert change accidentally committed in r160240. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f5baeb4af53b79a0d92a4ab7b7eba19bd721f344 |
|
16-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13368: Halve the instantiation depth of this test again. Apparently, FreeBSD has a much lower default stack limit than the systems I have access to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
2df1a5819fd98708ff3b4772f3477f6c1a8da59a |
|
11-May-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[objc] When boxing a BOOL/NSInteger/NSUInteger type, use the corresponding numberWithBool:/numberWithInteger:/numberWithUnsignedInteger: NSNumber selectors. rdar://11428703 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
27a00970bf4ababdc115e54383e6252cc3276dfa |
|
05-May-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make BuiltinType::getName return a StringRef and introduce BuiltinType::getNameAsCString to get a const char* if necessary. This avoids unnecessary conversions when we want to use the result of getName as a StringRef. Part of rdar://10796159 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
8907832ddee33d8a0b0d8432d4c7470360353d67 |
|
28-Apr-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
isCXX98PODType: Avoid dispatch on the language standard when recursing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155758 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
152f6b7be508fbc61543f3736ebd390d7ac84bd1 |
|
28-Apr-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Rename isPODType (using the C++98 rules) into isCXX98PODType and make isPODType decide which one to use based on LangOptions. - -Wc++98-compat depends on the c++98 definition - Now __is_pod returns the right thing in c++11 and c++98 mode - All changes to the type traits test are validated against g++ 4.7 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
13bffc532bafd45d4a77867993c1afb83c7661be |
|
19-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR 12586: Fix assert while running libc++ testsuite: deal with exception specifications on member function templates of class templates and other such nested beasties. Store the function template from which we are to instantiate an exception specification rather than trying to deduce it. Plus some additional test cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
e6975e9b0985ad7f7ff9187e38d95bfe9ac4181b |
|
17-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement DR1330 in C++11 mode, to support libstdc++4.7 which uses it. We have a new flavor of exception specification, EST_Uninstantiated. A function type with this exception specification carries a pointer to a FunctionDecl, and the exception specification for that FunctionDecl is instantiated (if needed) and used in the place of the function type's exception specification. When a function template declaration with a non-trivial exception specification is instantiated, the specialization's exception specification is set to this new 'uninstantiated' kind rather than being instantiated immediately. Expr::CanThrow has migrated onto Sema, so it can instantiate exception specs on-demand. Also, any odr-use of a function triggers the instantiation of its exception specification (the exception specification could be needed by IRGen). In passing, fix two places where a DeclRefExpr was created but the corresponding function was not actually marked odr-used. We used to get away with this, but don't any more. Also fix a bug where instantiating an exception specification which refers to function parameters resulted in a crash. We still have the same bug in default arguments, which I'll be looking into next. This, plus a tiny patch to fix libstdc++'s common_type, is enough for clang to parse (and, in very limited testing, support) all of libstdc++4.7's standard headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
5a5a971908a1fd064454db44c42333a3aecf3d5b |
|
04-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
For PR11916: Add support for g++'s __int128 keyword. Unlike __int128_t, this is a type specifier and can be combined with unsigned. This allows libstdc++4.7 to be used with clang in c++98 mode. Several other changes are still required for libstdc++4.7 to work with clang in c++11 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d |
|
11-Mar-2012 |
David Blaikie <dblaikie@gmail.com> |
Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
cd485926f1ffda2eaa9adeea34e1e15c35ab5fba |
|
09-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
[AST] Type::isVoidType() is trivial and should be inlined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
76e035a529775dc8fd31124f819745a33a085796 |
|
08-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
[AST] Change Type::isIntegerType to be inlined(). It is very popular. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f9aa3635fccb3dc0925ef4d27dfa2b692a8e6a90 |
|
06-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
AST: Move several Type::is...Type() functions to be inline. - These functions are both (a) very commonly called and (b) excellent candidates for CSE in the callers in which they are commonly used. - That isHalfType() is hot makes me sad, but it is trivially when inlined (and a huge waste of time when not!!!). - The extra IsEnumDeclComplete() function is a hack to break the cycle between Type.h and Decl.h, I'm not sure of how to do this more cleanly, but am open to ideas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
e8e92b9dccc362be33a7f9bb84a114b18db65b10 |
|
19-Feb-2012 |
Ahmed Charles <ace2001ac@gmail.com> |
Remove dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
eefb3d5b49c844347f212073a7e975b8118fe8e9 |
|
10-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Track whether a function type has a trailing return type as type sugar. Use this to pretty-print such function types better, and to fix a case where we were not instantiating templates in lexical order. In passing, move the Variadic bit from Type's bitfields to FunctionProtoType to get the Type bitfields down to 32 bits. Also ensure that we always substitute the return type of a function when substituting explicitly-specified arguments, since that can cause us to bail out with a SFINAE error before we hit a hard error in parameter substitution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
200fa53fd420aa8369586f569dbece04930ad6a3 |
|
08-Feb-2012 |
John McCall <rjmccall@apple.com> |
Revise the SplitQualType interface to make it its own thing instead of a typedef of std::pair. This slightly improves type-safety, but mostly makes code using it clearer to read as well as making it possible to add methods to the type. Add such a method for efficiently single-step desugaring a split type. Add a method to single-step desugaring a locally-unqualified type. Implement both the SplitQualType and QualType methods in terms of that. Also, fix a typo ("ObjCGLifetime"). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
d7a3e2c5f61cd4893f95b69a424fe4def3aa0f69 |
|
07-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Revert my patches which removed Diagnostic.h includes by moving some operator overloads out of line. This seems to negatively affect compile time onsome ObjC tests (which use a lot of partial diagnostics I assume). I have to come up with a way to keep them inline without including Diagnostic.h everywhere. Now adding a new diagnostic requires a full rebuild of e.g. the static analyzer which doesn't even use those diagnostics. This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99. This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789. This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7. This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f. This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
6496bd10dc3a6d5e3266348f08b6e35f8184bc99 |
|
05-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move operator overload out of line. Calling operator<< on a forward declared type doesn't seem to work on MSVC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
00bd44d5677783527d7517c1ffe45e4d75a0f56f |
|
04-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move various diagnostic operator<< overloads out of line and remove includes of Diagnostic.h. Fix all the files that depended on transitive includes of Diagnostic.h. With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
b70126a328f89937f46db42f9e3cba1592887c91 |
|
03-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
When a pack expansion occurs in the template argument list of an alias template without a corresponding parameter pack, don't immediately substitute the alias template. This is under discussion in the C++ committee, and may become ill-formed, but for now we match GCC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
95b68f94d28a4b94f4c3fb029b9f1690e1bb728b |
|
26-Jan-2012 |
Peter Collingbourne <peter@pcc.me.uk> |
Simplify {Record,Enum}Type::classof. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
c0536c8294fc4453f0f1d1cf24a62bfc725fd492 |
|
25-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix PR11848: decree that an alias template contains an unexpanded parameter pack iff its substitution contains an unexpanded parameter pack. This has the effect that we now reject declarations such as this (which we used to crash when expanding): template<typename T> using Int = int; template<typename ...Ts> void f(Int<Ts> ...ints); The standard is inconsistent on how this case should be treated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
3026348bd4c13a0f83b59839f64065e0fcbea253 |
|
20-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
More dead code removal (using -Wunreachable-code) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
fa16125aaf667c2bd80efcea403a7a71aa65da14 |
|
15-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
decltype(e) is type-dependent if e is instantiation-dependent. Scary but true. Don't consider decltype(e) for an instantiation-dependent, but not type-dependent, e to be non-type-dependent but canonical(!). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
093ecc92afb70f6125d249eef31f40c0c57b7d24 |
|
14-Jan-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remember if a type has its visibility set explicitly or implicitly. With that, centralize the way we merge visibility, always preferring explicit over implicit and then picking the most restrictive one. Fixes pr10113 and pr11690. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
7ead5c7b6fd48cf549e55b4db499c26ecf88ae75 |
|
10-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Implement the missing pieces of Evaluate for _Complex types. With that complete, remove some code from CGExprConstant which is no longer necessary. While I'm here, a couple minor tweaks to _Complex-in-C++. (Specifically, make _Complex types literal types, and don't warn for _Complex int.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147840 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
d07cc36c71558b62889691184dd04655a33fd12a |
|
02-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Diagnose cases where the definition of a particular type is required, is known (to Clang), but is not visible because the module has not yet been imported. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
51201882382fb40c9456a06c7f93d6ddd4a57712 |
|
30-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Unrevert r147271, reverted in r147361. Also temporarily remove the assumption from IR gen that we can emit IR for every constant we can fold, since it isn't currently true in C++11, to fix PR11676. Original comment from r147271: constexpr: perform zero-initialization prior to / instead of performing a constructor call when appropriate. Thanks to Eli for spotting this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f8c2a33b6e47c494b83e68f02f4ee67ca8fd8e3b |
|
30-Dec-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert r147271. This fixes PR11676. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
eba05b2e396e1474f7bd6e8e8e1bd7752effef4d |
|
25-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: perform zero-initialization prior to / instead of performing a constructor call when appropriate. Thanks to Eli for spotting this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
7723fec9b45b7258c0eddf4cbfd0d335348f5edc |
|
15-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Keep track of all declarations of an Objective-C class (both forward declarations and definitions) as ObjCInterfaceDecls within the same redeclaration chain. This new representation matches what we do for C/C++ variables/functions/classes/templates/etc., and makes it possible to answer the query "where are all of the declarations of this class?" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
68a2dc446fe6d32d5da3557902100ed06b21b12b |
|
26-Oct-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Correctly perform integral promotions on wchar_t/char16_t/char32_t in C++. <rdar://problem/10309088>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
3c3b7f90a863af43fa63043d396553ecf205351c |
|
25-Oct-2011 |
John McCall <rjmccall@apple.com> |
Restore r142914 and r142915, now with missing file and apparent GCC compiler workaround. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
327a50f46449c946c42d50d97689bcb30e2af7d9 |
|
25-Oct-2011 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Revert r142914 and r142915, due to possibly missing file. r142914: "Introduce a placeholder type for "pseudo object"" r142915: "Pull the pseudo-object stuff into its own file." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
a1b852f8e1bee5ed3604ee483803cef39ce57a20 |
|
25-Oct-2011 |
John McCall <rjmccall@apple.com> |
Introduce a placeholder type for "pseudo object" expressions: expressions which refer to a logical rather than a physical l-value, where the logical object is actually accessed via custom getter/setter code. A subsequent patch will generalize the AST for these so that arbitrary "implementing" sub-expressions can be provided. Right now the only client is ObjC properties, but this should be generalizable to similar language features, e.g. Managed C++'s __property methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
0ddaeb9b031070ec64afe92d9892875ac44df427 |
|
17-Oct-2011 |
John McCall <rjmccall@apple.com> |
Add a new placeholder type to represent "unbridged" casts in ARC. No semantic analysis yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
aa4a99b4a62615db243f7a5c433169f2fc704420 |
|
15-Oct-2011 |
Anton Korobeynikov <asl@math.spbu.ru> |
Provide half floating point support as a storage only type. Lack of half FP was a regression compared to llvm-gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
5e1cdac63c3d9c9b32fa41fa0b2d242a58a20d49 |
|
07-Oct-2011 |
John McCall <rjmccall@apple.com> |
Rename TagDecl::isDefinition -> isCompleteDefinition for better self-documenting code, since the semantics are subtly different from getDefinition(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
b001de7458d17c17e6d8b8034c7cfcefd3b70c00 |
|
07-Oct-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Support for C1x _Atomic specifier (see testcase). This is primarily being committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic. Thanks to Jeffrey Yasskin for the thorough review! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
9f569cca2a4c5fb6026005434e27025b9e71309d |
|
01-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: semantic checking for constexpr functions and constructors. Based in part on patches by Peter Collingbourne. We diverge from the C++11 standard in a few areas, mostly related to checking constexpr function declarations, and not just definitions. See WG21 paper N3308=11-0078 for details. Function invocation substitution is not available in this patch; constexpr functions cannot yet be used from within constant expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
7426f793844407021ffeb5afcf917fff1a57f196 |
|
30-Sep-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
30c42404202d2e2512e51efc6066bd614cfdb5a4 |
|
28-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
When 'bool' is not a built-in type but is defined as a macro, print 'bool' rather than '_Bool' within types, to make things a bit more readable. Fixes <rdar://problem/10063263>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
85ea7aa961deac1d754f610af8062ae3f8b4e2a5 |
|
30-Aug-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Declare and define implicit move constructor and assignment operator. This makes the code duplication of implicit special member handling even worse, but the cleanup will have to come later. For now, this works. Follow-up with tests for explicit defaulting and enabling the __has_feature flag to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
af1fc7af351758b0ea0d285bdfe5640128109a4e |
|
15-Aug-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Track in the AST whether a function is constexpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
6b8bc0707f26aa6acfdd80a59b9a3850cafbe387 |
|
10-Aug-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Renamings to consistently use 'Constexpr' not 'ConstExpr' when referring to the C++0x 'constexpr' keyword. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
4d9d157afb35742bc6348defbe45bc6de780ec77 |
|
04-Aug-2011 |
Kaelyn Uhrain <rikka@google.com> |
Match type names and give more info for out-of-line function definition errors. Having a function declaration and definition with different types for a parameter where the types have same (textual) name can occur when an unqualified type name resolves to types in different namespaces in each location. The error messages have been extended by adding notes that point to the first parameter of the function definition that doesn't match the declaration, instead of a generic "member declaration nearly matches". The generic message is still used in cases where the mismatch is not in the paramenter list, such as mismatched cv qualifiers on the member function itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
91873b72bf01b7170f80154f3118300ff2eacd34 |
|
27-Jul-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Make CodeGen for array delete involving incomplete class work without crashing. Should fix regression on g++.dg/init/delete1.C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
5cee1195584fa8672253139c86e922daeda69b9e |
|
27-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Add support for C++0x unicode string and character literals, from Craig Topper! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
5f9e272e632e951b1efe824cd16acb4d96077930 |
|
23-Jul-2011 |
Chris Lattner <sabre@nondot.org> |
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports them into the clang namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f96e904783dc28b2b3fa4dcbb6dbdb40ca26aa8d |
|
12-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
In ARC mode, consider Objective-C lifetime types (object pointers and block pointers) that don't have any qualification to be POD types. We were previously considering them to be non-POD types, because this was convenient in C++ for is_pod-like traits. However, we now end up inferring lifetime in such cases (template arguments infer __strong), so it is not necessary. Moreover, we want rvalues of object type (which have their lifetime stripped) to be PODs to allow, e.g., va_arg(arglist, id) to function properly. Fixes <rdar://problem/9758798>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f1588660c109610e6a79c786b83b7c9bbd6ed31e |
|
12-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Improve name mangling for instantiation-dependent types that are not dependent. This covers an odd class of types such as int (&)[sizeof(sizeof(T() + T()))]; which involve template parameters but, because of some trick typically involving a form of expression that is never type-dependent, resolve down to a non-dependent type. Such types need to be mangled essentially as they were written in the source code (involving template parameters), rather than via their canonical type. In general, instantiation-dependent types should be mangled as they were written in the source. However, since we can't do that now without non-trivial refactoring of the AST (see the new FIXME), I've gone for this partial solution: only use the as-written-in-the-source mangling for these strange types that are instantiation-dependent but not dependent. This provides better compatibility with previous incarnations of Clang and with GCC. In the future, we'd like to get this right. Fixes <rdar://problem/9663282>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
6af9f3ca25157379efd5c1caad82e9d01c17b9ff |
|
12-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix the desugaring of dependent decltype and typeof(expr) nodes. The isSugared() and desugar() routines previously provided were never actually called, since the corresponding types (DependentTypeOfExprType, DependentDecltypeType) don't have corresponding type classes. Outside of the current (incomplete) patch I'm working on, I haven't found a way to trigger this problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
5e78cd43a033b3dedf741fca4fa1652f9cb3e41c |
|
12-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Allow us to compute linkage et al for instantiation-dependent types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
561f81243f665cf2001caadc45df505f826b72d6 |
|
01-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce the notion of instantiation dependence into Clang's AST. A type/expression/template argument/etc. is instantiation-dependent if it somehow involves a template parameter, even if it doesn't meet the requirements for the more common kinds of dependence (dependent type, type-dependent expression, value-dependent expression). When we see an instantiation-dependent type, we know we always need to perform substitution into that instantiation-dependent type. This keeps us from short-circuiting evaluation in places where we shouldn't, and lets us properly implement C++0x [temp.type]p2. In theory, this would also allow us to properly mangle instantiation-dependent-but-not-dependent decltype types per the Itanium C++ ABI, but we aren't quite there because we still mangle based on the canonical type in cases like, e.g., template<unsigned> struct A { }; template<typename T> void f(A<sizeof(sizeof(decltype(T() + T())))>) { } template void f<int>(A<sizeof(sizeof(int))>); and therefore get the wrong answer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
146060435c3efce95c95a092c7a1eb651cfb9ae0 |
|
30-Jun-2011 |
John McCall <rjmccall@apple.com> |
Preserve that a TemplateName was arrived at by substituting for a template template parameter. Uses to follow. I've also made the uniquing of SubstTemplateTemplateParmPacks use a ContextualFoldingSet as a minor space efficiency. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
1901dce8b1e78d0bf7072cccab695bd58c7eec21 |
|
30-Jun-2011 |
John McCall <rjmccall@apple.com> |
Document and check tighter assumptions about the TemplateName of a TemplateSpecializationType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
0c051221bd06fe1b24b9459292584e5264a131c5 |
|
28-Jun-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Merge some calls to FoldingSetNodeID::AddInteger; assuming my measurements aren't completely off, roughly a 1% speedup on SingleSource/UnitTests/ObjC/trivial-interface.m . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
bc8d7f9fd4346cfcc285868be32b74e019a40f01 |
|
20-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Restructure the API in Type based on a conversation with Richard Smith. This makes 'isPointerLikeType' a little less confusing, and pulls the decay check into a separate interface that is much more clear and concrete. Also, just implement these as logical wrappers around other predicates. Having a switch based implementation isn't likely to be necessary. We can try to optimize them later if they show up on a profile. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133405 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
2af68e4761ed30181540dafb5572993daffa4910 |
|
19-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Add test cases for false positives on -Wnull-arithmetic from Richard Trieu, and fix them by checking for array and function types as well as pointer types. I've added a predicate method on Type to bundle together the logic we're using here: isPointerLikeType(). I'd welcome better names for this predicate, this is the best I came up with. It's implemented as a switch to be a touch lighter weight than all the chained isa<...> casts that would result otherwise. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
1abd35950bcb0761887dca0995c68b8a9dc8916f |
|
14-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
When profiling FunctionProtoTypes, don't canonicalize the expression in a noexcept exception specification because it isn't part of the canonical type. This ensures that we keep the exact expression written in the noexcept exception specification, rather than accidentally "adopting" a previously-written and canonically "equivalent" function prototype. Fixes PR10087. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
ca63c200346c0ca9e00194ec6e34a5a7b0ed9321 |
|
25-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement a new type node, UnaryTransformType, designed to represent a type that turns one type into another. This is used as the basis to implement __underlying_type properly - with TypeSourceInfo and proper behavior in the face of templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
575a1c9dc8dc5b4977194993e289f9eda7295c39 |
|
20-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce Type::isSignedIntegerOrEnumerationType() and Type::isUnsignedIntegerOrEnumerationType(), which are like Type::isSignedIntegerType() and Type::isUnsignedIntegerType() but also consider the underlying type of a C++0x scoped enumeration type. Audited all callers to the existing functions, switching those that need to also handle scoped enumeration types (e.g., those that deal with constant values) over to the new functions. Fixes PR9923 / <rdar://problem/9447851>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
feb375d31b7e9108b04a9f55b721d5e0c793a558 |
|
13-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement the __is_trivially_copyable type trait git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
023df37c27ee8035664fb62f206ca58f4e2a169d |
|
09-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Rename "hasTrivialConstructor" to "hasTrivialDefaultConstructor" and modify the semantics slightly to accomodate default constructors (I hope). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
3e4c6c4c79a03f5cb0c4671d7c282d623c6dc35e |
|
05-May-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement support for C++0x alias templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
b6adf2c889bb17c1be44e6c8e67e3b2762e9cecc |
|
05-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Scoped enumerations should not be treated as integer types (in the C sense). Fixes <rdar://problem/9366066> by eliminating an inconsistency between C++ overloading (which handled scoped enumerations correctly) and C binary operator type-checking (which didn't). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
b7efff4bae117604f442bb6859c844f90b15f3ff |
|
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Switch the interface name for both TemplateTypeParmType and SubstTemplateTypeParmType to be 'getIdentifier' instead of 'getName' as it returns an identifier. This makes them more consistent with the NamedDecl interface. Also, switch back to using this interface to acquire the indentifier in TypePrinter.cpp. I missed this in r130628. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
4fb86f8c4585e53c21c847ad3de9e3b2de123cd9 |
|
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Re-applies the patch first applied way back in r106099, with accompanying fixes to make it work today. The core of this patch is to provide a link from a TemplateTypeParmType back to the TemplateTypeParmDecl node which declared it. This in turn provides much more precise information about the type, where it came from, and how it functions for AST consumers. To make the patch work almost a year after its first attempt, it needed serialization support, and it now retains the old getName() interface. Finally, it requires us to not attempt to instantiate the type in an unsupported friend decl -- specifically those coming from template friend decls but which refer to a specific type through a dependent name. A cleaner representation of the last item would be to build FriendTemplateDecl nodes for these, storing their template parameters etc, and to perform proper instantation of them like any other template declaration. They can still be flagged as unsupported for the purpose of access checking, etc. This passed an asserts-enabled bootstrap for me, and the reduced test case mentioned in the original review thread no longer causes issues, likely fixed at somewhere amidst the 24k revisions that have elapsed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
dc53159ba08ae9a435b89e53497906e79141c347 |
|
30-Apr-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove unused function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
769d0cc72b1831785596d0e76f327bdb887823be |
|
30-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
When comparing parameters of reference-to-qualified type during partial ordering of function templates, use a simple superset relationship rather than the convertibility-implying isMoreQualifiedThan/compatibilyIncludes relationship. Fixes partial ordering between references and address-space-qualified references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
25df423cfc6689cf21d51a66af84ea1e70d489df |
|
30-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Make type-traits reflect that Clang's vectors act like scalar types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
018a088b3b30e500efa9173f7cd4b1b1f6a065a8 |
|
30-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Switch the type-trait like APIs on the AST to only check for incomplete types after looking through arrays. Arrays with an unknown bound seem to be specifically allowed in the library type traits in C++0x, and GCC's builtin __is_trivial returns 'true' for the type 'int[]'. Now Clang agrees with GCC about __is_trivial here. Also hardens these methods against dependent types by just returning false. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
ec997dc66627957bcdcd3db7906a68c1e14a279c |
|
30-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Rename the last '[hH]asStandardLayout' entites to '[iI]sStandardLayout' based on Doug's preferences when we discussed this in IRC. This brings the wording more in line with the standard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
636a617cc6021a4366380b3ce673f4472f3d99db |
|
30-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Hoist all of the type-specific trait logic for __is_standard_layout into a Type method isStandardLayoutType, to keep our user API matching the type trait builtins as closely as possible. Also, implement it in terms of other Type APIs rather than in terms of other type traits. This models the implementation on that of isLiteralType and isTrivialType. There remain some common problems with these traits still, so this is a bit of a WIP. However, we can now fix all of these traits at the same time and in a consistent manner. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
a8225449421e8c1e996a7c48300521028946482a |
|
30-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Completely re-implement the core logic behind the __is_standard_layout type trait. The previous implementation suffered from several problems: 1) It implemented all of the logic in RecordType by walking over every base and field in a CXXRecordDecl and validating the constraints of the standard. This made for very straightforward code, but is extremely inefficient. It also is conceptually wrong, the logic tied to the C++ definition of standard-layout classes should be in CXXRecordDecl, not RecordType. 2) To address the performance problems with #1, a cache bit was added to CXXRecordDecl, and at the completion of every C++ class, the RecordType was queried to determine if it was a standard layout class, and that state was cached. Two things went very very wrong with this. First, the caching version of the query *was never called*. Even within the recursive steps of the walk over all fields and bases the caching variant was not called, making each query a full *recursive* walk. Second, despite the cache not being used, it was computed for every class declared, even when the trait was never used in the program. This probably significantly regressed compile time performance for edge-case files. 3) An ASTContext was required merely to query the type trait because querying it performed the actual computations. 4) The caching bit wasn't managed correctly (uninitialized). The new implementation follows the system for all the other traits on C++ classes by encoding all the state needed in the definition data and building up the trait incrementally as each base and member are added to the definition of the class. The idiosyncracies of the specification of standard-layout classes requires more state than I would like; currently 5 bits. I could eliminate one of the bits easily at the expense of both clarity and resilience of the code. I might be able to eliminate one of the other bits by computing its state in terms of other state bits in the definition. I've already done that in one place where there was a fairly simple way to achieve it. It's possible some of the bits could be moved out of the definition data and into some other structure which isn't serialized if the serialized bloat is a problem. That would preclude serialization of a partial class declaration, but that's likely already precluded. Comments on any of these issues welcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
43fa33b4bedc28d2faa17d678ad1f40eb42817a1 |
|
29-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Relax the non-POD memset warning to use the less restrictive C++11 definition of POD. Specifically, this allows certain non-aggregate types due to their data members being private. The representation of C++11 POD testing is pretty gross. Any suggestions for improvements there are welcome. Especially the name 'isCXX11PODType()' seems truly unfortunate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
5751838965eefa1c08e4fc545498a3ee45cd9611 |
|
29-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Don't assume that the AST methods will only be invoked on C++ types. Teaches isLiteralType and isTrivialType to behave plausibly and most importantly not crash on normal RecordDecls. Sadly I have no real way to test this. I stumbled onto it by mis-implementing a warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130483 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
20c0da7787c9a7d2529e42a4a91d777778595d74 |
|
28-Apr-2011 |
John Wiegley <johnw@boostpro.com> |
t/clang/type-traits Patch authored by John Wiegley. These type traits are used for parsing code that employs certain features of the Embarcadero C++ compiler. Several of these constructs are also desired by libc++, according to its project pages (such as __is_standard_layout). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
864c041e118155c2b1ce0ba36942a3da5a4a055e |
|
26-Apr-2011 |
John McCall <rjmccall@apple.com> |
Make yet another placeholder type, this one marking that an expression is a bound member function, i.e. something of the form 'x.f' where 'f' is a non-static member function. Diagnose this in the general case. Some of the new diagnostics are probably worse than the old ones, but we now get this right much more universally, and there's certainly room for improvement in the diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
9b6347cd410be55425f7062d22fd6e4ecb4e1a58 |
|
24-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Implement most of the remaining logic in __is_literal type trait. This should now support all of the C++98 types, and all of the C++0x types Clang supports. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
b7e9589bce9852b4db9575f55ac9137572147eb5 |
|
23-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Implement basic __is_trivial type-trait support, enough to close PR9472. This introduces a few APIs on the AST to bundle up the standard-based logic so that programmatic clients have access to exactly the same behavior. There is only one serious FIXME here: checking for non-trivial move constructors and move assignment operators. Those bits need to be added to the declaration and accessors provided. This implementation should be enough for the uses of __is_trivial in libstdc++ 4.6's C++98 library implementation. Ideas for more thorough test cases or any edge cases missing would be appreciated. =D git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
162e1c1b487352434552147967c3dd296ebee2f7 |
|
15-Apr-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Support for C++11 (non-template) alias declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
414d8967e1d760ea1e19a4aca96b13777a8cf8c5 |
|
14-Apr-2011 |
Anton Korobeynikov <asl@math.spbu.ru> |
Implement ARM pcs attribute. Basically it's another way of calling convention selection (AAPCS or AAPCS+VFP), similar to fastcall / stdcall / whatevercall seen on x86. In particular, all library functions should always be AAPCS regardless of floating point ABI used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
1de4d4e8cb2e9c88809fea8092bc6e835a5473d2 |
|
07-Apr-2011 |
John McCall <rjmccall@apple.com> |
Basic, untested implementation for an "unknown any" type requested by LLDB. The idea is that you can create a VarDecl with an unknown type, or a FunctionDecl with an unknown return type, and it will still be valid to access that object as long as you explicitly cast it at every use. I'm still going back and forth about how I want to test this effectively, but I wanted to go ahead and provide a skeletal implementation for the LLDB folks' benefit and because it also improves some diagnostic goodness for placeholder expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
759abb4d9ec14ae32104a9677b60f0542b60d1d8 |
|
06-Apr-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix lookup for class messages sent to qualified-class types such that protocols are seached first. Fixes // rdar://9224670 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
8026f6d82f7fa544bc0453714fe94bca62a1196e |
|
13-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Instead of storing an ASTContext* in FunctionProtoTypes with computed noexcept specifiers, unique FunctionProtoTypes with a ContextualFoldingSet, as suggested by John McCall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
60618fa7f88d5162bb5b40988b6b38d4d75d6fc6 |
|
12-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Propagate the new exception information to FunctionProtoType. Change the interface to expose the new information and deal with the enormous fallout. Introduce the new ExceptionSpecificationType value EST_DynamicNone to more easily deal with empty throw specifications. Update the tests for noexcept and fix the various bugs uncovered, such as lack of tentative parsing support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
8b5b4099c61a136e9a1714c4d8a593febe942268 |
|
06-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Reinstate r127112, "Propagate new-style exception spec information to ExtProtoInfo.", this time with the missing header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
708a86690469474f0a8149abca71aa4c62bf9710 |
|
06-Mar-2011 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Revert r127112, "Propagate new-style exception spec information to ExtProtoInfo." It seems missing "clang/Basic/ExceptionSpecificationType.h". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
06bfa84588658d721094f383d6950e75100c4c4c |
|
05-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Propagate new-style exception spec information to ExtProtoInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
9c6082fe89c61af697f017aa80937581cc2128d8 |
|
02-Mar-2011 |
Tilmann Scheller <tilmann.scheller@googlemail.com> |
Revert "Add CC_Win64ThisCall and set it in the necessary places." This reverts commit 126863. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
88d117c2eedd7c5bec57ac983a98d5e12bdd2cc6 |
|
02-Mar-2011 |
Tilmann Scheller <tilmann.scheller@googlemail.com> |
Add CC_Win64ThisCall and set it in the necessary places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
a88f09f34e86125ee4e6949a757aaed314012664 |
|
28-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the last remains of TemplateSpecializationTypes with dependent template names. There is still a lot of redundant code in TreeTransform to cope with TemplateSpecializationTypes, which I'll remove in stages. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
aa2187de137e5b809dcbbe14f3b61ae907a3d8aa |
|
28-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
When we encounter a dependent template name within a nested-name-specifier, e.g., T::template apply<U>:: represent the dependent template name specialization as a DependentTemplateSpecializationType, rather than a TemplateSpecializationType with a dependent TemplateName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
34b41d939a1328f484511c6002ba2456db879a29 |
|
20-Feb-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement the C++0x deduced 'auto' feature. This fixes PR 8738, 9060 and 9132. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126069 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
0d70d71ccbc4f7f59cadb759f61b7172a149676c |
|
13-Feb-2011 |
John McCall <rjmccall@apple.com> |
Look through array types when deciding whether a field requires non-trivial destruction in the destructor-aliases logic. Fixes PR 9197. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
c938c1668b4fd12af154e965dd935a89e4801a70 |
|
26-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Rvalue references for *this: - Add ref-qualifiers to the type system; they are part of the canonical type. Print & profile ref-qualifiers - Translate the ref-qualifier from the Declarator chunk for functions to the function type. - Diagnose mis-uses of ref-qualifiers w.r.t. static member functions, free functions, constructors, destructors, etc. - Add serialization and deserialization of ref-qualifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
3b6575108a5b6d8b92ac3a9a7794bf6c3a210907 |
|
19-Jan-2011 |
John McCall <rjmccall@apple.com> |
Change the canonical representation of array types to store qualifiers on the outermost array types and not on the element type. Move the CanonicalType member from Type to ExtQualsTypeCommonBase; the canonical type on an ExtQuals node includes the qualifiers on the ExtQuals. Assorted optimizations enabled by this change. getQualifiers(), hasQualifiers(), etc. should all now implicitly look through array types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
62c28c831bbf207cc36e683e7c321fc33bf8928c |
|
18-Jan-2011 |
John McCall <rjmccall@apple.com> |
Generalize some operations on qualifiers. QualType::getQualifiers() and ::getCVRQualifiers() now look through array types, like all the other standard queries. Also, make a 'split' variant of getUnqualifiedType(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
c3069d618f4661d923cb1b5c4525b082fce73b04 |
|
14-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Start implementing support for substitution into pack expansions that involve template parameter packs at multiple template levels that occur within the signatures members of class templates (and partial specializations thereof). This is a work-in-progress that is deficient in several ways, notably: - It only works for template type parameter packs, but we need to also support non-type template parameter packs and template template parameter packs. - It doesn't keep track of the lengths of the substituted argument packs in the expansion, so it can't properly diagnose length mismatches. However, this is a concrete step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123425 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
4ba2a17694148e16eaa8d3917f657ffcd3667be4 |
|
12-Jan-2011 |
Jay Foad <jay.foad@gmail.com> |
PR3558: mark "logically const" accessor methods in ASTContext as const, and mark the fields they use as mutable. This allows us to remove a few const_casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
7d5c0c1273bdc1cb3dff1cb5a62d07b1439e82c7 |
|
11-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the last bullet of [temp.deduct.type]p5 and part of the last sentence of [temp.deduct.call]p1, both of which concern the non-deducibility of parameter packs not at the end of a parameter-type-list. The latter isn't fully implemented yet; see the new FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f5c65ffbd7374b6c8d9f1e361041578640cab320 |
|
06-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement template argument deduction from a call to a function template whose last parameter is a parameter pack. This allows us to form a call to, e.g., template<typename ...Args1, typename ...Args2> void f(std::pair<Args1, Args2> ...pairs); given zero or more instances of "pair". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
3f59c975aa5d047f7edd1b900b5e885c38af0ef7 |
|
26-Dec-2010 |
Chris Lattner <sabre@nondot.org> |
The -fshort-wchar option causes wchar_t to become unsigned, in addition to being 16-bits in size. Implement this by splitting WChar into two enums, like we have for char. This fixes a miscompmilation of XULRunner, PR8856. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
e186269a8a41dbff1ebea2c251048892979d1078 |
|
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs in various kinds of declarations. This is a work in progress, as I go through the C++ declaration grammar to identify where unexpanded parameter packs can occur. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
bebbe0d9b7568ce43a464286bee49429489ef483 |
|
15-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Variadic templates: extend the Expr class with a bit that specifies whether the expression contains an unexpanded parameter pack, in the same vein as the changes to the Type hierarchy. Compute this bit within all of the Expr subclasses. This change required a bunch of reshuffling of dependency calculations, mainly to consolidate them inside the constructors and to fuse multiple loops that iterate over arguments to determine type dependence, value dependence, and (now) containment of unexpanded parameter packs. Again, testing is painfully sparse, because all of the diagnostics will change and it is more important to test the to-be-written visitor that collects unexpanded parameter packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
e23cf437fe76b1ed02d63c3f61b456fd48a915f5 |
|
14-Dec-2010 |
John McCall <rjmccall@apple.com> |
Restore r121752 without modification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
5bfe232d1f07a6fd160fcf82c277c055a412a1c0 |
|
14-Dec-2010 |
John McCall <rjmccall@apple.com> |
Pull out r121752 in case it's causing the selfhost breakage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121759 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
0e88aa7100da32acc63bc8a4dcb946ed517868f1 |
|
14-Dec-2010 |
John McCall <rjmccall@apple.com> |
Factor out most of the extra state in a FunctionProtoType into a separate class to be passed around. The line between argument and return types and everything else is kindof vague, but I think it's justifiable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
d0937224f383c7cc72c947119380f9713a070c73 |
|
13-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Variadic templates: extend Type, NestedNameSpecifier, TemplateName, and TemplateArgument with an operation that determines whether there are any unexpanded parameter packs within that construct. Use this information to diagnose the appearance of the names of parameter packs that have not been expanded (C++ [temp.variadic]p5). Since this property is checked often (every declaration, ever expression statement, etc.), we extend Type and Expr with a bit storing the result of this computation, rather than walking the AST each time to determine whether any unexpanded parameter packs occur. This commit is deficient in several ways, which will be remedied with future commits: - Expr has a bit to store the presence of an unexpanded parameter pack, but it is never set. - The error messages don't point out where the unexpanded parameter packs were named in the type/expression, but they should. - We don't check for unexpanded parameter packs in all of the places where we should. - Testing is sparse, pending the resolution of the above three issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
075f8f1b6bed4d1b224c74f87508534cc6392ce6 |
|
10-Dec-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added ParenType type node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
49f4e1cbd839da27ff4814b4ea6d85a79f786cbd |
|
10-Dec-2010 |
John McCall <rjmccall@apple.com> |
It's kindof silly that ExtQuals has an ASTContext&, and we can use that space better. Remove this reference. To make that work, change some APIs (most importantly, getDesugaredType()) to take an ASTContext& if they need to return a QualType. Simultaneously, diminish the need to return a QualType by introducing some useful APIs on SplitQualType, which is just a std::pair<const Type *, Qualifiers>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
9f71a8f4c7a182a5236da9e747d57cc1d1bd24c2 |
|
07-Dec-2010 |
Jay Foad <jay.foad@gmail.com> |
PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method trunc(), to be const and to return a new value instead of modifying the object in place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121121 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
b7b2688bab0eac053d3e2938b329c8e523fd252b |
|
01-Dec-2010 |
John McCall <rjmccall@apple.com> |
Eliminate vtables from the Type hierarchy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
7907fad723a0f4764a2396df620d9c58725b3053 |
|
30-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate more pointless default statements git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
aab440b2cb0e583aeaf21f08c8247456f3142a23 |
|
30-Nov-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Take John McCall's suggestion and fix this silly gcc warnings in a way that Doug isn't likely to rip back out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120409 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f402943e6a3b2cdffaf2644191fa1c1515722eea |
|
30-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
I hate pointless default statements git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
1b51e3b2cbf929a7acc126e9d659e67d819a11e7 |
|
30-Nov-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Add a default clause to avoid this GCC warning: Type.cpp:1000: warning: control reaches end of non-void function git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120376 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
bbd340717422bf011d56cd0164d2576601368111 |
|
30-Nov-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Incomplete enum types not to be treated as integer type when checking for integer signed/unsigned-ness. PR8694, // rdar://8707031 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
2a601eb4cd9190ed52cc1c990c5a8c5ee852bce6 |
|
29-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
I hate default statements git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
daa8e4e888758d55a7a759dd4a91b83921cef222 |
|
15-Nov-2010 |
John McCall <rjmccall@apple.com> |
Assorted work leading towards the elimination of CK_Unknown. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
af14603ca61757cf4361b583b45639a04c57e651 |
|
30-Oct-2010 |
John McCall <rjmccall@apple.com> |
Better solution: calculate the visibility of functions and variables independently of whether they're definitions, then teach IR generation to ignore non-explicit visibility when emitting declarations. Use this to make sure that RTTI, vtables, and VTTs get the right visibility. More of rdar://problem/8613093 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
1fb0caaa7bef765b85972274e3b434af2572c141 |
|
22-Oct-2010 |
John McCall <rjmccall@apple.com> |
Substantially revise how clang computes the visibility of a declaration to more closely parallel the computation of linkage. This gets us to a state much closer to what gcc emits, modulo bugs, which will undoubtedly arise in abundance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
b870b88df784c2940efce448ebfaf54dece14666 |
|
14-Oct-2010 |
John McCall <rjmccall@apple.com> |
At Fariborz's request, a somewhat cleaner bit-combining hack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
71c3673d1e3756d8ef3cbc559fcad1d0b2f18a1f |
|
14-Oct-2010 |
John McCall <rjmccall@apple.com> |
Compress bit fields / enums from ReferenceType, BuiltinType, FunctionType, and ObjCObjectType into Type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
db4d4bb03df52920cf379797a7ff5c9900f938a6 |
|
13-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a bit into Type that keeps track of whether there are any unnamed or local types within that type. This bit is cached along with the linkage of a type, so that it can be recomputed (e.g., when we see that a typedef has given a name to an anonymous declaration). Use this bit when checking C++03 [temp.arg.type]p2, so that we don't walk template argument types repeatedly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
35495eb14f22c4e96956912e23ca2a433227ad8c |
|
13-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Compute whether a type is variably modified as we build the type, rather than walking the type's structure every time we request this information. Performance optimization; no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116409 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
2cd11fefb62c580651e4269e1488381c2d6d07ad |
|
12-Oct-2010 |
John McCall <rjmccall@apple.com> |
Progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116287 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
1274ccd90aec0b205fc838c3d504821ccfb55482 |
|
09-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a bit by me). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
3ff83dd534ccc828203670ce3f5125a4eb4199f8 |
|
06-Oct-2010 |
John McCall <rjmccall@apple.com> |
Use a more conventional/efficient implementation for isEnumeralType() and isBuiltinType(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
56a965c0f77c9e6bffd65cc8f8796442a8527381 |
|
08-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Reverse r113397 until we decide what to do with use of 'struct objc_object*' for 'is' (and others) in clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113414 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
d1877953f06df6df9b2cd5fc04b49e80eec66019 |
|
08-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a crash when overloading id with objc_object*. Radar 8400356. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
607a1788d9529c8e8494ac528764aa2c678a1a97 |
|
08-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Allow (cv) void and incomplete arrays to be passed to the type traits. Fixes PR8110, and thus PR8109, PR8097, and parts of PR8101, PR8105 and PR8107. Only a few traits have tests for incomplete arrays, since I'm not yet clear what the result for them should be; Howards wants to file a DR to change the standard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
58f9e13e87e57236fee4b914eea9be6f92a1c345 |
|
05-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
make clang print types as "const int *" instead of "int const*", which is should have done from the beginning. As usual, the most fun with this sort of change is updating all the testcases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
37edc00b6a08dcb094d812782ea4bfedab3b6445 |
|
05-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
tidy up git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
52fc314e1b5e1baee6305067cf831763d02bd243 |
|
03-Sep-2010 |
Dawn Perchik <dawn@burble.org> |
Add symantic support for the Pascal calling convention via "__attribute((pascal))" or "__pascal" (and "_pascal" under -fborland-extensions). Support still needs to be added to llvm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
34fd628d22f54baddf30cf80c401b2f862a31b23 |
|
19-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR7911 and PR7921: make isIntegralOrEnumerationType return false for incomplete enum types. An incomplete enum can't really be treated as an "integral or enumeration" type, and the incorrect treatment leads to bad behavior for many callers. This makes isIntegralOrEnumerationType equivalent to isIntegerType; I think we should globally replace the latter with the former; thoughts? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
2767ce2e21d8bc17869b8436220bce719b3369e4 |
|
18-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Emit an error if an array is too large. We're slightly more strict than GCC 4.2 here when building 32-bit (where GCC will allow allocation of an array for which we can't get a valid past-the-end pointer), and emulate its odd behavior in 64-bit where it only allows 63 bits worth of storage in the array. The former is a correctness issue; the latter is harmless in practice (you wouldn't be able to use such an array anyway) and helps us pass a GCC DejaGNU test. Fixes <rdar://problem/8212293>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.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/AST/Type.cpp
|
1357869bc5983cdfbc986db1f3d18265bb34cb0e |
|
05-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Get rid of isObjectType; when C++ says "object type", it generally just means "not a function type", not "not a function type or void". This changes behavior slightly, but generally in a way which accepts more code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110303 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
7f584bbe9c2de8455bfb572d4ab571628c6c024e |
|
05-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Drop an unjustified limitation from Type::isObjectType(). Fixes PR7801 and doesn't seem to break anything. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
ed48a8faa10b6750f334540711c7b3949bbfb3ae |
|
02-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Remove mutable data on TagType and InjectedClassNameType, by instead walking the declaration chain in search of a definition. This is necessary for a sane chained PCH implementation. No observable performance change on Carbon.h syntax-only, and bootstraps cleanly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
d0221526bcc81f49eff5c992978176e83ada3bc7 |
|
30-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach isIncompleteType() to look through sugar when it is dealing with Objective-C object and interface types. This is part of PR7741. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
afb6416bf7f04a00c44092e802f335bb3636489c |
|
25-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Move Type destructor out-of-line git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
ff331c15729f7d4439d253c97f4d60f2a7ffd0c6 |
|
25-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove the vast majority of the Destroy methods from the AST library, since we aren't going to be calling them ever. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f60946222721d9ba3c059563935c17b84703187a |
|
23-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Vectors are not integer types, so the type system should not classify them as such. Type::is(Signed|Unsigned|)IntegerType() now return false for vector types, and new functions has(Signed|Unsigned|)IntegerRepresentation() cover integer types and vector-of-integer types. This fixes a bunch of latent bugs. Patch from Anton Yartsev! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
6398235d7890a81b785ea5af3b6e66d86bf184cc |
|
13-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Whenever we're creating an expression that is typically an rvalue (e.g., a call, cast, etc.), immediately adjust the expression's type to strip cv-qualifiers off of all non-class types (in C++) or all types (in C). This effectively extends my previous fix for PR7463, which was restricted to calls, to other kinds of expressions within similar characteristics. I've audited every use of getNonReferenceType() in the code base, switching to the newly-renamed getNonLValueExprType() where necessary. Big thanks to Eli for pointing out just how incomplete my original fix for PR7463 actually was. We've been handling cv-qualifiers on rvalues wrong for a very, very long time. Fixes PR7463. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
6dc1ef87044e6b177d4df0d2b593a94616180b3d |
|
13-Jul-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Silence Doug's favorite GCC warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108247 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
5291c3cec0dbe8ad1d8e7e67e93af2b1586d5400 |
|
13-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
When forming a function call or message send expression, be sure to strip cv-qualifiers from the expression's type when the language calls for it: in C, that's all the time, while C++ only does it for non-class types. Centralized the computation of the call expression type in QualType::getCallResultType() and some helper functions in other nodes (FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant callers of getResultType() to getCallResultType(). Fixes PR7598 and PR7463, along with a bunch of getResultType() call sites that weren't stripping references off the result type (nothing stripped cv-qualifiers properly before this change). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
00619623af0b9d3271e31402ec1a95e84c2c4526 |
|
23-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Vector types are not arithmetic types, either. Note that we now ban __real myvec and __imag myvec, since they aren't all that useful (it's just an identity function) but we might want to use them in more restricted cases in the future (e.g., "__real mycomplexvec" could extract the real parts of a vector of complex numbers). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
4b1317264037732fff3653ac6f494b124c726e1b |
|
23-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach Type::isRealType() that vector types are never real types. All of the callers of isRealType() already assumed this, and one of them (increment/decrement) mistakenly permitted increments of vector types because of it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
0c293ea13d452c1a47a05ada5a5ee9acc69c66cc |
|
23-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Type Type::isRealFloatingType() that vectors are not floating-point types, updating callers of both isFloatingType() and isRealFloatingType() accordingly. Caught at least one issue where we allowed one to declare a vector of vectors (!), along with cleaning up the standard-conversion logic for C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
8eee119bf4f1693dde17b8552c1f9f81bf2b681e |
|
23-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Change Type::isFloatingType() to reflect the actual definition of a "floating type" in C, which does not include vector types. Introduce Type::hasFloatingRepresentation() for the places where we want to know whether the underlying representation is one or more floating-point values. Remove some hacks we had where the former behavior of Type::isFloatingType() was at odds with the language definition of the term. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
9d3347a5887d2d25afe8b0bd35783a72ec86cce2 |
|
16-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Give Type::isIntegralType() an ASTContext parameter, so that it provides C "integer type" semantics in C and C++ "integral type" semantics in C++. Note that I still need to update isIntegerType (and possibly other predicates) using the same approach I've taken for isIntegralType(). The two should have the same meaning, but currently don't (!). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
2ade35e2cfd554e49d35a52047cea98a82787af9 |
|
16-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce Type::isIntegralOrEnumerationType(), to cover those places in C++ that involve both integral and enumeration types. Convert all of the callers to Type::isIntegralType() that are meant to work with both integral and enumeration types over to Type::isIntegralOrEnumerationType(), to prepare to eliminate enumeration types as integral types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
71d74bc0d6e522ce7c21a599db8e19d3883b518f |
|
13-Jun-2010 |
John McCall <rjmccall@apple.com> |
TemplateSpecializationType's isCurrentInstantiation bit can be derived from its canonical type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
ef99001908e799c388f1363b1e607dad5f5b57d3 |
|
11-Jun-2010 |
John McCall <rjmccall@apple.com> |
Don't store ASTContext references in the TST nodes just to support profiling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
33500955d731c73717af52088b7fc0e7a85681e7 |
|
11-Jun-2010 |
John McCall <rjmccall@apple.com> |
Split DependentNameType into two types. DependentNameType represents the case of an elaborated-type-specifier like 'typename A<T>::foo', and DependentTemplateSpecializationType represents the case of an elaborated-type-specifier like 'typename A<T>::template B<T>'. The TypeLoc representation of a DependentTST conveniently exactly matches that of an ElaboratedType wrapping a TST. Kill off the explicit rebuild methods for RebuildInCurrentInstantiation; the standard implementations work fine because the nested name specifier is computable in the newly-entered context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
a481ec4150ad203440852a2bfee0883dd26f7530 |
|
23-May-2010 |
Douglas Gregor <dgregor@apple.com> |
It turns out that people love using VLAs in templates, too. Weaken our VLA restrictions so that one can use VLAs in templates (even accidentally), but not as part of a non-type template parameter (which would be very bad). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104471 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
60e7064d78f1a29cf969f255a19a9ae25e6bc128 |
|
19-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Cache the linkage of a type within its canonical type, eliminating some seriously non-linear performance with deeply nested template instantiations, as shown in PR6998. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f813a2c03fcb05381b3252010435f557eb6b3cde |
|
18-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Add support for Microsoft's __thiscall, from Steven Watanabe! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
e175a6f6ede0ae31165a18ac8bf4e8d2681b39f8 |
|
18-May-2010 |
John McCall <rjmccall@apple.com> |
Comments and assorted cleanups for the Objective C type AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
bef0efd11bc4430a3ee437a3213cec5c18af855a |
|
13-May-2010 |
Chris Lattner <sabre@nondot.org> |
add a couple of key functions for classes without them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
465d41b92b2c862f3062c412a0538db65c6a2661 |
|
11-May-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Merged Elaborated and QualifiedName types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
bb6e73fcf60fa5a4cc36c14744dc366b658443b5 |
|
11-May-2010 |
Douglas Gregor <dgregor@apple.com> |
A DeclRefExpr that refers to a member function or a static data member of the current instantiation is value-dependent. The C++ standard fails to enumerate this case and, therefore, we missed it. Chandler did all of the hard work of reducing the last remaining Boost.PtrContainer failure (which had to do with static initialization in the Serialization library) down to this simple little test. While I'm at it, clean up the dependence rules for template arguments that are declarations, and implement the dependence rules for template argument packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
c96be1ea33cdf63d07cec48d18fe8e3afea48f8d |
|
27-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
During template instantiation, set the naming class of UnresolvedLookupExpr and UnresolvedMemberExpr by substituting the naming class we computed when building the expression in the template... ... which we didn't always do correctly. Teach UnresolvedMemberExpr::getNamingClass() all about the new representation of injected-class-names in templates, so that it can return a naming class that is the current instantiation. Also, when decomposing a template-id into its template name and its arguments, be sure to set the naming class on the LookupResult structure. Fixes PR6947 the right way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
31f17ecbef57b5679c017c375db330546b7b5145 |
|
27-Apr-2010 |
John McCall <rjmccall@apple.com> |
Make the InjectedClassNameType the canonical type of the current instantiation of a class template or class template partial specialization. That is to say, in template <class T> class A { ... }; or template <class T> class B<const T*> { ... }; make 'A<T>' and 'B<const T*>' sugar for the corresponding InjectedClassNameType when written inside the appropriate context. This allows us to track the current instantiation appropriately even inside AST routines. It also allows us to compute a DeclContext for a type much more efficiently, at some extra cost every time we write a template specialization (which can be optimized, but I've left it simple in this patch). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
fb87b89fc9eb103e19fb8e4b925c23f0bd091b99 |
|
26-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce Type::isStructureOrClassType(), which does the obvious thing. Audit all uses of Type::isStructure(), changing those calls to isStructureOrClassType() as needed (which is alsmost everywhere). Fixes the remaining failure in Boost.Utility/Swap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
4033642464e8ba0982f88f34cffad808d247b393 |
|
01-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Change the representation of dependent elaborated-type-specifiers (such as "class T::foo") from an ElaboratedType of a TypenameType to a DependentNameType, which more accurately models the underlying concept. Improve template instantiation for DependentNameType nodes that represent nested-name-specifiers, by performing tag name lookup and checking the resulting tag appropriately. Fixes PR5681. There is still much testing and cleanup to do in this area. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
db2eb5abf4c082d1f0c5c45e39d8cd0300f81e38 |
|
31-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove the AST statistics tracking I added yesterday; it didn't pan out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
4714c12a1ab759156b78be8f109ea4c12213af57 |
|
31-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Rename TypenameType to DependentNameType in anticipation of some refactoring work in this area. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
425ef72306d4ff6b3698b744353e5f0e56b4b884 |
|
31-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remember the regparm attribute in FunctionType::ExtInfo. Fixes PR3782. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
264ba48dc98f3f843935a485d5b086f7e0fdc4f1 |
|
30-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
the big refactoring bits of PR3782. This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute and fix the bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f540305c5d834ad9412b41805b81a74249b7c5af |
|
30-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce new AST statistics that keep track of the number of isa (or dyn_cast) invocations for C++ and Objective-C types, declarations, expressions, and statements. The statistics will be printed when -print-stats is provided to Clang -cc1, with results such as: 277073 clang - Number of checks for C++ declaration nodes 13311 clang - Number of checks for C++ expression nodes 18 clang - Number of checks for C++ statement nodes 174182 clang - Number of checks for C++ type nodes 92300 clang - Number of checks for Objective-C declaration nodes 9800 clang - Number of checks for Objective-C expression nodes 7 clang - Number of checks for Objective-C statement nodes 65733 clang - Number of checks for Objective-C type nodes The statistics are only gathered when NDEBUG is not defined, since they introduce potentially-expensive operations into very low-level routines (isa). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
2263f822c31d0855ca8c48bfd9624322bf776f0b |
|
09-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't error when a block pointer is passed to a vararg functions/methods. Fixes radar 7725203. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98070 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
19c8576b7328f4dc2d07682f5da552875c1912ef |
|
16-Feb-2010 |
John McCall <rjmccall@apple.com> |
Make the various type-decl Types (and their associated ASTContext routines) accept const decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
fd6a0887a099256c35a5b23e9afd517ffe95fa0a |
|
08-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate a pointer of storage in each ObjCInterfaceType and ObjCObjectPointerType AST node by allocating the list of protocols after the type node itself. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
04a67a6aa3dfdc92d57f7f8d93ba397348c868a4 |
|
05-Feb-2010 |
John McCall <rjmccall@apple.com> |
Standardize the parsing of function type attributes in a way that follows (as conservatively as possible) gcc's current behavior: attributes written on return types that don't apply there are applied to the function instead, etc. Only parse CC attributes as type attributes, not as decl attributes; don't accepet noreturn as a decl attribute on ValueDecls, either (it still needs to apply to other decls, like blocks). Consistently consume CC/noreturn information throughout codegen; enforce this by removing their default values in CodeGenTypes::getFunctionInfo(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f82b4e85b1219295cad4b5851b035575bc293010 |
|
04-Feb-2010 |
John McCall <rjmccall@apple.com> |
Allow calling convention attributes to apply to types. Patch by Chip Davis! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
0b6bc8bd7a1d2a7d7478d13d78cff94cacad61fc |
|
03-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
When a function or variable somehow depends on a type or declaration that is in an anonymous namespace, give that function or variable internal linkage. This change models an oddity of the C++ standard, where names declared in an anonymous namespace have external linkage but, because anonymous namespace are really "uniquely-named" namespaces, the names cannot be referenced from other translation units. That means that they have external linkage for semantic analysis, but the only sensible implementation for code generation is to give them internal linkage. We now model this notion via the UniqueExternalLinkage linkage type. There are several changes here: - Extended NamedDecl::getLinkage() to produce UniqueExternalLinkage when the declaration is in an anonymous namespace. - Added Type::getLinkage() to determine the linkage of a type, which is defined as the minimum linkage of the types (when we're dealing with a compound type that is not a struct/class/union). - Extended NamedDecl::getLinkage() to consider the linkage of the template arguments and template parameters of function template specializations and class template specializations. - Taught code generation to rely on NamedDecl::getLinkage() when determining the linkage of variables and functions, also considering the linkage of the types of those variables and functions (C++ only). Map UniqueExternalLinkage to internal linkage, taking out the explicit checks for isInAnonymousNamespace(). This fixes much of PR5792, which, as discovered by Anders Carlsson, is actually the reason behind the pass-manager assertion that causes the majority of clang-on-clang regression test failures. With this fix, Clang-built-Clang+LLVM passes 88% of its regression tests (up from 67%). The specific numbers are: LLVM: Expected Passes : 4006 Expected Failures : 32 Unsupported Tests : 40 Unexpected Failures: 736 Clang: Expected Passes : 1903 Expected Failures : 14 Unexpected Failures: 75 Overall: Expected Passes : 5909 Expected Failures : 46 Unsupported Tests : 40 Unexpected Failures: 811 Still to do: - Improve testing - Check whether we should allow the presence of types with InternalLinkage (in addition to UniqueExternalLinkage) given variables/functions internal linkage in C++, as mentioned in PR5792. - Determine how expensive the getLinkage() calls are in practice; consider caching the result in NamedDecl. - Assess the feasibility of Chris's idea in comment #1 of PR5792. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
aa74a1e49f7c4b89539830290f76fe2c3e97187f |
|
02-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement promotion for enumeration types. WHAT!?! It turns out that Type::isPromotableIntegerType() was not considering enumeration types to be promotable, so we would never do the promotion despite having properly computed the promotion type when the enum was defined. Various operations on values of enum type just "worked" because we could still compute the integer rank of an enum type; the oddity, however, is that operations such as "add an enum and an unsigned" would often have an enum result type (!). The bug actually showed up as a spurious -Wformat diagnostic (<rdar://problem/7595366>), but in theory it could cause miscompiles. In this commit: - Enum types with a promotion type of "int" or "unsigned int" are promotable. - Tweaked the computation of promotable types for enums - For all of the ABIs, treat enum types the same way as their underlying types (*not* their promotion types) for argument passing and return values - Extend the ABI tester with support for enumeration types git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
71842cc07aafdebc9b180322ebb46f530beca5d6 |
|
21-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Allocate the 'Protocols' array in ObjCInterfaceType and ObjCObjectPointerType using the allocator associated with ASTContext. Not only does this fix a memory leak, but it also makes these arrays BumpPtrAllocated (in the typical case). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
7c67395283dae28408138176cafec00c42987459 |
|
15-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Elaborated types are specifier types, based on a patch from Cornelius git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
20093b4bf698f292c664676987541d5103b65b15 |
|
10-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Reimplement reference initialization (C++ [dcl.init.ref]) using the new notion of an "initialization sequence", which encapsulates the computation of the initialization sequence along with diagnostic information and the capability to turn the computed sequence into an expression. At present, I've only switched one CheckReferenceInit callers over to this new mechanism; more will follow. Aside from (hopefully) being much more true to the standard, the diagnostics provided by this reference-initialization code are a bit better than before. Some examples: p5-var.cpp:54:12: error: non-const lvalue reference to type 'struct Derived' cannot bind to a value of unrelated type 'struct Base' Derived &dr2 = b; // expected-error{{non-const lvalue reference to ... ^ ~ p5-var.cpp:55:9: error: binding of reference to type 'struct Base' to a value of type 'struct Base const' drops qualifiers Base &br3 = bc; // expected-error{{drops qualifiers}} ^ ~~ p5-var.cpp:57:15: error: ambiguous conversion from derived class 'struct Diamond' to base class 'struct Base': struct Diamond -> struct Derived -> struct Base struct Diamond -> struct Derived2 -> struct Base Base &br5 = diamond; // expected-error{{ambiguous conversion from ... ^~~~~~~ p5-var.cpp:59:9: error: non-const lvalue reference to type 'long' cannot bind to a value of unrelated type 'int' long &lr = i; // expected-error{{non-const lvalue reference to type ... ^ ~ p5-var.cpp:74:9: error: non-const lvalue reference to type 'struct Base' cannot bind to a temporary of type 'struct Base' Base &br1 = Base(); // expected-error{{non-const lvalue reference to ... ^ ~~~~~~ p5-var.cpp:102:9: error: non-const reference cannot bind to bit-field 'i' int & ir1 = (ib.i); // expected-error{{non-const reference cannot ... ^ ~~~~~~ p5-var.cpp:98:7: note: bit-field is declared here int i : 17; // expected-note{{bit-field is declared here}} ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
ccf43505dbc47da041c06125f90b3bd3ac7eac97 |
|
03-Dec-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Introduce the notion of literal types, as specified in C++0x. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90361 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
d5532b6cfff2977e0c59fa6ead7f7973984a620d |
|
23-Nov-2009 |
John McCall <rjmccall@apple.com> |
Encapsulate "an array of TemplateArgumentLocs and two angle bracket locations" into a new class. Use it pervasively throughout Sema. My fingers hurt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
fa1a06e80706846fa15e0bd44671bdc3dfc53d84 |
|
17-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When querying type qualifiers on QualType via one of the "non-local" interfaces (which are used throughout the front end), combine the qualifiers on the QualType instance with the qualifiers on the canonical type to produce the set of qualifiers that, semantically, apply to that type. This should design away a large category of "qualifier-hidden-behind-a-typedef" buts like we saw in PR5383. Performance-wise, this caused a regression of ~0.5% on Cocoa.h, but it's totally worth it. We may actually be able to get a little more performance back by using CanQualType more often. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
788cd06cf8e868a67158aafec5de3a1f408d14f3 |
|
11-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new representation for template template parameters. Rather than storing them as either declarations (for the non-dependent case) or expressions (for the dependent case), we now (always) store them as TemplateNames. The primary change here is to add a new kind of TemplateArgument, which stores a TemplateName. However, making that change ripples to every switch on a TemplateArgument's kind, also affecting TemplateArgumentLocInfo/TemplateArgumentLoc, default template arguments for template template parameters, type-checking of template template arguments, etc. This change is light on testing. It should fix several pre-existing problems with template template parameters, such as: - the inability to use dependent template names as template template arguments - template template parameter default arguments cannot be instantiation However, there are enough pieces missing that more implementation is required before we can adequately test template template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86777 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
fee8a3c003a8894002810a6373bd5b895290974e |
|
10-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Move all of the type-printing logic to its own C++ source file git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
1c03ca30ae962199ef702324b48550f6af7fdc32 |
|
09-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
__uint128_t is indeed an unsigned integer type. Fixes PR5435. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
923d56d436f750bc1f29db50e641078725558a1b |
|
05-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Allow the element type of arrays to be incomplete in C++. This fixes PR5048. Also fix a bug where zero-sized arrays weren't warned about when the size was unsigned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86136 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
9c21289a866b677d21ed3d5ecfdfd5ced5a55410 |
|
03-Nov-2009 |
Mike Stump <mrs@apple.com> |
Refine codegen for covariant thunks that return references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
833ca991c1bfc967f0995974ca86f66ba1f666b5 |
|
29-Oct-2009 |
John McCall <rjmccall@apple.com> |
Track source information for template arguments and template specialization types. Preserve it through template instantiation. Preserve it through PCH, although TSTs themselves aren't serializable, so that's pretty much meaningless. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
54e14c4db764c0636160d26c5bbf491637c83a76 |
|
23-Oct-2009 |
John McCall <rjmccall@apple.com> |
When building types from declarators, instead of building two types (one for the DeclaratorInfo, one for semantic analysis), just build a single type whose canonical type will reflect the semantic analysis (assuming the type is well-formed, of course). To make that work, make a few changes to the type system: * allow the nominal pointee type of a reference type to be a (possibly sugared) reference type. Also, preserve the original spelling of the reference type. Both of these can be ignored on canonical reference types. * Remove ObjCProtocolListType and preserve the associated source information on the various ObjC TypeLocs. Preserve the spelling of protocol lists except in the canonical form. * Preserve some level of source type structure on parameter types, but canonicalize on the canonical function type. This is still a WIP. Drops code size, makes strides towards accurate source location representation, slight (~1.7%) progression on Cocoa.h because of complexity drop. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
01eb9b9683535d8a65c704ad2c545903409e2d36 |
|
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients are updated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
5ffe14ca96bd662de7820f6875d3f04789a640c1 |
|
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Move misc clients to IdentifierInfo StringRef API. - strcmp -> == - OS.write(II->getName() ...) -> OS << II->getNameStr() - Avoid std::string concatenation - Use getNameStr().str() when an std::string is really needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
e013d685c6689ac7ae103ee88acf573422d1ed6a |
|
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Move clients to use IdentifierInfo::getNameStart() instead of getName() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.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/AST/Type.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/AST/Type.cpp
|
24fab41057e4b67ed69a6b4027d5ae0f2f6934dc |
|
29-Sep-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce ObjCProtocolListType type subclass. This is used only for keeping detailed type source information for protocol references, it should not participate in the semantics of the type system. Its protocol list is not canonicalized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
cd01f17358dc8ef19338c0e2321138dd0a6160d9 |
|
29-Sep-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce Type::getTypeClassName() that returns the string associated with the TypeClass enum. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
183700f494ec9b6701b6efe82bcb25f4c79ba561 |
|
22-Sep-2009 |
John McCall <rjmccall@apple.com> |
Change all the Type::getAsFoo() methods to specializations of Type::getAs(). Several of the existing methods were identical to their respective specializations, and so have been removed entirely. Several more 'leaf' optimizations were introduced. The getAsFoo() methods which imposed extra conditions, like getAsObjCInterfacePointerType(), have been left in place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
1eb4433ac451dc16f4133a88af2d002ac26c58ef |
|
09-Sep-2009 |
Mike Stump <mrs@apple.com> |
Remove tabs, and whitespace cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
7da2431c23ef1ee8acb114e39692246e1801afc2 |
|
05-Sep-2009 |
John McCall <rjmccall@apple.com> |
Basic support for representing elaborated type specifiers directly in the AST. The current thinking is to create these only in C++ mode for efficiency. But for now, they're not being created at all; patch to follow. This will let us do things like verify that tags match during template instantation, as well as signal that an elaborated type specifier was used for clients that actually care. Optimally, the TypeLoc hierarchy should be adjusted to carry tag location information as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
6946baf3542dcb1ed0d98d0fdda451d1c39a49c2 |
|
02-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
When parsing typename specifiers (with either the identifier or simple-template-id form), check whether the scope specifier is computable as a declaration context rather than checking whether it is dependent, so that we properly cope with members of the current instantiation. Improve testing for typename specifiers that terminate in a simpe-template-id. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
2ec09f1dc123e1942ed756e8ee4fef86451eac9e |
|
31-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Canonicalize dependent extended vector types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
04d4beee4b86af20a9e4457023d3925cab8f9908 |
|
31-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Build canonical types for dependently-sized array types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77647 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
9d702ae1cd5cfa19d884cbef77e1df99395138bb |
|
31-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Canonicalization of dependent C++0x decltype types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
b197572cf1cd70a817a1f546478cb2cb9112c48e |
|
31-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Canonicalization for dependent typeof(expr) types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
6217b80b7a1379b74cced1c076338262c3c980b3 |
|
29-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Change uses of: Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsRecordType() -> Type::getAs<RecordType>() Type::getAsPointerType() -> Type::getAs<PointerType>() Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>() Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>() Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>() Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>() Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsTagType() -> Type::getAs<TagType>() And remove Type::getAsReferenceType(), etc. This change is similar to one I made a couple weeks ago, but that was partly reverted pending some additional design discussion. With Doug's pending smart pointer changes for Types, it seemed natural to take this approach. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
828e226ab7ed08b3eb766549e9d3306432137460 |
|
29-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Use the new statement/expression profiling code to unique dependent template arguments, as in template specialization types. This permits matching out-of-line definitions of members for class templates that involve non-type template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
a91d6a6619a91d0ca7102d8ab5678d855f04d850 |
|
29-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Code refactoring to define getCXXRecordDeclForPointerType and use it in several places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
7a1bcdf26d48c2c40e900a973f7ffca45f451526 |
|
28-Jul-2009 |
John McCall <rjmccall@apple.com> |
Reimplement QualifierSet using a single word, as requested by dgregor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
2455636163fdd18581d7fdae816433f886d88213 |
|
25-Jul-2009 |
Mike Stump <mrs@apple.com> |
Add noreturn as a type attribute, handle printing for them and handle calls to noreturn function pointers when CFG building. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
5e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766 |
|
24-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
This patch fixes the implementations of the __has_trivial_destructor and __has_trivial_constructor builtin pseudo-functions and additionally implements __has_trivial_copy and __has_trivial_assign, from John McCall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
bd1099efde211cbb63fce3feee4ebcc6bac58781 |
|
23-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Clean up the ActOnTag action, so that there is only a single entry point that covers templates and non-templates. This should eliminate the flood of warnings I introduced yesterday. Removed the ActOnClassTemplate action, which is no longer used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
470301bac9c8abfc6b451b3b669c6695a9fd1518 |
|
22-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6770276> Support Class<Proto> syntax. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
e7f38406a38f453e83000a1e52a5ec0aada66e51 |
|
18-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Re-enable 'test/SemaTemplate/temp_class_spec_neg.cpp', after commenting out the cause of the crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76337 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
e61ad0b7063fcd97204b1cce5558685144267eb6 |
|
18-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Fix typo from r76321. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
c15cb2af27514ecc879daba9aa01389c5203685d |
|
18-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Remove ObjCQualifiedInterfaceType:-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
35366a67baa970c287c714c957cf78a4131cf60d |
|
17-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methods until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
5cad1f74469d4d8b4fc51fe53a7837778aeb6107 |
|
17-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
808825cd08704d1cccef605f8cd3ef83c93eac78 |
|
17-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Replace Type::getAsReferenceType() with Type::getAs<ReferenceType>(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76132 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
1a1a6e2bd4c5aefd7fd643cf25915f9623a02e59 |
|
16-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Add member template 'Type::getAs<T>', which converts a Type* to a respective T*. This method is intended to eventually replace the individual Type::getAsXXXType<> methods. The motivation behind this change is twofold: 1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of them are basically copy-and-paste. 2) By centralizing the implementation of the getAs<Type> logic we can more smoothly move over to Doug Gregor's proposed canonical type smart pointer scheme. Along with this patch: a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>. b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
f5c209d23b20ada4a9b6235db50317239cbf6ae1 |
|
14-Jul-2009 |
Alisdair Meredith <public@alisdairm.net> |
Basic support for C++0x unicode types. Support for literals will follow in an incremental patch git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
6a75cd9c1d54625fca7b5477ab9545bcdbd85ea4 |
|
11-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Implement more of C++0x 'auto'. A variable with an auto type specifier must have an initializer. Also, move some tests around to match the C++0x draft better. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
563a03b1338d31c2462def43253a722bc885d384 |
|
10-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Fix a problem that Eli noticed, and that Doug helped me fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
d5940ce01c5f6235c88a8b92e80b86e5b5abe212 |
|
10-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Fix another decltype crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75175 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
dd0257c77719a13d4acd513df40b04300cbfc871 |
|
08-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
The canonical type of typeof or decltype with a dependent type is itself, not Context.DependentTy. I'll let Anders check in the test case for this one... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74975 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
7154a77e7c1f23418342d3b72836ab504aa7821e |
|
01-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Rework Sema::CheckConditionalOperands(). No functionality change. This was necessary to simplify some other changes I'm making (wrt ObjC type cleanups). The idea is to separate the constraint checks for block pointers, ObjC pointers, and C pointers (the previous code combined them into one clause). Note: This routine will be further simplified when I integrate the ObjC type cleanups (forthcoming). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74604 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
e4f2142d00fa5fdb580c4e2413da91882d955381 |
|
30-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Key decisions about 'bool' vs '_Bool' to be based on a new flag in langoptions. This is simple enough, but then I thought it would be nice to make PrintingPolicy get a LangOptions so that various things can key off "bool" and "C++" independently. This spiraled out of control. There are many fixme's, but I think things are slightly better than they were before. One thing that can be improved: CFG should probably have an ASTContext pointer in it, which would simplify its clients. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
e2bb224dee15d07bc9843acd4f3ded8eb0f835ed |
|
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
An auto variable can't appear in its own initializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
3d2065b6efaa62d345fc3a3d8a6651215e9767b2 |
|
25-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Extra asserts never hurt anybody, right? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
08fa2af5f60cdcb65b554ce2afe39016475cade4 |
|
24-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Type::getDesugaredType needs to handle decltype types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
395b475a4474f1c7574d927ad142ca0c7997cbca |
|
24-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Add a DecltypeType type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f6ddb737cb882ffbf0b75a9abd50b930cc2b9068 |
|
18-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Some cleanups suggested by Chris git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
9cdda0cf8528e3d595be9bfa002f0450074beb4d |
|
17-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Support dependent extended vector types and template instantiation thereof. Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73641 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
d01b1da213aeb71fd40ff7fb78a194613cc1ece7 |
|
15-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Add a new 'Pack' argument kind to TemplateArgument. This is not yet used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
38999462749c22d49d1e1707206aaa4997636f4c |
|
04-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate a warning git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72846 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
d560d5025a0e5b1942d99d5f39005337b03a64c2 |
|
04-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Template argument deduction for references git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
42f42c0dd5cf71fbfc6fa282d03079a902f6e342 |
|
30-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Expose an API to print a group of decls (like "int a,b;"). Make StmtPrinter use DeclPrinter to print all declarations. Merge declarations in the limited case of an unnamed TagDecl followed by one or more declarations using that TagDecl directly. Change SuppressTypeSpecifiers to the more general SuppressSpecifiers, and use it to suppress stuff like "typedef" and "extern". Replace OwnedTag with SuppressTag, since it's more convenient to print declarations from DeclPrinter at the moment. improvements to declaration printing. Fix pretty-printing for K&R function definitions and __builtin_va_arg. We're now to the point where the pretty-printing output for non-trivial programs can actually be piped back into clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
c8f2c61f4f667c2bc3e4e74b274fa397a4232393 |
|
30-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix some test failures involving -ast-print. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
22b61e937dcd8ba2e14764c367f975a392ec7da0 |
|
30-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add support for PrintingPolicy::SuppressTypeSpecifiers to type printing. (I have a work-in-progress patch which uses this.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
d249e1d1f1498b81314459ceda19d6ff25c278ad |
|
29-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Create a new PrintingPolicy class, which we pass down through the AST printing logic to help customize the output. For now, we use this rather than a special flag to suppress the "struct" when printing "struct X" and to print the Boolean type as "bool" in C++ but "_Bool" in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
465226e23a3008bd68973513dda1f9e3cd27dbdd |
|
28-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Reintroduce the home for exception specs, and make Sema fill it. However, keep the spec out of the canonical type this time. Net effect is currently nothing, because the spec isn't checked anywhere. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
446ee4eb4fc4c705a59365252df7a5c253daafa1 |
|
27-May-2009 |
Steve Naroff <snaroff@apple.com> |
Convert ObjC qualified type clients over to using iterators. This allows me to remove some API that I don't want to carry over to ObjCObjectPointerType. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
6409625011e4a11ff07956ff46a44d6ca4473992 |
|
22-May-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Parse typeof-specifier the same way as sizeof/alignof are parsed. -Makes typeof consistent with sizeof/alignof -Fixes a bug when '>' is in a typeof expression, inside a template type param: A<typeof(x>1)> a; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
7e06390f8a60440d6fc5f0e633acdc2edd8ee924 |
|
12-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Encapsulate template arguments lists in a new class, TemplateArgumentList. This avoids the need to pass around pointer/length pairs of template arguments lists, and will eventually make it easier to introduce member templates and variadic templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
7da97d0f31e1ec16998d3de2cfd2e88fe3736673 |
|
11-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement the semantics of the injected-class-name within a class template. The injected-class-name is either a type or a template, depending on whether a '<' follows it. As a type, the injected-class-name's template argument list contains its template parameters in declaration order. As part of this, add logic for canonicalizing declarations, and be sure to canonicalize declarations used in template names and template arguments. A TagType is dependent if the declaration it references is dependent. I'm not happy about the rather complicated protocol needed to use ASTContext::getTemplateSpecializationType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
6e8ed16ffef02b82995a90bdcf10ffff7d63839a |
|
10-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement C++0x nullptr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71405 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
bfa2fcba545fb270f31205d616846c2bfaf4e47e |
|
07-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Back out r70506 (exception spec in AST) again. We won't have exception specs until we've had a lot more discussion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71125 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
7b9a2ee5a4393001bdec7dec841eb7c811da492c |
|
30-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make a home for exception specs in the AST. Now Sema can hook them up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
f91f5c8a66ffd812f61819836529f8ad437f7e2b |
|
26-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add a bit more handling for declarations like "int a[*]". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
1efaa9594a81709a17658fd80ae7e783e1026407 |
|
24-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6821047 - clang crashes on subscript of interface in 64-bit mode Several changes here: 1. We change Type::isIncompleteType to realize that forward declared interfaces are incomplete. This eliminate special case code for this from the sizeof path, and starts us rejecting P[4] when P is a pointer to an incomplete interface. 2. Explicitly reject P[4] when P points to an interface in non-fragile ABI mode. 3. Switch the sizeof(interface) diagnostic back to an error instead of a warning in non-fragile abi mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
068360e16fa4504a6fb80affebae5c5713629a96 |
|
22-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
ObjCQualifiedClass is dead, remove it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
1734317845d60307d474b5da8a8d33adbaf5e723 |
|
01-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Parsing, semantic analysis, and template instantiation for typename specifiers that terminate in a simple-template-id, e.g., typename MetaFun::template apply<T1, T2> Also, implement template instantiation for dependent nested-name-specifiers that involve unresolved identifiers, e.g., typename T::type::type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
9bde77309fd2f9f7a53446e374472c48c81f5182 |
|
31-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Some cleanup and renaming. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
c45c232440dfafedca1a3773b904fb42609b1b19 |
|
31-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Parsing and AST representation for dependent template names that occur within nested-name-specifiers, e.g., for the "apply" in typename MetaFun::template apply<T1, T2>::type At present, we can't instantiate these nested-name-specifiers, so our testing is sketchy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
7532dc66648cfe7432c9fe66dec5225f0ab301c6 |
|
31-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve the representation of template names in the AST. This representation handles the various ways in which one can name a template, including unqualified references ("vector"), qualified references ("std::vector"), and dependent template names ("MetaFun::template apply"). One immediate effect of this change is that the representation of nested-name-specifiers in type names for class template specializations (e.g., std::vector<int>) is more accurate. Rather than representing std::vector<int> as std::(vector<int>) we represent it as (std::vector)<int> which more closely follows the C++ grammar. Additionally, templates are no longer represented as declarations (DeclPtrTy) in Parse-Sema interactions. Instead, I've introduced a new OpaquePtr type (TemplateTy) that holds the representation of a TemplateName. This will simplify the handling of dependent template-names, once we get there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
d57959af02b4af695276f4204443afe6e5d86bd8 |
|
28-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial implementation of parsing, semantic analysis, and template instantiation for C++ typename-specifiers such as typename T::type The parsing of typename-specifiers is relatively easy thanks to annotation tokens. When we see the "typename", we parse the typename-specifier and produce a typename annotation token. There are only a few places where we need to handle this. We currently parse the typename-specifier form that terminates in an identifier, but not the simple-template-id form, e.g., typename T::template apply<U, V> Parsing of nested-name-specifiers has a similar problem, since at this point we don't have any representation of a class template specialization whose template-name is unknown. Semantic analysis is only partially complete, with some support for template instantiation that works for simple examples. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
ab452ba8323d1985e08bade2bced588cddf2cc28 |
|
27-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Revamp our representation of C++ nested-name-specifiers. We now have a uniqued representation that should both save some memory and make it far easier to properly build canonical types for types involving dependent nested-name-specifiers, e.g., "typename T::Nested::type". This approach will greatly simplify the representation of CXXScopeSpec. That'll be next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
bad0e656c3732e3539a9cd6525de721d7e47408b |
|
24-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Type::isObjectType now implements the (more sensible) C++ definition of "object type" rather than the C definition of "object type". The difference is that C's "object type" excludes incomplete types such as struct X; However, C's definition also makes it far too easy to use isObjectType as a means to detect incomplete types when in fact we should use other means (e.g., Sema::RequireCompleteType) that cope with C++ semantics, including template instantiation. I've already audited every use of isObjectType and isIncompleteType to ensure that they are doing the right thing for both C and C++, so this is patch does not change any functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
24c46b3133b03e254877a680f92f035e56058a39 |
|
19-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Print the context of tag types as part of pretty-printing, e.g., struct N::M::foo git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
bad351822117eaf280081494e3dbe4a06c0dbfcf |
|
19-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Generalize printing of nested-name-specifier sequences for use in both QualifiedNameType and QualifiedDeclRefExpr. We now keep track of the exact nested-name-specifier spelling for a QualifiedDeclRefExpr, and use that spelling when printing ASTs. This fixes PR3493. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
e4e5b054b4917f0ee493bb2fda5b1ec749bfb9a1 |
|
19-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce a representation for types that we referred to via a qualified name, e.g., foo::x so that we retain the nested-name-specifier as written in the source code and can reproduce that qualified name when printing the types back (e.g., in diagnostics). This is PR3493, which won't be complete until finished the other tasks mentioned near the end of this commit. The parser's representation of nested-name-specifiers, CXXScopeSpec, is now a bit fatter, because it needs to contain the scopes that precede each '::' and keep track of whether the global scoping operator '::' was at the beginning. For example, we need to keep track of the leading '::', 'foo', and 'bar' in ::foo::bar::x The Action's CXXScopeTy * is no longer a DeclContext *. It's now the opaque version of the new NestedNameSpecifier, which contains a single component of a nested-name-specifier (either a DeclContext * or a Type *, bitmangled). The new sugar type QualifiedNameType composes a sequence of NestedNameSpecifiers with a representation of the type we're actually referring to. At present, we only build QualifiedNameType nodes within Sema::getTypeName. This will be extended to other type-constructing actions (e.g., ActOnClassTemplateId). Also on the way: QualifiedDeclRefExprs will also store a sequence of NestedNameSpecifiers, so that we can print out the property nested-name-specifier. I expect to also use this for handling dependent names like Fibonacci<I - 1>::value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
2fa8c2598c2615da4639b4e42e9079647bd3aea4 |
|
17-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
Fix Type::getDesugaredType() to remove all direct sugar on a type. For example, if we have a typedef of a typeof of int, we strip all the say down to int. This allows us to simplify the getAs* methods, and is the first step towards fixing PR3817 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
7c80bd64032e610c0dbd74fc0ef6ea334447f2fd |
|
17-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
ba49817c5b9f502602672861cf369fd0e53966e8 |
|
13-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for several more kinds of expressions: - C++ function casts, e.g., T(foo) - sizeof(), alignof() More importantly, this allows us to verify that we're performing overload resolution during template instantiation, with argument-dependent lookup and the "cached" results of name lookup from the template definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
df667e71b1daadeacb230cf94fc717843f1a138a |
|
10-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Extend the notion of active template instantiations to include the context of a template-id for which we need to instantiate default template arguments. In the TextDiagnosticPrinter, don't suppress the caret diagnostic if we are producing a non-note diagnostic that follows a note diagnostic with the same location, because notes are (conceptually) a part of the warning or error that comes before them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66572 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
98137534e612c274ba270af99d73429043957e53 |
|
10-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Add pretty-printing for class template specializations, e.g., 'struct A<double, int>' In the "template instantiation depth exceeded" message, print "-ftemplate-depth-N" rather than "-ftemplate-depth=N". An unnamed tag type that is declared with a typedef, e.g., typedef struct { int x, y; } Point; can be used as a template argument. Allow this, and check that we get sensible pretty-printing for such things. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
4e16d0478407b556c819b5836a3564a9fdee8d5f |
|
10-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
When pretty-printing an anonymous tag type that is associated with a typedef, use the name of the typedef rather than <anonymous> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
40808ce6ac04b102c3b56244a635d6b98eed6d97 |
|
10-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for ClassTemplateSpecializationTypes, such as replacing 'T' in vector<T>. There are a few aspects to this: - Extend TemplateArgument to allow arbitrary expressions (an Expr*), and switch ClassTemplateSpecializationType to store TemplateArguments rather than it's own type-or-expression representation. - ClassTemplateSpecializationType can now store dependent types. In that case, the canonical type is another ClassTemplateSpecializationType (with default template arguments expanded) rather than a declaration (we don't build Decls for dependent types). - Split ActOnClassTemplateId into ActOnClassTemplateId (called from the parser) and CheckClassTemplateId (called from ActOnClassTemplateId and InstantiateType). They're smart enough to handle dependent types, now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
c1efaecf0373f1a55c5ef4c234357cf726fc0600 |
|
28-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate CXXRecordType git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
72564e73277e29f6db3305d1f27ba408abb7ed88 |
|
27-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Create a new TypeNodes.def file that enumerates all of the types, giving them rough classifications (normal types, never-canonical types, always-dependent types, abstract type representations) and making it far easier to make sure that we've hit all of the cases when decoding types. Switched some switch() statements on the type class over to using this mechanism, and filtering out those things we don't care about. For example, CodeGen should never see always-dependent or non-canonical types, while debug info generation should never see always-dependent types. More switch() statements on the type class need to be moved over to using this approach, so that we'll get warnings when we add a new type then fail to account for it somewhere in the compiler. As part of this, some types have been renamed: TypeOfExpr -> TypeOfExprType FunctionTypeProto -> FunctionProtoType FunctionTypeNoProto -> FunctionNoProtoType There shouldn't be any functionality change... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
fb41ca86eeede2fce02933034cf8b6e5aea84b79 |
|
27-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Do not issue bogus error on __weak/__strong ivar access. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
fc705b84347e6fb4746a1a7e26949f64c2f2f358 |
|
26-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Make the type associated with a ClassTemplateSpecializationDecl be a nicely sugared type that shows how the user wrote the actual specialization. This sugared type won't actually show up until we start doing instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
68694ada8f4d8f6c4b00ea5b900df96428b28fc8 |
|
26-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Remove PointerLikeType. - Having pointers and references share a base was not a useful notion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
d461777e23204fe8c480302d8ff76f5847605da6 |
|
23-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Revert http://llvm.org/viewvc/llvm-project?view=rev&revision=65244. Remove support for "Class<P>". Will be making this an error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f7f52e7bf5a4dc36d45b98531e0b21e343fc19de |
|
21-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
More work to integrate newly added ObjCQualifiedClassType into the type system. This is necessary 'plumbing' to fix <rdar://problem/6497631> Message lookup is sometimes different than gcc's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
15509f4fe73f0e11a8cec602bce4d99d9454b7f6 |
|
21-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Add support for GCC ObjC extension "Class<protocol>". Sigh. Found while researching <rdar://problem/6497631> Message lookup is sometimes different than gcc's. Will never be seen in user code. Needed to pass dejagnu testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
08eddd946628718e1832d98fc292610252c78a62 |
|
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
pretty printing vector types should print the element type, not just the attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
afa74448a07a16c3146accbe0ff03e9c8b0995e5 |
|
19-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add Type::getAsFunctionNoProto git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
3b6b83b8311ecdfa43cbb37ccc38c107d3b8d88b |
|
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
minor name changes, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
d33d9c0cc0cfdcd0b10f35a6acdfb25da4a64f19 |
|
18-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Representation of objc gc's attribute using ExtQualType. Note that one test attr-objc-gc.m fails. I will fix this after removing these attributes from the Decl nodes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
4886a4204ff2b20bc226ce70d837de5fcd4a79ab |
|
17-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Simplified ExtQualType per Chris's feedback. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
59d16d1402d76a298ab7fc5f362e9d3dfd744aa5 |
|
17-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Added support for objc's gc attribute in ExtQualType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f11284ac87daa613bc7b30db9f54bd716d123222 |
|
17-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Renamed ASQualType to ExtQualType to reflect its more general use; as for, objc2's gc type attributes. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f98aba35e6c3da5aae61843fc01334939e4e12ec |
|
13-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Initial implementation of arbitrary fixed-width integer types. Currently only used for 128-bit integers. Note that we can't use the fixed-width integer types for other integer modes without other changes because glibc headers redefines (u)int*_t and friends using the mode attribute. For example, this means that uint64_t has to be compatible with unsigned __attribute((mode(DI))), and uint64_t is currently defined to long long. And I have a feeling we'll run into issues if we try to define uint64_t as something which isn't either long or long long. This doesn't get the alignment right in most cases, including the 128-bit integer case; I'll file a PR shortly. The gist of the issue is that the targets don't really expose the information necessary to figure out the alignment outside of the target description, so there's a non-trivial amount of work involved in getting it working right. That said, the alignment used is conservative, so the only issue with the current implementation is ABI compatibility. This makes it trivial to add some sort of "bitwidth" attribute to make arbitrary-width integers; I'll do that in a followup. We could also use this for stuff like the following for compatibility with gcc, but I have a feeling it would be a better idea for clang to be consistent between C and C++ modes rather than follow gcc's example for C mode. struct {unsigned long long x : 33;} x; unsigned long long a(void) {return x.x+1;} git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
5cdf82164dd7c2b2320d6735c63ace4331e0716d |
|
12-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce _Complex conversions into the function overloading system. Since C99 doesn't have overloading and C++ doesn't have _Complex, there is no specification for this. Here's what I think makes sense. Complex conversions come in several flavors: - Complex promotions: a complex -> complex conversion where the underlying real-type conversion is a floating-point promotion. GCC seems to call this a promotion, EDG does something else. This is given "promotion" rank for determining the best viable function. - Complex conversions: a complex -> complex conversion that is not a complex promotion. This is given "conversion" rank for determining the best viable function. - Complex-real conversions: a real -> complex or complex -> real conversion. This is given "conversion" rank for determining the best viable function. These rules are the same for C99 (when using the "overloadable" attribute) and C++. However, there is one difference in the handling of floating-point promotions: in C99, float -> long double and double -> long double are considered promotions (so we give them "promotion" rank), while C++ considers these conversions ("conversion" rank). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64343 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
dedb84afce2cf2e52a6360e200c2c40822022235 |
|
11-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
CHAR_BIT == 8 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
c15cb38a4ff717097b32532fbf761c71b1376a02 |
|
10-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Rudimentary checking of template arguments against their corresponding template parameters when performing semantic analysis of a template-id naming a class template specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
672c91db00d28187600dd18ef6c524ff45e95ef2 |
|
09-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
id<Foo> is a POD type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64175 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
5908e9f25bc9a334c99c095e0b1e6a515445be2d |
|
09-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate TemplateArg so that we only have a single kind of representation for template arguments. Also simplifies the interface for ActOnClassTemplateSpecialization and eliminates some annoying allocations of TemplateArgs. My attempt at smart pointers for template arguments lists is relatively lame. We can improve it once we're sure that we have the right representation for template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64154 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
55f6b14230c94272efbbcdd89a92224c8db9f225 |
|
09-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Start processing template-ids as types when the template-name refers to a class template. For example, the template-id 'vector<int>' now has a nice, sugary type in the type system. What we can do now: - Parse template-ids like 'vector<int>' (where 'vector' names a class template) and form proper types for them in the type system. - Parse icky template-ids like 'A<5>' and 'A<(5 > 0)>' properly, using (sadly) a bool in the parser to tell it whether '>' should be treated as an operator or not. This is a baby-step, with major problems and limitations: - There are currently two ways that we handle template arguments (whether they are types or expressions). These will be merged, and, most likely, TemplateArg will disappear. - We don't have any notion of the declaration of class template specializations or of template instantiations, so all template-ids are fancy names for 'int' :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
00e68e2cc5ce37cb95beb801cae73c0d1e9dda37 |
|
09-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Update new expression to make use of Declarator::getSourceRange(). References are not objects; implement this in Type::isObjectType(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64152 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
fab9d67cebb87be968e7ae31a3b549a5279b5d51 |
|
06-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve the representation of template type parameters. We now canonicalize by template parameter depth, index, and name, and the unnamed version of a template parameter serves as the canonical. TemplateTypeParmDecl no longer needs to inherit from TemplateParmPosition, since depth and index information is present within the type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
aaba5e346dffdbad5d1c42765a89e4a7afb0da67 |
|
04-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Basic representation of C++ class templates, from Andrew Sutton. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
d7eb846aaf5ee4a8d22c3cd0796d1e7229d46013 |
|
30-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch Type::isAggregateType to use the C++ definition of "aggregate type" rather than the C definition. We do this because both C99 and Clang always use "aggregate type" as "aggregate or union type", and the C++ definition includes union types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
3e9704981d7691fdd44913bf1786e8d760d8a627 |
|
27-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Remove many references to ASTContext::getAllocator(), replacing them with calls to the recently added placement new (which uses ASTContext's allocator for memory). Also added ASTContext::Deallocate(). This will simplify runtime replacement of ASTContext's allocator. Keeping the allocator private (and removing getAllocator() entirely) is also goodness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
8edef7c31d27fc9d5d163660702a8a7730a0d19f |
|
25-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make tentative parsing of pointer-to-member decls work, and fix other stuff pointed out by Doug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f30208ad5b334e93582e846a2a0c92f38a607b8a |
|
24-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add support for declaring pointers to members. Add serialization support for ReferenceType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
566c2ba743065ec090f5154d5c30cf593aa12a6e |
|
19-Jan-2009 |
Ted Kremenek <kremenek@apple.com> |
Allocate Types using ASTContext's 'Allocator' object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
2a18dfe292cf3c406a769c3672080970ac586345 |
|
12-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
some more minor asqualtype bugs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62064 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
4bbce9901f7296ab030c58f0877be0b042bd70d3 |
|
12-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
improve some more is*Type predicates to look through asqualtypes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62063 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
f728a4a05df2455e1c6e62173ab720a92cd4a074 |
|
12-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
simplify these predicates a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
64b45f7e0d3167f040841ac2920aead7f080730d |
|
05-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
PODness and Type Traits Make C++ classes track the POD property (C++ [class]p4) Track the existence of a copy assignment operator. Implicitly declare the copy assignment operator if none is provided. Implement most of the parsing job for the G++ type traits extension. Fully implement the low-hanging fruit of the type traits: __is_pod: Whether a type is a POD. __is_class: Whether a type is a (non-union) class. __is_union: Whether a type is a union. __is_enum: Whether a type is an enum. __is_polymorphic: Whether a type is polymorphic (C++ [class.virtual]p1). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
61366e9cd41a6dbde4e66416dac21269c8ac1d94 |
|
24-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Correct the order in which we cope with end-of-class-definition semantics and improve our handling of default arguments. Specifically, we follow this order: - As soon as the see the '}' in the class definition, the class is complete and we add any implicit declarations (default constructor, copy constructor, etc.) to the class. - If there are any default function arguments, parse them - If there were any inline member function definitions, parse them As part of this change, we now keep track of the the fact that we've seen unparsed default function arguments within the AST. See the new ParmVarDecl::hasUnparsedDefaultArg member. This allows us to properly cope with calls inside default function arguments to other functions where we're making use of the default arguments. Made some C++ error messages regarding failed initializations more specific. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
97e0179f1ae545e07d9f5e7c1d2ef5c5bab06676 |
|
21-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Did not mean to commit this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
8b33c087fc6d97064b6620c96c732ebc5c003fb2 |
|
21-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Handle VLA indexing git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
898574e7496ba8fd76290079d3a9d06954992734 |
|
06-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Introduce basic support for dependent types, type-dependent expressions, and value-dependent expressions. This permits us to parse some template definitions. This is not a complete solution; we're missing type- and value-dependent computations for most of the expression types, and we're missing checks for dependent types and type-dependent expressions throughout Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
72c3f314d92d65c050ee1c07b7753623c044d6c7 |
|
05-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Representation of template type parameters and non-type template parameters, with some semantic analysis: - Template parameters are introduced into template parameter scope - Complain about template parameter shadowing (except in Microsoft mode) Note that we leak template parameter declarations like crazy, a problem we'll remedy once we actually create proper declarations for templates. Next up: dependent types and value-dependent/type-dependent expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
39f34e97d6a468f0a7dfa5664c61217cffc65b74 |
|
24-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Migrate some stuff from NamedDecl::getName() to NamedDecl::getNameAsString() to make it more explicit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59937 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
a7fbf7282eadebaf1293d9f970b01fb57f4b0ae4 |
|
30-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Fix arithmetic type check git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58429 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
971c4fae6092976338b755af1d47dac07c8f16e3 |
|
24-Oct-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
-Add support for cv-qualifiers after function declarators. -Add withConst/withVolatile/withRestrict methods to QualType class, that return the QualType plus the respective qualifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
8e9bebdea69c590dedfbf27374114cb76fe12fbd |
|
21-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Preliminary support for function overloading git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57909 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
5620b50f8f81854b2a6fea16c69ff1853f8f4d9b |
|
05-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Make VectorType printing less broken. - Print size as number of elements times "sizeof(elt type)", not perfect but better than just printing the completely wrong type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
7360fda1efd88fd28ca2882579676dbd8569c181 |
|
19-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Implement second part of PR 2600: NSError** parameter may be null, and should be checked before being dereferenced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
a95d3750441ac8ad03e36af8e6e74039c9a3109d |
|
13-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Patch by Csaba Hruska! "Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch covers the AST library, but ignores Analysis lib." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
77a52233f7c0f162672652051bfe78b65ad4f789 |
|
12-Sep-2008 |
Douglas Gregor <dgregor@apple.com> |
Give string literals const element typesin C++, and cope with the deprecated C++ conversion from a string literal to a pointer-to-non-const-character git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
b381aac9bae6d608c72267dd0ed08ec6369e94e4 |
|
01-Sep-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
codegen constant data as such. add QualType::isConstant() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
5618bd4a52c45fbbb605e3ba885663b2164db8a3 |
|
27-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
First wave of changes to support "blocks" (an extension to C). This commit adds the declaration syntax (and associated type). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
46713efe13c89f4ec9cd9546c7b598fe7186089b |
|
09-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Handle WChar inside BuiltinType::getName(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
49aa7ff1245abd03e6e998e01302df31e4c6f8f6 |
|
07-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add CXXRecordType class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
c63a1f276f7b324fd9a4be82098b1c8f7bf30733 |
|
04-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
Finally fix PR2189. This makes a fairly invasive but important change to move getAsArrayType into ASTContext instead of being a method on type. This is required because getAsArrayType(const AT), where AT is a typedef for "int[10]" needs to return ArrayType(const int, 10). Fixing this greatly simplifies getArrayDecayedType, which is a good sign. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
c36d405a02fab41f6c45cb2bc750d64949742903 |
|
27-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
make "call foo.dump()" and "call foo->dump()" work in GDB, with QualTypes and Types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.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/AST/Type.cpp
|
62f5f7ffad57e0c2af2b308af3735351505937cb |
|
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
fix several problems with the protocol qualified id handling where id was implicit. First, fix canonical type handling of these, since protocol qualified id's are always canonical. Next, enhance SemaType to actually make these when used (instead of int) allowing them to actually be used when appropriate. Finally remove a bunch of logic relating to the mishandling of canonical types with protocol-qual id's. This fixes rdar://5986251 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
834a72ac74cf4ff07ba6215545dba3db578f8a07 |
|
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6095136, various crashes with incomplete enum types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
e8e4f928e51091c1f9c7f5b4595941e33dc0bfec |
|
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
minor cleanup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
cdce6d17be572ae49417022357906ce04b54137d |
|
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
use iterators instead of direct access to protocol list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
ad74a758189180b8ab8faea648e4766c3bfd7fcb |
|
28-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR2501; this patch makes usual arithmetic conversions for integers which have the same width and different signedness work correctly. (The testcase in PR2501 uses a comparison between long and unsigned int). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
39ba4aeca296b1c9f04bde7d9d3cbbf129f1abd3 |
|
10-Jun-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
-Changes to TagDecl: Added TagKind enum. Added getTagKind() method. Added convenience methods: isEnum(), isStruct(), isUnion(), isClass(). -RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
4b05b1dee6cc65ae61d93dab7edff72710f24589 |
|
21-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Add Destroy method to Types, making there destruction more harmonious with the destruction of Decls and Stmts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
213541a68a3e137d11d2cefb612c6cdb410d7e8e |
|
19-Apr-2008 |
Nate Begeman <natebegeman@mac.com> |
OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49942 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
99dc91422144483c20d1c7381bc9ac634b646b04 |
|
13-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
This patch is just the easy part of the class names patch, which allows the parsing of "class" in addition to "struct" and "union" to declare a record. So this patch allows: class C { }; class C c1; But it does not contain the lookup bits, so this won't work yet: C c2; Patch by Doug Gregor! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
1ee0700c7dbe3554df09b4558e0b35a53d487ff2 |
|
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Fix a really bad bug where type uniquing would merge a<x> with b<x> as the same type, because it did not include a/b in the hash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
eca7be6b7ebd93682eeaab2c71d59f2995dacdcc |
|
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
move ObjCQualifiedIdTypesAreCompatible out of ASTContext into Sema. While it is similar to the other compatibility predicates in ASTContext, it is not used by them and is different. In addition, greatly simplify ObjCQualifiedIdTypesAreCompatible and fix some canonical type bugs. Also, simplify my Type::getAsObjC* methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
368eefa081d12f0a265ee90ee8ec61b54168d57d |
|
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
clean up some logic in objc type handling. Specifically, make it so that there are QualType::getAsObjc* type methods, and make isa<ObjCInterfaceType> return true for ObjCQualifiedInterfaceType's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
37c1b78a20a09b0456aa5caa15e159027010ca22 |
|
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Use EnumType to simplify some code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
2daa5df1b53f7ef745d724771384409f6f5df5c1 |
|
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Make EnumType/RecordType classof predicates simpler and more efficient in some cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49287 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
5edb8bfe8472e7d7bf6a82386394ef27359eb846 |
|
06-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
add a helper EnumType object for asking about tagtypes for enums. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
bdcd637c29ec1540f912ea6860c88b910e78c329 |
|
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
add a common base class "PointerLikeType" for PointerType and ReferenceType, allowing them to be treated the same in some contexts. A suggestion for a better name is welcome :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
8527f82594d88002c036cd8833379670a0bce067 |
|
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
remove blank line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|
bda0b626e74513950405c27525af87e214e605e2 |
|
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Make a major restructuring of the clang tree: introduce a top-level lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/Type.cpp
|