History log of /external/clang/lib/Sema/SemaType.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a4de17562d13d7a8188108243c4cfbd52f33229a 04-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r256229

http://b/26987366

(cherry picked from commit 87d948ecccffea9e9e37d0d053b246e2d6d6c47b)

Change-Id: I10ca401a280e905253aafabad9118693a2f24ffb
/external/clang/lib/Sema/SemaType.cpp
b6d6993e6e6d3daf4d9876794254d20a134e37c2 01-Jul-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r239765

Change-Id: I0393bcc952590a7226af8c4b58534a8ee5fd2d99
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
3ea9e33ea25e0c2b12db56418ba3f994eb662c04 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r233350

Change-Id: I12d4823f10bc9e445b8b86e7721b71f98d1df442
/external/clang/lib/Sema/SemaType.cpp
0e2c34f92f00628d48968dfea096d36381f494cb 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master clang for rebase to r230699.

Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
/external/clang/lib/Sema/SemaType.cpp
176edba5311f6eff0cad2631449885ddf4fbc9ea 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master Clang for rebase to r222490.

Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/lib/Sema/SemaType.cpp
c568f1e98938584c0ef0b12ae5018ff7d90a4072 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

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

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

Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/lib/Sema/SemaType.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/Sema/SemaType.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/Sema/SemaType.cpp
579d45ff5f92c4f5e31213e31490acdc5bcc5567 20-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195154:
------------------------------------------------------------------------
r195154 | rafael | 2013-11-19 13:07:04 -0800 (Tue, 19 Nov 2013) | 15 lines

Further fixes when thiscall is the default for methods.

The previous patches tried to deduce the correct function type. I now realize
this is not possible in general. Consider

class foo {
template <typename T> static void bar(T v);
};
extern template void foo::bar(const void *);

We will only know that bar is static after a lookup, so we have to handle this
in the template instantiation code.

This patch reverts my previous two changes (but not the tests) and instead
handles the issue in DeduceTemplateArguments.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f0cc19f43d5e05dbd22d00faca8c093b7005be3f 19-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195163:
------------------------------------------------------------------------
r195163 | rsmith | 2013-11-19 14:47:36 -0800 (Tue, 19 Nov 2013) | 5 lines

PR9547: If we're parsing a simple-declaration that contains a tag definition,
and we see an ill-formed declarator that would probably be well-formed if the
tag definition were just missing a semicolon, use that as the diagnostic
instead of producing some other mysterious error.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f4966557bedd375dbf0909c8d94e092ddf0dc8de 18-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> The attached patch is a follow up from my previous one. The existing
logic was not handling typedefs as free functions. This was not
causing problems with the existing tests, but does with the microsoft
abi where they have to get a different calling convention.

I will try to refactor this into a method on Declarator in a second.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
cdf7cfc16b340a39e52be769d533049a88dca770 18-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Use the default method CC in GetFullTypeForDeclarator.

Before this patch explicit template instatiations of member function templates
were failing with the microsoft abi and 32 bits. This was happening because
the expected and computed function types had different calling conventions.

This patch fixes it by considering the default calling convention in
GetFullTypeForDeclarator.

This fixes pr17973.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
624bb5e59dbcc24efeee7dff12c9b48d2b5077e9 14-Nov-2013 Kevin Qin <Kevin.Qin@arm.com> [AArch64 neon] support poly64 and relevant intrinsic functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
45d3950e373412f395413c81a0310e8090508608 09-Oct-2013 Hans Wennborg <hans@hanshq.net> Tighten diagnostics for calling conventions on variadic functions

Follow-up from r192240.

This makes it an error to use callee-cleanup conventions on variadic
functions, except for __fastcall and __stdcall, which we ignore with
a warning for GCC and MSVC compatibility.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192308 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
3636fb126ffa22704c5eacb52fc5673247d8ad57 08-Oct-2013 Hans Wennborg <hans@hanshq.net> Turn error about fastcall variadic function into warning in MS mode (PR12535)

MSVC allows this and silently falls back to __cdecl for variadic functions.
This patch turns Clang's error into a warning in MS mode and adds a test
to make sure we generate correct code.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
d1a32c328bce903fb1b17fc8147b646be818298e 08-Oct-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Fix the calling convention for operator new in records

Summary:
Operator new, new[], delete, and delete[] are all implicitly static when
declared inside a record. CXXMethodDecl already knows this, but we need
to account for that before we pick the calling convention for the
function type.

Fixes PR17371.

Reviewers: rsmith

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8a3f9e46cb988d2c664395b21910091e3730ae82 01-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Remove support for arrays of runtime bound in C++1y, now they have been voted
out of the working paper. This reverts r179962 and r179992.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
fad9e13f3cb85198f0ee5af620ba81cd78574faa 26-Sep-2013 Faisal Vali <faisalv@yahoo.com> Implement a rudimentary form of generic lambdas.

Specifically, the following features are not included in this commit:
- any sort of capturing within generic lambdas
- generic lambdas within template functions and nested
within other generic lambdas
- conversion operator for captureless lambdas
- ensuring all visitors are generic lambda aware
(Although I have gotten some useful feedback on my patches of the above and will be incorporating that as I submit those patches for commit)

As an example of what compiles through this commit:

template <class F1, class F2>
struct overload : F1, F2 {
using F1::operator();
using F2::operator();
overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }
};

auto Recursive = [](auto Self, auto h, auto ... rest) {
return 1 + Self(Self, rest...);
};
auto Base = [](auto Self, auto h) {
return 1;
};
overload<decltype(Base), decltype(Recursive)> O(Base, Recursive);
int num_params = O(O, 5, 3, "abc", 3.14, 'a');

Please see attached tests for more examples.

This patch has been reviewed by Doug and Richard. Minor changes (non-functionality affecting) have been made since both of them formally looked at it, but the changes involve removal of supernumerary return type deduction changes (since they are now redundant, with richard having committed a recent patch to address return type deduction for C++11 lambdas using C++14 semantics).



Some implementation notes:

- Add a new Declarator context => LambdaExprParameterContext to
clang::Declarator to allow the use of 'auto' in declaring generic
lambda parameters

- Add various helpers to CXXRecordDecl to facilitate identifying
and querying a closure class

- LambdaScopeInfo (which maintains the current lambda's Sema state)
was augmented to house the current depth of the template being
parsed (id est the Parser calls Sema::RecordParsingTemplateParameterDepth)
so that SemaType.cpp::ConvertDeclSpecToType may use it to immediately
generate a template-parameter-type when 'auto' is parsed in a generic
lambda parameter context. (i.e we do NOT use AutoType deduced to
a template parameter type - Richard seemed ok with this approach).
We encode that this template type was generated from an auto by simply
adding $auto to the name which can be used for better diagnostics if needed.

- SemaLambda.h was added to hold some common lambda utility
functions (this file is likely to grow ...)

- Teach Sema::ActOnStartOfFunctionDef to check whether it
is being called to instantiate a generic lambda's call
operator, and if so, push an appropriately prepared
LambdaScopeInfo object on the stack.

- various tests were added - but much more will be needed.

There is obviously more work to be done, and both Richard (weakly) and Doug (strongly)
have requested that LambdaExpr be removed form the CXXRecordDecl LambdaDefinitionaData
in a future patch which is forthcoming.

A greatful thanks to all reviewers including Eli Friedman, James Dennett,
and especially the two gracious wizards (Richard Smith and Doug Gregor)
who spent hours providing feedback (in person in Chicago and on the mailing lists).
And yet I am certain that I have allowed unidentified bugs to creep in; bugs, that I will do my best to slay, once identified!

Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
41d0958281627882fbe2049fb887d741eabd3fe3 25-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> Refactor to use C++1y 'auto' semantics directly in lambdas with no specified
return type in C++1y mode. No functionality change intended. Extracted and
tweaked from a patch by Faisal Vali!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8adf837adc65b55a3f74643c02c1ee077dc26f06 20-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR17290: Use 'false' macro in fix-it hint for initializing a variable of type
_Bool in C, if the macro is defined. Also teach FixItUtils to look at whether
the macro was defined at the source location for which it is creating a fixit,
rather than looking at whether it's defined *now*. This is especially relevant
for analysis-based warnings which are delayed until end of TU.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
6aa7df9df93bcf2d6399f6e535ef74c132db40ec 18-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> If a variable template specialization with an incomplete array type is
referenced, try to instantiate its definition in order to complete the type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
2440fb1f91557912f8c43cb72201170254ae09f4 16-Sep-2013 Amara Emerson <amara.emerson@arm.com> Add error checking to reject neon_vector_type attribute on targets without NEON.

Patch by Artyom Skrobov.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b445cb9662067b7c7586815937b07828ede9bb49 13-Sep-2013 Aaron Ballman <aaron@aaronballman.com> vector_size cannot be applied to Booleans. Updated the semantic checking logic, as well as the comment and added a test case. Fixes PR12649

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
fbf6f5c8ac0a3feb9a5add5f9221a21f68ca487a 13-Sep-2013 Aaron Ballman <aaron@aaronballman.com> Updated the PCS calling convention to use the new checkStringLiteralArgument helper function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
d068607c136298bec0891d750389a55bac9f5c98 11-Sep-2013 Aaron Ballman <aaron@aaronballman.com> Tablegen now generates a StringSwitch for attributes containing enumeration arguments to map strings to the proper enumeration value. This makes error checking more consistent and reduces the amount of hand-written code required.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e2e9a517f6a6bd4caad5500243597c871a516da7 11-Sep-2013 Eli Friedman <eli.friedman@gmail.com> Remove unused class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b7165589b2eafc4b48d09a5914e21604ae580256 09-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> C++ modules: fix a bug where loading a declaration with some name would prevent
name lookup from lazily deserializing the other declarations with the same
name, by tracking a bit to indicate whether a name in a DeclContext might have
additional external results. This also allows lazier reconciling of the lookup
table if a module import adds decls to a pre-existing DC.

However, this exposes a pre-existing bug, which causes a regression in
test/Modules/decldef.mm: if we have a reference to a declaration, and a
later-imported module adds a redeclaration, nothing causes us to load that
redeclaration when we use or emit the reference (which can manifest as a
reference to an undefined inline function, a use of an incomplete type, and so
on). decldef.mm has been extended with an additional testcase which fails with
or without this change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
624421f98d8fcb8ed8ebc406da41217682159aa8 31-Aug-2013 Aaron Ballman <aaron@aaronballman.com> Consolidating the notion of a GNU attribute parameter with the attribute argument list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.cpp
63f25e6719e3920a04f66a80958b792ac268aedd 24-Aug-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
152b4e4652baedfceba1cd8115515629225e713f 22-Aug-2013 Manuel Klimek <klimek@google.com> Revert "Implement a rudimentary form of generic lambdas."

This reverts commit 606f5d7a99b11957e057e4cd1f55f931f66a42c7.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ecb5819a9e64fb654d46a3b270a286cc570c58ff 22-Aug-2013 Faisal Vali <faisalv@yahoo.com> Implement a rudimentary form of generic lambdas.

Specifically, the following features are not included in this commit:
- any sort of capturing within generic lambdas
- nested lambdas
- conversion operator for captureless lambdas
- ensuring all visitors are generic lambda aware


As an example of what compiles:

template <class F1, class F2>
struct overload : F1, F2 {
using F1::operator();
using F2::operator();
overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }
};

auto Recursive = [](auto Self, auto h, auto ... rest) {
return 1 + Self(Self, rest...);
};
auto Base = [](auto Self, auto h) {
return 1;
};
overload<decltype(Base), decltype(Recursive)> O(Base, Recursive);
int num_params = O(O, 5, 3, "abc", 3.14, 'a');

Please see attached tests for more examples.

Some implementation notes:

- Add a new Declarator context => LambdaExprParameterContext to
clang::Declarator to allow the use of 'auto' in declaring generic
lambda parameters

- Augment AutoType's constructor (similar to how variadic
template-type-parameters ala TemplateTypeParmDecl are implemented) to
accept an IsParameterPack to encode a generic lambda parameter pack.

- Add various helpers to CXXRecordDecl to facilitate identifying
and querying a closure class

- LambdaScopeInfo (which maintains the current lambda's Sema state)
was augmented to house the current depth of the template being
parsed (id est the Parser calls Sema::RecordParsingTemplateParameterDepth)
so that Sema::ActOnLambdaAutoParameter may use it to create the
appropriate list of corresponding TemplateTypeParmDecl for each
auto parameter identified within the generic lambda (also stored
within the current LambdaScopeInfo). Additionally,
a TemplateParameterList data-member was added to hold the invented
TemplateParameterList AST node which will be much more useful
once we teach TreeTransform how to transform generic lambdas.

- SemaLambda.h was added to hold some common lambda utility
functions (this file is likely to grow ...)

- Teach Sema::ActOnStartOfFunctionDef to check whether it
is being called to instantiate a generic lambda's call
operator, and if so, push an appropriately prepared
LambdaScopeInfo object on the stack.

- Teach Sema::ActOnStartOfLambdaDefinition to set the
return type of a lambda without a trailing return type
to 'auto' in C++1y mode, and teach the return type
deduction machinery in SemaStmt.cpp to process either
C++11 and C++14 lambda's correctly depending on the flag.

- various tests were added - but much more will be needed.

A greatful thanks to all reviewers including Eli Friedman,
James Dennett and the ever illuminating Richard Smith. And
yet I am certain that I have allowed unidentified bugs to creep in;
bugs, that I will do my best to slay, once identified!

Thanks!




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
5d937b3fe7832f8ffa0a258d1b037c64708e97c1 13-Aug-2013 Kaelyn Uhrain <rikka@google.com> Add hooks to ExternalSemaSource for after-the-fact diagnosis of
incomplete types, courtesy of Luke Zarko.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
30d237556fdd29b5075c990da953116225b95d9d 10-Aug-2013 Robert Wilhelm <robert.wilhelm@gmx.net> Omit llvm:: before StringRef and SmallString. We have using directive in include/clang/Basic/LLVM.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e2d20c9a539cdfa75db6382eb5a327a73e5e0e1b 02-Aug-2013 Tim Northover <tnorthover@apple.com> Remove rather oddly merged logic from AArch64 commit.

We seem to have ended up with both an inlined check of permitted NEON base
types and a call to a function.

Since the outer if was (I believe) strictly weaker than the one in the
function, there's no actual user-visible behaviour change, so no tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b793f0d3448a15277cd6b6cc4ba558ded39a8084 01-Aug-2013 Tim Northover <tnorthover@apple.com> AArch64: initial NEON support

Patch by Ana Pazos

- Completed implementation of instruction formats:
AdvSIMD three same
AdvSIMD modified immediate
AdvSIMD scalar pairwise

- Completed implementation of instruction classes
(some of the instructions in these classes
belong to yet unfinished instruction formats):
Vector Arithmetic
Vector Immediate
Vector Pairwise Arithmetic

- Initial implementation of instruction formats:
AdvSIMD scalar two-reg misc
AdvSIMD scalar three same

- Intial implementation of instruction class:
Scalar Arithmetic

- Initial clang changes to support arm v8 intrinsics.
Note: no clang changes for scalar intrinsics function name mangling yet.

- Comprehensive test cases for added instructions
To verify auto codegen, encoding, decoding, diagnosis, intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
9f939f75c64770c746d78579f75a49f9c657e426 30-Jul-2013 Aaron Ballman <aaron@aaronballman.com> Replacing err_attribute_argument_not_int with err_attribute_not_type_attr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
3cd6feb87a62fb52c31cbc83655d76ace020513f 30-Jul-2013 Aaron Ballman <aaron@aaronballman.com> err_attribute_not_string has been subsumed by err_attribute_argument_type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187400 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
1652ed1cd2cb63e0d0cb74c67a40d9dc5cab6b89 26-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Tighten type-checking for vector attributes.

Based on patch by Yunzhong Gao.

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

The fix here has two parts:

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

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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
baec77865b3ce64bb942dddc5dc2fada84ce5099 23-Jul-2013 Aaron Ballman <aaron@aaronballman.com> Added the attribute name to the err_attribute_wrong_number_arguments diagnostic for clarity; updated almost all of the affected test cases.

Thanks to Fariborz Jahanian for the suggestion!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
73883c3d9bf1a03e5c0240e5a8755d5bea07c386 23-Jul-2013 Aaron Ballman <aaron@aaronballman.com> Removed a redundant diagnostic and replaced it with a more standard one. Added a test case for the diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186942 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
437d43fa2c8e338de3285f4028f0578ddd1b8f80 23-Jul-2013 Aaron Ballman <aaron@aaronballman.com> Consolidate several attribute argument diagnostics into a single, selectable diagnostic. This makes the diagnostic more consistent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
fe6dec6efaf860ed3eb20ee13267f35129f7747a 19-Jul-2013 Aaron Ballman <aaron@aaronballman.com> Replace some existing type attribute diagnostics with a
single diagnostic that selects. No functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
658cd2c287b1a0b419f51cd18e5a48d4560d1c56 13-Jul-2013 David Blaikie <dblaikie@gmail.com> PR16214, PR14467: DebugInfo: use "RequireCompleteType" to decide when to emit the full definition of a type in -flimit-debug-info

This simplifies the core benefit of -flimit-debug-info by taking a more
systematic approach to avoid emitting debug info definitions for types
that only require declarations. The previous ad-hoc approach (3 cases
removed in this patch) had many holes.

The general approach (adding a bit to TagDecl and callback through
ASTConsumer) has been discussed with Richard Smith - though always open
to revision.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
7348454025693dd20a411c2bcaabd4460cb87559 26-Jun-2013 Joerg Sonnenberger <joerg@bec.de> Don't use unnamed local enums as template arguments.
Fixes -Werror bootstrap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
12df246d6dea2ee1f92c186f922f1afcf499647a 24-Jun-2013 Reid Kleckner <reid@kleckner.net> [AST] Introduce a new DecayedType sugar node

The goal of this sugar node is to be able to look at an arbitrary
FunctionType and tell if any of the parameters were decayed from an
array or function type. Ultimately this is necessary to implement
Microsoft's C++ name mangling scheme, which mangles decayed arrays
differently from normal pointers.

Reviewers: rsmith

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
cac18add73d095eaab600aefe27ea7174aec4922 20-Jun-2013 Nico Weber <nicolasweber@gmx.de> Lazily provide a __float128 dummy type in -std=gnu++11 mode.

This is needed to parse libstdc++ 4.7's type_traits, see PR13530.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ddb5a3926d715ab4354ca36117679e3f4d5d3e21 14-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Unify return type checking for functions and ObjC methods. Move all the
random checks for ObjC object return types to SemaType.cpp.

Fixes issue with ObjC method type checking reported on cfe-dev.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
0567a79130a251bf464ce21ecf3f8b9fb5207900 10-Jun-2013 Reid Kleckner <reid@kleckner.net> Use FPT::getArgTypes() instead of manually building ArrayRefs

Made significantly easier with git-clang-format.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.cpp
44ee0a710c59d8e6793189f903bae21c16814324 07-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Re-commit r183466 with a fix to make the TypeLoc casting machinery work
correctly in the presence of qualified types.

(I had to change the unittest because it was trying to cast a
QualifiedTypeLoc to TemplateSpecializationTypeLoc.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
aa9df09729fb8aee3e645549e95fcb413306a7aa 23-May-2013 Aaron Ballman <aaron@aaronballman.com> Adding in parsing and the start of semantic support for __sptr and __uptr pointer type qualifiers. This patch also fixes the correlated __ptr32 and __ptr64 pointer qualifiers so that they are truly type attributes instead of declaration attributes.

For more information about __sptr and __uptr, see MSDN: http://msdn.microsoft.com/en-us/library/aa983399.aspx

Patch reviewed by Richard Smith.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ee2f8f2f7c4eacfa305a29fcd916d63c650ca847 16-May-2013 Richard Trieu <rtrieu@google.com> Return QualType() when a too large array is attempting to be created. This
prevents further errors and some overflows in size calculations.
One overflow was previously triggering an assert.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
60e141e1f87211ca831de6821003d80fe20a06f3 04-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> Implement most of N3638 (return type deduction for normal functions).
Missing (somewhat ironically) is support for the new deduction rules
in lambda functions, plus PCH support for return type patching.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
14f78f4a11df4c06667e2cbb87eeb179e4cb46fe 04-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> Separate out and special-case the diagnostic for 'auto' in a
conversion-type-id, in preparation for this becoming valid in c++1y mode.
No functionality change; small diagnostic improvement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
58eb37036b47bbe7433f72d92a2cb60848507707 01-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> Fix PR15845: apparently MSVC does not support implicit int in C++ mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
a2c3646c35dd09d21b74826240aa916545b1873f 26-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Implement C++1y decltype(auto).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
39b0e269dc8895ecc0f92f08126d3082b2a837a8 21-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Disable VLA diagnostic in C++1y mode, and add some tests.

Still to do here:
- we have a collection of syntactic accepts-invalids to diagnose
- support non-PODs in VLAs, including dynamic initialization /
destruction
- runtime checks (and throw std::bad_array_length) for bad bound
- support VLA capture by reference in lambdas
- properly support VLAs in range-based for (don't recompute bound)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
d2615cc53b916e8aae45783ca7113b93de515ce3 03-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Add 178663 back.

http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb went back green
before it processed the reverted 178663, so it could not have been the culprit.

Revert "Revert 178663."

This reverts commit 4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41 03-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert 178663.

Looks like it broke http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb

Revert "Don't compute a patched/semantic storage class."

This reverts commit 8f187f62cb0487d31bc4afdfcd47e11fe9a51d05.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8f187f62cb0487d31bc4afdfcd47e11fe9a51d05 03-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't compute a patched/semantic storage class.

For variables and functions clang used to store two storage classes. The one
"as written" in the code and a patched one, which, for example, propagates
static to the following decls.

This apparently is from the days clang lacked linkage computation. It is now
redundant and this patch removes it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e93e2552e76ab704ec85919cc2c76f02b8b081ee 29-Mar-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Add more tests for r178297

This covers a few cases where the class of a member pointer is not a
CXXRecordDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
4bbae38abf4145b81a3bf8658968fdaa2a8941c1 28-Mar-2013 Reid Kleckner <reid@kleckner.net> [sema] Check the result of getAsCXXRecordDecl() to fix the build

I'm not 100% sure what should happen here to find the real
CXXRecordDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
edd2cb381e9c7a45354677c7fb6a93ae2a0080b7 28-Mar-2013 Reid Kleckner <reid@kleckner.net> [sema] Remove unused variable from r178283

Wouldn't it be cool if we had a compiler for Windows that could warn
about these things?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
84e9ab44af3a16f66d62590505db2036ef0aa03b 28-Mar-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Correctly compute the size of member pointers

Summary:
This also relaxes the requirement on Windows that the member pointer
class type be a complete type (http://llvm.org/PR12070). We still ask
for a complete type to instantiate any templates (MSVC does this), but
if that fails we continue as normal, relying on any inheritance
attributes on the declaration.

Reviewers: rjmccall

CC: triton, timurrrr, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
eb82a53aaa7880b7d3fd733aeee38b9aeee919ba 28-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> For -Wignored-qualifiers, don't warn on qualifiers which we acquire via a
typedef. Also don't warn on the _Atomic type specifier, just on the _Atomic
type qualifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8c952cd40ccec9d720931f27e7d722fed207d536 28-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> Teach -Wigored-qualifiers about exotic flavors of declarator and the _Atomic type qualifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
47681531ce5330b0bb42d4a7882ddd258e34de26 28-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> Remove outdated FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
4cf4a5e96ab0babd13774b17112e7c1d83042ea7 28-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> Support C11 _Atomic type qualifier. This is more-or-less just syntactic sugar for the _Atomic type specifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
93d6b07cd79d74e343d81c0e8fb5365376a33097 28-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> Fold together the two implementations of 6.7.3p2 in SemaType. Fix two bugs, each of which was only present in one version:
* Give the right diagnostic for 'restrict' applied to a non-pointer, non-reference type.
* Don't reject 'restrict' applied indirectly to an Objective-C object pointer type (eg, through template instantiation).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
9807a2e0ddb1eafb8725dbf0247271a4a694037b 28-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> Don't reject __restrict applied to a dependent type; it might instantiate to a pointer or reference type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178198 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
0918989f0eed08870e50418df97d1486d977d773 08-Mar-2013 Jordan Rose <jordan_rose@apple.com> Sema: Preserve attributes on parameters in instantiated function templates.

This was causing correctness issues for ARC and the static analyzer when a
function template has "consumed" Objective-C object parameters (i.e.
parameters that will be released by the function before returning).

The fix is threefold:
(1) Actually copy over the attributes from old ParmVarDecls to new ones.
(2) Have Sema::BuildFunctionType only work for building FunctionProtoTypes,
which it was doing anyway. This allows us to pass an ExtProtoInfo
instead of a plain ExtInfo and several flags.
(3) Drop param attributes as part of StripImplicitInstantiation, which is
used when an implicit instantiation is followed by an explicit one.

<rdar://problem/12685622>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
41f3f3a4792f46787632fdb94f952f6b3ce3f4ae 05-Mar-2013 Jordan Rose <jordan_rose@apple.com> Silence a number of static analyzer warnings with assertions and such.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b2381b1c91ac5dc2407e98f36e3a6ba93d771791 01-Mar-2013 John McCall <rjmccall@apple.com> Attempt to not place ownership qualifiers on the result type
of block declarators. Document the rule we use.

Also document the rule that Doug implemented a few weeks ago
which drops ownership qualifiers on function result types.

rdar://10127067

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.cpp
d5668a2447c2afeea38815b51a80a5a6ac235599 22-Feb-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> When a parameter list in a C function has an error, recover by forming a K&R function,
instead of a non-function type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
66874fb18afbffb8b2ca05576851a64534be3352 21-Feb-2013 David Blaikie <dblaikie@gmail.com> Use None rather than Optional<T>() where possible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
dc84cd5efdd3430efb22546b4ac656aa0540b210 20-Feb-2013 David Blaikie <dblaikie@gmail.com> Include llvm::Optional in clang/Basic/LLVM.h

Post-commit CR feedback from Jordan Rose regarding r175594.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
6b3d3e54c003b03f16e235ad2ff49e95587bbf92 20-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> Process and handle attributes on conditions and for loop variables. Process and
diagnose attributes on alias declarations, using directives, and attribute
declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
39e6ab4be93d9c5e729a578ddd9d415cd2d49872 18-Feb-2013 David Blaikie <dblaikie@gmail.com> Replace TypeLoc llvm::cast support to be well-defined.

The TypeLoc hierarchy used the llvm::cast machinery to perform undefined
behavior by casting pointers/references to TypeLoc objects to derived types
and then using the derived copy constructors (or even returning pointers to
derived types that actually point to the original TypeLoc object).

Some context is in this thread:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056804.html
Though it's spread over a few months which can be hard to read in the mail
archive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
9dd74c5504c743c96ea3a1d691d6a75ec3a98147 12-Feb-2013 John McCall <rjmccall@apple.com> Diagnose loads of 'half' l-values in OpenCL.
Patch by Joey Gouly!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
d03de6aaa312d57dcd6e2bc76bed1e89f5c5019d 29-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Downgrade 'attribute ignored when parsing type' from error to warning, to match
the diagnostic's warn_ name. Switch some places (notably C++11 attributes)
which really wanted an error over to a different diagnostic. Finally, suppress
the diagnostic entirely for __ptr32, __ptr64 and __w64, to avoid producing
diagnostics in important system headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
5cd532ca0bc1cb8110e24586d064f72332d8b767 29-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Replace AS_MSTypespec with AS_Keyword, for representing any attribute spelled
as a keyword. Rationalize existing attributes to use it as appropriate, and to
not lie about some __declspec attributes being GNU attributes. In passing,
remove a gross hack which was discarding attributes which we could handle. This
results in us actually respecting the __pascal keyword again.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b8b2c9da87e7d70a1679db026f40548b3192b705 25-Jan-2013 John McCall <rjmccall@apple.com> First pass at abstracting out a class for the target C++ ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
630f4bb9f12e330438281c4e46deb6656620b73a 23-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Implement -Wvla correctly

GCC implements -Wvla as "warn on every VLA" (this is useful to find every VLA,
for example, if they are forbidden by coding guidelines). Currently Clang
implements -Wvla as "warn on VLA when it is an extension".

The attached patch makes our behavior match GCC. The existing vla extwarn is
moved under -Wvla-extension and is still included into -Wgnu.

This fixes PR5953.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
19dbb20ac4371fae3190379a7e7bd467af3c00aa 23-Jan-2013 Joey Gouly <joey.gouly@arm.com> Add a new LangOpt NativeHalfType. This option allows for native half/fp16
operations (as opposed to storage only half/fp16).

Also add some semantic checks for OpenCL half types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
02dd79830979e6d83d4420377e8f4c9e4a77439b 18-Jan-2013 Douglas Gregor <dgregor@apple.com> In Objective-C ARC, completely ignore ownership qualifiers on the
return type of a function by canonicalizing them away. They are
useless anyway, and conflict with our rules for template argument
deduction and __strong. Fixes <rdar://problem/12367446>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
617bb317a7aeb6c3468a4170a5d6c1058da7cea1 17-Jan-2013 Joey Gouly <joey.gouly@arm.com> Add some semantic checks for OpenCL. Variadic macros, VLAs and bitfields are not supported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
cd8ab51a44e80625d84126780b0d85a7732e25af 17-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Implement C++11 semantics for [[noreturn]] attribute. This required splitting
it apart from [[gnu::noreturn]] / __attribute__((noreturn)), since their
semantics are not equivalent (for instance, we treat [[gnu::noreturn]] as
affecting the function type, whereas [[noreturn]] does not).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
5c52166525f8714c3e3a979b156ec23426947fd3 15-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Fix behavior of [[gnu::]] function attributes. Per g++'s behavior, these
attributes appertain to a declaration, even though they would be much more
naturally modelled as appertaining to a function type. Previously, we would
try to distribute them from the declarator to the function type, then
reject them for being at an incorrect location. Now, we just distribute them
as far as the declarator; the existing attribute handling code can actually
apply them there just fine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f7a052732c2b6c82f74708038f75fa92c9b4dba0 14-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Accept [[gnu::*]] for all __attribute__((*))s which are:
1) Supported by Clang, and
2) Supported by GCC, and
3) Documented in GCC's manual.

g++ allows its C++11-style attributes to appertain only to the entity being
declared, and never to a type (even for a type attribute), so we do the same.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172382 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
21c8fa87a3517d835072193a59a955ec7f6bf408 14-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR12008: defer adding the implicit 'const' to a constexpr member function until
we know whether it is static.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172376 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a4fa9008988985f9cf01712a99ddd923aea278a0 13-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Remove some duplication in the handling of __attribute__((ext_vector_size(N))).


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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
601e6e894c2a38243588b375bed0b9a9e60060bb 11-Jan-2013 Enea Zaffanella <zaffanella@cs.unipr.it> Fixed an assertion failure triggered by invalid code.

Set invalid type of declarator after emitting error diagnostics,
so that it won't be later considered when instantiating the template.
Added test5_inst in test/SemaCXX/condition.cpp for non-regression.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
3c7236e01dfb69b370857ccd71c7bcf5ce80b36f 08-Jan-2013 Douglas Gregor <dgregor@apple.com> Back out my no-op change from r171783.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
57cbb141ca7ee020d6853cd098065a9e0c2d69cc 07-Jan-2013 Douglas Gregor <dgregor@apple.com> Use the C++11 POD definition in C++11 mode to determine whether one
can create a VLA of class type. Fixes <rdar://problem/12151822>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
80ad52f327b532bded5c5b0ee38779d841c6cd35 02-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> s/CPlusPlus0x/CPlusPlus11/g


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.cpp
ac71351acdefc9de0c770c1d717e621ac9e684bf 08-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> Properly compute triviality for explicitly-defaulted or deleted special members.
Remove pre-standard restriction on explicitly-defaulted copy constructors with
'incorrect' parameter types, and instead just make those special members
non-trivial as the standard requires.

This required making CXXRecordDecl correctly handle classes which have both a
trivial and a non-trivial special member of the same kind.

This also fixes PR13217 by reimplementing DiagnoseNontrivial in terms of the
new triviality computation technology.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
55fc873017f10f6f566b182b70f6fc22aefa3464 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.

This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.

I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
84268904947ada7e251932a6f5b0f4364df7a2c7 29-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Reject uses of __int128 on platforms that don't support it. Also move the ugly
'getPointerWidth(0) >= 64' test to be a method on TargetInfo, ready to be
properly cleaned up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e925322569cb4aad26cc62036a13e2d3daed862d 25-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR14171: Don't crash if we hit one of the paths where GetFullTypeForDeclarator
rebuilds a function type, and that function type has parens around its name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
444d384a969ce05ae534bf8be3174e308dc8c58b 20-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> Rework implementation of DR1492: Apply the resolution to operator delete too,
since it also has an implicit exception specification. Downgrade the error to
an extwarn, since at least for operator delete, system headers like to declare
it as 'noexcept' whereas the implicit definition does not have an explicit
exception specification. Move the exception specification for user-declared
'operator delete' functions from the type-as-written into the type, to reflect
reality and to allow us to detect whether there was an implicit exception spec
or not.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
59c0a818a79be850f7ae8fdafd57a1710e5b809a 04-Oct-2012 Abramo Bagnara <abramo.bagnara@bugseng.com> Fixed FunctionTypeLoc source range.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
82bfa19fe3be324b13fdbcda46304b52c500f0d4 02-Oct-2012 Aaron Ballman <aaron@aaronballman.com> Allowing individual targets to determine whether a given calling convention is allowed or ignored with warning. This allows for correct name mangling for x64 targets on Windows, which in turn allows for linking against the Win32 APIs.

Fixes PR13782

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e3b136bd873508c9ac0ee6eba98c2a810a177eba 24-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Change the wording of the extension warning from
> 'long long' is an extension when C99 mode is not enabled
to
> 'long long' is a C++11 extension
while compiling in C++98 mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
84dd82e2088b1ea629f54f62a816f1155c78bb94 14-Sep-2012 Douglas Gregor <dgregor@apple.com> When computing the decltype of an expression, consider Objective-C
ivar and property references as member accesses and produce the actual
type of the declaration. Fixes <rdar://problem/12031582>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a1a32f7f5966edf47c1e22bcbeb2a09bc462ff0b 13-Sep-2012 Fariborz Jahanian <fjahanian@apple.com> Move back the stuff about missing ownership attribute warning
to SemaDeclObjC and apply some simplification per John's
comment. // rdar://12280826


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163824 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ca5c4c9bfeb4b1ac645b04723c0319b0fc96073e 13-Sep-2012 Fariborz Jahanian <fjahanian@apple.com> Move no explicit ownership warning to SemaType.cpp.
// rdar://12280826


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
31ba6135375433b617a8587ea6cc836a014ebd86 06-Sep-2012 Roman Divacky <rdivacky@freebsd.org> Dont cast away const needlessly. Found by gcc48 -Wcast-qual.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
679fc9314c2bde5eb6bea33c790d1a035461e618 04-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Revert r163078 per chandlerc's request.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f712c48ce80763f3c0bbc2e1b0afe6ed3b5b88cb 02-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Added a diagnostic for mismatched MS inheritance attributes. Also fixed the incomplete type member pointer size calculation under the MS ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f143ae9b68cdd40dfb120094baaa702b810eb52c 01-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Changed the remaining dead asserts to llvm_unreachable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
4e90bc39f052ea0046d40aebbb42732ad1f21f50 23-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix undefined behavior: don't call ObjCInterfaceDecl::isArcWeakrefUnavailable
on a null pointer. (This function happens to work for a null 'this' pointer, so
no test.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
0a7dd788dbef975f35f273c7ab913f480f7edd60 21-Aug-2012 John McCall <rjmccall@apple.com> Screw around with ObjCRuntime some more, changing the
diagnostics for bad deployment targets and adding a few
more predicates. Includes a patch by Jonathan Schleifer
to enable ARC for ObjFW.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
99570a58b09fca5d0b328733ab8b6717a1a04f4a 15-Aug-2012 Matt Beaumont-Gay <matthewbg@google.com> Allow 'static' and type qualifiers in K&R parameter type lists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
7f397c5d97fc0c11333d939f2c07bc3b230956e2 15-Aug-2012 Hans Wennborg <hans@hanshq.net> Check for improper use of 'static' and type qualifiers in array
declarators.

They are only allowed for function parameters, and then only on the
outermost array type derivation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
9fbf327cfdd27ddb5d845042c95f2299ac95b143 15-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Remove trailing return flag from FunctionTypeLoc, since we now carry that
information on FunctionProtoType. (This also fixes one of *many* misalignment
problems in the TypeLoc hierarchy...)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
71f55f771794674a410171dbf3cb5dbedf95d033 07-Aug-2012 David Blaikie <dblaikie@gmail.com> Refactor checks for unevaluated contexts into a common utility function.

The one caller that's surrounded by nearby code manipulating the underlying
evaluation context list is left unmodified for readability.

Review by Sean Silva and Richard Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a78a640c5f59720f2c2b8034eca4fbf8525d9026 31-Jul-2012 Rafael Espindola <rafael.espindola@gmail.com> Attributes preceding a function declaration are first applied to the return
type and then propagated to the function. This was failing for destructors,
constructors and constructors templates since they don't have a return type.

Fix that by directly calling processTypeAttrs on the dummy type we use as the
return type in these cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
d64effc4e31044c05d6e4400150edb26e914983a 30-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> Extend the ',' versus ';' diagnostic for -Wvexing-parse to cover the with-arguments case as well as the no-arguments case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b9c6261d02f688d0a9a36b736ad5956fbc737854 30-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> Improvements to vexing-parse warnings. Make the no-parameters case more
accurate by asking the parser whether there was an ambiguity rather than trying
to reverse-engineer it from the DeclSpec. Make the with-parameters case have
better diagnostics by using semantic information to drive the warning,
improving the diagnostics and adding a fixit.

Patch by Nikola Smiljanic. Some minor changes by me to suppress diagnostics for
declarations of the form 'T (*x)(...)', which seem to have a very high false
positive rate, and to reduce indentation in 'warnAboutAmbiguousFunction'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
bb35151a166db2b4fee043bc90e60858ac2b7a89 08-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> Reject 'int a[1][];' in Sema rather than crashing in IR generation. Found by a
misreduction of PR13290.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
91cbbbf506c892a26d4301e2b3ccd377b0938817 26-Jun-2012 Chad Rosier <mcrosier@apple.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
efce31f51d6e7e31e125f96c20f6cdab3ead0a47 22-Jun-2012 James Dennett <jdennett@google.com> Documentation cleanup:
* Primarily fixed \param commands with names not matching any actual
parameters of the documented functions. In many cases this consists
just of fixing up the parameter name in the \param to match the code,
in some it means deleting obsolete documentation and occasionally it
means documenting the parameter that has replaced the older one that
was documented, which sometimes means some simple reverse-engineering
of the docs from the implementation;
* Fixed \param ParamName [out] to the correct format with [out] before
the parameter name;
* Fixed some \brief summaries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
aa0cd85838f2a024e589ea4e8c2094130065af21 20-Jun-2012 Dmitri Gribenko <gribozavr@gmail.com> Structured comment parsing, first step.

* Retain comments in the AST
* Serialize/deserialize comments
* Find comments attached to a certain Decl
* Expose raw comment text and SourceRange via libclang


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8e083e71d48f7f4d6ef40c00531c2e14df745486 20-Jun-2012 Sean Hunt <scshunt@csclub.uwaterloo.ca> Reapply r158700 and fixup patches, minus one hunk that slipped through and
caused a crash in an obscure case. On the plus side, it caused me to catch
another bug by inspection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
3532936f4f50c15fcec4d00f4cbb81a7a9dd9b7e 19-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Revert r158700 and dependent patches r158716, r158717, and r158731.

The original r158700 caused crashes in the gcc test suite,
g++.abi/vtable3a.C among others. It also caused failures in the libc++
test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158749 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
bfcb037a3479de4a453a8275c64ae441c22d43f9 19-Jun-2012 Sean Hunt <scshunt@csclub.uwaterloo.ca> Improve the specification of spellings in Attr.td.

Note that this is mostly a structural patch that handles the change from the old
spelling style to the new one. One consequence of this is that all AT_foo_bar
enum values have changed to not be based off of the first spelling, but rather
off of the class name, so they are now AT_FooBar and the like (a straw poll on
IRC showed support for this). Apologies for code churn.

Most attributes have GNU spellings as a temporary solution until everything else
is sorted out (such as a Keyword spelling, which I intend to add if someone else
doesn't beat me to it). This is definitely a WIP.

I've also killed BaseCheckAttr since it was unused, and I had to go through
every attribute anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
93f95f2a2cbb6bb3d17bfb5fc74ce1cccea751b6 18-Jun-2012 Sean Hunt <scshunt@csclub.uwaterloo.ca> Handle C++11 attribute namespaces automatically.

Now, as long as the 'Namespaces' variable is correct inside Attr.td, the
generated code will correctly admit a C++11 attribute only when it has the
appropriate namespace(s).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
699c9044c7d53a2774d0dd261a6901dd2c4a545f 15-Jun-2012 James Dennett <jdennett@google.com> Documentation cleanup:
* Removed \param comments for parameters that no longer exist;
* Fixed a "\para" typo to "\param";
* Escaped @, # and \ symbols as needed in Doxygen comments;
* Added use of \brief to output short summaries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
1dfbd92c83699820bfaa352e83083124e34fc9dc 14-Jun-2012 James Dennett <jdennett@google.com> Still more Doxygen documentation fixes:
* Escape #, < and @ symbols where Doxygen would try to interpret them;
* Fix several function param documentation where names had got out of sync;
* Delete param documentation referring to parameters that no longer exist.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
54655be65585ed6618fdd7a19fa6c70efc321d3a 12-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> If parsing a trailing-return-type fails, don't pretend we didn't have one at
all. Suppresses follow-on errors mentioned in PR13074.


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

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

This rolls back r155808 and r155869.

Review by Doug Gregor incorporating feedback from Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
48d798ce32447607144db70a484cdb99c1180663 02-Jun-2012 Benjamin Kramer <benny.kra@googlemail.com> Fix typos found by http://github.com/lyda/misspell-check

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
c052dbb2d8fe0e23e90d81236aab0f864f712b45 22-May-2012 John McCall <rjmccall@apple.com> Recognize the MS inheritance attributes and turn them into attributes
on the RecordDecl. Persist the MS portability type attributes and
ignore them in Sema rather than the parser.

Patch by João Matos!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
1de6a6cb485fb58b4fb100282bb3cf298eedacd9 09-May-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c. Fixes a 'fixit' where location of
'*' on objective-c class name was misplaced.
// rdar://11311333


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ab41fe914f63bb470dfa7e400876ada72f57a931 05-May-2012 Douglas Gregor <dgregor@apple.com> Move Sema::VerifyIntegerConstantExpression() and
Sema::ConvertToIntegralOrEnumerationType() from PartialDiagnostics to
abstract "diagnoser" classes. Not much of a win here, but we're
-several PartialDiagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f502d8ec9b43b259db9e37e9622279df46070fed 04-May-2012 Douglas Gregor <dgregor@apple.com> Switch RequireLiteralType() off of PartialDiagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
d10099e5c8238fa0327f03921cf2e3c8975c881e 04-May-2012 Douglas Gregor <dgregor@apple.com> Move Sema::RequireCompleteType() and Sema::RequireCompleteExprType()
off PartialDiagnostic. PartialDiagnostic is rather heavyweight for
something that is in the critical path and is rarely used. So, switch
over to an abstract-class-based callback mechanism that delays most of
the work until a diagnostic is actually produced. Good for ~11k code
size reduction in the compiler and 1% speedup in -fsyntax-only on the
code in <rdar://problem/11004361>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a058fd4f0a944174295f77169b438510dad389f8 03-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> Revert most of r154844, which was disabled in r155975. Keep around the
refactorings in that revision, and some of the subsequent bugfixes, which
seem to be relevant even without delayed exception specification parsing.


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

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

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

(reviewed by Richard Smith)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
c799a6a5c884831c3c3ea57d30fbe4ab35709d49 26-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> If a type is non-literal by virtue of being incomplete produce notes
explaining that.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e656b8397f05fd1b7c4a735372f79a52f4e32be5 23-Apr-2012 Douglas Gregor <dgregor@apple.com> Teach RequireCompleteType about multi-dimensional arrays. Fixes
<rdar://problem/11284902>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
74e2fc332e07c76d4e69ccbd0e9e47a0bafd3908 16-Apr-2012 Douglas Gregor <dgregor@apple.com> Implement the last part of C++ [class.mem]p2, delaying the parsing of
exception specifications on member functions until after the closing
'}' for the containing class. This allows, for example, a member
function to throw an instance of its own class. Fixes PR12564 and a
fairly embarassing oversight in our C++98/03 support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154844 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
bc1029b4a47282cb4ce27c7014acb864b10a4043 06-Apr-2012 Eli Friedman <eli.friedman@gmail.com> Implement C90 pedantic warning for duplicate declaration specifiers which are duplicated via a typedef. Patch by Tim Northover.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154136 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
564f4c5664f552becbd05407611a92754c40e641 22-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> During the instantiation of a class template specialization, that
specialization is known to be incomplete. If we're asked to try to
complete it, don't attempt to instantiate it again -- that can lead
to stack overflow, and to rejects-valids if the class being incomplete
is not an error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
7796eb5643244f3134834253ce5ea89107ac21c1 12-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix parsing of trailing-return-type. Types are syntactically prohibited from
being defined here: [] () -> struct S {} does not define struct S.

In passing, implement DR1318 (syntactic disambiguation of 'final').


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d 11-Mar-2012 David Blaikie <dblaikie@gmail.com> Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).

The member variable is always "LangOpts" and the member function is always "getLangOpts".

Reviewed by Chris Lattner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a346efaaad5cd779cdfd5be73c2b258748ad1f06 10-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [Sema] A tag decl that is marked as invalid and is used in a decl-spec,
should not impede creating a proper TypeLoc info for the decl-spec.

This improves our semantic error recovery.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
96a0014f9b963d8a987f1cccd48808a47f9c6331 09-Mar-2012 Daniel Dunbar <daniel@zuster.org> [AST/Sema/libclang] Replace getSourceRange().getBegin() with getLocStart().
- getSourceRange().getBegin() is about as awesome a pattern as .copy().size().

I already killed the hot paths so this doesn't seem to impact performance on my
tests-of-the-day, but it is a much more sensible (and shorter) pattern.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a08c2fb74ef823c185619ecc532f8fced6a1982f 24-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Make helper static.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151400 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ee0653963537f6ea60f655856fb0c83d7d4010db 21-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Make RequireLiteralType work correctly with incomplete array types. PR12037.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
68932845a432d2a1dbbc57a84fd85bbb37c90487 18-Feb-2012 Douglas Gregor <dgregor@apple.com> Unify our computation of the type of a captured reference to a
variable; it was previously duplicated, and one of the copies failed
to account for outer non-mutable lambda captures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
86c3ae46250cdcc57778c27826060779a92f3815 13-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Update constexpr implementation to match CWG's chosen approach for core issues
1358, 1360, 1452 and 1453.
- Instantiations of constexpr functions are always constexpr. This removes the
need for separate declaration/definition checking, which is now gone.
- This makes it possible for a constexpr function to be virtual, if they are
only dependently virtual. Virtual calls to such functions are not constant
expressions.
- Likewise, it's now possible for a literal type to have virtual base classes.
A constexpr constructor for such a type cannot actually produce a constant
expression, though, so add a special-case diagnostic for a constructor call
to such a type rather than trying to evaluate it.
- Classes with trivial default constructors (for which value initialization can
produce a fully-initialized value) are considered literal types.
- Classes with volatile members are not literal types.
- constexpr constructors can be members of non-literal types. We do not yet use
static initialization for global objects constructed in this way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
6d9ef30c5026e80fb398ed32bcdf69e4d714f033 12-Feb-2012 Douglas Gregor <dgregor@apple.com> Implement the standard decltype() semantics described in C++11
[dcl.type.simple]p4, which treats all xvalues as returning T&&. We had
previously implemented a pre-standard variant of decltype() that
doesn't cope with, e.g., static_ast<T&&>(e) very well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f8af98286022f72157d84951b48fde5fb369ab29 12-Feb-2012 Douglas Gregor <dgregor@apple.com> Within the body of a lambda expression, decltype((x)) for an
id-expression 'x' will compute the type based on the assumption that
'x' will be captured, even if it isn't captured, per C++11
[expr.prim.lambda]p18. There are two related refactors that go into
implementing this:

1) Split out the check that determines whether we should capture a
particular variable reference, along with the computation of the
type of the field, from the actual act of capturing the
variable.
2) Always compute the result of decltype() within Sema, rather than
AST, because the decltype() computation is now context-sensitive.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8327118ff60cd9c4812fba1e5ba4eb3cb5ed3401 11-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Make sure to try instantiating a templated type which is used in an _Atomic
before complaining that it's incomplete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150308 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
d37b360bf9f954af119c9805fdc79ab9d30e06c6 10-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR11684, core issue 1417:

o Correct the handling of the restrictions on usage of cv-qualified and
ref-qualified function types.
o Fix a bug where such types were rejected in template type parameter default
arguments, due to such arguments not being treated as a template type arg
context.
o Remove the ExtWarn for usage of such types as template arguments; that was
a standard defect, not a GCC extension.
o Improve the wording and unify the code for diagnosing cv-qualifiers with the
code for diagnosing ref-qualifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
b4e5e286a5cd156247720b1eb204abaa8e09568d 09-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> CWG issue 1405: mutable members are allowed in literal types, but can't undergo
lvalue-to-rvalue conversions in constant expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
d85bf9dd23920f5400bb8d6a41c8ebb1aecfdee9 08-Feb-2012 John McCall <rjmccall@apple.com> Only complain about __strong __strong id, not __strong SomeStrongTypedef
or __strong __typeof__(some.strong.thing).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
66581d41527628d4b37f7b05c288f77be7415d7d 06-Feb-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Added source location for the template keyword in DependentTemplateSpecializationTypeLoc nodes (DTSTLoc).

The new info is propagated to TSTLoc on template instantiation, getting rid of 3 FIXMEs in TreeTransform.h and another one Parser.cpp.

Simplified code in TypeSpecLocFiller visitor methods for DTSTLoc and DependentNameTypeLoc by removing what now seems to be dead code (adding corresponding assertions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
38a42916cb07fd368d9e2ae1e7915fa896f9ec06 06-Feb-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Removed redundant location info from ElaboratedTypeLoc / DependentNameLoc / DependentTSTLoc. Uniformed names referencing elaborated keyword. No intended functionality changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
55d23c925b058be29b792008ddb7d68f6c4fa9a0 06-Feb-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Added location for template keyword in TemplateSpecializationTypeLoc. In the process removed some naming ambiguities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
282e7e66748cc6dd14d6f7f2cb52e5373c531e61 04-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> In C++11 mode, when an integral constant expression is desired and we have a
value of class type, look for a unique conversion operator converting to
integral or unscoped enumeration type and use that. Implements [expr.const]p5.

Sema::VerifyIntegerConstantExpression now performs the conversion and returns
the converted result. Some important callers of Expr::isIntegralConstantExpr
have been switched over to using it (including all of those required for C++11
conformance); this switch brings a side-benefit of improved diagnostics and, in
several cases, simpler code. However, some language extensions and attributes
have not been moved across and will not perform implicit conversions on
constant expressions of literal class type where an ICE is required.

In passing, fix static_assert to perform a contextual conversion to bool on its
argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8398cbfc73f7ff0a676232db9ea9160bb9dafd8d 01-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> constexpr: Unlike other incomplete types, 'void' cannot possibly be completed as
a literal type. Disallow it as the return type of a constexpr function
declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e4b92761b43ced611c417ae478568610f1ad7b1e 27-Jan-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Added source location for the template keyword in AST template-id expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e8c904ff343f440e213b88e6963f5ebfbec7ae60 26-Jan-2012 John McCall <rjmccall@apple.com> Don't suppress access-control or invalid-type diagnostics from a
declarator just because we were able to build an invalid decl
for it. The invalid-type diagnostics, in particular, are still useful
to know, and may indicate something about why the decl is invalid.

Also, recover from an illegal pointer/reference-to-unqualified-retainable
type using __strong instead of __autoreleasing; in general, a random
object is much more likely to be __strong, so this avoids unnecessary
cascading errors in the most common case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
78a542478dd63c2789816dcc1cdab5c9a6eef99b 21-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Fix some comments relating to ExpressionEvaluationContexts. Get rid of a couple of uses of ConstantEvaluated which don't make sense.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
ef331b783bb96a0f0e34afdb7ef46677dc4764cb 20-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Remove PotentiallyPotentiallyEvaluated, and replace it with a much simpler and less error-prone way of handling the relevant cases. Towards marking of whether a declaration is used more accurately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
93c878ee093f2a233c32b29f074e6a3f511e333f 18-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Fix a couple issues where we didn't correctly delay diagnostics in PotentiallyPotentiallyEvaluated contexts. In preparation for making sizeof() PotentiallyPotentiallyEvaluated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
561d3abc881033776ece385a01a510e1cbc1fa92 17-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unnecessary default cases in switches over enums.

This allows -Wswitch-enum to find switches that need updating when these enums are modified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
806054db6653d29cb0d9692df3612cbcd03d0530 11-Jan-2012 John McCall <rjmccall@apple.com> Do placeholder conversions on array bounds in both declarators and
new-expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
906a7e1c0f272f7e539c82dda01f4644031ce637 06-Jan-2012 Eli Friedman <eli.friedman@gmail.com> More lambda work. Fixes a minor bug Richard pointed out, makes lookup for lambda parameters work correctly, recording more information into the AST.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f88c400085eac7068399d0a01dbad89f8c579f07 04-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Add an explicit LambdaExprContext to Declarator, to parallel BlockLiteralContext. Use it to ensure semantic analysis of types isn't confused by the lack of a type specifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
d7c56e1114bfe7d461786903bb720d2c6efc05a1 29-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> Change the diagnostics which said 'accepted as an extension' to instead say
'is an extension'. The former is inappropriate and confusing when building with
-Werror/-pedantic-errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
80d4b55db94db2172a04617d1a80feca6bbcea5c 28-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> Small refactoring and simplification of constant evaluation and some of its
clients. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f6702a3927147655206ae729a84339c4fda4c651 20-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> Unlike in C++03, a constant-expression is not an unevaluated operand in C++11.
Split out a new ExpressionEvaluationContext flag for this case, and don't treat
it as unevaluated in C++11. This fixes some crash-on-invalids where we would
allow references to class members in potentially-evaluated constant expressions
in static member functions, and also fixes half of PR10177.

The fix to PR10177 exposed a case where template instantiation failed to provide
a source location for a diagnostic, so TreeTransform has been tweaked to supply
source locations when transforming a type. The source location is still not very
good, but MarkDeclarationsReferencedInType would need to operate on a TypeLoc to
improve it further.

Also fix MarkDeclarationReferenced in C++98 mode to trigger instantiation for
static data members of class templates which are used in constant expressions.
This fixes a link-time problem, but we still incorrectly treat the member as
non-constant. The rest of the fix for that issue is blocked on PCH support for
early-instantiated static data members, which will be added in a subsequent
patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
bd79119a50172db92ad3ce77ec3ac3c51e42a126 16-Dec-2011 Sean Callanan <scallanan@apple.com> Sema::RequireCompleteType currently attempts to
instantiate a class from its template pattern
before it consults the ExternalASTSource. LLDB
in particular will sometimes provide patterns
that need to be completed first.

To make this possible, I have moved the
completion before the code that does the
instantiation, allowing the ExternalASTSource
to provide the required information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b3029960632ca8a3248e74770eda64d6c16f7246 14-Nov-2011 Douglas Gregor <dgregor@apple.com> Use Sema::RequireCompleteType to check for the completeness of
Objective-C classes. This has two purposes: to consistently provide
"forward declaration here" notes when we hit an incomplete type, and
to give LLDB a chance to complete the type.

RequireCompleteType bits from Sean Callanan!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
1bf9a9e6a5bdc0de7939908855dcddf46b661800 12-Nov-2011 Richard Smith <richard-llvm@metafoo.co.uk> Represent an APValue based on a Decl as that Decl, rather than a DeclRefExpr
or MemberExpr which refers to it. As a side-effect, MemberExprs which refer to
static member functions and static data members are now emitted as constant
expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8ac2c66a1442985091c5ec2b33ce6d3df3bcb529 11-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Make sure that restrict-qualifying an array actually adds a restrict qualifier. PR11354. (operator bool() is evil!)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
5cad82236ecc0a2eeed2edd75e119f6069a99f4c 07-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> When applying ARC __weak to a non-objc pointer, do not give error that
__weak is unsupported by the deployment target, since it is going to be
ignored anyway.

Makes it easier for incremental migration from GC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143975 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e71202efccdead44c8a3d4a2296d866d0e89799b 04-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> In ARC, when applying an ownership to a non-objc pointer, instead of ignoring it
create an attributed type with same type as the original type.

We effectively retain the source info that an ownership attribute was present but the attribute
is ignored by not modifying the type that it was applied to.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
51f4708c00110940ca3f337961915f2ca1668375 29-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Rename Expr::Evaluate to Expr::EvaluateAsRValue to make it clear that it will
implicitly perform an lvalue-to-rvalue conversion if used on an lvalue
expression. Also improve the documentation of Expr::Evaluate* to indicate which
of them will accept expressions with side-effects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
6ee54925f709176a33aab4727bc35bea2d05aca4 29-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [ARC] Do not transfer ARC ownership if the cast is going to result in r-value,
in which case the ownership is redundant. Thanks to John for the suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
43f5103f8051bbac19022e6edaf7d9138b0f3c0f 19-Oct-2011 Douglas Gregor <dgregor@apple.com> Improve the warning for cv-qualifiers on free functions, from Ahmed Charles!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ebaf0e6ab743394dda086a01b457838cb6e589a8 18-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> -Wc++98-compat and -Wc++98-compat-pedantic warnings for Sema, part 1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
20cdbeb8f36576f469db195b4140c293c7281718 16-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Add sema checks for calls to functions taking static array parameters

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
0aa86c0463a881be85fd34e04c7de3379997621d 15-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add -Wc++98-compat warning for deduced 'auto' type specifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
e5acd13f885ac95d0f2dafda245625b8190235ac 14-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Reinstate r141898 (reverted in r141921), without the -Wc++98-compat-variadic-templates flag. Consensus is that -Wc++98-compat is a useful addition to clang, but per-C++11-feature warnings may not be.
Original patch by Jeffrey Yasskin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f38eaa4748ee6164d5e36309fecef71765ff8b2b 14-Oct-2011 Jeffrey Yasskin <jyasskin@google.com> Revert the -Wc++98-compat flag because dgregor doesn't like it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
48a9d189bbc989369155195a4ce8c7e1c02ea02a 14-Oct-2011 Jeffrey Yasskin <jyasskin@google.com> Implement the first piece of a -Wc++98-compat flag so that people can build in
C++11 mode but keep their sources compatible with C++98. This patch implements
the -Wc++98-compat-variadic-templates sub-flag and -Wc++98-compat to include
it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
5fa6a0422f12216d549d0f2991a29d5690634065 12-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> constexpr: don't consider class types with mutable members to be literal types.

The standard doesn't allow this, but mutable constexpr variables break the
semantics so badly that we can't reasonably accept them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
43fe245b37c3cd36d837aab9eb98551328d30141 09-Oct-2011 Douglas Gregor <dgregor@apple.com> When building source location information for an _Atomic type, be sure
to fill in the source locations for the underlying value type. Fixes
an intermittent crasher (due to uninitialized data) in the PCH test
for _Atomic types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
682eae243ae3d96fe3dc302091034e08c414db10 07-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Hack in a workaround for PR11082 until we have a proper fix. This
un-breaks every glib-dependent compile with Clang.

I'm not sure this is even the best workaround, so suggestions welcome.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.cpp
cdda47faab5c2c61c239491a1a091e071ed3e38e 01-Oct-2011 John McCall <rjmccall@apple.com> Parse attributes written in an ObjC method parameter type as
attributes on the parameter declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e82247a71a1a76e78f3b979b64d5f6412ab40266 01-Oct-2011 John McCall <rjmccall@apple.com> Hey, maybe we shouldn't silently ignore decl attributes
on declarators written as types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
55dec868977ccb89cab0286122f9345f63bb5de7 30-Sep-2011 Richard Smith <richard-llvm@metafoo.co.uk> constexpr functions are implicitly const. More tests to follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
440ec2ebbe2e7aa2a5f733a41cf845d354d16e23 28-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> For __weak/__strong/etc. ownership attributes, don't macro expand them in diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
eb2d1f1c88836bd5382e5d7aa8f6b85148a88b27 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Removing a bunch of dead returns/breaks after llvm_unreachables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Switch assert(0/false) llvm_unreachable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
5b76f373d23cc3b292ecf523349aaaa388eea375 21-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [ARC] Allow forming 'id*' in an unevaluated context. Fixes rdar://10148540.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
62ec1f2fd7368542bb926c04797fb07023547694 17-Sep-2011 Francois Pichet <pichet2000@gmail.com> Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag.

Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e97179c675b341927807c718be215c8d1aab8acb 08-Sep-2011 Douglas Gregor <dgregor@apple.com> Implement the Objective-C 'instancetype' type, which is an alias of
'id' that can be used (only!) via a contextual keyword as the result
type of an Objective-C message send. 'instancetype' then gives the
method a related result type, which we have already been inferring for
a variety of methods (new, alloc, init, self, retain). Addresses
<rdar://problem/9267640>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
bcfd1f55bfbb3e5944cd5e03d07b343e280838c4 02-Sep-2011 Douglas Gregor <dgregor@apple.com> Extend the ASTContext constructor to delay the initialization of
builtin types (When requested). This is another step toward making
ASTUnit build the ASTContext as needed when loading an AST file,
rather than doing so after the fact. No actual functionality change (yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8e68f1c8a2919ea83c2053731d6011074f1062e1 05-Aug-2011 Roman Divacky <rdivacky@freebsd.org> Let attribute((cdecl)) and company override -mrtd default calling convention.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
020972d5d6dc1f3c49839cfbadcccf4cbefb2f4d 27-Jul-2011 Peter Collingbourne <peter@pcc.me.uk> Forbid address-space-qualified function types, per TR 18037

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
29e3ef8df84da298e7553a84276af4909ff6e9eb 27-Jul-2011 Peter Collingbourne <peter@pcc.me.uk> Fix TR 18037 citation in SemaType.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136256 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
108f756bebd991eaa980cfb9994353612a2e5ff6 26-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Cleanup the stray comments and variables I could dig out of Sema to
refer to 'expansion' instead of 'instantiation'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
5f9e272e632e951b1efe824cd16acb4d96077930 23-Jul-2011 Chris Lattner <sabre@nondot.org> remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
90ebed0734fac9b464c9bdff53fbf85a86b27f32 13-Jul-2011 Douglas Gregor <dgregor@apple.com> Add 'mutable' to the function declarator chunk, to be used when
parsing lambda expressions, from John Freeman!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
98a5403ecf1d2b60ae8cbf43e54194bd762cacaa 12-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> Fix a bug where a local variable named 'self' is causing
implicit ivar accesses to go through the 'self' variable
rather than the real 'self' for the method. // rdar://9730771


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
79e6bd379773447a74cc3e579d9081e4c5cb6d63 12-Jul-2011 Douglas Gregor <dgregor@apple.com> Centralize the getCanonicalType() calls in the Itanium C++ mangling
code so that they only occur in a single place. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
7263feeb367ab55af7e9a6fd701148b1b8264dba 06-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> Some code cleanup of r134522


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134529 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
742352a3984aeef9ecf911be23e673e97b34595f 06-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: Support objc_arc_weak_unavailable on those
classes which are incompatible with weak references.
// rdar://9693477


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
9f084a3166b684573ba49df28fc5792bc37d92e1 06-Jul-2011 John McCall <rjmccall@apple.com> Change the driver's logic about Objective-C runtimes: abstract out a
structure to hold inferred information, then propagate each invididual
bit down to -cc1. Separate the bits of "supports weak" and "has a native
ARC runtime"; make the latter a CodeGenOption.

The tool chain is still driving this decision, because it's the place that
has the required deployment target information on Darwin, but at least it's
better-factored now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
28445f0b62f6aed851ff87ce64d9b19200d3211f 02-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Fix mistake in ASTContext::getInnerObjCOwnership noticed by Doug
-Remove unnecessary 'return'.
-Remove unnecessary 'if' check (llvm_unreachable make sure attrStr will be non-null)
-Add a test of transferring ownership to a reference cast type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
05d4876a64865e34366b58fc8a6848c3cde895d9 02-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix the warning that is emitted when an ownership attribute is applied incorrectly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a8349f5e60d1b5b0e658195a60d385b56ed440ec 02-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use transferARCOwnershipToDeclaratorChunk in inferARCWriteback, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
1c73dcbe1f1921bad8311cfb5089d30b4bd75b66 02-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix assertion hit in inferARCWriteback.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
31862ba5ea70b1f2c81d03f8a0100b61cd6f06f6 02-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [ARC] When casting from a pointer to an objective-c object with known ownership, if the
cast type has no ownership specified, implicitly "transfer" the ownership of the cast'ed type
to the cast type:

id x;
static_cast<NSString**>(&x); // Casting as (__strong NSString**).

This currently only works for C++ named casts, C casts to follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8cfa57b348d4d5a58d92764a60280bf88e4e49ae 02-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Break Sema::GetTypeForDeclarator in 2 functions, one for DeclSpec processing and another for the rest.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
17b6399f8461c5b7e1c6f367b0a0dde49f921240 02-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Declarator::ObjCCatchContext, this will result in correct error for 'auto' in obj-c catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
0b8c98f3ddf83adcb9e9d98b68ce38e970cdee73 28-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Declarator::CXXNewContext and remove 'AutoAllowedInTypeName' parameter
from Sema::GetTypeForDeclarator. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
d3880f8458bb6a03818ee01f758c32f945de3eaa 28-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Centralize all checks for a C++ tag definition inside a typename in
Sema::GetTypeForDeclarator and remove its 'OwnedDecl' out parameter.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
3215398dc9dac2be19a9fc1df929e6b7d83eafca 28-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Centralize the check for a tag definition in a Declarator::PrototypeContext inside GetTypeForDeclarator.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
db7abf78dedc2ef6ccb42b3dac6ab330fe2ea469 28-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the call to GetTypeForDeclarator in Sema::ActOnCXXConditionDeclaration.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b8b0313e84700b5c6d597b3be4de41c97b7550f1 24-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about 'ownership', not 'lifetime'.

rdar://9477613.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f85e193739c953358c865005855253af4f68a497 16-Jun-2011 John McCall <rjmccall@apple.com> Automatic Reference Counting.

Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.

Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
4ac01401b1ec602a1f58c217544d3dcb5fcbd7f1 15-Jun-2011 Douglas Gregor <dgregor@apple.com> Eliminate a 'default' case in template argument deduction, where we
were just punting on template argument deduction for a number of type
nodes. Most of them, obviously, didn't matter.

As a consequence of this, make extended vector types (via the
ext_vector_type attribute) actually work properly for several
important cases:
- If the attribute appears in a type-id (i.e, not attached to a
typedef), actually build a proper vector type
- Build ExtVectorType whenever the size is constant; previously, we
were building DependentSizedExtVectorType when the size was constant
but the type was dependent, which makes no sense at all.
- Teach template argument deduction to handle
ExtVectorType/DependentSizedExtVectorType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e1eed38733ed47d44f9d8c7731817c411eaf4141 14-Jun-2011 Chris Lattner <sabre@nondot.org> when compiling in a GNU mode (e.g. gnu99) treat VLAs with a size that can be folded to a constant
as constant size arrays. This has slightly different semantics in some insane cases, but allows
us to accept some constructs that GCC does. Continue to be pedantic in -std=c99 and other
modes. This addressed rdar://8733881 - error "variable-sized object may not be initialized"; g++ accepts same code


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
7a614d8380297fcd2bc23986241905d97222948c 11-Jun-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement support for C++11 in-class initialization of non-static data members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a08fcb8105bf53f3640ad17f61bdcde2d8ace78a 03-Jun-2011 Hans Wennborg <hans@hanshq.net> Make -Wignored-qualifiers point to the first ignored qualifier.

In code such as "char* volatile const j()", Clang warns that "volatile
const" will be ignored. Make it point to the first ignored qualifier,
and simplify the code a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
36f255c324d37dd8e0e5ab2e026814e8396a05aa 03-Jun-2011 Douglas Gregor <dgregor@apple.com> Improve the instantiation of static data members in
Sema::RequireCompleteExprType() a bit more, setting the point of
instantiation if needed, and skipping explicit specializations entirely.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f15748a28c8443eef2924ef83689c358c661e9c5 03-Jun-2011 Douglas Gregor <dgregor@apple.com> When performing template argument deduction given a function argument
of incomplete array type, attempt to complete the array type. This was
made much easier by Chandler's addition of RequireCompleteExprType(),
which I've tweaked (slightly) to improve the consistency of the
DeclRefExpr. Fixes PR7985.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e4d645cbe073042d8abc1a4eb600af4ff7a8dffb 27-May-2011 Chandler Carruth <chandlerc@gmail.com> Enhance Clang to start instantiating static data member definitions
within class templates when they are necessary to complete the type of
the member. The canonical example is code like:

template <typename T> struct S {
static const int arr[];
static const int x;
static int f();
};

template <typename T> const int S<T>::arr[] = { 1, 2, 3 };
template <typename T> const int S<T>::x = sizeof(arr) / sizeof(arr[0]);
template <typename T> int S<T>::f() { return x; }

int x = S<int>::f();

We need to instantiate S<T>::arr's definition to pick up its initializer
and complete the array type. This involves new code to specially handle
completing the type of an expression where the type alone is
insufficient. It also requires *updating* the expression with the newly
completed type. Fortunately, all the other infrastructure is already in
Clang to do the instantiation, do the completion, and prune out the
unused bits of code that result from this instantiation.

This addresses the initial bug in PR10001, and will be a step to
fleshing out other cases where we need to work harder to complete an
expression's type. Who knew we still had missing C++03 "features"?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132172 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
9625e44c0252485277a340746ed8ac950686156f 22-May-2011 Douglas Gregor <dgregor@apple.com> It's considered poor form to create references to the overloaded
function type. Educate template argument deduction thusly, fixing
PR9974 / <rdar://problem/9479155>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131811 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
db5d44b775c60166074acd184ca9f1981c10c2a7 19-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement __underlying_type for libc++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.cpp
fb8721ce4c6fef3739b1cbd1e38e3f1949462033 10-Apr-2011 John McCall <rjmccall@apple.com> Simplify calling CheckPlaceholderExpr, converge on it in a few places,
and move a vector-splat check to follow l-value conversion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a5fc472b353b88be3b4981da946fb01f5a5cc0c6 10-Apr-2011 John McCall <rjmccall@apple.com> Fix a bunch of major problems with __unknown_anytype and properly test
for them. The only major missing feature is references.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a49218e17bcbb1acde0245773173e2c0c42f4f19 09-Apr-2011 Eli Friedman <eli.friedman@gmail.com> PR8369: make __attribute((regparm(0))) work correctly. Original patch by
pageexec@freemail.hu, tweaks by me.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
429bb276991ff2dbc7c5b438828b9b7737cb15eb 08-Apr-2011 John Wiegley <johnw@boostpro.com> Use ExprResult& instead of Expr *& in Sema

This patch authored by Eric Niebler.

Many methods on the Sema class (e.g. ConvertPropertyForRValue) take Expr
pointers as in/out parameters (Expr *&). This is especially true for the
routines that apply implicit conversions to nodes in-place. This design is
workable only as long as those conversions cannot fail. If they are allowed
to fail, they need a way to report their failures. The typical way of doing
this in clang is to use an ExprResult, which has an extra bit to signal a
valid/invalid state. Returning ExprResult is de riguour elsewhere in the Sema
interface. We suggest changing the Expr *& parameters in the Sema interface
to ExprResult &. This increases interface consistency and maintainability.

This interface change is important for work supporting MS-style C++
properties. For reasons explained here
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-February/013180.html>,
seemingly trivial operations like rvalue/lvalue conversions that formerly
could not fail now can. (The reason is that given the semantics of the
feature, getter/setter method lookup cannot happen until the point of use, at
which point it may be found that the method does not exist, or it may have the
wrong type, or overload resolution may fail, or it may be inaccessible.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
7ea21937de6f849a7f44f10549c3d69c5a8cb3f3 26-Mar-2011 John McCall <rjmccall@apple.com> Properly move attributes to the decl spec when applying them there.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128324 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
0b7e678a11ece4288dc01aebb5b17e5eef8f8d2d 24-Mar-2011 John McCall <rjmccall@apple.com> Insomniac refactoring: change how the parser allocates attributes so that
AttributeLists do not accumulate over the lifetime of parsing, but are
instead reused. Also make the arguments array not require a separate
allocation, and make availability attributes store their stuff in
augmented memory, too.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
c05a94b7accd4035bf5d5897c434c445b22da855 24-Mar-2011 John McCall <rjmccall@apple.com> Call out ObjC parameter types as a different kind of declarator context
from a normal type-spec, just for completeness.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
148f1f7936afd718bac7be95089e77673e43f16f 20-Mar-2011 Peter Collingbourne <peter@pcc.me.uk> Only objects are declared const by a constexpr specifier, per C++0x [dcl.constexpr]p9

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
207f4d8543529221932af82836016a2ef066c917 18-Mar-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for language-specific address spaces. On top of that,
add support for the OpenCL __private, __local, __constant and
__global address spaces, as well as the __read_only, _read_write and
__write_only image access specifiers. Patch originally by ARM;
language-specific address space support by myself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
0daaf32723ac78549c507c2a68a5300502703673 16-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Use ElaboratedType also for C.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127755 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8999fe1bc367b3ecc878d135c7b31e3479da56f4 14-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Make deallocation functions implicitly noexcept in C++0x.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
796aa443ab5ed036f42ef33fed629e1b4b34871b 12-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Forgotten part of previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
1e15394853bfae25112d9cc6b445504905e1f34a 11-Mar-2011 Rafael Espindola <rafael.espindola@gmail.com> Fix PR9453 by not trying to print a warning about ignored qualifiers
in conversion functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
91ce2c4484e56cdc8068cebaaf2bb42362b0e1a6 10-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed class type generation for MemberPointerType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
eecf5fa12d5426637c47d7072f0c193a8d7ff68b 09-Mar-2011 John McCall <rjmccall@apple.com> Add a bit to ParmVarDecl indicating whether the parameter undergoes
K&R-style default argument promotion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
15987970eeaa1842c29ec8797affd1c1dea05585 08-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed isEmbeddedInDeclarator flag loading.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
834e3f6c77d9ac03997a3f0c56934edcf406a355 08-Mar-2011 John McCall <rjmccall@apple.com> Fix my earlier commit to work with escaped newlines and leave breadcrumbs
in case we want to make a world where we can check intermediate instantiations
for this kind of breadcrumb.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
2792fa5115c5de7cbe11d99d23663c569bfb4cae 08-Mar-2011 John McCall <rjmccall@apple.com> objc_gc wants a pointer type, not a function type; give it a more appropriate
diagnostic. Also, these attributes are commonly written with macros which we
actually pre-define, so instead of expanding the macro location, refer to the
instantiation location and name it using the macro loc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127219 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
fd9c42ed22fb4f7f865f7d8f8848df84ddf8262c 06-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Used a nicer cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.cpp
6e5d319b671dbb0ecf70619834aa23c853d17621 05-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Propagate new-style exception spec information to Declarator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b6ab6c1ca733fda2302a1c5066bdfc6218c89e41 05-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Improved MemberPointerType source locations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
14aa2175416f79ef17811282afbf425f87d54ebf 04-Mar-2011 John McCall <rjmccall@apple.com> Make AttributedTypes for GC-qualified types and fix some miscellaneous
bugs with such types. Not sure this is quite how I want the desugaring
and a.k.a. logic to go, but it suffices.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
94fdffa4a572fc14ac296f5f1aae9db3734c72f1 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source-location information into dependent
template specialization types. There are still a few rough edges to
clean up with some of the parser actions dropping
nested-name-specifiers too early.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
9e876876afc13aa671cc11a17c19907c599b9ab9 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Reinstate the introduction of source-location information for
nested-name-speciciers within elaborated type names, e.g.,

enum clang::NestedNameSpecifier::SpecifierKind

Fixes in this iteration include:

(1) Compute the type-source range properly for a dependent template
specialization type that starts with "template template-id ::", as
in a member access expression

dep->template f<T>::f()

This is a latent bug I triggered with this change (because now we're
checking the computed source ranges for dependent template
specialization types). But the real problem was...

(2) Make sure to set the qualifier range on a dependent template
specialization type appropriately. This will go away once we push
nested-name-specifier locations into dependent template
specialization types, but it was the source of the
valgrind errors on the buildbots.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
2786864406af0f3ec65b300675c6f3c809c22fd7 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Revert r126748, my second attempt at nested-name-specifier source
location information for elaborated types. *sigh*


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
fff951371dfc309160a99d423e43a7841aeb35aa 01-Mar-2011 Douglas Gregor <dgregor@apple.com> When digging into a cv-qualified return type that is a pointer type to
diagnose ignored qualifiers on return types, only assume that there is
a pointer chunk if the type is *structurally* a pointer type, not if
it's a typedef of a pointer type. Fixes PR9328/<rdar://problem/9055428>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
be38c5f5d8fa7c43c52fafddee054b8fe8c2b964 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Reinstate r126737, extending the generation of type-source location
information for qualifier type names throughout the parser to address
several problems.

The commit message from r126737:

Push nested-name-specifier source location information into elaborated
name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind".

Aside from the normal changes, this also required some tweaks to the
parser. Essentially, when we're looking at a type name (via
getTypeName()) specifically for the purpose of creating an annotation
token, we pass down the flag that asks for full type-source location
information to be stored within the returned type. That way, we retain
source-location information involving nested-name-specifiers rather
than trying to reconstruct that information later, long after it's
been lost in the parser.

With this change, test/Index/recursive-cxx-member-calls.cpp is showing
much improved results again, since that code has lots of
nested-name-specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
44cd9f9d686dfdb9ad16113c41c2dca1da35a646 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Revert r126737, the most recent nested-name-specifier location change, for buildbot breakage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
239cbb023c8da689e7722f7146914eed9755e368 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into elaborated
name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind".

Aside from the normal changes, this also required some tweaks to the
parser. Essentially, when we're looking at a type name (via
getTypeName()) specifically for the purpose of creating an annotation
token, we pass down the flag that asks for full type-source location
information to be stored within the returned type. That way, we retain
source-location information involving nested-name-specifiers rather
than trying to reconstruct that information later, long after it's
been lost in the parser.

With this change, test/Index/recursive-cxx-member-calls.cpp is showing
much improved results again, since that code has lots of
nested-name-specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
2494dd024b392b8def58bf067cc94b51c214cf77 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into
DependentNameTypeLoc. Teach the recursive AST visitor and libclang how to
walk DependentNameTypeLoc nodes.

Also, teach libclang about TypedefDecl source ranges, so that we get
those. The massive churn in test/Index/recursive-cxx-member-calls.cpp
is a good thing: we're annotating a lot more of this test correctly
now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
14aba76042e041b2c5e439bf4ae353a0a3c7fd73 24-Feb-2011 Douglas Gregor <dgregor@apple.com> Teach NestedNameSpecifier to keep track of namespace aliases the same
way it keeps track of namespaces. Previously, we would map from the
namespace alias to its underlying namespace when building a
nested-name-specifier, losing source information in the process.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126358 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
d067c07c6cbf099b25aba38bcb66f38e79d0c420 23-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Fix the behavior of -Wignored-qualifiers on return type qualifiers in
several ways. We now warn for more of the return types, and correctly
locate the ignored ones. Also adds fix-it hints to remove the ignored
qualifiers. Fixes much of PR9058, although not all of it.

Patch by Hans Wennborg, a couple of minor style tweaks from me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8110f04b39fd028496dd6bf9e3a78278c3e0a6ad 22-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> In Objective-C, there are no trailing return types, so don't produce diagnostics suggesting they are missing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e7397c6a1bb2b205c5fe678e26199eb26d22e38e 22-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> Fix a few auto-related issues:

* 'auto' was being rejected on abstract-declarators with trailing return
types and on typedefs with trailing return types. 'auto' is always
allowed in these cases. This was found while testing the fix for PR 9278.

* A very poor diagnostic was being issued for auto (f() -> int): "return
type must be 'auto', not 'auto'". This is closely related to PR 9060.

* Trailing return type handling was happening slightly too late,
resulting in the checks for functions returning arrays and functions
returning functions being missed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ddc83f9255834217f0559b09ff75a1c50b8ce457 22-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> C++0x's deduced auto is illegal in typedefs.

This actually rules out too much, since it also catches typedefs for pointers to functions with trailing return types:

typedef auto (*F)() -> int;

Fix for that (and the same issue in all abstract-declarators) to follow shortly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
39d3e7a26c1969fcb76bceb4ee0a410c60ea5954 15-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> OpenCL: semantic analysis support for cl_khr_fp64 extension

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
da263795abd39437d73d23fcf34dcd3afc1d7df3 08-Feb-2011 John McCall <rjmccall@apple.com> dgregor accidentally killed this assert, but on investigation, it can fire
on invalid code and we don't really care, so kill it harder.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8ef6c8cb6c5627240e2339fd7062c9873f821d7e 05-Feb-2011 Douglas Gregor <dgregor@apple.com> Improve our uniquing of file entries when files are re-saved or are
overridden via remapping. Thus, when we create a "virtual" file in the
file manager, we still stat() the real file that lives behind it so
that we can provide proper uniquing based on inodes. This helps keep
the file manager much more consistent.

To take advantage of this when reparsing files in libclang, we disable
the use of the stat() cache when reparsing or performing code
completion, since the stat() cache is very likely to be out of date in
this use case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
683a81f4373cf1fa9d41a751dca6f7c36125b058 31-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement the suggested resolution to core issue 547, extended to also
allow ref-qualifiers on function types used as template type
arguments. GNU actually allows cv-qualifiers on function types in many
places where it shouldn't, so we currently categorize this as a GNU
extension.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
944aa60777e6ea1015c9423107f7925f6d91f4a0 27-Jan-2011 Douglas Gregor <dgregor@apple.com> Cope with parenthesized function declarators when emitting a
diagnostic about ref-qualifiers where they do not belong.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
83f51722ed2b8134810cb178f39e44da811de7cd 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Rvalue references for *this: parse ref-qualifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a4356adfd4a79bd63f86e2b30878795ce7b9b0a6 26-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Correct r124242 making sure function chunk that gets diagnosed is really about the block.
Clairvoyance by John!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ce95566b36a4ff16e90507633dad8b7a76572999 26-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Diagnose calling convention attribute incompatibilities. Fixes rdar://8876096.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
98650449dc769dd6217f183c846dcaf9e6f94930 26-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change error "function cannot return array type" -> "blocks cannot return array type" when blocks are involved.
Addresses rdar://8876238.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
c21c7e9c2cded68f91be15be6847c9649242dc17 25-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach TemplateSpecializationTypeLoc::initializeArgLocs() to actually
generate meaningful [*] template argument location information.

[*] Well, as meaningful as possible, given that this entire code path
is a hack for when we've lost type-source information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
69d831645f429d3b806d2ae220aee45ca44f8c6c 20-Jan-2011 Douglas Gregor <dgregor@apple.com> Add some tests for reference-collapsing and referencing binding
involving rvalue references, to start scoping out what is and what
isn't implemented. In the process, tweak some standards citations,
type desugaring, and teach the tentative parser about && in
ptr-operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123913 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
5ce5f5221217b64193799c2a4d5aa84432d3fba4 19-Jan-2011 Douglas Gregor <dgregor@apple.com> Downgrade the "variadic templates are a C++0x feature" error to an
ExtWarn. We want variadic templates to be usable in libc++/libstdc++
headers even when we're in C++98/03 mode, since it's the only clean
way to implement TR1 <functional>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f4c7371fb1d3cebcfb40abad4537bb82515704ea 19-Jan-2011 John McCall <rjmccall@apple.com> Change QualType::getTypePtr() to return a const pointer, then change a
thousand other things which were (generally inadvertantly) relying on that.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
cded4f649cd4b7ba7d461c25c6482ef52b8d3a2a 14-Jan-2011 Douglas Gregor <dgregor@apple.com> Keep track of the number of expansions to be produced from a type pack
expansion, when it is known due to the substitution of an out
parameter pack. This allows us to properly handle substitution into
pack expansions that involve multiple parameter packs at different
template parameter levels, even when this substitution happens one
level at a time (as with partial specializations of member class
templates and the signatures of member function templates).

Note that the diagnostic we provide when there is an arity mismatch
between an outer parameter pack and an inner parameter pack in this
case isn't as clear as the normal diagnostic for an arity
mismatch. However, this doesn't matter because these cases are very,
very rare and (even then) only typically occur in a SFINAE context.

The other kinds of pack expansions (expression, template, etc.) still
need to support optional tracking of the number of expansions, and we
need the moral equivalent of SubstTemplateTypeParmPackType for
substituted argument packs of template template and non-type template
parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ae278a3a57595349a411f6474938d4dd1b263a0e 12-Jan-2011 John McCall <rjmccall@apple.com> Slight bugfix to the attribute-distribution logic for GC attributes.
Slight optimization of getObjCGCAttrKind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
07fa2fa8b9a0f7982a31e12f4164550d004543ae 05-Jan-2011 John McCall <rjmccall@apple.com> Fix the -Asserts build.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
711c52bb20d0c69063b52a99826fb7d2835501f1 05-Jan-2011 John McCall <rjmccall@apple.com> Refactor the application of type attributes so that attributes from
the declaration-specifiers and on the declarator itself are moved
to the appropriate declarator chunk. This permits a greatly
simplified model for how to apply these attributes, as well as
allowing a much more efficient query for the GC attribute.
Now all qualifier queries follow the same basic strategy of
"local qualifiers, local qualifiers on the canonical type,
then look through arrays". This can be easily optimized by
changing the canonical qualified-array-type representation.

Do not process type attributes as decl attributes on declarations
with declarators.

When computing the type of a block, synthesize a prototype
function declarator chunk if the decl-spec type was not a
function. This simplifies the logic for building block signatures.

Change the logic which inserts an objc_read_weak on a block
literal to only fire if the block has a __weak __block variable,
rather than if the return type of the block is __weak qualified,
which is not actually a sensible thing to ask.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b2b5cc0cf908d516a107d373db963f692449a8a8 04-Jan-2011 Chandler Carruth <chandlerc@gmail.com> Enhance the diagnostic for negative array sizes to include the
declaration name of the array when present. This ensures that
a poor-man's C++03 static_assert will include the user error message
often embedded in the name.

Update all the tests to reflect the new wording, and add a test for the
name behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
7f040a9d817cd1c72b565e92abff473510bf9e1d 24-Dec-2010 John McCall <rjmccall@apple.com> Refactor how we collect attributes during parsing, and add slots for attributes
on array and function declarators. This is pretty far from complete, and I'll
revisit it later if someone doesn't beat me to it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
10738d36b150aa65206890c1c845cdba076e4200 24-Dec-2010 Douglas Gregor <dgregor@apple.com> Add an AST representation for non-type template parameter
packs, e.g.,

template<typename T, unsigned ...Dims> struct multi_array;

along with semantic analysis support for finding unexpanded non-type
template parameter packs in types, expressions, and so on.

Template instantiation involving non-type template parameter packs
probably doesn't work yet. That'll come soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a8bc8c9e9ba5bffebde00340786fe8542469c435 23-Dec-2010 Douglas Gregor <dgregor@apple.com> Implement parsing of function parameter packs and non-type template
parameter packs (C++0x [dcl.fct]p13), including disambiguation between
unnamed function parameter packs and varargs (C++0x [dcl.fct]p14) for
cases like

void f(T...)

where T may or may not contain unexpanded parameter packs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e6a365d772a6b455f1e23ac9ae5f40d65a55a18c 19-Dec-2010 John McCall <rjmccall@apple.com> Motions towards simplifying how we deal with attribute-qualified function types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
5e3c67b4bd894a926282d24b4d0cbc0e123c9f4a 15-Dec-2010 John McCall <rjmccall@apple.com> Sundry missing lvalue-to-rvalue conversions. Also leave a TODO for the vital
future task of performing contextual conversion to size_t in a VLA size
expression. :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
373920bd733b1d28fe7bf209945a62eb9248d948 14-Dec-2010 John McCall <rjmccall@apple.com> Improve some comments, shrink FunctionType::ExtInfo, and fix a bug found
by valgrind where we were doing the wrong thing in the presence of invalid
exception specs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121770 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.cpp
eb0eb49ce5f5294902769702b9322e42e89e972e 10-Dec-2010 Douglas Gregor <dgregor@apple.com> Use TypeAlignment constant rather than fixed alignment of 8

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121473 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
253e80b019727451edb4cbcad71277fcbe05ff0e 22-Nov-2010 Nico Weber <nicolasweber@gmx.de> Fix the source range of CXXNewExprs. Fixes http://llvm.org/pr8661.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
916c870442978db40404d51348cdf5524e506faa 16-Nov-2010 John McCall <rjmccall@apple.com> Add an ExternalASTSource hook to complete a type on demand.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
4211bb68cff1f310be280f66a59520548ef99d8f 16-Nov-2010 Bob Wilson <bob.wilson@apple.com> Add support for "neon_vector_type" and "neon_polyvector_type" attributes
to create the special Neon vector types. These are intended to be used in
Clang's version of <arm_neon.h> to define special Neon vector types that will
be mangled according to ARM's ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
56affbcaeff9a01caa70b2a237f7e6ac31c8ded6 16-Nov-2010 Bob Wilson <bob.wilson@apple.com> Fix a comment typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e86d78cf4754a6aef2cf9a33d847aa15338e276f 10-Nov-2010 Bob Wilson <bob.wilson@apple.com> Add a variant of GCC-style vector types for ARM NEON.
NEON vector types need to be mangled in a special way to comply with ARM's ABI,
similar to some of the AltiVec-specific vector types. This patch is mostly
just renaming a bunch of "AltiVecSpecific" things, since they will no longer
be specific to AltiVec. Besides that, it just adds the new "NeonVector" enum.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
613ef3d4c144f8c35224daf28a187426d2044aee 19-Oct-2010 John McCall <rjmccall@apple.com> Uncomputable contexts are always records but can exist.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
708f3b8e350a5c0605889a4f32b26686864495ca 15-Oct-2010 Douglas Gregor <dgregor@apple.com> Make sure that we diagnose invalid qualifiers on friend functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
008df5dce3938456ae7ea2e7ab3b2d12391ebf3e 14-Oct-2010 John McCall <rjmccall@apple.com> Whoops. This really shouldn't compile in clang, either.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
1e030eb1194763b42c1752723be23b1515f48981 14-Oct-2010 John McCall <rjmccall@apple.com> Perform range restrictions on regparm when applied to a type and
not a decl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
2a984cad5ac3fdceeff2bd99daa7b90979313475 12-Oct-2010 John McCall <rjmccall@apple.com> Add some infrastructure for dealing with expressions of 'placeholder' type,
i.e. expressions with an internally-convenient type which should not be
appearing in generally valid, complete ASTs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
730e175910936eae49e65caea8b2ba81c67edff7 06-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Issue deprecated warning when typeof uses typedef
based on underlying type's deprecatedness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
aca7f7bab0102341863a0d1bdb048d69213ae362 06-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Ue TagType, added a FIXME. Per John's comment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
2b1d51bcf891f8887759aebb4b9e78dee8542e6d 06-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Issue deprecated warning when typeof uses an
expression of deprecated type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
dab60ad68a3a98d687305941a3852e793705f945 01-Oct-2010 Douglas Gregor <dgregor@apple.com> Implement the C++0x "trailing return type" feature, e.g.,

auto f(int) -> int

from Daniel Wallin!

(With a few minor bug fixes from me).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
47423bdaa06a3b9c2a859b57c17fc570094dad1c 23-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't crash on _Imaginary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.cpp
2d0e2431b2ddd16cd87176a3bf6c2529b8acaab2 03-Sep-2010 Anders Carlsson <andersca@mac.com> Remove now unused function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
5d1d7ae120c2c8e6cba5d2a712b33500a5aecc10 03-Sep-2010 Anders Carlsson <andersca@mac.com> Get rid of the "functions declared 'noreturn' should have a 'void' result type" warning.

The rationale behind this is that it is normal for callback functions to have a non-void return type
and it should still be possible to mark them noreturn. (JavaScriptCore is a good example of this).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
afac01d7e76f28d5e5a5c377369cc400919387ee 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Transfer calling-convention attributes down to member function pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f312b1ea179f1c44371f9ee0cd0bc006f612de11 27-Aug-2010 John McCall <rjmccall@apple.com> One who seeks knowledge learns something new every day.
One who seeks the Tao unlearns something new every day.
Less and less remains until you arrive at non-action.
When you arrive at non-action,
nothing will be left undone.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
2d88708cbe4e4ec5e04e4acb6bd7f5be68557379 26-Aug-2010 John McCall <rjmccall@apple.com> Split out a header to hold APIs meant for the Sema implementation from Sema.h.
Clients of Sema don't need to know (for example) the list of diagnostics we
support.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
7cd088e519d7e6caa4c4c12db52e0e4ae35d25c2 24-Aug-2010 John McCall <rjmccall@apple.com> Struggle mightily against header inclusion in Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b3d8748e797c6c2f1dc01186c8eeb3b1b5fe970c 24-Aug-2010 John McCall <rjmccall@apple.com> Abstract out passing around types and kill off ActionBase.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
9ae2f076ca5ab1feb3ba95629099ec2319833701 24-Aug-2010 John McCall <rjmccall@apple.com> Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
d226f65006733ed7f709c3174f22ce33391cb58f 21-Aug-2010 John McCall <rjmccall@apple.com> DeclPtrTy -> Decl *



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
19510856727e0e14a3696b2a72c35163bff2a71f 20-Aug-2010 John McCall <rjmccall@apple.com> Another step in the process of making the parser depend on Sema:
- move DeclSpec &c into the Sema library
- move ParseAST into the Parse library
Reflect this change in a thousand different includes.
Reflect this change in the link orders.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
20cf717034ba1f20fc47c025ecb72ed9b631ad13 19-Aug-2010 Charles Davis <cdavis@mines.edu> Add some enum goodness as requested by Chris. Now instead of storing the
active C++ ABI as a raw string, we store it as an enum. This should improve
performance somewhat.

And yes, this time, I started from a clean build directory, and
all the tests passed. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
58f281f7d54976f23ed4fa23a10ff1ab9c7037fe 19-Aug-2010 Ted Kremenek <kremenek@apple.com> Add warning for functions/blocks that have attribute 'noreturn' but return a non-void result. (<rdar://problem/7562925>)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
d18f9f965bcfe56edcdf9b0d8375ffaad9866b3f 16-Aug-2010 Charles Davis <cdavis@mines.edu> Err on incomplete class types in member pointers when compiling for the
Microsoft C++ ABI, for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
7bd067635df79f6ce4b9ffee394ea6d9e86e4290 13-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed NNS insertion in MemberPointerType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e737f5041a36d0befb39ffeed8d50ba15916d3da 12-Aug-2010 Douglas Gregor <dgregor@apple.com> Move Sema's headers into include/clang/Sema, renaming a few along the way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
22f638a58ed05579c51ee6a35a1d16a7c2157f90 10-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed redundant NNS loading.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
fa869547eb1cab12d7e0c0dfa8ba594e336b9b32 05-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Preserve calling convention etc. across template instantiations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
27940d2fb346325d6001a7661e4ada099cd8e59c 30-Jul-2010 John McCall <rjmccall@apple.com> If a TST_typename has a null type, mark the declarator invalid. Prevents
some downstream crashes, among them rdar://problem/8229840.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ff331c15729f7d4439d253c97f4d60f2a7ffd0c6 25-Jul-2010 Douglas Gregor <dgregor@apple.com> Remove the vast majority of the Destroy methods from the AST library,
since we aren't going to be calling them ever.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
67a213b1efffe854f924737af2bc8322ac138328 23-Jul-2010 Bill Wendling <isanbard@gmail.com> Remove unneeded iostream include.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109219 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
de80ec1fa947855d2e53722a8cd71367ff513481 13-Jul-2010 Douglas Gregor <dgregor@apple.com> Improve diagnostics for the "type qualifier on return type has no
effect warning" by printing the qualifiers we saw and correctly
pluralizing the message, e.g.,

test/SemaCXX/conditional-expr.cpp:295:3: warning: 'const volatile' type
qualifiers on return type have no effect
const volatile Enum g2() {
^~~~~ ~~~~~~~~





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
c61bb2056148891375bfa591fa2859b9b6ec2734 09-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Slightly improve the diagnostic when using a qualified function typedef to declare nonmember or static member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
788b0fd67e1992f23555454efcdb16a19dfefac3 23-Jun-2010 Chris Lattner <sabre@nondot.org> improve altivec vector bool/pixel support, patch by Anton Yartsev
with several tweaks by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
737801257f795632175517ffce4a80c62fc7bff7 09-Jun-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Commit my WIP on constexpr support. This commit: an XFAILed test and treating constexpr as a top-level const.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
5a57efd7bf88a4a13018e0471ded8063a4abe8af 09-Jun-2010 Douglas Gregor <dgregor@apple.com> Tweak our handling of the notion of a standard conversion sequence
being a subsequence of another standard conversion sequence. Instead
of requiring exact type equality for the second conversion step,
require type *similarity*, which is type equality with cv-qualifiers
removed at all levels. This appears to match the behavior of EDG and
VC++ (albeit not GCC), and feels more intuitive. Big thanks to John
for the line of reasoning that supports this change: since
cv-qualifiers are orthogonal to the second conversion step, we should
ignore them in the type comparison.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
2865474261a608c7873b87ba4af110d17907896d 05-Jun-2010 John McCall <rjmccall@apple.com> Simplify the methods for creating a pointer, reference, member-pointer,
or block-pointer type by removing the qualifiers parameter. Introduce a
method to perform semantic checking when adding qualifiers to a type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
bf1a028246d884a540aeafa38e89be59a269b072 05-Jun-2010 John McCall <rjmccall@apple.com> Alter the interface of GetTypeForDeclarator to return a TypeSourceInfo*.
This is never null, but the associated type might be.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
204ce17e0cfd9bbe229627e1e5a20c3f2f587c8c 24-May-2010 Douglas Gregor <dgregor@apple.com> Don't complain about VLAs of non-POD types when the array type is
dependent. Fixes <rdar://problem/8021385>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
0fddb97901dbe36a8253dee29961cba8e0a87cf6 22-May-2010 Douglas Gregor <dgregor@apple.com> Implement support for variable length arrays in C++. VLAs are limited
in several important ways:

- VLAs of non-POD types are not permitted.
- VLAs cannot be used in conjunction with C++ templates.

These restrictions are intended to keep VLAs out of the parts of the
C++ type system where they cause the most trouble. Fixes PR5678 and
<rdar://problem/8013618>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e4da7a034a2fcf4b14d0bcc28d05de0878159061 19-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added basic source locations to Elaborated and DependentName types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ac06a0e1e3feb95c2ffd352c086882b492a65b99 19-May-2010 Douglas Gregor <dgregor@apple.com> Protect isIntegerConstantExpr from seeing type- or value-dependent
expressions in attributes, pragmas.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
d425d2b78665f42dddda56da31d6a3f576493474 18-May-2010 John McCall <rjmccall@apple.com> Permit Objective C object pointers to be const_casted.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
c12c5bba6ceb6acd4e51e7a0fc03257da9cfd44e 15-May-2010 John McCall <rjmccall@apple.com> Substantially alter the design of the Objective C type AST by introducing
ObjCObjectType, which is basically just a pair of
one of {primitive-id, primitive-Class, user-defined @class}
with
a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared). ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.

Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet. Remove some number of methods that are no
longer used, at least after this patch.

By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a63db84b164d3f1c987a3ea6251e3092db4f317b 14-May-2010 Daniel Dunbar <daniel@zuster.org> Revert r103770, "Added basic source locations to Elaborated and DependentName
types.", it is breaking Clang bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103775 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
5431299f6e1e1d14b39b924fe24bf04035f4ae42 14-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added basic source locations to Elaborated and DependentName types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103770 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
465d41b92b2c862f3062c412a0538db65c6a2661 11-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Merged Elaborated and QualifiedName types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e215f7232dd4aa65ebf2a1ecd07cd95fe1ce3481 30-Apr-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Add calling convention related attributes to related declaration. Mark attributes invalid on type related checking so to add them to declarations only when everything is ok.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b1f1b267351be74013f966f4834cde1eddbe0233 30-Apr-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Attribute noreturn is now put in declaration attributes. Fixed a double warning generation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
138bb2366baa3856088bae94f36f2d96b2c995b9 27-Apr-2010 Douglas Gregor <dgregor@apple.com> Diagnose the use of abstract types as array element types. Previously,
we were relying on checking for abstract class types when an array
type was actually used to declare a variable, parameter, etc. However,
we need to check when the construct the array for, e.g., SFINAE
purposes (see DR337). Fixes problems with Boost's is_abstract type
trait.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
92e986e0adb79e8a47f738bd608e6c97c547641d 22-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement template instantiation for Objective-C++ message sends. We
support dependent receivers for class and instance messages, along
with dependent message arguments (of course), and check as much as we
can at template definition time.

This commit also deals with a subtle aspect of template instantiation
in Objective-C++, where the type 'T *' can morph from a dependent
PointerType into a non-dependent ObjCObjectPointer type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
050b78acf11900cb8c47563376200a1d7bd97f59 22-Apr-2010 Douglas Gregor <dgregor@apple.com> Record nested-name-specifiers of when we create
elaborated-type-specifiers. Patch by Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
cb421fa690da545b58a720abe5f1c49b166dbde7 19-Apr-2010 Dan Gohman <gohman@apple.com> Fix -Wcast-qual warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
c0b53c2e4c954fe59917da5194ba4b9f831fa5bf 13-Apr-2010 Douglas Gregor <dgregor@apple.com> Remove some dead FIXMEs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
05baacbfd67017b2724f3e0503fd23609f5d32bc 13-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve source-location information for C++ conversion functions, by
copying the type location information from the conversion-type-id into
the type location information for the function type. Do something
similar for constructors and destructors, by giving their "void"
return type source-location information.

In all of these cases, we previously left this type-source information
uninitialized, which led to various unfortunate crashes.

We still aren't tracking good source-location information for the
actual names. That's PR6357.

John, please check my sanity on this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
edc287751a4b05e3b4d8ff2b38fa30c5b59a548b 08-Apr-2010 Jeffrey Yasskin <jyasskin@google.com> Fix some redundant errors by changing CXXScopeSpec::isSet calls into
isNotEmpty calls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
161755a09898c95d21bfff33707da9ca41cd53c5 06-Apr-2010 John McCall <rjmccall@apple.com> Implement the protected access restriction ([class.protected]), which requires
that protected members be used on objects of types which derive from the
naming class of the lookup. My first N attempts at this were poorly-founded,
largely because the standard is very badly worded here.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
4a2023f5014e82389d5980d307b89c545dbbac81 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Extend DependentNameType with a keyword enum that specifies whether
this was parsed as a typename-specifier, elaborated-type-specifier
(including the kind), or just a dependent qualified type name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
849b243d4065f56742a4677d6dc8277609a151f8 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Reinstate my CodeModificationHint -> FixItHint renaming patch, without
the C-only "optimization".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
275313cbb0847f1f117f60d144d113804d4fa42d 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Revert r100008, which inexplicably breaks the clang-i686-darwin10 builder

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
d0ebe080eee7c37e73754068b47fd90cc506e128 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Rename CodeModificationHint to FixItHint, since we've been using the
term "fix-it" everywhere and even *I* get tired of long names
sometimes. No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
6bb8017bb9e828d118e15e59d71c66bba323c364 30-Mar-2010 John McCall <rjmccall@apple.com> Propagate the "found declaration" (i.e. the using declaration instead of
the underlying/instantiated decl) through a lot of API, including "intermediate"
MemberExprs required for (e.g.) template instantiation. This is necessary
because of the access semantics of member accesses to using declarations:
only the base class *containing the using decl* need be accessible from the
naming class.

This allows us to complete an access-controlled selfhost, if there are no
recent regressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
fe6b2d481d91140923f4541f273b253291884214 30-Mar-2010 Douglas Gregor <dgregor@apple.com> Optimize PartialDiagnostic's memory-allocation behavior by placing a
cache of PartialDiagnostic::Storage objects into an allocator within
the ASTContext. This eliminates a significant amount of malloc
traffic, for a 10% performance improvement in -fsyntax-only wall-clock
time with 403.gcc's combine.c.

Also, eliminate the RequireNonAbstractType hack I put in earlier,
which was but a symptom of this larger problem.

Fixes <rdar://problem/7806091>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
02024a9f0d8e6c898de276193af604c42ee41269 28-Mar-2010 Douglas Gregor <dgregor@apple.com> After performing template argument deduction for a function template,
check deduced non-type template arguments and template template
arguments against the template parameters for which they were deduced,
performing conversions as appropriate so that deduced template
arguments get the same treatment as explicitly-specified template
arguments. This is the bulk of PR6723.

Also keep track of whether deduction of a non-type template argument
came from an array bound (vs. anywhere else). With this information,
we enforce C++ [temp.deduct.type]p17, which requires exact type
matches when deduction deduces a non-type template argument from
something that is not an array bound.

Finally, when in a SFINAE context, translate the "zero sized
arrays are an extension" extension diagnostic into a hard error (for
better standard conformance), which was a minor part of PR6723.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
01620704304f819b82ecef769ec114e541a364d7 21-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix PR6618.

If a struct has an invalid field, mark it as invalid. Also avoid producing
errors about incomplete types that are invalid.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a42286486c85402c65f9d30df17e6b1b037a6ade 05-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to build qualifier on objective-c
pointer types. Fixes radar 7626768.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
328ce34c7d0c4e8696d352853b48b385dec1fef4 24-Feb-2010 Charles Davis <cdavis@mines.edu> When we encounter a function-specific attribute in a declaration specifier,
apply it only to the function itself, and never to the return type. Fixes part
of PR6408.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
064f7db69def9299f5f4d9a32114afc10b6a6420 23-Feb-2010 Charles Davis <cdavis@mines.edu> When comparing two calling conventions after redeclaring a function, compare
the canonical calling conventions instead of comparing the raw calling
conventions directly. Fixes PR6361.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ce056bcaa1c97b89a4b2de2112c62d060863be2b 21-Feb-2010 Douglas Gregor <dgregor@apple.com> Eliminate the default arguments to ASTContext::getFunctionType(),
fixing up a few callers that thought they were propagating NoReturn
information but were in fact saying something about exception
specifications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b37b648b3f2bba4c557a1604ced19b526b25a372 12-Feb-2010 Douglas Gregor <dgregor@apple.com> Improve representation of tag declarations first declared or defined
within the declarator of another declaration, from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
591bd3cb605f1f0229b4b1d8a4b8183377064ec5 08-Feb-2010 Douglas Gregor <dgregor@apple.com> Keep track of whether a tag was defined in a declarator vs. being
defined by itself, from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
82287d19ded35248c4ce6a425ce74116a13ce44e 05-Feb-2010 John Thompson <John.Thompson.JTSoftware@gmail.com> First stage of adding AltiVec support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
ddf889a2ad2888f1dea573987bbe952d9912c1a0 18-Jan-2010 Douglas Gregor <dgregor@apple.com> Improve source-location information for builtin TypeLocs, from Enea
Zaffanella (with a couple of my tweaks).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
cfb708c354e2f30ccc5cba9d644650f408a1ec3e 13-Jan-2010 John McCall <rjmccall@apple.com> Add type source information for both kinds of typeof types.
Patch by Enea Zaffanella.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
0efc2c1716be4f1c5f1343cad3b047e74861f030 13-Jan-2010 Douglas Gregor <dgregor@apple.com> Reimplement constructor declarator parsing to cope with template-ids
that name constructors, the endless joys of out-of-line constructor
definitions, and various other corner cases that the previous hack
never imagined. Fixes PR5688 and tightens up semantic analysis for
constructor names.

Additionally, fixed a problem where we wouldn't properly enter the
declarator scope of a parenthesized declarator. We were entering the
scope, then leaving it when we saw the ")"; now, we re-enter the
declarator scope before parsing the parameter list.

Note that we are forced to perform some tentative parsing within a
class (call it C) to tell the difference between

C(int); // constructor

and

C (f)(int); // member function

which is rather unfortunate. And, although it isn't necessary for
correctness, we use the same tentative-parsing mechanism for
out-of-line constructors to improve diagnostics in icky cases like:

C::C C::f(int); // error: C::C refers to the constructor name, but
// we complain nicely and recover by treating it as
// a type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
af40776922bc5c28e740adb0342faa09f35b0068 12-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Reverted r93198; done without reading relevant PR.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
004f81f8d1ec38047dba4d198311d31ccc8dd94d 11-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Allow VLAs in C++ if in GNU mode (GNU C++ permits them). Clang can now compile LanguageKit, although the resulting code crashes (although not in any of the functions that use VLAs).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93198 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
58408bc4ead86b08af56cd06fc966fd858b48b2d 11-Jan-2010 Douglas Gregor <dgregor@apple.com> Tighten up the "cannot return array or function type" diagnostic to
say either "array type" or "function type", whichever it is. No reason
to make the user guess.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
48026d26fb58e413544874eead5491b1452e2ebf 11-Jan-2010 Douglas Gregor <dgregor@apple.com> Implement name lookup for conversion function template specializations
(C++ [temp.mem]p5-6), which involves template argument deduction based
on the type named, e.g., given

struct X { template<typename T> operator T*(); } x;

when we call

x.operator int*();

we perform template argument deduction to determine that T=int. This
template argument deduction is needed for template specialization and
explicit instantiation, e.g.,

template<> X::operator float*() { /* ... */ }

and when calling or otherwise naming a conversion function (as in the
first example).

This fixes PR5742 and PR5762, although there's some remaining ugliness
that's causing out-of-line definitions of conversion function
templates to fail. I'll look into that separately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
3a349947e5d4ba6bd16d775ce17cf9c9d181bc39 02-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Eliminate dead code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
4b52e25f3b05ab0f9d2492276a52323a50a84fb7 22-Dec-2009 Douglas Gregor <dgregor@apple.com> When a template-id refers to a single function template, and the
explicitly-specified template arguments are enough to determine the
instantiation, and either template argument deduction fails or is not
performed in that context, we can resolve the template-id down to a
function template specialization (so sayeth C++0x
[temp.arg.explicit]p3). Fixes PR5811.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
9f61aa9e280adea9fbf3365f0e4f6ed568c9885a 12-Dec-2009 Jeffrey Yasskin <jyasskin@google.com> Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
no extra safety anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
2b5ff1a1471819192ae805b51b888030ecb52914 07-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to allow restrict applied to id/Class types.
(fixes radar 7442244).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a93c934af4fbf97cbe8e649d82e68ccacfe57c95 07-Dec-2009 John McCall <rjmccall@apple.com> DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated variables,
but the results are imperfect.

For posterity, I did:

cat <<EOF > $cmdfile
s/DeclaratorInfo/TypeSourceInfo/g
s/DInfo/TInfo/g
s/TypeTypeSourceInfo/TypeSourceInfo/g
s/SourceTypeSourceInfo/TypeSourceInfo/g
EOF

find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \;
find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \;
find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
6e132aab867c189b1c3ee7463ef9d2b1f03a294d 04-Dec-2009 John Thompson <John.Thompson.JTSoftware@gmail.com> Fix for PR5650 - Revised vector_size attribute handling to be done earlier before declaration is finalized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90600 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
1f5f3a4d58a1c7c50c331b33329fc14563533c04 03-Dec-2009 Douglas Gregor <dgregor@apple.com> When we're building a CXXExprWithTemporaries, only include those
temporaries that are within our current evaluation context. That way,
nested evaluation contexts (e.g., within a sizeof() expression) won't
see temporaries from outer contexts. Also, make sure to push a new
evaluation context when instantiating the initializer of a variable;
this may be an unevaluated context or a potentially-evaluated context,
depending on whether it's an in-class initializer or not. Fixes PR5672.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
0486d746019f8310589b1f0d92edcc4bb3916b33 28-Nov-2009 Sean Hunt <rideau3@gmail.com> Add Parser support for C++0x literal operators ('operator "" i').
DeclarationName can't handle them yet, so right now Parser just errors out on them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
89c49f09b0292dc7c03885f6c765d667a9837597 09-Nov-2009 Douglas Gregor <dgregor@apple.com> Make sure that Type::getAs<ArrayType>() (or Type::getAs<subclass of
ArrayType>()) does not instantiate. Update all callers that used this
unsafe feature to use the appropriate ASTContext::getAs*ArrayType method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
c7621a64717203e1f7d5d79dbf548e590b32596c 05-Nov-2009 Douglas Gregor <dgregor@apple.com> Be a little more careful when trying to extract a TypeDecl from a enum/class/struct/union specifier; in invalid code, we may also see ClassTemplateDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
87c12c4a4667279dacb3d4a93c64b49148a0ff79 04-Nov-2009 Douglas Gregor <dgregor@apple.com> Store the unresolved class type in MemberPointerType's Class field,
from Peter Collingbourne!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86030 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
54abf7d4fa3123b8324c09d2a4dfb789fd818403 04-Nov-2009 John McCall <rjmccall@apple.com> Change our basic strategy for avoiding deprecation warnings when the decl use
appears in a deprecated context. In the new strategy, we emit the warnings
as usual unless we're currently parsing a declaration, where "declaration" is
restricted to mean a decl group or a few special cases in Objective C. If
we *are* parsing a declaration, we queue up the deprecation warnings until
the declaration has been completely parsed, and then emit them only if the
decl is not deprecated.
We also standardize the bookkeeping for deprecation so as to avoid special cases.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
3f9a0566e6793151b99a65ab936220971cf96c1b 03-Nov-2009 Douglas Gregor <dgregor@apple.com> Introduce a new class, UnqualifiedId, that provides a parsed
representation of a C++ unqualified-id, along with a single parsing
function (Parser::ParseUnqualifiedId) that will parse all of the
various forms of unqualified-id in C++.

Replace the representation of the declarator name in Declarator with
the new UnqualifiedId class, simplifying declarator-id parsing
considerably and providing more source-location information to
Sema. In the future, I hope to migrate all of the other
unqualified-id-parsing code over to this single representation, then
begin to merge actions that are currently only different because we
didn't have a unqualified notion of the name in the parser.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ac406052f7b980f8caa6b07b4a8d0867d53852c4 30-Oct-2009 John McCall <rjmccall@apple.com> Include pointee type information in the diagnostic for creating bad pointers or
arrays.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
972e6ce33c7e307f4b0da12bd6079bbd6ef76948 27-Oct-2009 Douglas Gregor <dgregor@apple.com> Only set the point of instantiation for an implicit or explicit
instantiation once we have committed to performing the
instantiation. As part of this, make our makeshift
template-instantiation location information suck slightly less.

Fixes PR5264.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
523382640e9b099dd64ba0875a60a9356845b068 25-Oct-2009 Chris Lattner <sabre@nondot.org> Implement rdar://6756623 - use of deprecated type in deprecated typedef should not warn


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a64ef0ab5cb6ac9cfb7d40661a9152c4aa488386 25-Oct-2009 Chris Lattner <sabre@nondot.org> move calls to DiagnoseUseOfDecl (which warns about deprecated/unavailable
types) out of Sema::getTypeName into ConvertDeclSpecToType. getTypeName
is sometimes used as a predicate in the parser, so it could cause redundant
diags to be emitted. This is also needed by two upcoming enhancements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85070 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8ce35b095e8fca45e04c1bda14ed0548ce7536ad 25-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Remove the Skip parameter from GetTypeForDeclarator and dependents. Take the opportunity to improve an error message and fix PR4498.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
311157fa6be96e2769bf317390dc9fb85087d5fa 25-Oct-2009 Chris Lattner <sabre@nondot.org> move the extwarn about using long long out of the entry of
GetTypeForDeclarator and into the code that handles long long
already.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85063 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
5db2bb1cb0c040dcbca1b5000f091d6d225b4bfe 25-Oct-2009 Chris Lattner <sabre@nondot.org> simplify interface to ConvertDeclSpecToType, check for inferred
block return types only when a TST isn't specified, not every time
through GetTypeForDeclarator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85062 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
1564e3906cad604a42bd131e584751a75589a9c4 25-Oct-2009 Chris Lattner <sabre@nondot.org> change ConvertDeclSpecToType to be a static function in SemaType.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
778ed741de8ada0049b89608af0abdb5ae6e106e 25-Oct-2009 Chris Lattner <sabre@nondot.org> various cleanups for SemaType.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
573d9c325279b6e156c7fde163ffe3629c62d596 22-Oct-2009 Douglas Gregor <dgregor@apple.com> Don't (directly) call RequireCompleteType with an invalid source location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
51bd803fbdade51d674598ed45da3d54190a656c 18-Oct-2009 John McCall <rjmccall@apple.com> Clone the full Type hierarchy into the TypeLoc hierarchy. Normalize
TypeLoc class names to be $(Type classname)Loc. Rewrite the visitor.
Provide skeleton implementations for all the new TypeLocs.

Handle all cases in PCH. Handle a few more cases when inserting
location information in SemaType.

It should be extremely straightforward to add new location information
to existing TypeLoc objects now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
46a617a792bfab0d9b1e057371ea3b9540802226 16-Oct-2009 John McCall <rjmccall@apple.com> Remove the ConstantArrayType subtypes. This information is preserved in the
TypeLoc records for declarations; it should not be necessary to represent it
directly in the type system.

Please complain if you were using these classes and feel you can't replicate
previous functionality using the TypeLoc API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
34a0447b8072e0da14c0980597da9d03a1495662 15-Oct-2009 John McCall <rjmccall@apple.com> Better living through metaprogramming. Create a base class which abstracts
most of the unsafe boilerplate out of TypeLoc. Create a QualifiedLoc class
to represent the idea that we *might* start representing source locations
of qualifiers. Dealing with qualifiers explicitly like this also lets us
efficiently ignore them in all the concrete cases.

This should make it obvious and easy to add new TypeLoc subclasses.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84168 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b3ae4fcd4314a9c1c46d41b200883599c32025b4 12-Oct-2009 Douglas Gregor <dgregor@apple.com> Diagnose the declaration of explicit specializations after an implicit
instantiation has already been required. To do so, keep track of the
point of instantiation for anything that can be instantiated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
dced226e37f7c2c31c25d06c514f29b610fe2a54 11-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Test exception spec compatibility on return type and parameters.

Along the way, use RequireCompleteType when testing exception spec types.
Separate all the ugly spec stuff into its own file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83764 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
2c7588f1260c6655cfb73126b695d2f79ae170bb 10-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement the core checking for compatible exception specifications in assignment and initialization.

The exception specification of the assignee must be the same or a subset of the target. In addition, exception specifications on arguments and return types must be equivalent, but this is not implemented yet.
This currently produces two diagnostics for every invalid assignment/initialization, due to the diagnostic produced outside PerformImplicitConversion, e.g. in CheckSingleInitializer. I don't know how to suppress this; in any case I think it is the wrong place for a diagnostic, since there are other diagnostics produced inside the function. So I'm leaving it as it is for the moment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
6e24726524c2b51b31bb4b622aa678a46b024f42 10-Oct-2009 John McCall <rjmccall@apple.com> Qualified lookup through using declarations. Diagnose a new type of ambiguity.
Split the various ambiguous result enumerators into their own enum. Tests
for most of C++ [namespace.qual].



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8c8d91917c307dc3ba4f60661377c745f2a6bef2 10-Oct-2009 Anders Carlsson <andersca@mac.com> Add CheckCallReturnType and start using it for regular call expressions. This will improve error messages. For

struct B;

B f();

void g() {
f();
}

We now get

t.cpp:6:3: error: calling 'f' with incomplete return type 'struct B'
f();
^~~
t.cpp:3:3: note: 'f' declared here
B f();
^
t.cpp:1:8: note: forward declaration of 'struct B'
struct B;
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f6b1185f0a8a209c06dfc1efdb6a59cc851e970c 08-Oct-2009 Douglas Gregor <dgregor@apple.com> Improve checking for specializations of member classes of class
templates, and keep track of how those member classes were
instantiated or specialized.

Make sure that we don't try to instantiate an explicitly-specialized
member class of a class template, when that explicit specialization
was a declaration rather than a definition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a8f32e0965ee19ecc53cd796e34268377a20357c 06-Oct-2009 Douglas Gregor <dgregor@apple.com> Refactor the code that walks a C++ inheritance hierarchy, searching
for bases, members, overridden virtual methods, etc. The operations
isDerivedFrom and lookupInBases are now provided by CXXRecordDecl,
rather than by Sema, so that CodeGen and other clients can use them
directly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
eb66759e9a1d7c041354d132a14674b2d948059b 29-Sep-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce ObjCInterfaceLoc which provides type source information for ObjC interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f352bddf015e537350416c296dd2963524f554f9 29-Sep-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce ObjCProtocolListLoc for keeping source location information for protocol references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
db422dffb720ff41d0b60e228f45c685600ffa9e 25-Sep-2009 Douglas Gregor <dgregor@apple.com> Declarators can now properly represent template-ids, e.g., for

template void f<int>(int);
~~~~~~
Previously, we silently dropped the template arguments. With this
change, we now use the template arguments (when available) as the
explicitly-specified template arguments used to aid template argument
deduction for explicit template instantiations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
0953e767ff7817f97b3ab20896b229891eeff45b 24-Sep-2009 John McCall <rjmccall@apple.com> Refactor the representation of qualifiers to bring ExtQualType out of the
Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right; many more remain.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
83913e36c847052966d9ff60d760ea7231ed8b6b 17-Sep-2009 Anders Carlsson <andersca@mac.com> When creating function types, remove any top-level CVR qualifications in the function type argument types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
9cc7807e1622c2f945b607bdd39dd283df5e7bb5 11-Sep-2009 John McCall <rjmccall@apple.com> Track a class template specialization's point of instantiation separately
from its location. Initialize appropriately.

When implicitly creating a declaration of a class template specialization
after encountering the first reference to it, use the pattern class's
location instead of the location of the first reference.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
043cad21b78c6b02597cdc7b6ead32388e27ebc7 11-Sep-2009 Douglas Gregor <dgregor@apple.com> Diagnose VLAs as an error in C++.

Also, treat the GNU __null as an integral constant expression to match
GCC's behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
1eb4433ac451dc16f4133a88af2d002ac26c58ef 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
2191b20bfb31fc0e22a158f6b4204cd0b7dbd0fd 05-Sep-2009 John McCall <rjmccall@apple.com> Start emitting ElaboratedTypes in C++ mode. Support the effort in various
ways: remove elab types during desugaring, enhance pretty-printing to allow
tags to be suppressed without suppressing scopes, look through elab types
when associating a typedef name with an anonymous record type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
d0e3daf2b980b505e535d35b432c938c6d0208ef 05-Sep-2009 Douglas Gregor <dgregor@apple.com> Improve the AST representation and semantic analysis for extern
templates. We now distinguish between an explicit instantiation
declaration and an explicit instantiation definition, and know not to
instantiate explicit instantiation declarations. Unfortunately, there
is some remaining confusion w.r.t. instantiation of out-of-line member
function definitions that causes trouble here.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
31590f929eec2c4fbd09276b5f3a7038d5f3b3e2 30-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix the start source location for type-specs like long, short, etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
357bbd022c1d340c8e255aea7a684ddb34bc76e5 28-Aug-2009 Douglas Gregor <dgregor@apple.com> Tighten up the conversion from a single-level template argument list
to a multi-level template argument list by making it explicit. The
forced auditing of callers found a bug in the instantiation of member
classes inside member templates.

I *love* static type systems.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b790661a15d93941d2c33a0ea328254277b3d7e3 27-Aug-2009 Anders Carlsson <andersca@mac.com> Bye-bye old RequireCompleteType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80182 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
c56642301eaa6335ea9ad210ff923080f841464b 27-Aug-2009 Anders Carlsson <andersca@mac.com> Remove another unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80175 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
d497ba7ca5e52cd4523822055abd5e89dfec1800 27-Aug-2009 Anders Carlsson <andersca@mac.com> Remove the PrintType argument from RequireCompleteType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
91a0cc913ecc5619b76d2e40742fd09725be8c56 27-Aug-2009 Anders Carlsson <andersca@mac.com> Add a RequireCompleteType variant that takes a PartialDiagnostic. The old RequireCompleteType now creates a PartialDiagnostic and calls the new function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
5842ba9fd482bb2fe5198b32c2ae549cd5474e6d 24-Aug-2009 Douglas Gregor <dgregor@apple.com> Try to complete a type before looking for conversion functions within
that type. Note that we do not produce a diagnostic if the type is
incomplete; rather, we just don't look for conversion functions. Fixes PR4660.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a95d75769edae299816ec7fd9bbcdf1ef617c5c9 19-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Make integer promotions work correctly on PIC16 and other platforms
where sizeof(short) == sizeof(int). Move UsualArithmeticConversionsType
out of Sema, since it was only there as a historical artifact. Patch by
Enea Zaffanella.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
35d44e5673e772d1cc7eab66818de8d9796b89ca 19-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix a comment and improve an assert message.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e8661906d49ef6c9694a9cc845ca62a85dbc016d 19-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use Sema's LocInfoType to pass and preserve type source info through the Parser.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
1bb8a45f7386a23871598d05141a07af03067925 19-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce LocInfoType which is a Sema-specific implementation detail.

This is a Type subclass that can hold a DeclaratorInfo* when we have type source info coming
out of a declarator that we want to preserve. This is used only at the "border" of Parser/Sema for
passing/getting QualTypes, it does not participate in the type system semantics in any way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
4adab7fcb4cb1e23622f4849f7ef7981ff169616 19-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Create and instantiate a DeclaratorInfo using a newly introduced Sema::GetDeclaratorInfoForDeclarator().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a1d5662d96465f0fddf8819d245da4d19b892eff 19-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema interfaces.

DeclaratorDecl contains a DeclaratorInfo* to keep type source info.
Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl.
EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo.

Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
33a3138a0862cafdd9ff1332b834454a79cd2cdc 05-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Get rid of "smart" quotes. Per report on cfe-dev.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
efadb7768e7c7418185f5a4010ecd8b21ca9731b 28-Jul-2009 John McCall <rjmccall@apple.com> Bounds checking for address spaces.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77303 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.cpp
f59a56e180bf54528d7d1d5afa68fcc13300965a 22-Jul-2009 Douglas Gregor <dgregor@apple.com> Basic parsing and semantic analysis for out-of-line definitions of the
member functions of class templates, e.g.,

template<typename T>
struct X {
void f(T);
};

template<typename T> X<T>::f(T) { /* ... */ }



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
67ef8eaea8a0a2073147a8d863f0e3f30d525802 20-Jul-2009 Steve Naroff <snaroff@apple.com> 5 cleanups to ObjCObjectPointerType work:

- Remove Sema::CheckPointeeTypesForAssignment(), a temporary API I added to ease migration to ObjCObjectPointerType. Convert Sema::CheckAssignmentConstraints() to no longer depend on the temporary API.
- Sema::ConvertDeclSpecToType(): Replace a couple FIXME's with an important comment/example.
- Sema::GetTypeForDeclarator(): Get the protocol's from the interface, NOT the declspec (to support the following C typedef idiom: "typedef C<P> T; T *obj").
- Sema::ObjCQualifiedIdTypesAreCompatible(): Removed some dead code.
- ASTContext::getObjCEncodingForTypeImpl(): Some minor cleanups.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
726212f41bac77dc7f3352bc7047615fa0cd9e58 18-Jul-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Enhance testing of overriding exception specs for inaccessible base exceptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.cpp
14108da7f7fc059772711e4ffee1322a27b152a7 11-Jul-2009 Steve Naroff <snaroff@apple.com> This patch includes a conceptually simple, but very intrusive/pervasive change.

The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches.

This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic.

By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time.

Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
23c7d061367dd2fc1631e867cffc3d6aae24e799 07-Jul-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement checking of exception spec compatibility for overriding virtual functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
7e7eb3da052a6d80ddf2377cab0384c798f73f75 06-Jul-2009 Douglas Gregor <dgregor@apple.com> Keep track of the Expr used to describe the size of an array type,
from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
4994d2d50ceacdc8908f750c55589c0a20942a0a 04-Jul-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Catch function redeclarations with incompatible exception specifications.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8d4655d3b966da02fe0588767160448594cddd61 30-Jun-2009 Anders Carlsson <andersca@mac.com> Make an error message more clear.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
af017e682918f7a1a95ff08d9ab7ae3426436ca3 30-Jun-2009 Anders Carlsson <andersca@mac.com> Improvements to decltype. We now don't crash anymore when the expr is an overloaded function decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
74add6d9a4f475fe1cc5c146e9a0543578e95da3 29-Jun-2009 Anders Carlsson <andersca@mac.com> Remove some dead code

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
683087ffcf21d2a22cd2d0424b7f119168b47a8e 29-Jun-2009 Steve Naroff <snaroff@apple.com> Remove ASTContext::getObjCQualifiedIdType().
Convert clients to use ASTContext::getObjCObjectPointerType().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
baf45d31f18e6d5b3d2a33695c2af6e6cbc4ee29 27-Jun-2009 Anders Carlsson <andersca@mac.com> More auto work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e7cf07d8df83e083505c7105c50b2797493008a6 26-Jun-2009 Anders Carlsson <andersca@mac.com> Can't have arrays of auto.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e89d15944dd3be750a09805ad21222d2fa9321fa 26-Jun-2009 Anders Carlsson <andersca@mac.com> Implement enough of the 'auto' keyword so we can claim to support N2546.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b78d833b12f7c4baab138f305f72efd49455a3f9 26-Jun-2009 Chris Lattner <sabre@nondot.org> Improve error recovery in C++: when we hit 'implicit int' cases in C++,
these are usually because the parser was thoroughly confused. In addition
to typing the value being declared as an int and hoping for the best, we
mark the value as invalid so we don't get chains of errors when it is
used downstream. In C, implicit int actually is valid, so typing the thing
as int is good and marking it invalid is bad. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
60a9a2a404a4cf259d39133383e922aa00ca9043 24-Jun-2009 Anders Carlsson <andersca@mac.com> C++ decltype support (N2343)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
6fd634f4ac59f5923cffadadb99d19f23c18707a 24-Jun-2009 Anders Carlsson <andersca@mac.com> Parse the C++0x decltype specifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
9a917e4fac79aba20fbd25983c78396475078918 13-Jun-2009 Anders Carlsson <andersca@mac.com> Address comments from Doug - Add a Sema::SemaRef.BuildBlockPointerType and use it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
949bf69136e07fb7968d84bc21d9272ff343ffdb 10-Jun-2009 Douglas Gregor <dgregor@apple.com> Handle member pointer types with dependent class types (e.g., int
T::*) and implement template instantiation for member pointer types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73151 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
fcff57751247d534159e0b51177cad5cc3e18ae7 03-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup for implicit int warnings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72770 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
3cc9726a493d90bd8faf094986a59352fd3461cb 31-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Disallow exception specs on typedefs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ef65f06e8e440aec541442cfd73a8a836e9bc842 29-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Reject incomplete types in exception specs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
6a7330c20cabf1cf1cd46f5dfc183ec3a72add66 29-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Disallow exception specifications on multi-level indirections.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
402abb55fc2e0cdda5fb1ac90009b1f5f6774906 29-May-2009 Douglas Gregor <dgregor@apple.com> When we parse a tag specifier, keep track of whether that tag
specifier resulted in the creation of a new TagDecl node, which
happens either when the tag specifier was a definition or when the tag
specifier was the first declaration of that tag type. This information
has several uses, the first of which is implemented in this commit:

1) In C++, one is not allowed to define tag types within a type
specifier (e.g., static_cast<struct S { int x; } *>(0) is
ill-formed) or within the result or parameter types of a
function. We now diagnose this.

2) We can extend DeclGroups to contain information about any tags
that are declared/defined within the declaration specifiers of a
variable, e.g.,

struct Point { int x, y, z; } p;

This will help improve AST printing and template instantiation,
among other things.

3) For C99, we can keep track of whether a tag type is defined
within the type of a parameter, to properly cope with cases like,
e.g.,

int bar(struct T2 { int x; } y) {
struct T2 z;
}

We can also do similar things wherever there is a type specifier,
e.g., to keep track of where the definition of S occurs in this
legal C99 code:

(struct S { int x, y; } *)0





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72555 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
690dc7f4f2c0fe87409839b7560c19dee7832195 22-May-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for C99 compound literals

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
beaaccd8e2a8748f77b66e2b330fb9136937e14c 21-May-2009 Jay Foad <jay.foad@gmail.com> Use v.data() instead of &v[0] when SmallVector v might be empty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
390b4cc8b45a05612349269ef08faab3e4688f06 16-May-2009 Mike Stump <mrs@apple.com> Reflow some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8f12f65fad7bfbbdbd4234efe0d484f68c3924b6 13-May-2009 Chris Lattner <sabre@nondot.org> reject use of the GNU _Decimal32 extension with a diagnostic, not an abort.
rdar://6880104


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
93dfdb1299ef740df854f4a745dc87e5e43f0c30 13-May-2009 Douglas Gregor <dgregor@apple.com> Semantic analysis for explicit instantiation of class templates. We
still aren't instantiating the definitions of class template members,
and core issues 275 and 259 will both affect the checking that we do
for explicit instantiations (but are not yet implemented).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
7bc8d964405ce3b0b95091cdb66a391e50275b3c 07-May-2009 Mike Stump <mrs@apple.com> Allow qualifiers on blocks. Radar 6441502


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
c7c11b1ba6a110f2416889cc3576fe33277b2a33 27-Apr-2009 Chris Lattner <sabre@nondot.org> rdar://6827200 - [sema] reject statically allocated arrays of interface types

Upgrade "array of interface" warning to an error. In addition to being a
terrible idea, this crashes codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
5153ee66d6d4fb37b02f85df38e48dc8b46660df 25-Apr-2009 Chris Lattner <sabre@nondot.org> Change SemaType's "GetTypeForDeclarator" and "ConvertDeclSpecToType" to
always return a non-null QualType + error bit. This fixes a bunch of
cases that didn't check for null result (and could thus crash) and eliminates
some crappy code scattered throughout sema.

This also improves the diagnostics in the recursive struct case to eliminate
a bogus second error. It also cleans up the case added to function.c by forming
a proper function type even though the declarator is erroneous, allowing the
parameter to be added to the function. Before:

t.c:2:1: error: unknown type name 'unknown_type'
unknown_type f(void*P)
^
t.c:4:3: error: use of undeclared identifier 'P'
P+1;
^

After:
t.c:2:1: error: unknown type name 'unknown_type'
unknown_type f(void*P)
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
eaaebc7cf10dc1a2016183a262ad3256bc468759 25-Apr-2009 Chris Lattner <sabre@nondot.org> This is a pretty big cleanup for how invalid decl/type are handle.
This gets rid of a bunch of random InvalidDecl bools in sema, changing
us to use the following approach:

1. When analyzing a declspec or declarator, if an error is found, we
set a bit in Declarator saying that it is invalid.
2. Once the Decl is created by sema, we immediately set the isInvalid
bit on it from what is in the declarator. From this point on, sema
consistently looks at and sets the bit on the decl.

This gives a very clear separation of concerns and simplifies a bunch
of code. In addition to this, this patch makes these changes:

1. it renames DeclSpec::getInvalidType() -> isInvalidType().
2. various "merge" functions no longer return bools: they just set the
invalid bit on the dest decl if invalid.
3. The ActOnTypedefDeclarator/ActOnFunctionDeclarator/ActOnVariableDeclarator
methods now set invalid on the decl returned instead of returning an
invalid bit byref.
4. In SemaType, refering to a typedef that was invalid now propagates the
bit into the resultant type. Stuff declared with the invalid typedef
will now be marked invalid.
5. Various methods like CheckVariableDeclaration now return void and set the
invalid bit on the decl they check.


There are a few minor changes to tests with this, but the only major bad
result is test/SemaCXX/constructor-recovery.cpp. I'll take a look at this
next.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
3f84ad22acc25353a47ee88f55ab05dffef5d9a9 22-Apr-2009 Chris Lattner <sabre@nondot.org> change implicit int warnings to point to the identifier, not the
start of the declspec. The fixit still goes there, and we underline
the declspec. This helps when the start of the declspec came from a
macro that expanded from a system header. For example, we now produce:

t.c:2:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
static x;
~~~~~~ ^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69777 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
b28317a8e5e0e2953d1e5406d753d6c3c7f1e7d2 28-Mar-2009 Chris Lattner <sabre@nondot.org> Introduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a
pointer. Its purpose in life is to be a glorified void*, but which does not
implicitly convert to void* or other OpaquePtr's with a different UID.

Introduce Action::DeclPtrTy which is a typedef for OpaquePtr<0>. Change the
entire parser/sema interface to use DeclPtrTy instead of DeclTy*. This
makes the C++ compiler enforce that these aren't convertible to other opaque
types.

We should also convert ExprTy, StmtTy, TypeTy, AttrTy, BaseTy, etc,
but I don't plan to do that in the short term.

The one outstanding known problem with this patch is that we lose the
bitmangling optimization where ActionResult<DeclPtrTy> doesn't know how to
bitmangle the success bit into the low bit of DeclPtrTy. I will rectify
this with a subsequent patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
d17a9e5a29ef076e31d012d7254b526769c386f6 27-Mar-2009 Douglas Gregor <dgregor@apple.com> Remove the code insertion hint for implicit int. Too often, we're wrong about this hint, so it loses its usefulness. Maybe some day we can make the hint smart enough to be useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
9af5500f3f132f9a2f9abbe82113a7c7bb751472 27-Mar-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6719156 - clang should emit a better error when blocks are disabled but are used anyway
by changing blocks from being disabled in the parser to being disabled
in Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
3507369940bfb269551bfa1fec812481f60e3552 27-Mar-2009 Douglas Gregor <dgregor@apple.com> Simplify CXXScopeSpec a lot. No more weird SmallVector-like hacks here

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
d475b8d9e6f5ff0e6ab8d15667ce8a64c7cb9a4d 25-Mar-2009 Douglas Gregor <dgregor@apple.com> Instantiation for member classes of class templates. Note that only
the declarations of member classes are instantiated when the owning
class template is instantiated. The definitions of such member classes
are instantiated when a complete type is required.

This change also introduces the injected-class-name into a class
template specialization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67707 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
beb58cb83bd53b79b80fc6f9952efd985934cbfc 24-Mar-2009 Douglas Gregor <dgregor@apple.com> Another use of adjustParameterType. Plus, GetTypeForDeclarator will
always get ParmVarDecls with already-adjusted types. Assert it.

Thanks, Anders!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
2dc0e64e57b2a1786fa53a7dbd1d5c8e255eadb0 24-Mar-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for the declarations of member functions within
a class template. At present, we can only instantiation normal
methods, but not constructors, destructors, or conversion operators.

As ever, this contains a bit of refactoring in Sema's type-checking. In
particular:

- Split ActOnFunctionDeclarator into ActOnFunctionDeclarator
(handling the declarator itself) and CheckFunctionDeclaration
(checking for the the function declaration), the latter of which
is also used by template instantiation.
- We were performing the adjustment of function parameter types in
three places; collect those into a single new routine.
- When the type of a parameter is adjusted, allocate an
OriginalParmVarDecl to keep track of the type as it was written.
- Eliminate a redundant check for out-of-line declarations of member
functions; hide more C++-specific checks on function declarations
behind if(getLangOptions().CPlusPlus).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
dfe292dbebe84bc3a19dba83e9eef52d56492b0a 22-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Fix build from r67476 and address the easy part of Doug's comments on rvalue refs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e6258936178b4c52b43b3b9dbec13552961cd645 19-Mar-2009 Douglas Gregor <dgregor@apple.com> Extend the use of QualifiedNameType to the creation of class template
specialization names. This way, we keep track of sugared types like

std::vector<Real>

I believe we are now using QualifiedNameTypes everywhere we can. Next
step: QualifiedDeclRefExprs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
ca5e77fefc4ac06aa787d7e777957ba6b7a03c60 18-Mar-2009 Douglas Gregor <dgregor@apple.com> The scope representation can now be either a DeclContext pointer or a
Type pointer. This allows our nested-name-specifiers to retain more
information about the actual spelling (e.g., which typedef did the
user name, or what exact template arguments were used in the
template-id?). It will also allow us to have dependent
nested-name-specifiers that don't map to any DeclContext.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
86447ec25fa34aa3c2f48ebc49ec09bc1f03f002 09-Mar-2009 Douglas Gregor <dgregor@apple.com> Rename DiagnoseIncompleteType to RequireCompleteType, and update the documentation to reflect the fact that we can instantiate templates here

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66421 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
2943aed177b33ae3f14273b11a7b398e5276ec62 03-Mar-2009 Douglas Gregor <dgregor@apple.com> Implement the basics of implicit instantiation of class templates, in
response to attempts to diagnose an "incomplete" type. This will force
us to use DiagnoseIncompleteType more regularly (rather than looking at
isIncompleteType), but that's also a good thing.

Implicit instantiation is still very simplistic, and will create a new
definition for the class template specialization (as it should) but it
only actually instantiates the base classes and attaches
those. Actually instantiating class members will follow.

Also, instantiate the types of non-type template parameters before
checking them, allowing, e.g.,

template<typename T, T Value> struct Constant;

to work properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
724651c3523e25fbf2f6cd0419bc3466e0afdb07 28-Feb-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for function types

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
cd281c3ded486ced5aad29dd7c3fa22b7514c3d8 28-Feb-2009 Douglas Gregor <dgregor@apple.com> Implement template instantiation for pointer, reference, and (some)
array types. Semantic checking for the construction of these types has
been factored out of GetTypeForDeclarator and into separate
subroutines (BuildPointerType, BuildReferenceType,
BuildArrayType). We'll be doing the same thing for all other types
(and declarations and expressions).

As part of this, moved the type-instantiation functions into a class
in an anonymous namespace.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
173144affecc3f97b73b075c44752aff8cfcfc3a 27-Feb-2009 Chris Lattner <sabre@nondot.org> Give a code insertion hint for how to fix 'implicit int' warnings and errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
35d276f443462249b436951c1c663820569e1768 27-Feb-2009 Chris Lattner <sabre@nondot.org> upgrade various 'implicit int' warnings from an ext-warn to warning when not
in C89 mode. This makes it enabled by default instead of only enabled with
-pedantic. Clang defaults to c99 mode, so people will see this more often
than with GCC, but they can always use -std=c89 if they really want c89.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65647 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
bb71001d287fda144c4bcf096124d8e3667d6930 26-Feb-2009 Daniel Dunbar <daniel@zuster.org> Drop uses of getAsPointerLikeType.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
4262a07621043c19292f5fd90b1e426d65cd366c 23-Feb-2009 Steve Naroff <snaroff@apple.com> - Generate error for protocol qualifiers on 'Class'.
- Generate error for protocol qualifiers on non-ObjC types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.cpp
8dfb0c57ddb700b163afa89e3ab160f1de26753d 21-Feb-2009 Steve Naroff <snaroff@apple.com> Warn about bogus protocol qualifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
1ca4813ddae54deead43252fe2f2d79fa5b7ad48 21-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Re-fix r65140 correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
540b146d013b3b6d5ab7c485b9e692a866173e15 20-Feb-2009 Anders Carlsson <andersca@mac.com> Always try to fold array sizes, and warn if we could fold something that isn't an ICE. This makes us compatible with GCC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
89951a86b594513c2a013532ed45d197413b1087 20-Feb-2009 Chris Lattner <sabre@nondot.org> remove some more methods from objc decls, using the iterator
interfaces more consistently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
67a6b6bf004661182e1654edd24942c067701f8b 19-Feb-2009 Chris Lattner <sabre@nondot.org> fariborz already fixed this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64975 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
5934e75d98d99374f72722a69c5eefe026f35c74 18-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Start generating gc'able code using the new
objc gc type attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ba372b85524f712e5b97a176f6ce0197d365835d 18-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Cleanup objc's gc attributes code no longer needed.
This make warn-weak-field.m to fail (subject of
a followup patch).
attr-objc-gc.m no passes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
809070a886684cb5b92eb0e00a6581ab1fa6b17a 18-Feb-2009 Douglas Gregor <dgregor@apple.com> Update Parser::ParseTypeName to return a TypeResult, which also tells
us whether there was an error in trying to parse a type-name (type-id
in C++). This allows propagation of errors further in the compiler,
suppressing more bogus error messages.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
965acbb321e94e36aa5365126eee46b97745fdbb 18-Feb-2009 Douglas Gregor <dgregor@apple.com> Allow "overloadable" functions in C to be declared as variadic without
any named parameters, e.g., this is accepted in C:

void f(...) __attribute__((overloadable));

although this would be rejected:

void f(...);

To do this, moved the checking of the "ellipsis without any named
arguments" condition from the parser into Sema (where it belongs anyway).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.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/Sema/SemaType.cpp
4310f4ee260e6c7ceeaf299e240f4d789ecc730d 16-Feb-2009 Douglas Gregor <dgregor@apple.com> Make "implicit int" an error in C++ (unless we're allowing Microsoft
extensions). This caught a couple bugs in our test suite :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ecb81f28cb279b7d8e84296445a4131fa80b69a9 16-Feb-2009 Chris Lattner <sabre@nondot.org> random cleanup


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f244cd7e54753caf6edb76df430dea2f43bb82a8 14-Feb-2009 Douglas Gregor <dgregor@apple.com> Add a test case for -ffreestanding that redefines malloc.

Warn that complex numbers are an extension in a freestanding C99
implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
26a0bdb810681e2514b9ddc2d9779ce6c9a79409 11-Feb-2009 Douglas Gregor <dgregor@apple.com> Rename Sema::hasSameType to QualType::isSameAs
Rename Sema::hasSameUnqualifiedType to QualType::isSameIgnoringQalifiers


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
6ae5e6649f5d01a1b593f4db755bfcb42e095700 11-Feb-2009 Douglas Gregor <dgregor@apple.com> Add type-checking and implicit conversions for template parameters of
integral or enumeration type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64256 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
0bfe54fdc83b7b4e37c40e652d86d15aa89885b2 10-Feb-2009 Douglas Gregor <dgregor@apple.com> GNU allows structs with flexible array members to be placed inside
arrays and other structs/unions as an extension. Downgrade our error
to a warning. Fixes PR3540.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
1a51b4a11b7db25cac2134249711ecaaf9d1c0a8 09-Feb-2009 Douglas Gregor <dgregor@apple.com> Make Sema::getTypeName return the opaque pointer of a QualType rather
than a Decl, which gives us some more flexibility to express the
results with the type system. There are no clients using this
flexibility yet, but it's meant to be able to describe qualified names
as written in the source (e.g., "foo::type") or template-ids that name
a class template specialization (e.g., "std::vector<INT>").

DeclSpec's TST_typedef has become TST_typename, to reflect its use to
describe types found by name (that may or may not be typedefs). The
type representation of a DeclSpec with TST_typename is an opaque
QualType pointer. All users of TST_typedef, both direct and indirect,
have been updated for these changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
169a2664a64b57a815b5f0b39276a0891663921a 07-Feb-2009 Ted Kremenek <kremenek@apple.com> Use 'Destroy(Context)' instead of 'Context.Deallocate()' (does recursive freeing of memory).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
8189cde56b4f6f938cd65f53c932fe1860d0204c 07-Feb-2009 Ted Kremenek <kremenek@apple.com> Overhaul of Stmt allocation:
- Made allocation of Stmt objects using vanilla new/delete a *compiler
error* by making this new/delete "protected" within class Stmt.
- Now the only way to allocate Stmt objects is by using the new
operator that takes ASTContext& as an argument. This ensures that
all Stmt nodes are allocated from the same (pool) allocator.
- Naturally, these two changes required that *all* creation sites for
AST nodes use new (ASTContext&). This is a large patch, but the
majority of the changes are just this mechanical adjustment.
- The above changes also mean that AST nodes can no longer be
deallocated using 'delete'. Instead, one most do
StmtObject->Destroy(ASTContext&) or do
ASTContextObject.Deallocate(StmtObject) (the latter not running the
'Destroy' method).

Along the way I also...
- Made CompoundStmt allocate its array of Stmt* using the allocator in
ASTContext (previously it used std::vector). There are a whole
bunch of other Stmt classes that need to be similarly changed to
ensure that all memory allocated for ASTs comes from the allocator
in ASTContext.
- Added a new smart pointer ExprOwningPtr to Sema.h. This replaces
the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used
'delete' to free memory instead of a Stmt's 'Destroy' method.

Big thanks to Doug Gregor for helping with the acrobatics of making
'new/delete' private and the new smart pointer ExprOwningPtr!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
98eb8a7a702b95183ed015706b1f1c66f5cb27a4 04-Feb-2009 Mike Stump <mrs@apple.com> Add support for blocks with explicit return types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
930d8b5ecc074cca01ecd9a522a55f55f3b72396 30-Jan-2009 Douglas Gregor <dgregor@apple.com> Implement and test aggregate initialization in C++. Major changes:

- Support initialization of reference members; complain if any
reference members are left uninitialized.
- Use C++ copy-initialization for initializing each element (falls
back to constraint checking in C)
- Make sure we diagnose when one tries to provide an initializer
list for a non-aggregate.
- Don't complain about empty initializers in C++ (they are permitted)
- Unrelated but necessary: don't bother trying to convert the
decl-specifier-seq to a type when we're dealing with a C++
constructor, destructor, or conversion operator; it results in
spurious warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
500d3297d2a21edeac4d46cbcbe21bc2352c2a28 29-Jan-2009 Chris Lattner <sabre@nondot.org> move library-specific diagnostic headers into library private dirs. Reduce
redundant #includes. Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
21593acb933324b439bc68b68e7cc7d1c3e3484d 28-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement pointer to member handling in static_cast.
Fix a stupid mistake in UnwrapSimilarPointers that made any two member pointers compatible as long as the pointee was the same.
Make a few style corrections as suggested by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
20c6b3b85e186cd52d5d99489132d71d498159eb 27-Jan-2009 Chris Lattner <sabre@nondot.org> Split the single monolithic DiagnosticKinds.def file into one
.def file for each library. This means that adding a diagnostic
to sema doesn't require all the other libraries to be rebuilt.

Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
9e5e4aaf8b8835b552819d68d29b6d94115d8a0b 26-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Remove an implemented FIXME and extend test cases. Follow-up on Doug's review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
4433aafbc2591b82e4ea2fc39c723b21d2497f4d 25-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement implicit conversions for pointers-to-member.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
4ec339f43c0cae2678334850c90926bea10999c7 19-Jan-2009 Douglas Gregor <dgregor@apple.com> Centralize error reporting of improper uses of incomplete types in the
new DiagnoseIncompleteType. It provides additional information about
struct/class/union/enum types when possible, either by pointing to the
forward declaration of that type or by pointing to the definition (if
we're in the process of defining that type).
Fixes <rdar://problem/6500531>.


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



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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61840 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
a1fcbadf4f930c22bb171fb90ed886f5f359d010 18-Dec-2008 Chris Lattner <sabre@nondot.org> Clean up the C89/C++ warnings about C99 array features to not
emit duplicate diags (some in parser and some in sema) and to
warn about use of typequals in array sizes. This implements
PR2759.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61197 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
584049d49d956add7bce5669e9823491f7d8de78 16-Dec-2008 Douglas Gregor <dgregor@apple.com> Diagnose erroneous uses of out-of-line member definitions and scope
specifiers. Specifically:
* Determine when an out-of-line function definition does not match
any declaration within the class or namespace (including coping
with overloaded functions).
* Complain about typedefs and parameters that have scope specifiers.
* Complain about out-of-line declarations that aren't also
definitions.
* Complain about non-static data members being declared out-of-line.
* Allow cv-qualifiers on out-of-line member function definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
cee63fbf0e64ac526582312bf8cf33263fc5c16e 02-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Handle new by passing the Declaration to the Action, not a processed type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
d162584991885ab004a02573a73ce06422b921fc 24-Nov-2008 Chris Lattner <sabre@nondot.org> Change a whole lot of diagnostics to take QualType's directly
instead of converting them to strings first. This also fixes a
bunch of minor inconsistencies in the diagnostics emitted by clang
and adds a bunch of FIXME's to DiagnosticKinds.def.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
4c5d320a7581f4b80b151630c91cea5727fa9923 21-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implementation of new and delete parsing and sema.
This version uses VLAs to represent arrays. I'll try an alternative way next, but I want this safe first.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f3a41af4d5c98a72a1d6720bbbfd658e57ef2541 20-Nov-2008 Chris Lattner <sabre@nondot.org> remove the last old-fashioned Diag method. Transition complete!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
d3a94e24ddf3fb90de76b17bd176d9ed61e66f2c 20-Nov-2008 Chris Lattner <sabre@nondot.org> remove another old-school Diag method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
dcd5ef12488e4c7ea844327835896ca86b609a97 19-Nov-2008 Chris Lattner <sabre@nondot.org> remove one more old-style Diag method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
f1f9b4e5c7fd087e78f2e387c01098d49d41e784 03-Nov-2008 Douglas Gregor <dgregor@apple.com> Implement C++ DR 106 and C++ DR 540, both of which deal with
reference-collapsing.

Implement diagnostic for formation of a reference to cv void.

Drop cv-qualifiers added to a reference type when the reference type
comes from a typedef.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
7fb5e4888221cd36652d078c6b171ac55e7f406d 26-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't give a default argument to ASTContext::getFunctionType for the TypeQuals parameter, it causes subtle bugs where TypeQuals, while necessary, are omitted from the call.
-Remove the default argument.
-Update all call sites of ASTContext::getFunctionType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
2f639b9f3c6b081f076d2ac6d75115ce44bfa249 24-Oct-2008 Douglas Gregor <dgregor@apple.com> Semantic analysis for C++ reinterpret_cast and const_cast. Patch by Sebastian Redl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
57373266011f73418381b736015d8d2bb0381176 22-Oct-2008 Douglas Gregor <dgregor@apple.com> Implement ranking of standard conversion sequences by their qualification
conversions (e.g., comparing int* -> const int* against
int* -> const volatile int*); see C++ 13.3.3.2p3 bullet 3.

Add Sema::UnwrapSimilarPointerTypes to simplify the control flow of
IsQualificationConversion and CompareQualificationConversion (and fix
the handling of the int* -> volatile int* conversion in the former).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e0a5d5fe8eab573f7764bf6d2ddb02bee8dceaf9 22-Oct-2008 Douglas Gregor <dgregor@apple.com> Move Sema::GetNonReferenceType to QualType::getNonReferenceType and make it inline

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
98cd599ee8a9b259ed7388ee2921a20d97658864 22-Oct-2008 Douglas Gregor <dgregor@apple.com> Initial step toward supporting qualification conversions (C++ 4.4).

Changes:
- Sema::IsQualificationConversion determines whether we have a qualification
conversion.
- Sema::CheckSingleAssignment constraints now follows the C++ rules in C++,
performing an implicit conversion from the right-hand side to the type of
the left-hand side rather than checking based on the C notion of
"compatibility". We now rely on the implicit-conversion code to
determine whether the conversion can happen or
not. Sema::TryCopyInitialization has an ugly reference-related
hack to cope with the initialization of references, for now.
- When building DeclRefExprs, strip away the reference type, since
there are no expressions whose type is a reference. We'll need to
do this throughout Sema.
- Expr::isLvalue now permits functions to be lvalues in C++ (but not
in C).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
097e916b617bb4a069a03764024c310ed42a6424 20-Oct-2008 Chris Lattner <sabre@nondot.org> fix indentation



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
c6f7345e44e079f373d6bdecaa06c7e06574dc27 16-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> In C++, an empty parameter list indicates a function that takes no parameters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57646 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
eb4b7051a596560ef4a1846e3714707f44e9dc30 25-Aug-2008 Eli Friedman <eli.friedman@gmail.com> Do typechecking and codegen for K&R-style function declarations
correctly. Not a regression, but made more obvious by my recent fix
which made function type compatibility checking a bit more strict.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
43477ca46792311640cf29b7cff731e29bebb146 19-Aug-2008 Chris Lattner <sabre@nondot.org> warn when someone tries to make an array of ObjC interfaces instead of array
of pointers to them. rdar://4304469


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
acc5f3e42334525bf28c86471551f83dfce222d5 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Kill unnecessary #includes in .cpp files. This is an automatic
sweep so some things removed are actually used, but happen to be
included by a previous header. I tried to get rid of the obvious
examples and this was the easiest way to trim the #includes in one
fell swoop.
- We now return to regularly scheduled development.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e91593ef084479340582b2ba177b44be50a717b7 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and
SourceLocation.h)
- Move ASTContext constructor into implementation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e4858a65a93fb36c099d8dd2ea0a98e33e77687e 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into
implementation .cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54626 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
64c438a4be2a871fa43c78264663ba1e9788b94d 09-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement support for the 'wchar_t' C++ type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
ae4da6150bb837311a2f0f958b01a2989066ba90 26-Jul-2008 Chris Lattner <sabre@nondot.org> make DeclSpec manage its own protocol qualifier list memory instead of having
clients allocate the memory and it delete it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
c9b346d7b3b24f8bf940735cc812893dfcef1d4b 29-Jun-2008 Chris Lattner <sabre@nondot.org> make type attribute processing static instead of methods on Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
0bf29ad534c381087e89efadbf7aff0579bf259f 29-Jun-2008 Chris Lattner <sabre@nondot.org> handle type attributes when converting types, not when processing decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52877 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
545dd3401e7f31c256d69cb948a45d5ca781064c 29-Jun-2008 Chris Lattner <sabre@nondot.org> adjust the prototypes of a bunch of decl processing methods to take
the single attribute they look at by reference instead of by pointer.
This is a subtle indicator that they take the specified attribute, not
a whole list of them.

This also make HandleExtVectorTypeAttribute work the same way as the rest
of the attributes, adds some comments etc. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
fbf1347e1e225cbc206563bba3f0a75f9ceaa571 28-Jun-2008 Chris Lattner <sabre@nondot.org> the 'mode' attribute is a decl attribute, not a type attribute. Move it to
SemaDeclAttr, and do some cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52844 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
985abd958d83e4f109a15451440f1d008ae45f59 26-Jun-2008 Chris Lattner <sabre@nondot.org> Make Declarator::getDeclSpec() return a const reference to avoid
cases where mutation can introduce bugs. Propagate around 'const'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
fca0ddd42965e0b7ae821213486d4e0dd71fb439 26-Jun-2008 Chris Lattner <sabre@nondot.org> fix a bug handling type attributes in the declspec. declspec processing
used to mutate the attribute list for declspecs when the type was
converted, breaking the case where one declspec was shared by multiple
declarators.

This fixes rdar://6032532.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
3c0eb160ca1361a82b9f15b3b40a2425adc14d0f 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Implementation of gcc mode attribute; this is significant because
it fixes PR2204. Not too much to say about the implementation; it works
in a similar way to the vector size attribute.

At some point, we need to modify the targets to provide information
about the appropriate types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
37148aabe7d153ce682b5715a820a11c0bbfcd59 14-May-2008 Eli Friedman <eli.friedman@gmail.com> An array of VLAs is a VLA. Shouldn't make any significant difference at
the moment, but it what you'd expect in the AST from reading the
standard, and it should make VLA codegen a bit more strightforward.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
6d6eb57225b53fb627c565861d1d0e90645400d1 07-May-2008 Douglas Gregor <dgregor@apple.com> Diagnose attempts to use C++ default arguments outside of a function declaration

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
8123a95c33b792d35c2e4992ba6e27882748fb0d 10-Apr-2008 Chris Lattner <sabre@nondot.org> Several improvements from Doug Gregor related to default
argument handling. I'll fix up the c89 (void) thing next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
04421087832a031c90bd58f128c7c0e741db8dd2 08-Apr-2008 Chris Lattner <sabre@nondot.org> Add support for C++ default arguments, and rework Parse-Sema
interaction for function parameters, fixing PR2046.

Patch by Doug Gregor!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
3420766281f1d9626cfa710c000247f9625f26d4 06-Apr-2008 Chris Lattner <sabre@nondot.org> move a semantic check out of the parser into sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
d658b562e80d6ef7a1118e34ff12802c6e2fcced 05-Apr-2008 Chris Lattner <sabre@nondot.org> Fix handling of implicit int, resolving PR2012 and reverting (and
subsuming) my patch for PR1999.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.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/Sema/SemaType.cpp
d805bec0fbb98aa10abbb41bfdcb2e2fab1bac96 02-Apr-2008 Chris Lattner <sabre@nondot.org> Various parts of the standard require something to be an "incomplete or
object type". Add a predicate that checks exactly this, as it is equivalent
to checking ot see if the type is *not* a function type, which is faster
to check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
96b77fc05ed4a052a9e614f72b0e83572408ce48 02-Apr-2008 Chris Lattner <sabre@nondot.org> 1) Enforce C99 6.7.3p2: "Types other than pointer types derived from
object or incomplete types shall not be restrict-qualified."

2) Warn about qualifiers on function types: C99 6.7.3p8: "If the
specification of a function type includes any type qualifiers, the
behavior is undefined."

3) Implement restrict on C++ references.

4) fix some locations for various C++ reference diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
e6327747b72bb687c948270f702ff53c30f411a6 02-Apr-2008 Chris Lattner <sabre@nondot.org> Fix several bugs in array -> pointer decomposition.

First, we got several CVR propagation cases wrong, which Eli pointed
out in PR2039.

Second, we didn't propagate address space qualifiers correctly, leading
to incorrect lowering of code in CodeGen/address-space.c.

Third, we didn't uniformly propagate the specifier in the array to the
pointer ("int[restrict 4]" -> "int *restrict").

This adds an ASTContext::getArrayDecayedType member that handles the
non-trivial logic for this seemingly simple operation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
fd89bc825026e44c68a68db72d4012fd6752e70f 02-Apr-2008 Chris Lattner <sabre@nondot.org> Fix PR2017 and silence some bogus errors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
58cce3b0dcbdcc95b7e713795834b4cb2c8a008a 16-Mar-2008 Chris Lattner <sabre@nondot.org> Make the parameter count of ObjCMethodDecl unsigned, you
can't have negative arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp
bda0b626e74513950405c27525af87e214e605e2 16-Mar-2008 Chris Lattner <sabre@nondot.org> Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it. This follows the main
llvm tree, and allows the libraries to be built in parallel. The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in. This speeds
up parallel builds, particularly incremental ones.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaType.cpp