History log of /external/clang/include/clang/Sema/Sema.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ef8225444452a1486bd721f3285301fe84643b00 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

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

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

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

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

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/include/clang/Sema/Sema.h
2434dcfb022778b06cfd257d830d0249680b87cf 05-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196454:
------------------------------------------------------------------------
r196454 | faisalv | 2013-12-04 17:40:41 -0800 (Wed, 04 Dec 2013) | 43 lines

Fix init-captures for generic lambdas.

For an init capture, process the initialization expression
right away. For lambda init-captures such as the following:
const int x = 10;
auto L = [i = x+1](int a) {
return [j = x+2,
&k = x](char b) { };
};
keep in mind that each lambda init-capture has to have:
- its initialization expression executed in the context
of the enclosing/parent decl-context.
- but the variable itself has to be 'injected' into the
decl-context of its lambda's call-operator (which has
not yet been created).
Each init-expression is a full-expression that has to get
Sema-analyzed (for capturing etc.) before its lambda's
call-operator's decl-context, scope & scopeinfo are pushed on their
respective stacks. Thus if any variable is odr-used in the init-capture
it will correctly get captured in the enclosing lambda, if one exists.
The init-variables above are created later once the lambdascope and
call-operators decl-context is pushed onto its respective stack.

Since the lambda init-capture's initializer expression occurs in the
context of the enclosing function or lambda, therefore we can not wait
till a lambda scope has been pushed on before deciding whether the
variable needs to be captured. We also need to process all
lvalue-to-rvalue conversions and discarded-value conversions,
so that we can avoid capturing certain constant variables.
For e.g.,
void test() {
const int x = 10;
auto L = [&z = x](char a) { <-- don't capture by the current lambda
return [y = x](int i) { <-- don't capture by enclosing lambda
return y;
}
};
If x was not const, the second use would require 'L' to capture, and
that would be an error.
Make sure TranformLambdaExpr is also aware of this.

Patch approved by Richard (Thanks!!)
http://llvm-reviews.chandlerc.com/D2092
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
37c07bfb94e08f95da299596820da4ac98184288 02-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196050:
------------------------------------------------------------------------
r196050 | rafael | 2013-12-01 08:54:29 -0800 (Sun, 01 Dec 2013) | 5 lines

Handle CC and NoReturn when instantiating members of class templates.

Before we were considering them only when instantiating templates.

This fixes pr18033.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c98db7244be45be5aa1a00bd9c070fe43752c0f2 01-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r195906:
------------------------------------------------------------------------
r195906 | majnemer | 2013-11-27 17:45:16 -0800 (Wed, 27 Nov 2013) | 5 lines

Sema: Assert that there are no pending local instantiations left

This should have been part of r195887, not sure how it slipped through
the cracks.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
65173e04eacb68ff89a58fbff14979eb318896c9 28-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195887:
------------------------------------------------------------------------
r195887 | majnemer | 2013-11-27 14:57:44 -0800 (Wed, 27 Nov 2013) | 9 lines

Sema: Instantiation of variable definitions weren't local enough

We wouldn't properly save and restore the pending local instantiations
we had built up prior to instantiation of a variable definition. This
would lead to us instantiating too much causing crashes and other
general badness.

This fixes PR14374.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
26297f57634994b4ae47a0774c372d6944265bb2 15-Nov-2013 Richard Smith <richard-llvm@metafoo.co.uk> When we hit a #include directive that maps to a module import, emit a token
representing the module import rather than making the module immediately
visible. This serves two goals:
* It avoids making declarations in the module visible prematurely, if we
walk past the #include during a tentative parse, for instance, and
* It gives a diagnostic (although, admittedly, not a very nice one) if
a header with a corresponding module is included anywhere other than
at the top level.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d78d6591fa2556b037d3571fde3631d0243c08d7 12-Nov-2013 Faisal Vali <faisalv@yahoo.com> REFACTOR: Have PushLambdaScope return the LambdaScopeInfo that it creates.

No Functionality change.

This refactoring avoids having to call getCurLambda right after PushLambdaScope, to obtain the LambdaScopeInfo that was created during the call to PushLambdaScope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194438 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1ce550906a9163fdf4d174a2f4ed594aa18d75ac 07-Nov-2013 Douglas Gregor <dgregor@apple.com> Re-instate contextual conversion to Objective-C pointers in message sends.

When performing an Objective-C message send to a value of class type,
perform a contextual conversion to an Objective-C pointer type. We've
had this for a long time, but it recently regressed. Fixes
<rdar://problem/15234703>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c00e4194296e994efab0e4bf64ca66737850bdf0 07-Nov-2013 Faisal Vali <faisalv@yahoo.com> This patch implements capturing of variables within generic lambdas.

Both Richard and I felt that the current wording in the working paper needed some tweaking - Please see http://llvm-reviews.chandlerc.com/D2035 for additional context and references to core-reflector messages that discuss wording tweaks.

What is implemented is what we had intended to specify in Bristol; but, recently felt that the specification might benefit from some tweaking and fleshing.

As a rough attempt to explain the semantics: If a nested lambda with a default-capture names a variable within its body, and if the enclosing full expression that contains the name of that variable is instantiation-dependent - then an enclosing lambda that is capture-ready (i.e. within a non-dependent context) must capture that variable, if all intervening nested lambdas can potentially capture that variable if they need to, and all intervening parent lambdas of the capture-ready lambda can and do capture the variable.

Of note, 'this' capturing is also currently underspecified in the working paper for generic lambdas. What is implemented here is if the set of candidate functions in a nested generic lambda includes both static and non-static member functions (regardless of viability checking - i.e. num and type of parameters/arguments) - and if all intervening nested-inner lambdas between the capture-ready lambda and the function-call containing nested lambda can capture 'this' and if all enclosing lambdas of the capture-ready lambda can capture 'this', then 'this' is speculatively captured by that capture-ready lambda.

Hopefully a paper for the C++ committee (that Richard and I had started some preliminary work on) is forthcoming.

This essentially makes generic lambdas feature complete, except for known bugs. The more prominent ones (and the ones I am currently aware of) being:
- generic lambdas and init-captures are broken - but a patch that fixes this is already in the works ...
- nested variadic expansions such as:
auto K = [](auto ... OuterArgs) {
vp([=](auto ... Is) {
decltype(OuterArgs) OA = OuterArgs;
return 0;
}(5)...);
return 0;
};
auto M = K('a', ' ', 1, " -- ", 3.14);
currently cause crashes. I think I know how to fix this (since I had done so in my initial implementation) - but it will probably take some work and back & forth with Doug and Richard.

A warm thanks to all who provided feedback - and especially to Doug Gregor and Richard Smith for their pivotal guidance: their insight and prestidigitation in such matters is boundless!

Now let's hope this commit doesn't upset the buildbot gods ;)

Thanks!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4e7f00c74487bca84993a1f35d0a26a84ed2b1a0 25-Oct-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC: under -Wunused-property-ivar warn if property's
backing warning is not used in one of its accessor methods.
// rdar://14989999


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bef582b0159e8f0deb606c7700e3590a6f5a4ab2 23-Oct-2013 Faisal Vali <faisalv@yahoo.com> Refactor out the circular reference to LambdaExpr in CXXRecordDecl.

A prior commit of this patch was reverted because it was within the blamelist's purview of a failing test. The failure of that test has been addressed here: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131021/091546.html. Therefore I am recommitting this patch (all tests pass on windows, except for the usual modules & index suspects that never pass on my box).

Some background: Both Doug and Richard had asked me in Chicago to remove the circular reference in CXXRecordDecl to LambdaExpr by factoring out and storing the needed information from LambdaExpr directly into CXXRecordDecl.

In addition, I have added an IsGenericLambda flag - this makes life a little easier when we implement capturing, and are Sema-analyzing the body of a lambda (and the calloperator hasn't been wired to the closure class yet). Any inner lambdas can have potential captures that could require walking up the scope chain and checking if any generic lambdas are capture-ready. This 'bit' makes some of that checking easier.

No change in functionality.

This patch was approved by Doug with minor modifications (comments were cleaned up, and all data members were converted from bool/enum to unsigned, as requested):
http://llvm-reviews.chandlerc.com/D1856

Thanks!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193246 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
80f2b2e693422f84ec3735f16a08614a527b0bc5 23-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert r193223 and r193216.

They were causing CodeGenCXX/mangle-exprs.cpp to fail.

Revert "Remove the circular reference to LambdaExpr in CXXRecordDecl."

Revert "Again: Teach TreeTransform and family how to transform generic lambdas nested within templates and themselves."

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a4c91afe103063e983aa9bab535e442da8629636 23-Oct-2013 Faisal Vali <faisalv@yahoo.com> Remove the circular reference to LambdaExpr in CXXRecordDecl.

Both Doug and Richard had asked me to remove the circular reference in CXXRecordDecl to LambdaExpr by factoring out and storing the needed information from LambdaExpr directly into CXXRecordDecl.

No change in functionality.

In addition, I have added an IsGenericLambda flag - this makes life a little easier when we implement capturing, and are Sema-analyzing the body of a lambda (and the calloperator hasn't been wired to the closure class yet). Any inner lambdas can have potential captures that could require walking up the scope chain and checking if any generic lambdas are capture-ready. This 'bit' makes some of that checking easier.

This patch was approved by Doug with minor modifications (comments were cleaned up, and all data members were converted from bool/enum to unsigned, as requested):
http://llvm-reviews.chandlerc.com/D1856

Thanks!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f06a2893bc9778857295c64ee32b4a899a338480 23-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Make UsingShadowDecls redeclarable. This fixes some visibility problems with
modules.

With this fixed, I no longer see any test regressions in the libc++ test suite
when enabling a single-module module.map for libc++ (other than issues with my
system headers).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193219 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b1c0e204046b72828e513bad369ab03252b2c42e 22-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Treat aliases as definitions.

This fixes pr17639.

Before this patch clang would consider

void foo(void) __attribute((alias("__foo")));

a declaration. It now correctly handles it as a definition.

Initial patch by Alp Toker. I added support for variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
063820655db8121f0022a7c51458463c7250324c 20-Oct-2013 Benjamin Kramer <benny.kra@googlemail.com> Miscellaneous speling fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
08235661cf457978ba4645ec8e22697aebabe4fa 18-Oct-2013 Alp Toker <alp@nuanti.com> Fix missed exception spec checks and crashes

Delayed exception specification checking for defaulted members and virtual
destructors are both susceptible to mutation during iteration so we need to
swap and process the worklists.

This resolves both accepts-invalid and rejects-valid issues and moreover fixes
potential invalid memory access as the contents of the vectors change during
iteration and recursive template instantiation.

Checking can be further delayed where parent classes aren't yet fully defined.
This patch adds two assertions at end of TU to ensure no specs are left
unchecked as was happenning before the fix, plus a test case from Marshall Clow
for the defaulted member crash extracted from the libcxx headers.

Reviewed by Richard Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7121bdb91b86f6053765bda18dd0a8a118929ace 18-Oct-2013 David Majnemer <david.majnemer@gmail.com> [-fms-extensions] Permit 'override' in C++98 and 'sealed' as a synonym for 'final'

Summary: Some MS headers use these features.

Reviewers: rnk, rsmith

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
682a56b15ae01cc8154d4800d29498da93911981 17-Oct-2013 Alp Toker <alp@nuanti.com> Revert "Fix missed exception spec checks and crashes"

The changes caused the sanitizer bot to hang:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/2311

Needs investigation.

This reverts commit r192914.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bb81f880aa77cfd09dedfc72a9b87262889ae75c 17-Oct-2013 Alp Toker <alp@nuanti.com> Fix missed exception spec checks and crashes

Delayed exception specification checking for defaulted members and virtual
destructors are both susceptible to mutation during iteration so we need to
process the worklists fully.

This resolves both accepts-invalid and rejects-valid issues and moreover fixes
potential invalid memory access as the contents of the vectors change during
iteration and recursive template instantiation.

This patch also adds two assertions at end of TU to ensure no specs are left
unchecked as was happenning before the fix, plus a test case from Marshall Clow
for the defaulted member crash extracted from the libcxx headers.

Reviewed by Richard Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b79b17b67f2c0de8fd343fdd070e5ccbfe20d602 15-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR17567: Improve diagnostic for a mistyped constructor name. If we see something
that looks like a function declaration, except that it's missing a return type,
try typo-correcting it to the relevant constructor name.

In passing, fix a bug where the missing-type-specifier recovery codepath would
drop a preceding scope specifier on the floor, leading to follow-on diagnostics
and incorrect recovery for the auto-in-c++98 hack.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d69f37b5822420e3c3a1b2e875b122aca8248533 08-Oct-2013 Alp Toker <alp@nuanti.com> Make InstantiatingTemplate depth checks clearer

The bool conversion operator on InstantiatingTemplate never added value and
only served to obfuscate the template instantiation routines.

This replaces the conversion and its callers with an explicit isInvalid()
function to make it clear what's going on at a glance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
b328e29173d15baf3f44ccdc9c310ee741caaaf7 07-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add support for WG21 N3599 (literal operator template for strings) as a GNU
extension. The GCC folks have decided to support this even though the standard
committee have not yet approved this feature.

Patch by Hristo Venev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c98fbf1db917c2497ddcf68925a0801cae2050df 05-Oct-2013 Alp Toker <alp@nuanti.com> Remove unused Sema::DelayedDestructorExceptionSpecs

This was a leftover from r160847.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1cd6fab3930d5c058c201895654c6b0bd6ecb8c1 04-Oct-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC. Allow readonly properties without an explicit ownership
(assign/unsafe_unretained/weak/retain/strong/copy) in super class
to be overridden by a property with any explicit ownership in the
subclass. // rdar://15014468


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f8aebef45428388ffbbd2ad9cbb3bfb15cd7069a 01-Oct-2013 Tim Northover <tnorthover@apple.com> Move checkStringLiteralArgument into Sema class

It's a useful function to have around for target-specific attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d195bc38fd424b0c928e3c354038a8ca6e2ccac3 01-Oct-2013 Alexey Bataev <a.bataev@hotmail.com> [OpenMP] Added parsing and semantic analysis for firstprivate clause


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
91d3f338e446e654392184e68f940c77b5c98f39 01-Oct-2013 Eli Friedman <eli.friedman@gmail.com> Fix typo correction usage of SemaAccess.cpp.

When we check access for lookup results, make sure we propagate the
result's access to the access control APIs; this can be different from
the natural access of the declaration depending on the path used by the lookup.

PR17394.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4cb295d3b32cb04215f87948fbf944ee4c31de1b 29-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> Implement C++1y sized deallocation (n3778). This is not enabled by -std=c++1y;
instead, it's enabled by the -cc1 flag -fsized-deallocation, until we sort out
the backward-compatibility issues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
04fa7a33279808dc3e5117c41b5f84c40eeb7362 28-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> Per latest drafting, switch to implementing init-captures as if by declaring
and capturing a variable declaration, and complete the implementation of them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2b17b472d2f503ee61c460ca23f226c2aebcdd62 27-Sep-2013 Kaelyn Uhrain <rikka@google.com> Cache the location of failed typo corrections so that typo correction
isn't repeatedly attempted for the same identifier at the same location.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
a924f847fcc3268ca2ce5c1bc5592a3774aeab80 25-Sep-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC: Handle the case of qualifying protocols
declared in a typedef declaraton used as super
class of an ObjC class. Curretnly, these protocols
are dropped from the class hierarchy. Test shows that
it is now included. // rdar://15051465


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a41c97a5d1912ffd184381d269fd8e5a25ee5e59 20-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> Switch the semantic DeclContext for a block-scope declaration of a function or
variable from being the function to being the enclosing namespace scope (in
C++) or the TU (in C). This allows us to fix a selection of related issues
where we would build incorrect redeclaration chains for such declarations, and
fail to notice type mismatches.

Such declarations are put into a new IdentifierNamespace, IDNS_LocalExtern,
which is only found when searching scopes, and not found when searching
DeclContexts. Such a declaration is only made visible in its DeclContext if
there are no non-LocalExtern declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191064 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
58ee425b11e178c652fa6ff4c1c924fe9b98801e 19-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> Remove a bogus diagnostic preventing static data member templates from being
defined with no initializer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
414a1bdbdaf250e0488589f12865c8961831b65d 18-Sep-2013 Hal Finkel <hfinkel@anl.gov> Add the intrinsic __builtin_convertvector

LLVM supports applying conversion instructions to vectors of the same number of
elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to
cause such instructions to be generated when using builtin vector types.

C-style casting on vectors is already defined in terms of bitcasts, and so
cannot be used for these conversions as well (without leading to a very
confusing set of semantics). As a result, this adds a __builtin_convertvector
intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is
intended to aid the creation of vector intrinsic headers that create generic IR
instead of target-dependent intrinsics (in other words, this is a generic
_mm_cvtepi32_ps). As noted in the documentation, the action of
__builtin_convertvector is defined in terms of the action of a C-style cast on
each vector element.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e9f6f33f0cf98a3e39025a57a0079cd316ed98f8 17-Sep-2013 David Majnemer <david.majnemer@gmail.com> [-cxx-abi microsoft] Correctly identify Win32 entry points

Summary:
This fixes several issues with the original implementation:
- Win32 entry points cannot be in namespaces
- A Win32 entry point cannot be a function template, diagnose if we it.
- Win32 entry points cannot be overloaded.
- Win32 entry points implicitly return, similar to main.

Reviewers: rnk, rsmith, whunt, timurrrr

Reviewed By: rnk

CC: cfe-commits, nrieck

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3312933e244d820c1c6fec83c4c0c0f67f42d25b 16-Sep-2013 Wei Pan <wei.pan@intel.com> Handle PredefinedExpr with templates and lambdas

Summary:

- lambdas, blocks or captured statements in templates were not
handled which causes codegen crashes.

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
30961ca72e6a295c34c86e8f3ee31463bc75fc99 13-Sep-2013 David Blaikie <dblaikie@gmail.com> Fix indentation of closing };

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b2956ba4f79fbe0b38bd5200ad3ed515fdbfacb3 13-Sep-2013 Nick Lewycky <nicholas@mxc.ca> Fix typo in llvm_unreachable string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190641 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9bd3cdc3b78653275a36f15df81e1def3b2db8db 13-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR13657 (and duplicates):

When a comma occurs in a default argument or default initializer within a
class, disambiguate whether it is part of the initializer or whether it ends
the initializer.

The way this works (which I will be proposing for standardization) is to treat
the comma as ending the default argument or default initializer if the
following token sequence matches the syntactic constraints of a
parameter-declaration-clause or init-declarator-list (respectively).

This is both consistent with the disambiguation rules elsewhere (where entities
are treated as declarations if they can be), and should have no regressions
over our old behavior. I think it might also disambiguate all cases correctly,
but I don't have a proof of that.

There is an annoyance here: because we're performing a tentative parse in a
situation where we may not have seen declarations of all relevant entities (if
the comma is part of the initializer, lookup may find entites declared later in
the class), we need to turn off typo-correction and diagnostics during the
tentative parse, and in the rare case that we decide the comma is part of the
initializer, we need to revert all token annotations we performed while
disambiguating.

Any diagnostics that occur outside of the immediate context of the tentative
parse (for instance, if we trigger the implicit instantiation of a class
template) are *not* suppressed, mirroring the usual rules for a SFINAE context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
66118c215183dec714cbbdec8060497675cebcac 11-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR17075: When performing partial ordering of a member function against a
non-member function, the number of arguments in the two candidate calls
will be different (the non-member call will have one extra argument).
We used to get confused by this, and fail to compare the last argument
when testing whether the member is better, resulting in us always
thinking it is, even if the non-member is more specialized in the last
argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4ad09e6281a0b32a0705807159649bb81cb2b1e9 11-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> getMostSpecialized for function template sets is never used in the context of a
call; remove its 'number of explicit arguments' and 'what kind of call'
parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190444 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
942f9fe11d3a9583eef6bc4ca2549b1f0d1694da 10-Sep-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Implement guard variables for static initialization

Static locals requiring initialization are not thread safe on Windows.
Unfortunately, it's possible to create static locals that are actually
externally visible with inline functions and templates. As a result, we
have to implement an initialization guard scheme that is compatible with
TUs built by MSVC, which makes thread safety prohibitively difficult.

MSVC's scheme is that every function that requires a guard gets an i32
bitfield. Each static local is assigned a bit that indicates if it has
been initialized, up to 32 bits, at which point a new bitfield is
created. MSVC rejects inline functions with more than 32 static locals,
and the externally visible mangling (?_B) only allows for one guard
variable per function.

On Eli's recommendation, I used MangleNumberingContext to track which
bit each static corresponds to.

Implements PR16888.

Reviewers: rjmccall, eli.friedman

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0c018357b8bbb1f96bbf622a5807421e626b4228 06-Sep-2013 Alexey Bataev <a.bataev@hotmail.com> OpenMP: Data-sharing attributes analysis and clause 'shared' (fixed test threadprivate_messages.cpp)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
dae9271c2c32527fea8b01953912e214eadc548e 06-Sep-2013 Eli Friedman <eli.friedman@gmail.com> Improve error for "override" + non-virtual func.

Consider something like the following:

struct X {
virtual void foo(float x);
};
struct Y : X {
void foo(double x) override;
};

The error is almost certainly that Y::foo() has the wrong signature,
rather than incorrect usage of the override keyword. This patch
adds an appropriate diagnostic for that case.

Fixes <rdar://problem/14785106>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
caa5ab264ddea332e8423af1ebcea50d0cb37206 03-Sep-2013 Aaron Ballman <aaron@aaronballman.com> Switched FormatAttr to using an IdentifierArgument instead of a StringArgument since that is a more accurate modeling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
99a7238b1acc6f4f41d39aeec6f25049375a24ec 03-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> Refactor computation of whether a variable declaration's type should be merged
with a prior declaration. No functionality change intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4367829b41e89d2f3dfae94a97af40ffa01c56c9 03-Sep-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert "OpenMP: Data-sharing attributes analysis and clause 'shared'"

This reverts commit r189795.

threadprivate_messages.cpp is faling on windows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189811 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8f1a2db8649eb151ee620273dcf34b700176430f 03-Sep-2013 Alexey Bataev <a.bataev@hotmail.com> OpenMP: Data-sharing attributes analysis and clause 'shared'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8ed2f3ad9505962d8dec4630caeaad607edbbb7d 29-Aug-2013 Serge Pavlov <sepavloff@gmail.com> Change return type of Sema::DiagnoseAmbiguousLookup from bool to void.
The function always returned true value, which was never used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4a97b8e75f5dccf5a9537cf7358297437f55326d 29-Aug-2013 Richard Smith <richard-llvm@metafoo.co.uk> Remove Inheritable/NonInheritable flags from ProcessDeclAttributes. They don't
do anything useful.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
21adb0ce21d8180b5dce0a31209cba3a5a33e26a 22-Aug-2013 Robert Wilhelm <robert.wilhelm@gmx.net> const'ify Sema::ActOnCXXTryBlock by
changing Parameter from MutableArrayRef to
ArrayRef.
No functionality change intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
567f917df048d42732997a479b2b257403fc88ef 22-Aug-2013 Larisse Voufo <lvoufo@google.com> Refactor for clarity and simplicity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c895f4d411152b08365cac48f330a8a7898fb382 19-Aug-2013 Robert Wilhelm <robert.wilhelm@gmx.net> const'ify Sema::ActOnCompoundStmt by
changing Parameter of Sema::ActOnCompoundStmt from MutableArrayRef to
ArrayRef.
No functionality change intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2d67097ad41f4c2fe82ebce3f587e06498f1bd71 17-Aug-2013 Richard Smith <richard-llvm@metafoo.co.uk> Refactor all diagnosing of TypoCorrections through a common function, in
preparation for teaching this function how to diagnose a correction that
includes importing a module.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4a91989b2dc901a4998fa5443aeba0276a8cfaa6 14-Aug-2013 Larisse Voufo <lvoufo@google.com> Bug fix: disallow a variable template to be redeclared as a non-templated variable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
dd9459f8869f66409f7ea429053b453e33f6499c 13-Aug-2013 Richard Smith <richard-llvm@metafoo.co.uk> Fix implementation of C11 6.2.7/4 and C++11 [dcl.array]p3:

When a local extern declaration redeclares some other entity, the type of that
entity is merged with the prior type if the prior declaration is visible (in C)
or is declared in the same scope (in C++).

- Make LookupRedeclarationWithLinkage actually work in C++, use it in the right
set of cases, and make it track whether it found a shadowed declaration.
- Track whether we found a declaration in the same scope (for C++) including
across serialization and template instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e7205c0e2472dd66238f4c6b6db1b7cc2957b42a 10-Aug-2013 Robert Wilhelm <robert.wilhelm@gmx.net> Omit llvm:: before SmallVector and SmallVectorImpl. We have using directive in include/clang/Basic/LLVM.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f68af647dda5cca00b49be27d24f62b0a7fff986 10-Aug-2013 James Dennett <jdennett@google.com> Expose LambdaIntroducer::DefaultLoc in the AST's LambdaExpr.

Summary:
Source-centric tools need access to the location of a C++11
lambda expression's capture-default ('&' or '=') when it's present.
It's possible for them to find it by re-lexing and re-implementing
rules that Clang's parser has already applied, but the cost of storing
the SourceLocation and making it available to them is 32 bits per
LambdaExpr (a small delta, proportionally), and the simplification in
client code is significant.

Reviewers: rsmith

Reviewed By: rsmith

CC: cfe-commits, klimek, revane

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188121 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4e9686b1f9947f1747b4f4316deb2087a7f56282 09-Aug-2013 Richard Smith <richard-llvm@metafoo.co.uk> Implement [class.friend]p11's special name lookup rules for friend declarations
of local classes. We were previously handling this by performing qualified
lookup within a function declaration(!!); replace it with the proper scope
lookup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7ae9745a54d2f02f2adf95d91fa74827a3a69b14 08-Aug-2013 Hans Wennborg <hans@hanshq.net> Fix doxygen function name mismatch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ac32d9044b9c1e7492cef929a322d23ce899d276 07-Aug-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR9992: Serialize and deserialize the token sequence for a function template in
-fdelayed-template-parsing mode. Patch by Will Wilson!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
06935f32645c8965e398bbd141f9800eacdfd439 06-Aug-2013 Larisse Voufo <lvoufo@google.com> Moved diagnosis of forward declarations of variable templates from Parser to Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ef4579cda09b73e3d4d98af48201da25adc29326 06-Aug-2013 Larisse Voufo <lvoufo@google.com> Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0e2189791acf7fcec4f1b32af24efb2d363f30c1 05-Aug-2013 Richard Smith <richard-llvm@metafoo.co.uk> Implement C++'s restrictions on the type of an expression passed to a vararg
function: it can't be 'void' and it can't be an initializer list. We give a
hard error for these rather than treating them as undefined behavior (we can
and probably should do the same for non-POD types in C++11, but as of this
change we don't).

Slightly rework the checking of variadic arguments in a function with a format
attribute to ensure that certain kinds of format string problem (non-literal
string, too many/too few arguments, ...) don't suppress this error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
3d672e4aa51fcf231de5d5283b1ee3f6c6a79e8c 01-Aug-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC ARC: finishing off issuing error when
retainable pointer is passed to an audited CF function
expecting CF type. // rdar://14569171


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
01ad048b70508bf21174cd25512b57f87b7c57a6 31-Jul-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC ARC: Do not issue bridge cast diagnostic when
passing a retainable object arg to a CF audited function
expecting a CF object type. Issue a normal type mismatch
diagnostic. This is wip // rdar://14569171


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
baaeb85f07640794f6a4fabb871e33deeab07df2 31-Jul-2013 Kaelyn Uhrain <rikka@google.com> Improve the diagnostic experience, including adding recovery, for
changing '->' to '.' when there is no operator-> defined for a class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
e6c8afcf449728a5096834393fc4a1acfad9b49d 23-Jul-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Error on more illegal kernel argument types for OpenCL

bool, half, pointers and structs / unions containing any
of these are not allowed. Does not yet reject size_t and
related integer types that are also disallowed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
cfa18eacafce73cd35b21ce10a2c5328378647f0 22-Jul-2013 Reid Kleckner <reid@kleckner.net> Forward declare OMPClause in Sema.h to avoid an include

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186824 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8d030c7a6f36438f6c7dd977f8be0de0cc781ad5 22-Jul-2013 Enea Zaffanella <zaffanella@cs.unipr.it> Improve clarity/consistency of a few UsingDecl methods and related helpers.
No functionality change.

In Sema helper functions:
* renamed isTypeName as HasTypenameKeyword
In UsingDecl:
* renamed get/setUsingLocation to get/setUsingLoc
* renamed is/setTypeName as has/setTypename



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1169e2fa84939325bdf1d0f558c63e87404a6b57 21-Jul-2013 Robert Wilhelm <robert.wilhelm@gmx.net> Convert Sema::MatchTemplateParametersToScopeSpecifier to ArrayRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4384712b3a0aedd7c68d6abdb0407850f7b46c8b 20-Jul-2013 Larisse Voufo <lvoufo@google.com> FIXME fix: improving diagnostics for template arguments deduction of class templates and explicit specializations
This patch essentially removes all the FIXMEs following calls to DeduceTemplateArguments() that want to keep track of deduction failure info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8c5d4078bb40642847164e7613828262d32db973 20-Jul-2013 Larisse Voufo <lvoufo@google.com> Revert "Use function overloading instead of template specialization for diagnosis of bad template argument deductions."

This reverts commit a730f548325756d050d4caaa28fcbffdae8dfe95.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a730f548325756d050d4caaa28fcbffdae8dfe95 20-Jul-2013 Larisse Voufo <lvoufo@google.com> Use function overloading instead of template specialization for diagnosis of bad template argument deductions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4fa7eab771ab8212e1058bd1a91061ff120c8fbb 19-Jul-2013 Alexey Bataev <a.bataev@hotmail.com> OpenMP: basic support for #pragma omp parallel


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186647 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9a3ecb015448dad705829b683f2392cfda80fc13 17-Jul-2013 Reid Kleckner <reid@kleckner.net> MS wide bitfield error check in Sema

cl.exe treats wide bitfields as an error. This patch causes them to be
an error if IsMsStruct is true, as it is in straight C.

Patch by Warren Hunt!

Reviewers: eli.friedman

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
012cff97d8b1ffebb028dcf6a0bdbfe8d127f552 17-Jul-2013 Fariborz Jahanian <fjahanian@apple.com> Follow coding convention in argument decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a3c6246950f23d7d4cd748badaf8f05d7bc3f14a 16-Jul-2013 Fariborz Jahanian <fjahanian@apple.com> This patch removes unused parameter allProperties and converts remaining
parameters in ArrayRef'ize Sema::ActOnAtEnd to ArrayRef.
Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186421 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
09df2b066221d869f17f4b5762405f111a65f983 16-Jul-2013 Tim Northover <tnorthover@apple.com> ARM: implement low-level intrinsics for the atomic exclusive operations.

This adds three overloaded intrinsics to Clang:
T __builtin_arm_ldrex(const volatile T *addr)
int __builtin_arm_strex(T val, volatile T *addr)
void __builtin_arm_clrex()

The intent is that these do what users would expect when given most sensible
types. Currently, "sensible" translates to ints, floats and pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bf03b375d887403e78837c9453fbad45efaef91d 16-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Fix member refs with using decl + anonymous union.

Make sure we call BuildFieldReferenceExpr with the appropriate decl
when a member of an anonymous union is made public with a using decl.
Also, fix a crash on invalid field access into an anonymous union.

Fixes PR16630.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
27ec2d0acc51fc661f3ab10693565f5f0653b294 11-Jul-2013 Richard Smith <richard-llvm@metafoo.co.uk> Make CheckAddressOfOperand a member of Sema so it can be reused by
__builtin_addressof.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5e867c8a07d82da0d3b0a43402ee4f1c6ba416e9 10-Jul-2013 Eli Friedman <eli.friedman@gmail.com> More local mangling fixes.

Compute mangling numbers for externally visible local variables and tags.
Change the mangler to consistently use discriminators where necessary.
Tweak the scheme we use to number decls which are not externally visible
to avoid unnecessary discriminators in common cases now that we request
them more consistently.

Fixes <rdar://problem/14204721>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4549d7ffc15bdd7ab860aa68db089d9f559b79e7 09-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> ArrayRef'ize Sema::FinalizeDeclaratorGroup, Sema::BuildDeclaratorGroup and
Sema::ActOnDocumentableDecls.

Patch by Robert Wilhelm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6b9240e058bf3451685df73fc8ce181b3046e92b 05-Jul-2013 Craig Topper <craig.topper@gmail.com> Use SmallVectorImpl& for function arguments instead of SmallVector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8540b6e778545008fd521b002929b89ce10506ce 05-Jul-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C: diagnose when synthesizing an ivar of
abstract class type. // rdar://14261999


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ee0a47998ca7db5d31291a397aca38219d3dfd7d 05-Jul-2013 Craig Topper <craig.topper@gmail.com> Add typedefs for Densemaps containing SmallVectors to avoid repeating the SmallVector size when creating iterators for the DenseMap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
305e5b4268685aa97d6338fe4362d1b73246cbe9 04-Jul-2013 Richard Smith <richard-llvm@metafoo.co.uk> Part of PR15673: If a function template has a default argument in which
substitution failed, report that as a substitution failure rather than
pretending that there was no default argument.

The test cases in PR15673 have exposed some pre-existing poor diagnostics here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185604 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
07369dde9d72213bf8a48288cd8b29999af9a40c 01-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Fix mangling for block literals.

Blocks, like lambdas, can be written in contexts which are required to be
treated as the same under ODR. Unlike lambdas, it isn't possible to actually
take the address of a block, so the mangling of the block itself doesn't
matter. However, objects like static variables inside a block do need to
be mangled in a consistent way.

There are basically three components here. One, block literals need a
consistent numbering. Two, objects/types inside a block literal need
to be mangled using it. Three, objects/types inside a block literal need
to have their linkage computed correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
642038d7c5855b54afbca298631da93b7889d4a5 27-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Delete dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a8bd8c87ce124fe7748580fc169feef5147f68f1 27-Jun-2013 David Majnemer <david.majnemer@gmail.com> Sema: Small cleanup around TemplateParamListContext


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
87b12b2e92c1670e551d66938a4c0a055b18b03a 26-Jun-2013 David Majnemer <david.majnemer@gmail.com> Implement DR21

A default template-argument shall not be specified in a friend template
declaration.

Interestingly, we properly handled default template arguments on friend
class members but not on just friend classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8c0501c7370d894a735692b92fab62bbb05d86bd 24-Jun-2013 Reid Kleckner <reid@kleckner.net> [Sema] Call CheckParmForFunctionDef on ObjC method parameters

CheckParmForFunctionDef performs standard checks for type completeness
and other things like a destructor check for the MSVC++ ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184740 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
572cf585da655522651b589101784c58902f8690 24-Jun-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize Sema::CodeCompleteConstructorInitializer

Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0538f0e9200df56974b5a71bc276dbce456e9781 22-Jun-2013 Richard Trieu <rtrieu@google.com> Extend -Wnon-pod-varargs to more cases, such as function pointers as return
types and function pointer arrays.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c8fa525b5b81eeb7a62294dd3218ca2a6ccf0a6a 22-Jun-2013 David Blaikie <dblaikie@gmail.com> Provide suggested no-arg calls for overloaded member functions missing calls

Reviewed by Richard Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
f462b0152f10eed0b989b07bcf457b6fb0d83bdb 20-Jun-2013 Richard Trieu <rtrieu@google.com> Extend -Wnon-pod-varargs to check calls made from function pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
850cf510b8e310a99344c29731f0b68e096a8658 20-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Fix one place I missed that was memcpy'ing TypeLocs in a way that messes
up alignment.

Fixes utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp from the
libc++ testsuite.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8db6cc7146fbdc84f8109b72c953863f92ece487 20-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Remove dead code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184379 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
662f41bd9d4bfb4aebaba05e6043a6ff5f0dc2ff 18-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> DR14, DR101, and part of DR1: fix handling of extern "C" declarations in
namespaces, by treating them just like we treat extern "C" declarations in
function scope.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d395e34ae7aeeeaf9a37a12bc0f6de87158c95c3 17-Jun-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C [qoi]: Provide fixit hint when message with typo
is sent to a receiver object. This is wip. // rdar://7853549


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
050315bfd0473323a68f2da99b51bbe2842f6c36 16-Jun-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize Sema::CodeComplete*

Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
539470e7d38f71b7a0700e1f1b371e76480cf0a6 15-Jun-2013 Larisse Voufo <lvoufo@google.com> Updated the support for contextual conversion tweaks (n3323) with a previously overlooked part: implicitly converting array sizes to size_t, rather than contextually converting them to some unique type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
13f8404adee57d31863671aef3014484117492a6 14-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Avoid fallthrough in header, to allow external users of Clang libraries to
build with Clang's -Wimplicit-fallthrough warning enabled. The fallthrough
was not making this code better.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9464a08a743295d6aefaca1a751b5b4d371cf99c 05-Jun-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C: Provide fixit with suggested spelling correction
for -Wundeclared-selector warnings. // rdar://14039037



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a7ff62f9443efa3b13a28a1e566d4625b15b8553 04-Jun-2013 Aaron Ballman <aaron@aaronballman.com> Adding support for MSVC #pragma detect_mismatch functionality by emitting a FAILIFMISMATCH linker command into the object file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f98c688968777214bfff7a6cc9bbd4ff78e9c1d3 30-May-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C: Implements gcc's -Wselector option
which diagnoses type mismatches of identical
selectors declared in classes throughout.
// rdar://14007194


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
942dfe2e4d75f9d7c6f2e73eadac6fa659a5f853 24-May-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Don't diagnose an empty lookup for inline assmebly. This happen
for labels in inline assembly that aren't in the lookup tables. E.g.,

__asm {
a:
jmp a
}

rdar://13983623


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
569b4ad6506960f1a7f191107c185cb1566a7fbb 21-May-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C arc: don't count use of __weak
variables when they are used in such unevaluated
contexts as __typeof, etc. // rdar://13942025


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182423 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
097e0a2cb08c8244a6923489acc8f890e6a99b59 21-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> Refactor places which perform contextual implicit conversions to go through a
common function. The C++1y contextual implicit conversion rules themselves are
not yet implemented, however.

This also fixes a subtle bug where template instantiation context notes were
dropped for diagnostics coming from conversions for integral constant
expressions -- we were implicitly slicing a SemaDiagnosticBuilder into a
DiagnosticBuilder when producing these diagnostics, and losing their context
notes in the process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0d8e9646bc000bab521ce52ed294209a92298cef 16-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> First pass of semantic analysis for init-captures: check the initializer, build
a FieldDecl from it, and propagate both into the closure type and the
LambdaExpr.

You can't do much useful with them yet -- you can't use them within the body
of the lambda, because we don't have a representation for "the this of the
lambda, not the this of the enclosing context". We also don't have support or a
representation for a nested capture of an init-capture yet, which was intended
to work despite not being allowed by the current standard wording.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7247c88d1e41514a41085f83ebf03dd5220e054a 15-May-2013 David Blaikie <dblaikie@gmail.com> Use only explicit bool conversion operator

The most common (non-buggy) case are where such objects are used as
return expressions in bool-returning functions or as boolean function
arguments. In those cases I've used (& added if necessary) a named
function to provide the equivalent (or sometimes negative, depending on
convenient wording) test.

DiagnosticBuilder kept its implicit conversion operator owing to the
prevalent use of it in return statements.

One bug was found in ExprConstant.cpp involving a comparison of two
PointerUnions (PointerUnion did not previously have an operator==, so
instead both operands were converted to bool & then compared). A test
is included in test/SemaCXX/constant-expression-cxx1y.cpp for the fix
(adding operator== to PointerUnion in LLVM).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6af701f29be43e49a25ab098c79940ae4cbb69c7 13-May-2013 Alexey Bataev <a.bataev@hotmail.com> OpenMP threadprivate with qualified names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181683 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
181e3ecc0907ae0103586a9f4db52241995a8267 13-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Cleanup handling of UniqueExternalLinkage.

This patch renames getLinkage to getLinkageInternal. Only code that
needs to handle UniqueExternalLinkage specially should call this.

Linkage, as defined in the c++ standard, is provided by
getFormalLinkage. It maps UniqueExternalLinkage to ExternalLinkage.

Most places in the compiler actually want isExternallyVisible, which
handles UniqueExternalLinkage as internal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
daaa468cdd8be3bc4f5861c34d0686d3d7a373fa 10-May-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize Sema::FindAllocationFunctions

Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8061322dabc3adc58ad20832170942eb72f009e6 10-May-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize GenericSelectionExpr


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
416c9b318e0100729a803e747736e7c968be69c9 10-May-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize Sema::CheckMessageArgumentTypes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a7b7d0e4bb13a7ca5da4869197f43e923dadbb38 10-May-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize Sema::FindAllocationOverload

Now tests should pass. The previous error was caused by a misplaced backing
array for MutableArrayRef that I introduced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ed09bfcf04b7470b1c6fca54477f6d3bfcfb3b64 10-May-2013 Dmitri Gribenko <gribozavr@gmail.com> Revert my r181563, breaks tests on buildbots


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a36bbac10f7b74ef198ec2fb0eb52dbd8a50e7f0 10-May-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize Sema::ActOnMemInitializer


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8e6b7093c840ddd4054523333b5a0d3262c3c2c2 10-May-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize Sema::FindAllocationOverload


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7297a2ecbf97db3153088660e15be1eb296d4659 10-May-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize Sema::BuildCallToObjectOfClassType


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9e00f12a2558bc4af77bc2e4171572052ea7d9a2 09-May-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize some SemaOverload methods

Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3190ca922d3743137e15fe0c525c04b177b9983b 08-May-2013 Reid Kleckner <reid@kleckner.net> Forward #pragma comment(lib/linker) through as flags metadata

Summary:
Most of this change is wiring the pragma all the way through from the
lexer, parser, and sema to codegen. I considered adding a Decl AST node
for this, but it seemed too heavyweight.

Mach-O already uses a metadata flag called "Linker Options" to do this
kind of auto-linking. This change follows that pattern.

LLVM knows how to forward the "Linker Options" metadata into the COFF
.drectve section where these flags belong. ELF support is not
implemented, but possible.

This is related to auto-linking, which is http://llvm.org/PR13016.

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
287f24d3991994b9a263af9e2a873f4feadfb8fa 05-May-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize Sema::CheckObjCMethodCall

Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
958ba64dabe674660130d914abfd13ffeca4151d 05-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> ArrayRef'ization of some methods in SemaOverload. Patch by Robert Wilhelm!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5543169296beeb183b9c9392debc774fcf493eeb 05-May-2013 Dmitri Gribenko <gribozavr@gmail.com> Replace ArrayRef<T>() with None, now that we have an implicit ArrayRef constructor from None

Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
9fd6b8f5a73788f288edd01fa99d434d1e6588ad 04-May-2013 Wei Pan <wei.pan@intel.com> Implement template support for CapturedStmt

- Sema tests added and CodeGen tests are pending

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8c045ace381972f41d385b0a661ccf172834f459 03-May-2013 Ben Langmuir <ben.langmuir@intel.com> Move CapturedStmt parameters to CapturedDecl

Move the creation of CapturedStmt parameters out of CodeGen and into
Sema, making it easier to customize the outlined function. The
ImplicitParamDecls are stored in the CapturedDecl using an
ASTContext-allocated array.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8eead16398c003dc2a8be22f44e8c2d92af80479 03-May-2013 Dmitri Gribenko <gribozavr@gmail.com> Add const qualifier to Sema::getTypeName's parameter `II`

Patch by Ismail Pazarbasi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
aeeacf725c9e0ddd64ea9764bd008e5b6873ce51 03-May-2013 John McCall <rjmccall@apple.com> Move parsing of identifiers in MS-style inline assembly into
the actual parser and support arbitrary id-expressions.

We're actually basically set up to do arbitrary expressions here
if we wanted to.

Assembly operands permit things like A::x to be written regardless
of language mode, which forces us to embellish the evaluation
context logic somewhat. The logic here under template instantiation
is incorrect; we need to preserve the fact that an expression was
unevaluated. Of course, template instantiation in general is fishy
here because we have no way of delaying semantic analysis in the
MC parser. It's all just fishy.

I've also fixed the serialization of MS asm statements.

This commit depends on an LLVM commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9b1317531d376738fd6631291b0a04109c76a63b 30-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> When deducing an 'auto' type, don't modify the type-as-written.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
548107ee5241037b4533d86afbe0cf38ddf6b5d9 29-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Use ArrayRef in AddMethodCandidate.

Patch by Robert Wilhelm!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3a2f91280a49f4747063f983dc6a3296bd9359d2 29-Apr-2013 Ben Langmuir <ben.langmuir@intel.com> Small CapturedStmt improvements

Add a CapturedStmt.h similar to Lambda.h to reduce the typing required to get
to the CapturedRegionKind enum. This also allows codegen to access this enum
without including Sema/ScopeInfo.h.

Also removes some duplicated code for capturing 'this' between CapturedStmt and
Lambda.

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9ff2b421f352fe0a0769c0a2a75af922c147b878 27-Apr-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize Sema::ActOnEnumBody. No functionality change.

Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c775b1a0702621e297d00452a897381c8bf10f3f 24-Apr-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C: When reporting on missing property accessor implementation in
categories, do not report when they are declared in primary class,
class's protocol, or one of it super classes. This is because,
its class is going to implement them. // rdar://13713098


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180198 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1e7ca6211c77208c8a339c2a26e612be81c70ec5 22-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Refactor/clean up the SemaLookup interface. No functional
change indended.
Part of rdar://13663589

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
092140a434366007a611c0a1a73fb6a4e8ff7f5e 17-Apr-2013 Douglas Gregor <dgregor@apple.com> Fix PR15291: noreturn adjustment in overload resolution for function templates, from Alexander Zinenko!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2e3d8c0815acaf1bc5995ebe56cea07471e5c9c7 17-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Enhance the ObjC global method pool to record whether there were 0, 1, or >= 2 methods (with a particular selector) inside categories.

This is done by extending ObjCMethodList (which is only used by the global method pool) to have 2 extra bits of information.
We will later take advantage of this info in global method pool for the overridden methods calculation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6afcf8875d4e447645cd7bf3733dd8e2eb8455dc 16-Apr-2013 Tareq A. Siraj <tareq.a.sriaj@intel.com> Sema for Captured Statements

Add CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic
analysis. Currently captures all variables by reference.

TODO: templates

Author: Ben Langmuir <ben.langmuir@intel.com>

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
76da55d3a49e1805f51b1ced7c5da5bcd7f759d8 16-Apr-2013 John McCall <rjmccall@apple.com> Basic support for Microsoft property declarations and
references thereto.

Patch by Tong Shen!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
90cc390c4955029dd56d125af5512e68efa0c2b2 15-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove hasExternalLinkageUncached.

It was being used correctly, but it is a very dangerous API to have around.
Instead, move the logic from the filtering to when we are deciding if we should
link two decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0b0ca4724d1c05dc0dd1d6e5aff4c8a439cbb1a2 10-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add support for computing the exception specification for an inheriting
constructor. This isn't quite perfect (as usual, we don't handle default
arguments correctly yet, and we don't deal with copy/move constructors for
arguments correctly either, but this will be fixed when we implement core issue
1351.

This completes our support for inheriting constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179154 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b846381fc3099b2340ba8c74d16178203a60d9a0 04-Apr-2013 John McCall <rjmccall@apple.com> Be sure to check ARC conventions on the implicit method declarations
of a property just in case the property's getter happens to be +1.
We won't synthesize a getter for such a property, but we will allow
the user to define a +1 method for it.
rdar://13115896

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178731 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
b421d926cdc632489915d39556f04c14f59d2392 02-Apr-2013 John McCall <rjmccall@apple.com> Add -Wstatic-local-in-inline, which warns about using a static local
variable in a C99 inline (but not static-inline or extern-inline)
function definition.

The standard doesn't actually say that this doesn't apply to
"extern inline" definitions, but that seems like a useful extension,
and it at least doesn't have the obvious flaw that a static
mutable variable in an externally-available definition does.

rdar://13535367

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5b8740f840238b3616691e5b300df57a758f32a6 01-Apr-2013 John McCall <rjmccall@apple.com> Only merge down a variable type if the previous declaration was
visible. There's a lot of potential badness in how we're modelling
these things, but getting this much correct is reasonably easy.

rdar://13535367

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
2db075b1d3b16f0100fe06408dfb4ab7d50700a4 26-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> Implement special-case name lookup for inheriting constructors: member
using-declarations with names which look constructor-like are interpreted as
constructor names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8ff563c2178866779903cb1b47c2962c39309995 22-Mar-2013 Daniel Jasper <djasper@google.com> Fix DeclRefExpr::getFoundDecl() for usages by reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c640058aa7f224a71ce3b1d2601d84e1b57f82d3 22-Mar-2013 Alexey Bataev <a.bataev@hotmail.com> OpenMP threadprivate directive parsing and semantic analysis

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b760f11fae94e3003b9241ac50c02617465f2fa2 22-Mar-2013 John McCall <rjmccall@apple.com> Fix a crash-on-valid where a block capture copy expression was
picking up cleanups from earlier in the statement. Also fix a
crash-on-invalid where a reference to an invalid decl from an
enclosing scope was causing an expression to fail to build, but
only *after* a cleanup was registered from that statement,
causing an assertion downstream.

The crash-on-valid is rdar://13459289.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7cca821e1acf0f1b4fe892c3111bfb2086832e4e 19-Mar-2013 John McCall <rjmccall@apple.com> Add a clarifying note when a return statement is rejected because
we expect a related result type.

rdar://12493140

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c7f811638f8603fa373d2be724e8b1c8ba51ad75 18-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add missing diagnostic for a nested-name-specifier on a free-standing type definition. Bump some related diagnostics from warning to extension in C++, since they're errors there. Add some missing checks for function specifiers on non-function declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
07b0fdcee8d64222b274779d02851cc53d18e0db 18-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> Bring inheriting constructor implementation up-to-date with current defect
reports, and implement implicit definition of inheriting constructors.
Remaining missing features: inheriting constructor templates, implicit
exception specifications for inheriting constructors, inheriting constructors
from dependent bases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
57f8da506a0db208a936e26a8cb77267f638b26b 14-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't try to typo-correct 'super' in an objc method.

This created 2 issues:

1) Performance issue, since typo-correction with PCH/modules is rather expensive.
2) Correctness issue, since if it managed to "correct" 'super' then bogus compiler errors would
be emitted, like this:

3.m:8:3: error: unknown type name 'super'; did you mean 'super1'?
super.x = 0;
^~~~~
super1
t3.m:5:13: note: 'super1' declared here
typedef int super1;
^
t3.m:8:8: error: expected identifier or '('
super.x = 0;
^

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2d1b09641ecf2e754bf3fd244dc45dbf3e460c1b 14-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Avoid computing the linkage too early. Don't invalidate it.

Before this patch we would compute the linkage lazily and cache it. When the
AST was modified in ways that could change the value, we would invalidate the
cache.

That was fairly brittle, since any code could ask for the a linkage before
the correct value was available.

We should change the API to one where the linkage is computed explicitly and
trying to get it when it is not available asserts.

This patch is a first step in that direction. We still compute the linkage
lazily, but instead of invalidating a cache, we assert that the AST
modifications didn't change the result.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
48f904271effd381ec3c1ae33b97d1ec7d95860a 04-Mar-2013 John McCall <rjmccall@apple.com> Centralize and refine the __unknown_anytype argument rules
and be sure to apply them whether or not the debugger gave
us a method declaration.

rdar://12565338

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
65611bf036dab4e2ba90b1316b1b21b276dde185 02-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Process #pragma weak only after we know the linkage of the function or variable
we are looking at.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176414 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f3f6231fb5a86c98aa88eba7dbf2df87cc141e0d 23-Feb-2013 Benjamin Kramer <benny.kra@googlemail.com> Shrink SmallPtrSet. It gets swapped a lot which copies the whole small part.

Testing shows that it's empty in >99% of the cases and I couldn't find a case
where it contained more than 2 elements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
684aa73192d92850a926870be62a1787eb5b7ed9 22-Feb-2013 Michael Han <fragmentshaders@gmail.com> [Sema] Semantic analysis for empty-declaration and attribute-declaration.

Introduce a new AST Decl node "EmptyDecl" to model empty-declaration. Have attributes from attribute-declaration appertain
to the EmptyDecl node by creating the AST representations of these attributes and attach them to the EmptyDecl node so these
attributes can be sema checked just as attributes attached to "normal" declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f6565a9f7318b1ca6ea9510003dde7b89696daab 22-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> Handle alignas(foo...) pack expansions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
671b3219c2be00ef8f26234ec993816c3ba56a4f 22-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> Implement C++11 [dcl.align]p6-p8, and C11 6.7.5/7. This had to be split out of
the normal attribute-merging path, because we can't merge alignment attributes
without knowing the complete set of alignment attributes which apply to a
particular declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
d4c3d66be70ae2d0bd828329022dc428cc277a1c 20-Feb-2013 John McCall <rjmccall@apple.com> Add a new 'type_visibility' attribute to allow users to
control the visibility of a type for the purposes of RTTI
and template argument restrictions independently of how
visibility propagates to its non-type member declarations.

Also fix r175326 to not ignore template argument visibility
on a template explicit instantiation when a member has
an explicit attribute but the instantiation does not.

The type_visibility work is rdar://11880378

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
053214013990ad8ec096dafc64aa7c0ad2b05bc0 20-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR15300: Support C++11 attributes on base-specifiers. We don't support any such
attributes yet, so just issue the appropriate diagnostics. Also generalize the
fixit for attributes-in-the-wrong-place code and reuse it here, if attributes
are placed after the access-specifier or 'virtual' in a base specifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
26202291b161f8598c0c342cba12c6552e44d44c 14-Feb-2013 Fariborz Jahanian <fjahanian@apple.com> objective-C: When implementing custom accessor method for
a property, the -Wdirect-ivar-access should not warn when
accessing the property's synthesized instance variable.
// rdar://13142820


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a4dc51b46861eb52626f89183da7610437baba93 05-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add some missing diagnostics for C++11 narrowing conversions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174337 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b7e5eec2f57bd82c6ddb762ca3dd7b7d8697e9d5 02-Feb-2013 Nick Lewycky <nicholas@mxc.ca> This patch makes "&Cls::purevfn" not an odr use. This isn't what the standard
says, but that's a defect (to be filed). "Cls::purevfn()" is still an odr use.

Also fixes a bug that caused us to not mark the function referenced just
because we didn't want to mark it odr used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
cd0655b17249c4c4908ca91462657f62285017e6 01-Feb-2013 Nick Lewycky <nicholas@mxc.ca> Add a new -Wundefined-inline warning for inline functions which are used but not
defined. Fixes PR14993!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
be507b6e72df8ab5e7d8c31eb4453e1bdf5fcfaf 01-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> Implement [dcl.align]p5 and C11 6.7.5/4: alignas cannot underalign.
Also support alignas(0), which C++11 and C11 require us to ignore.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a31f65b10e61ca8f2f427b1df176c10ea8a0efa2 01-Feb-2013 Michael Han <fragmentshaders@gmail.com> [Sema][Attr]Fix alignment attribute printing.

Remove "IsMSDeclspec" argument from Align attribute since the arguments in Attr.td should
only model those appear in source code. Introduce attribute Accessor, and teach TableGen
to generate syntax kind accessors for Align attribute, and use those accessors to decide
if an alignment attribute is a declspec attribute.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174133 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
29805ca6d278b4d9563adfee67f2478f0fecdcfc 31-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Improve 'failed template argument deduction' diagnostic for the case where we
have a direct mismatch between some component of the template and some
component of the argument. The diagnostic now says what the mismatch was, but
doesn't yet say which part of the template doesn't match.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
995e26b0523ac8e3b6199a509b871b81fa5df6ee 31-Jan-2013 Nick Lewycky <nicholas@mxc.ca> Remove elements from Sema.UndefinedInternals as functions are defined. Also
filter the elements before emitting them into a PCH. No user-visible
functionality change, except that PCH files may be smaller?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8f3aacc8c4849c9e0e7a236954725fffdeb917a6 29-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Propagate the spelling list index for an attribute across template instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
01a41140cd8ec9475ed0c33384310fbdd3b6de11 26-Jan-2013 Nick Lewycky <nicholas@mxc.ca> Preserve Sema::UndefinedInternals across PCH boundaries. Fixes
-Wundefined-internal warnings with PCH.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ad48a500596d7d678b99c7f94326cfa856c3b49f 24-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> Patch to check for integer overflow. It has been
commented on and approved by Richard Smith.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
51d8c52ad36129760eaa586f85176037e2cd0d0e 24-Jan-2013 Michael Han <fragmentshaders@gmail.com> PR14922: when printing an attribute, use the real syntax of the attribute (GNU, C++11, MS Declspec) instead of hardcoded GNU syntax.

Introduce a spelling index to Attr class, which is an index into the attribute spelling list of an attribute defined in Attr.td.
This index will determine the actual spelling used by an attribute, as it incorporates both the syntax and naming of the attribute.
When constructing an attribute AST node, the spelling index is computed based on attribute kind, scope (if it's a C++11 attribute), and
name, then passed to Attr that will use the index to print itself.

Thanks to Richard Smith for the idea and review.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173358 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
89cf425f1136f8d24a64ed94450e488b6794dfa4 23-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Use 'const Decl *' throughout code completion in Sema


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3548068c22f809e5bc64b83d2c3622018469256c 22-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> Small code change to improve performance
in my last patch, suggested by Argyrios.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173182 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
48f3cc2b2be1d32df14234904539b34e6e387e4a 22-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> objectiveC (take two): don't warn when in -Wselector mode and
an unimplemented selector is consumed by
"respondsToSelector:". // rdar://12938616


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f11ccc1cbb26cacac36abebe6ce9add43bf32585 21-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> objectiveC: don't warn when in -Wselector mode and
an unimplemented selector is consumed by
"respondsToSelector:". // rdar://12938616


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b892d7010f9c2c61e2f3a2686546cbfbffbedef3 21-Jan-2013 Douglas Gregor <dgregor@apple.com> Eliminate Sema::CompareProperties(), which was walking over a pile of
lexical declarations looking for properties when we could more
efficiently check for property mismatches at property declaration
time. Good for ~1% of -fsyntax-only time when most of the properties
we're checking against come from an AST file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
aabd094cf694039fe823987e133af7ac25cb9711 21-Jan-2013 Douglas Gregor <dgregor@apple.com> Eliminate the oddly-named Sema::ComparePropertiesInBaseAndSuper, which
did a redundant traversal of the lexical declarations in the
superclass. Instead, when we declare a new property, look into the
superclass to see whether we're redeclaring the property. Goot for 1%
of -fsyntax-only time on Cocoa.h and a little less than 3% on my
modules test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b8b5cbc169c9f6c523ada0d37dd126f7af65f3f8 17-Jan-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Extend the Sema interface to get the size and length of a
VarDecl.
Part of rdar://12576868

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
93c8617bec98aeb769ee9f569d7ed439eec03249 17-Jan-2013 David Blaikie <dblaikie@gmail.com> ArrayRef-ize some ctor initializer related APIs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
6c3af3d0e3e65bcbca57bfd458d684941f6d0531 17-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add -Wunsequenced (with compatibility alias -Wsequence-point) to warn on
expressions which have undefined behavior due to multiple unsequenced
modifications or an unsequenced modification and use of a variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f4d918fdf7da64215db8abe63945798c66e6d132 15-Jan-2013 Douglas Gregor <dgregor@apple.com> When checking availability attributes for consistency between an
overriding and overridden method, allow the overridden method to have
a narrower contract (introduced earlier, deprecated/obsoleted later)
than the overriding method. Fixes <rdar://problem/12992023>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
419563768ef4929a622d7c2b066856e82901bb91 14-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Refactor to call ActOnFinishFullExpr on every full expression. Teach
ActOnFinishFullExpr that some of its checks only apply to discarded-value
expressions. This adds missing checks for unexpanded variadic template
parameter packs to a handful of constructs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1c030e9a3f290a1eea5de82fe1e63dfde2bd8f1e 13-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize Sema APIs related to format string checking


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
cfa88f893915ceb8ae4ce2f17c46c24a4d67502f 12-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
5ea6ef490547917426d5e2ed14c9f36521bbeacf 11-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Truth in advertising: LocallyScopedExternalDecls actually only contains
external declarations with C language linkage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3973f28f347bf8ca3cca31ea30da235c95701231 10-Jan-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Extend the inline asm Sema lookup interface to determine if the
Decl is a VarDecl.
Part of rdar://12991541

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
51be6e3487c4b7f43d9f5b2db962382b79295acb 08-Jan-2013 Rafael Espindola <rafael.espindola@gmail.com> Tighten types a bit. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
fc35cbca942ccdfe43742c1d786ed168517e0a47 08-Jan-2013 Rafael Espindola <rafael.espindola@gmail.com> Tighten types a bit. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
8c6fe1467094a8650bb0d3b19f0e001be13362f7 31-Dec-2012 Nico Weber <nicolasweber@gmx.de> Fix minor copy-pasto. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d3292c88ad6360823818b78d67875eceb3caedfb 21-Dec-2012 Ted Kremenek <kremenek@apple.com> Tweak Sema::CheckLiteralKind() to also include block literals

This simplifies some diagnostic logic in checkUnsafeAssignLiteral(),
hopefully making it less error prone.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a193e3b1e675f2d149802dc7e6f061bf3eb1ab27 21-Dec-2012 Chad Rosier <mcrosier@apple.com> Fix a warning due to an extraneous comma.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3ee069bddb538ebafff2068e99136cc526fb9fdd 21-Dec-2012 Ted Kremenek <kremenek@apple.com> Hoist logic for classifying Objective-C literals into Sema (proper) for use with other diagnostics.

No immediate (intended) functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ad017fa7a4df7389d245d02a49b3c79ed70bedb9 20-Dec-2012 Bill Wendling <isanbard@gmail.com> Revert r170500. It over-zealously converted *ALL* things named Attributes, which is wrong here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
094dbf917127a1228147587076d59ca45b7c258d 19-Dec-2012 Bill Wendling <isanbard@gmail.com> Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c83c2300e1946fea78ecd3c2e93d9c2dd2638a2b 19-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR13470: Ensure that copy-list-initialization isntantiates as
copy-list-initialization (and doesn't add an additional copy step):

Fill in the ListInitialization bit when creating a CXXConstructExpr. Use it
when instantiating initializers in order to correctly handle instantiation of
copy-list-initialization. Teach TreeTransform that function arguments are
initializations, and so need this special treatment too. Finally, remove some
hacks which were working around SubstInitializer's shortcomings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1d28caf3b5254e60d3e3a1d2d37e5df2e5924111 11-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR14558: Compute triviality of special members (etc) at the end of the class
definition, rather than at the end of the definition of the set of nested
classes. We still defer checking of the user-specified exception specification
to the end of the nesting -- we can't check that until we've parsed the
in-class initializers for non-static data members.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
fff3248e69c478cfb4d1a1ffdefb808d5885535b 09-Dec-2012 Aaron Ballman <aaron@aaronballman.com> Virtual method overrides can no longer have mismatched calling conventions. This fixes PR14339.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
35f3f36cb9451f347b83a6e7f01e3c702df4732d 06-Dec-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add a bit on FunctionDecl/ObjCMethodDecl to indicate if there was a body
that was skipped by the parser.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
30a2e16f6c27f888dd11eba6bbbae1e980078fcb 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort #include lines for all files under include/...

This is a simpler sort, entirely automatic with the help of
llvm/utils/sort_includes.py -- no manual edits here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a93d0f280693b8418bc88cf7a8c93325f7fcf4c6 01-Dec-2012 Benjamin Kramer <benny.kra@googlemail.com> Include pruning and general cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2fa67efeaf66a9332c30a026dc1c21bef6c33a6c 01-Dec-2012 Benjamin Kramer <benny.kra@googlemail.com> Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't pull in all the generated Attr code.

Required to pull some functions out of line, but this shouldn't have a perf impact.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
afb49189d6962f3636d6a93d09c0b495e94ac782 29-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> The declaration of a special member can require overload resolution to be
performed, to determine whether that special member is deleted or constexpr.
That overload resolution process can in turn trigger the instantiation of a
template, which can do anything, including triggering the declaration of that
very same special member function. When this happens, do not try to recursively
declare the special member -- that's impossible. Instead, only try to realise
the truth. There is no special member.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
21173b1080abaa2738f9e700a9d4b0d04f928930 28-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR14388: An array or function type in an exception specification should be
decayed to a pointer type. Patch by WenHan Gu, with a little tweaking and
additional testcases by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1a5bd5d680726f3d133da27791b228b2c8fe96c6 19-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR14381: Never skip constexpr function bodies when code-completing. We may need
them in order to parse the rest of the file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4a9e60fc7c36e323ae376601cc704fed4beb68ae 16-Nov-2012 Nick Lewycky <nicholas@mxc.ca> Store this Decl* as a Decl* instead of a uintptr_t. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b6ad9b163d50827d4cd7eccadb20432cd3c089d5 14-Nov-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> In ExpressionEvaluationContextRecord manage LambdaMangle with a shared
pointer, otherwise we will double free it when ExpressionEvaluationContextRecord
gets copied.

Fixes crash in rdar://12645424 & http://llvm.org/PR14252

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
accaf19bc1129c0273ec50dba52318e60bc29103 14-Nov-2012 Benjamin Kramer <benny.kra@googlemail.com> s/tranform/transform/

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b8a8de316dade43fff95d7bfd2cfaa367f53faea 14-Nov-2012 John McCall <rjmccall@apple.com> Accept and pass arguments to __unknown_anytype in argument
positions of Objective-C methods.

It is possible to recover a lot of type information about
Objective-C methods from the reflective metadata for their
implementations. This information is not rich when it
comes to struct types, however, and it is not possible to
produce a type in the debugger's round-tripped AST which
will really do anything useful during type-checking.
Therefore we allow __unknown_anytype in these positions,
which essentially disables type-checking for that argument.
We infer the parameter type to be the unqualified type of
the argument expression unless that expression is an
explicit cast, in which case it becomes the type-as-written
of that cast.

rdar://problem/12565338

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
530564196fe7e2e30fbc2b0edae45975447583e0 07-Nov-2012 David Blaikie <dblaikie@gmail.com> PR13552: Fix the end location of a CXXNewExpr.

Spent longer than reasonable looking for a nice way to test this & decided to
give up for now. Open to suggestions/requests. Richard Smith suggested adding
something to ASTMatchers but it wasn't readily apparent how to test this with
that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
802f93736a9ae76ffcbd90dbaf1c0b185531bb30 25-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for field lookup in the SemaCallback. Patch by Eli.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
03e6fda61f48a6f11fb3c9459d5ac3d5b1db2809 22-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR14141 (part of DR1351): An implicitly-deduced "any" exception specification
produces an exception of 'noexcept(false)' and is thus compatible with an
explicit exception specification of 'noexcept(false)'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
efeeccfb5efa94b6b4198298a80ad9a699bebcce 21-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> Unrevert r166268, reverted in r166272, with a fix for the issue which Nick
found: if an overloaded operator& is present before a template definition,
the expression &T::foo is represented as a CXXOperatorCallExpr, not as a
UnaryOperator, so we didn't notice that it's permitted to reference a non-static
data member of an unrelated class.

While investigating this, I discovered another problem in this area: we are
treating template default arguments as unevaluated contexts during substitution,
resulting in performing incorrect checks for uses of non-static data members in
C++11. That is not fixed by this patch (I'll look into this soon; it's related
to the failure to correctly instantiate constexpr function templates), but was
resulting in this bug not firing in C++11 mode (except with -Wc++98-compat).

Original message:

PR14124: When performing template instantiation of a qualified-id outside of a
class, diagnose if the qualified-id instantiates to a non-static class member.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
79cf161f178e36ce6d8aeea2a247e367b8d0fc34 19-Oct-2012 Nick Lewycky <nicholas@mxc.ca> Revert r166268, this fix for a crash-on-invalid introduced a rejects-valid.
Richard has an unreduced testcase to work with.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
80ddc31c5379df78a007eaf08d531efdbcd9b161 19-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR14124: When performing template instantiation of a qualified-id outside of a
class, diagnose if the qualified-id instantiates to a non-static class member.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c337d1457e4600107a1b3793f62ca96a33f1308b 18-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add a size argument to the LookupInlineAsmIdentifier() callback,
which will be used by the asm matcher in the near future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9a14db3fefa73ef8a702dea1928fd0ee0befe59b 18-Oct-2012 Eli Friedman <eli.friedman@gmail.com> Fix Objective-C implicit property synthesis for C++ classes so we use valid
source locations in places where it is necessary for diagnostics. By itself,
this causes assertions, so while I'm here, also fix property synthesis
for properties of C++ class type so we use so we properly set up a scope
and mark variable declarations.

<rdar://problem/12514189>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166219 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0ec56b7add7be643f490ea9b430823570f01b4e2 18-Oct-2012 Axel Naumann <Axel.Naumann@cern.ch> From Vassil Vassilev: enable Sema to deal with multiple ExternalSemaSources.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b1502bcd67fb593a95cbf73ec3814f4015666da0 18-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> DR1442: In a range-based for statement, namespace 'std' is not an associated
namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166194 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7fd00b153c991fbe30f9fa76391d2ad9fa1d349d 18-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Move most of the AsmParsing logic in clang back into the MC
layer. Use the new ParseMSInlineAsm() API and add an implementation of the
MCAsmParserSemaCallback interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
04bec39d61f2b392d798882c9141fecf3ca653c5 10-Oct-2012 Jordan Rose <jordan_rose@apple.com> Move Sema::PropertyIfSetterOrGetter to ObjCMethodDecl::findPropertyDecl.

Then, switch users of PropertyIfSetterOrGetter and LookupPropertyDecl
(the latter by name) over to findPropertyDecl. This actually makes
-Wreceiver-is-weak a bit stronger than it was before.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9a1f7d8c33304f973a59c68d80c2cce280afb1d4 10-Oct-2012 Jordan Rose <jordan_rose@apple.com> Change Sema::PropertyIfSetterOrGetter to make use of isPropertyAccessor.

Old algorithm:
1. See if the name looks like a getter or setter.
2. Use the name to look up a property in the current ObjCContainer
and all its protocols.
3. If the current container is an interface, also look in all categories
and superclasses (and superclass categories, and so on).

New algorithm:
1. See if the method is marked as a property accessor. If so, look through
all properties in the current container and find one that has a matching
selector.
2. Find all overrides of the method using ObjCMethodDecl's
getOverriddenMethods. This collects methods in superclasses and protocols
(as well as superclass categories, which isn't really necessary), and
checks if THEY are accessors. This part is not done recursively, since
getOverriddenMethods is already recursive.

This lets us handle getters and setters that do not match the property
names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9595c7e2533c836537dc300e75d059c29feb7094 04-Oct-2012 Eli Friedman <eli.friedman@gmail.com> Permanently end the whole "pragma got handled by the parser too early"
mess by handling all pragmas which the parser touches uniformly.
<rdar://problem/12248901>, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
be9af1288881110e406b87914162eaa59f1e5918 02-Oct-2012 Lang Hames <lhames@gmail.com> Add FP_CONTRACT support for clang.

Clang will now honor the FP_CONTRACT pragma and emit LLVM
fmuladd intrinsics for expressions of the form A * B + C (when they occur in a
single statement).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
568f785a76e0a21de20932abf09ce7653e651f92 01-Oct-2012 Richard Trieu <rtrieu@google.com> Cleaning up the self initialization checker.
-Allow Sema to do more processing on the initial Expr before checking it.
-Remove the special conditions in HandleExpr()
-Move the code so that only one call site is needed.
-Removed the function from Sema and only call it locally.
-Warn on potentially evaluated reference variables, not just casts to r-values.
-Update tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f3477c13eeaf11b32a41f181398fb5deffd0dd73 27-Sep-2012 Sylvestre Ledru <sylvestre@debian.org> Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164766

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
94ff8e1f57c6382d91d0de981a4f311509d83e37 27-Sep-2012 Sylvestre Ledru <sylvestre@debian.org> Fix a typo 'iff' => 'if'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
80bfa3d125fa0b9c636977ea37b4a55b2c9b1037 26-Sep-2012 Eli Friedman <eli.friedman@gmail.com> Fix an edge case of mangling involving the combination of a lambda and typeid.
typeid (and a couple other non-standard places where we can transform an
unevaluated expression into an evaluated expression) is special
because it introduces an an expression evaluation context,
which conflicts with the mechanism to compute the current
lambda mangling context. PR12123.

I would appreciate if someone would double-check that we get the mangling
correct with this patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164658 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e49ff3ef3459e97fa76502bd9eae4ed9170fd048 25-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix crash when a decltype expression in a trailing return type refers to the
function being instantiated. An error recovery codepath was recursively
performing name lookup (and triggering an unbounded stack of template
instantiations which blew out the stack before hitting the depth limit).

Patch by Wei Pan!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
fd09088880f758c874edc8d3d22fa922baec0483 21-Sep-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C: when diagnosing deprecated/unavailable usage of
setter or getter backing a deprecated/unavailable property,
also not location of the property. // rdar://12324295


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8b533d97e0683a0c87096b95927a2e9ce02243d4 20-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> If the range in a for range statement doesn't have a viable begin/end function,
but can be dereferenced to form an expression which does have viable begin/end
functions, then typo-correct the range, even if something else goes wrong with
the statement (such as inaccessible begin/end or the wrong type of loop
variable).

In order to ensure we recover correctly and produce any followup diagnostics in
this case, redo semantic analysis on the for-range statement outside of the
diagnostic trap, after issuing the typo-correction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7c3c6bca2662704fbe038137d8ef2e4112359586 20-Sep-2012 Eli Friedman <eli.friedman@gmail.com> Handle lambdas where the lambda-declarator is an explicit "(void)". PR13854.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d6f80daa84164ceeb8900da07f43b6a150edf713 20-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> Per C++11 [class.friend]p3, the 'friend' keyword must appear first in a
non-function friend declaration. Patch by Josh Magee!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8da8a660128180a31479216111ff9b19b11c95b4 19-Sep-2012 Eli Friedman <eli.friedman@gmail.com> Add the TypeSourceInfo for the lambda call operator to the lambda's
definition info; it needs to be there because the mangler needs to
access it before we're finished defining the lambda class.
PR12808.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
be2fa7ebf01259b63dc52fe46c8d101c18e72269 18-Sep-2012 Craig Topper <craig.topper@gmail.com> Mark unimplemented copy constructors and copy assignment operators with LLVM_DELETED_FUNCTION.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f56faa01936b9cf909623d7f06e3c2569ca4a78e 15-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e10f4d384f5ae113d72a5193a1332c1930635ccc 15-Sep-2012 Jordan Rose <jordan_rose@apple.com> -Warc-retain-cycles: warn at variable initialization as well as assignment.

Specifically, this should warn:

__block block_t a = ^{ a(); };

Furthermore, this case which previously warned now does not, since the value
of 'b' is captured before the assignment occurs:

block_t b; // not __block
b = ^{ b(); };

(This will of course warn under -Wuninitialized, as before.)

<rdar://problem/11015883>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ae19fbba559d8199d1f2b7154863180b0ae22ac7 13-Sep-2012 Douglas Gregor <dgregor@apple.com> Don't perform template argument deduction against invalid templates;
it's likely to lead to a crash later on. Fixes PR12933 /
<rdar://problem/11525335>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1824d54df85a462ada812dadda18130f951d40f3 13-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Fix Doxygen misuse: refer to parameter names in paragraphs correctly (\arg is
not what most people want -- it starts a new paragraph).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6964b3f80ce1ba489e7e25e7cd58062699af9b0c 07-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR9023: A template template parameter whose template parameter list contains an
unexpanded parameter pack is a pack expansion. Thus, as with a non-type template
parameter which is a pack expansion, it needs to be expanded early into a fixed
list of template parameters.

Since the expanded list of template parameters is not itself a parameter pack,
it is permitted to appear before the end of the template parameter list, so also
remove that restriction (for both template template parameter pack expansions and
non-type template parameter pack expansions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3359fa306836ffb64401aad4b561e7647b20d6ef 06-Sep-2012 Fariborz Jahanian <fjahanian@apple.com> refactoring + objective-C specific test for my last patch.
// rdar://12233989


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
568ba871bbac959029671b81f8e531edb7e0d7d6 04-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Revert r163083 per chandlerc's request.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5be92de217a1940d0e109abd0f401df4480c1a4b 02-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Implemented parsing and AST support for the MS __leave exception statement. Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
376c43223ee29334685250c59fdb11e4b3c594fb 31-Aug-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C: underline name of the missing method
in the diagnbostic. // rdar://11303469



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163003 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
df5faf5e7ae6823d0af0b801c4ac26d47f2cee97 25-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] As part of a larger refactoring, rename AsmStmt to GCCAsmStmt.
No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
42f48fbdf31a7e8c516ba5eed486ff53966459fc 24-Aug-2012 John McCall <rjmccall@apple.com> Instantiate class template specializations during ADL.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4e28d9e2ba9ce237549b45cfd4136ec6536d1325 24-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove ASTOwningVector, it doesn't own anything and provides no value over SmallVector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3fe198bf0d6118c7b080c17c3bb28d7c84e458b9 23-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Rip out remnants of move semantic emulation and smart pointers in Sema.

These were nops for quite a while and only lead to confusion. ASTMultiPtr
now behaves like a proper dumb array reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
70517ca5c07c4b41ff8662b94ee22047b0299f8c 23-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Fix a bunch of -Wdocumentation warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e1715b66a878bcab315513351e5df68bfc010d2e 21-Aug-2012 Sam Panzer <espanz@gmail.com> Better diagnostics for range-based for loops with bad range types.

The old error message stating that 'begin' was an undeclared identifier
is replaced with a new message explaining that the error is in the range
expression, along with which of the begin() and end() functions was
problematic if relevant.

Additionally, if the range was a pointer type or defines operator*,
attempt to dereference the range, and offer a FixIt if the modified range
works.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
df4ee102aa909e2f40c294701bfeffac63e8d29b 20-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove old cruft now that MS-style asms their own code path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0576681bac125be07f77f66b02a3dba2c3a24557 18-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR41111, PR5925, PR13210: Teach tentative parsing to annotate identifiers and
nested names as id-expressions, using the annot_primary_expr annotation, where
possible. This removes some redundant lookups, and also allows us to
typo-correct within tentative parsing, and to carry on disambiguating past an
identifier which we can determine will fail lookup as both a type and as a
non-type, allowing us to disambiguate more declarations (and thus offer
improved error recovery for such cases).

This also introduces to the parser the notion of a tentatively-declared name,
which is an identifier which we *might* have seen a declaration for in a
tentative parse (but only if we end up disambiguating the tokens as a
declaration). This is necessary to correctly disambiguate cases where a
variable is used within its own initializer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0d5a069f66df09b3308ccfdce84a88170034c657 17-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Add support for "type safety" attributes that allow checking that 'void *'
function arguments and arguments for variadic functions are of a particular
type which is determined by some other argument to the same function call.

Usecases include:
* MPI library implementations, where these attributes enable checking that
buffer type matches the passed MPI_Datatype;
* for HDF5 library there is a similar usecase as MPI;
* checking types of variadic functions' arguments for functions like
fcntl() and ioctl().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162067 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7f90b531818ad772f6e407f88101dc618c738fa4 17-Aug-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C++: issue diagnostic when ivar type is
an abstract c++ class. // rdar://12095239


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bc20bbb0bf90446a469848c658ca376832f43dc8 16-Aug-2012 Sam Panzer <espanz@gmail.com> Removed unused LParenLoc parameter to ActOnCXXForRangeStmt

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7bd092b054444e9800e8de1d8d71c408dbdc8ead 15-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add the left brace source location and improve the pretty
printer. Patch by Enea Zaffanella <zaffanella@cs.unipr.it>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
92570bd1597f355d5673a94960323f81d99c4921 15-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove the last bits of LineEnds.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1f2e1a96bec2ba6418ae7f2d2b525a3575203b6a 10-Aug-2012 John McCall <rjmccall@apple.com> Check access to friend declarations. There's a number of different
things going on here that were problematic:
- We were missing the actual access check, or rather, it was suppressed
on account of being a redeclaration lookup.
- The access check would naturally happen during delay, which isn't
appropriate in this case.
- We weren't actually emitting dependent diagnostics associated with
class templates, which was unfortunate.
- Access was being propagated incorrectly for friend method declarations
that couldn't be matched at parse-time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8c6cb462946b8be19167fad7ff21d4f9fbaebfef 09-Aug-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C: refactor/simplify parsing of delayed
method/c-funcs defined in objc class implementation.
No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161540 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
de01b7a6b4df27555ff7b25e51c0d3df29e3a0cf 09-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR13558: Fix typo 'compatiblity'. Thinking of the children. Apparently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
62f22b87801882646418bae85111e565f7a53ddb 08-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Refactor the logic to generate the AsmString into Sema. No
functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161518 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d24bf90ae72d7df5e0ef0a1d3dd2806462ec15b1 08-Aug-2012 Chad Rosier <mcrosier@apple.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
79efe24e125553b7fd4a35ffb3b7a45c4f1e661a 07-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Stmt destructors are never called, so allocate the AsmToks using
the ASTContext BumpPtr. Also use the preferred llvm::ArrayRef interface.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
8f726de55412870ef70e788b852c6cc50873e15b 06-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Pass Tokens to Sema and store them in the AST. No functional
change intended. No test case as there's no real way to test at this time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a4b39658673954fb9f75673594b50028685fc665 06-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR13499: Don't try to check whether 'override' has been validly applied until
we know whether the function is virtual. But check it as soon as we do know;
in some cases we don't need to wait for an instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
95aac15936e8362aeb4813f95bc255dee6473592 01-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Fix an assertion failure instantiating a constexpr function from within a -dealloc method. PR13401.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e61354b274ec5aa6acf3d15271896ce7596bb123 27-Jul-2012 Anna Zaks <ganna@apple.com> Consolidate ObjC lookupPrivateMethod methods from Sema and DeclObjC.

Also, fix a subtle bug, which occurred due to lookupPrivateMethod
defined in DeclObjC.h not looking up the method inside parent's
categories.

Note, the code assumes that Class's parent object has the same methods
as what's in the Root class of a the hierarchy, which is a heuristic
that might not hold for hierarchies which do not descend from NSObject.
Would be great to fix this in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b9d0b76e42fd2d4cdfd135220302458d03ad09fe 27-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> Final piece of core issue 1330: delay computing the exception specification of
a defaulted special member function until the exception specification is needed
(using the same criteria used for the delayed instantiation of exception
specifications for function temploids).

EST_Delayed is now EST_Unevaluated (using 1330's terminology), and, like
EST_Uninstantiated, carries a pointer to the FunctionDecl which will be used to
resolve the exception specification.

This is enabled for all C++ modes: it's a little faster in the case where the
exception specification isn't used, allows our C++11-in-C++98 extensions to
work, and is still correct for C++98, since in that mode the computation of the
exception specification can't fail.

The diagnostics here aren't great (in particular, we should include implicit
evaluation of exception specifications for defaulted special members in the
template instantiation backtraces), but they're not much worse than before.

Our approach to the problem of cycles between in-class initializers and the
exception specification for a defaulted default constructor is modified a
little by this change -- we now reject any odr-use of a defaulted default
constructor if that constructor uses an in-class initializer and the use is in
an in-class initialzer which is declared lexically earlier. This is a closer
approximation to the current draft solution in core issue 1351, but isn't an
exact match (but the current draft wording isn't reasonable, so that's to be
expected).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
612409ece080e814f79e06772c690d603f45fbd6 25-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR12057: Allow variadic template pack expansions to cross lambda boundaries.
Rather than adding a ContainsUnexpandedParameterPack bit to essentially every
AST node, we tunnel the bit directly up to the surrounding lambda expression
when we reach a context where an unexpanded pack can not normally appear.
Thus any statement or declaration within a lambda can now potentially contain
an unexpanded parameter pack.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bed28ac1d1463adca3ecf24fca5c30646fa9dbb2 23-Jul-2012 Sylvestre Ledru <sylvestre@debian.org> Fix a typo (the the => the)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
adb1d4c18ee83249d4cffc99ef902f98e846092a 23-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR12917: Remove incorrect assumption that lambda mangling information cannot
change once it's been assigned. It can change in two ways:
1) In a template instantiation, the context declaration should be the
instantiated declaration, not the declaration in the template.
2) If a lambda appears in the pattern of a variadic pack expansion, the
mangling number will depend on the pack length.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ddcfbc9ad1817f545610999d655ac6c28d4c0c12 19-Jul-2012 Jordan Rose <jordan_rose@apple.com> For varargs, diagnose passing ObjC objects by value like other non-POD types.

While we still want to consider this a hard error (non-POD variadic args are
normally a DefaultError warning), delaying the diagnostic allows us to give
better error messages, which also match the usual non-POD errors more closely.

In addition, this change improves the diagnostic messages for format string
argument type mismatches by passing down the type of the callee, so we can
say "variadic method" or "variadic function" appropriately.

<rdar://problem/11825593>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6a06e5ff3b680dcf7234d200309fd2400c478095 18-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR13381: consider cv-qualifiers on a class member's type when determining which
constructor will be used for moving that object, in the computation of its
exception specification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
500d729e85028944355a119f9823ac99fa5ddcab 18-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR13386: When matching up parameters between a function template declaration
and a function template instantiation, if there's a parameter pack in the
declaration and one at the same place in the instantiation, don't assume that
the pack wasn't expanded -- it may have expanded to nothing. Instead, go ahead
and check whether the parameter pack was expandable. We can do this as a
side-effect of the work we'd need to do anyway, to find how many parameters
were produced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160416 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
379b28183a7dcb715c3f3eb2da4b0157d6d8ffbe 17-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> Issue warning when assigning out-of-range integer values to enums.
Due to performance cost, this is an opt-in option placed
under -Wassign-enum. // rdar://11824807


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160382 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7e54fb5fcc7d7b8e843501652cf7c19cea6c4c57 16-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR13365: Fix code which was trying to treat an array of DeducedTemplateArgument
as an array of its base class TemplateArgument. Switch the const
TemplateArgument* parameters of InstantiatingTemplate's constructors to
ArrayRef<TemplateArgument> to prevent this from happening again in the future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160245 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e3f470a718ec00eb8b546e405fa59bc2df2d7c46 12-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> Stop instantiating a class if we hit a static_assert failure. Also, if the
static_assert fails when parsing the template, don't diagnose it again on every
instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a5ef44ff5d93a3be6ca67782828157a71894cf0c 11-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Enable comment parsing and semantic analysis to emit diagnostics. A few
diagnostics implemented -- see testcases.

I created a new TableGen file for comment diagnostics,
DiagnosticCommentKinds.td, because comment diagnostics don't logically
fit into AST diagnostics file. But I don't feel strongly about it.

This also implements support for self-closing HTML tags in comment
lexer and parser (for example, <br />).

In order to issue precise diagnostics CommentSema needs to know the
declaration the comment is attached to. There is no easy way to find a decl by
comment, so we match comments and decls in lockstep: after parsing one
declgroup we check if we have any new, not yet attached comments. If we do --
then we do the usual comment-finding process.

It is interesting that this automatically handles trailing comments.
We pick up not only comments that precede the declaration, but also
comments that *follow* the declaration -- thanks to the lookahead in
the lexer: after parsing the declgroup we've consumed the semicolon
and looked ahead through comments.

Added -Wdocumentation-html flag for semantic HTML errors to allow the user to
disable only HTML warnings (but not HTML parse errors, which we emit as
warnings in -Wdocumentation).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4990890fc9428f98bef90ba349203a648c592778 09-Jul-2012 Alexander Kornienko <alexfh@google.com> Inline storage of attributes in AttributedStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
fad0a32da8ea34a58aa0a0dd3fd67cd30959b080 08-Jul-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Range check __builtin_mips_wrdsp / __builtin_mips_rddsp arguments against the upper/lower values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
478851c3ed6bd784e7377dffd8e57b200c1b9ba9 04-Jul-2012 Benjamin Kramer <benny.kra@googlemail.com> Drop the ASTContext.h include from Stmt.h and fix up transitive users.

This required moving the ctors for IntegerLiteral and FloatingLiteral out of
line which shouldn't change anything as they are usually called through Create
methods that are already out of line.

ASTContext::Deallocate has been a nop for a long time, drop it from ASTVector
and make it independent from ASTContext.h

Pass the StorageAllocator directly to AccessedEntity so it doesn't need to
have a definition of ASTContext around.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a1eec4bd198b96ef40a7c15cd0e131ca94511ad8 04-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: Refactor parse/sema portion of
objective-c's fast enumeration statement,
for more work to come.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6c89eafc90f5c51a0bf185a993961170aee530c2 03-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: just as we have done for method definitions,
c-functions declared in implementation should have their
parsing delayed until the end so, they can access forward
declared private methods. // rdar://10387088


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159626 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7dd900ed308506f9cf1cb72c70db1652f94cab37 02-Jul-2012 Jordan Rose <jordan_rose@apple.com> In blocks, only pretend that enum constants have enum type if necessary.

In C, enum constants have the type of the enum's underlying integer type,
rather than the type of the enum. (This is not true in C++.) Thus, when a
block's return type is inferred from an enum constant, it is incompatible
with expressions that return the enum type.

In r158899, I told block returns to pretend that enum constants have enum
type, like in C++. Doug Gregor pointed out that this can break existing code.

Now, we don't check the types of return statements until the end of the block.
This lets us go back and add implicit casts in blocks with mixed enum
constants and enum-typed expressions.

<rdar://problem/11662489> (again)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
831421f24057b93ea28bc92d8bd6290631a43caf 25-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> Unrevert r158887, reverted in r158949, along with a fix for the bug which
resulted in it being reverted. A test for that bug was added in r158950.

Original comment:

If an object (such as a std::string) with an appropriate c_str() member function
is passed to a variadic function in a position where a format string indicates
that c_str()'s return type is desired, provide a note suggesting that the user
may have intended to call the c_str() member.

Factor the non-POD-vararg checking out of DefaultVariadicArgumentPromotion and
move it to SemaChecking in order to facilitate this. Factor the call checking
out of function call checking and block call checking, and extend it to cover
constructor calls too.

Patch by Sam Panzer!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8da16874f48d2c5c8f1275c7fd77caf8a8af3f81 22-Jun-2012 James Dennett <jdennett@google.com> Documentation cleanup: making \param and \returns docs match the code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
16ae9de07730832945204877d752db7f1c070962 22-Jun-2012 James Dennett <jdennett@google.com> Documentation cleanup: making \param docs match the code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4e294eea2c8a8965e24682ed9da8944969830813 22-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> Revert r158887. This fixes pr13168.

Revert "If an object (such as a std::string) with an appropriate c_str() member function"

This reverts commit 7d96f6106bfbd85b1af06f34fdbf2834aad0e47e.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7d96f6106bfbd85b1af06f34fdbf2834aad0e47e 21-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> If an object (such as a std::string) with an appropriate c_str() member function
is passed to a variadic function in a position where a format string indicates
that c_str()'s return type is desired, provide a note suggesting that the user
may have intended to call the c_str() member.

Factor the non-POD-vararg checking out of DefaultVariadicArgumentPromotion and
move it to SemaChecking in order to facilitate this. Factor the call checking
out of function call checking and block call checking, and extend it to cover
constructor calls too.

Patch by Sam Panzer!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
cea06d26b8f3a2599bba79f7e072b7550de949a7 21-Jun-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: Normally, a property cannot be both 'readonly' and having a
"write" attribute (copy/retain/etc.). But, property declaration in
primary class and protcols are tentative as they may be overridden
into a 'readwrite' property in class extensions. Postpone diagnosing
such warnings until the class implementation is seen.
// rdar://11656982


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
fc685ace387734599c475426b1a8efdb491054b8 20-Jun-2012 Aaron Ballman <aaron@aaronballman.com> Reapplying the changes from r158717 as they were rolled back to avoid merge conflicts from a separate problematic patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
ed35fd1c6db1680b4526ba64c94e5da6ec203be7 19-Jun-2012 Aaron Ballman <aaron@aaronballman.com> Improves parsing and semantic analysis for MS __declspec attributes. This includes support for the align (which fixes PR12631).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
50dc12ad05d4a3a57e83852756498afce4307a77 16-Jun-2012 Kaelyn Uhrain <rikka@google.com> Recover when correcting an unknown type name to a keyword like "struct".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7bf33401acf506b0039222834d7259acb80f6311 16-Jun-2012 Kaelyn Uhrain <rikka@google.com> Move isCXXSimpleTypeSpecifier from Parser to Sema and tweak it for wider use.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158572 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
03f1eb031b84e93415b792c4b45d8da71c88e92d 15-Jun-2012 Douglas Gregor <dgregor@apple.com> Check the parameter lists and return type of both blocks and lambdas
for unexpanded parameter packs. Fixes the crash-on-invalid in
PR13117.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0899e9787799abdb93887e5e3d180fa77a83ee3d 15-Jun-2012 James Dennett <jdennett@google.com> Documentation cleanup:
* Escaped @ symbols that shouldn't be interpreted by Doxygen;
* Deleted \param documentation for function parameters that no longer exist;
* Fixed parameter names in \param Doxygen commands;
* Fixed some broken formatting.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158505 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
809d1be9820039b4cf6efa48246a0d70ffa13394 14-Jun-2012 James Dennett <jdennett@google.com> More doxygen/documentation cleanups.

This reduces the number of warnings generated by Doxygen by about 100
(roughly 10%). Issues addressed:
(1) Primarily, backslash-escaped "@foo" and "#bah" in Doxygen comments
when they're not supposed to be Doxygen commands or links, and
similarly for "<baz>" when it's not intended as as HTML tag;
(2) Changed some \t commands (which don't exist) to \c ("to refer to a
word of code", as the Doxygen manual says);
(3) \precondition becomes \pre;
(4) When touching comments, deleted a couple of spurious spaces in them;
(5) Changed some \n and \r to \\n and \\r;
(6) Fixed one tiny typo: #pragms -> #pragma.

This patch touches documentation/comments only.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8cd64b4c5553fa6284d248336cb7c82dc960a394 11-Jun-2012 Chad Rosier <mcrosier@apple.com> Etch out the code path for MS-style inline assembly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ca5233044ef679840d1ad1c46a36b16e2ee8a6e1 10-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR13064: Store whether an in-class initializer uses direct or copy
initialization, and use that information to produce the right kind of
initialization during template instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f8cc02e50553b5c3bc6570bff0c47ac7db85fe8d 06-Jun-2012 Daniel Jasper <djasper@google.com> Introduce -Wunused-private-field. If enabled, this warning detects
unused private fields of classes that are fully defined in the current
translation unit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
684190b8dbe5258f4708ffbd816b8c5ee5b3502d 01-Jun-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Use CFBridgingRetain/CFBridgingRelease instead of __bridge_retained/__bridge_transfer
when migrating.

rdar://11569198

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
811bfcd823d51db6a06b3fd5a5943ff910b79d68 27-May-2012 Benjamin Kramer <benny.kra@googlemail.com> Use the SelectorSet typedef more widely throughout Sema.

While there make it a SmallPtrSet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
def07624ecc535431e0c814b4b5b842de8a06997 16-May-2012 David Blaikie <dblaikie@gmail.com> Include the correct conversion context locations for condition expressions.

This improves the conversion diagnostics (by correctly pointing to the loop
construct for conversions that may've been caused by the contextual conversion
to bool caused by a condition expression) and also causes the NULL conversion
warnings to be correctly suppressed when crossing a macro boundary in such a
context. (previously, since the conversion context location was incorrect, the
suppression could not be performed)

Reported by Nico Weber as feedback to r156826.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7d24e289bea2accaaed79c6ca3e5cdd0c204ddc1 16-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang/AST] Index references of protocols in "@protocol(...)" syntax.

To do that, keep track of the location of the protocol id in the ObjCProtocolExpr
AST node.

rdar://11190837

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3003e1d6626d07e8fc4af95fad95b3a5d4c4af98 15-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fold the six functions checking explicitly-defaulted special member functions
into one. These were all performing almost identical checks, with different bugs
in each of them.

This fixes PR12806 (we weren't setting the exception specification for an
explicitly-defaulted, non-user-provided default constructor) and enforces
8.4.2/2's rule that an in-class defaulted member must exactly match the implicit
parameter type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
599f1b7100745efacb7ded6c176cb7feade114a5 13-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Refactor all the

if (Inherited)
Attr->setInherited(true);

To a central location.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
420efd83934ee78f04d73880e2ed1b7fdef3328c 13-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Produce a warning for mismatched section attributes. Completest pr9356.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bf9da1f8292bb66720ada94a050ede9dca17f60a 11-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix a recent regression with the merging of format attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
98ae834a3e289f84f0765d0d0ca7ff22ccaba458 10-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix an old (2009) FIXME:

// FIXME: This needs to happen before we merge declarations. Then,
// let attribute merging cope with attribute conflicts.

This was already being done for variables, but for functions we were merging
then first and then applying the attributes. To avoid duplicating merging
logic, some of the helpers in SemaDeclAttr.cpp become methods that can
handle merging two attributes in one decl or inheriting attributes from one
decl to another.

With this change we are now able to produce errors for variables with
incompatible visibility attributes or warn about unused dllimports in
variables.

This changes the attribute list iteration back to being in reverse source
code order, as that matches what decl merging does and avoids differentiating
the two cases is the merge*Attr methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e15db6f0d226a3bc88d244512d1004c7c1c07391 09-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [AST/libclang] Speed up clang_getOverriddenCursors() considerably by reserving a bit
in ObjCMethodDecl to indicate whether the method does not override any other method,
which is the majority of cases.

That way we can avoid unnecessary work doing lookups, especially when PCH is involved.

rdar://11360082

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
13489673b84fafaaf49cf5ae4e3bb9a945524dcb 07-May-2012 John McCall <rjmccall@apple.com> Change how we suppress access control in explicit instantiations
so that we actually accumulate all the delayed diagnostics. Do
this so that we can restore those diagnostics to good standing
if it turns out that we were wrong to suppress, e.g. if the
tag specifier is actually an elaborated type specifier and not
a declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3f152e65074b70e8c13c876ed8b552cb1e6194d7 07-May-2012 John McCall <rjmccall@apple.com> There is no reason for these methods to be out-of-line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9257664568bf375b7790131a84d9a4fa30a5b7e3 07-May-2012 John McCall <rjmccall@apple.com> Refactor DelayedDiagnostics so that it keeps diagnostics in
separate pools owned by the RAII objects that keep pushing
decl state. This gives us quite a bit more flexibility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
6a26e2e54aa2a8cc6c977081befd8e80e7573ca4 04-May-2012 Douglas Gregor <dgregor@apple.com> Move Sema::RequireNonAbstractType() off of PartialDiagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
ff310c763eeb41a7aaa3b928cd0bc0a6e493d5dd 02-May-2012 Douglas Gregor <dgregor@apple.com> Eliminate Sema::CompareMethodParamsInBaseAndSuper() entirely, by
folding its one check into the normal path for checking overridden
Objective-C methods. Good for another 3.6% speedup on the test case in
<rdar://problem/11004361>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8722ae8f6083cc27bef430e2815ceea77ffa0b28 02-May-2012 Douglas Gregor <dgregor@apple.com> The semantic checking that verifies whether an Objective-C method
declared in a subclass has consistent parameter types with a method
having the same selector in a superclass performs a significant number
of lookups into the class hierarchy. In the example in
<rdar://problem/11004361>, we spend 4.7% of -fsyntax-only time in
these lookups.

Optimize away most of the calls to this routine
(Sema::CompareMethodParamsInBaseAndSuper) by first checking whether we
have ever seen *any* method with that selector (using the global
selector table). Since most selectors are unique, we can avoid the
cost of this name lookup in many cases, for a 3.3% speedup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2c0abf4ae33ab2ba690ccae724b8d6f196e7cfda 30-Apr-2012 David Blaikie <dblaikie@gmail.com> Add FixItHint for -Wnull-conversion to initialize with an appropriate literal.

Reviewed by Doug Gregor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155839 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2b90f7637e846ea555dedac14e7f5065d85c5d3b 25-Apr-2012 Kaelyn Uhrain <rikka@google.com> Add an error message with fixit hint for changing '.' to '->'.

This is mainly for attempting to recover in cases where a class provides
a custom operator-> and a '.' was accidentally used instead of '->' when
accessing a member of the object returned by the current object's
operator->.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a4156b8574666aa69a2b0ad35dc9e9603433e4ae 21-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix regression in r154844. If necessary, defer computing adjusted destructor
exception specifications in C++11 until after we've parsed the exception
specifications for nested classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
05b3385f78939b3c6f328153b0011d974a407064 20-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Update doxygen comment to match changes in r155218.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155232 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
704c8f76bbe2de68375f7f146e75bd74de6dd518 20-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix bug where a class's (deleted) copy constructor would be implicitly given a
non-const reference parameter type if the class had any subobjects with deleted
copy constructors. This causes a rejects-valid if the class's copy constructor
is explicitly defaulted (as happens for some implementations of std::pair etc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9879556f250c7b692228e834d7fca8f1cb118bf6 20-Apr-2012 Fariborz Jahanian <fjahanian@apple.com> objective-arc: Retune my previous patch so warning
is issued on weak property as receiver and not on
any other use of a weak property. // rdar://10225276


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
289677da2d3ef2f015af8b7e41150053891589f7 19-Apr-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c arc: Issue warning under -Wreceiver-is-weak
if receiver is a 'weak' property, by type or by attribute.
// rdar://10225276


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
eb382ec1507cf2c8c12d7443d0b67c076223aec6 19-Apr-2012 Patrick Beard <pcbeard@mac.com> Implements boxed expressions for Objective-C. <rdar://problem/10194391>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d448ce0932708038adb93456b817722a314b647f 18-Apr-2012 Benjamin Kramer <benny.kra@googlemail.com> VerifyICE: Pass PartialDiagnostics by reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e6975e9b0985ad7f7ff9187e38d95bfe9ac4181b 17-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Implement DR1330 in C++11 mode, to support libstdc++4.7 which uses it.

We have a new flavor of exception specification, EST_Uninstantiated. A function
type with this exception specification carries a pointer to a FunctionDecl, and
the exception specification for that FunctionDecl is instantiated (if needed)
and used in the place of the function type's exception specification.

When a function template declaration with a non-trivial exception specification
is instantiated, the specialization's exception specification is set to this
new 'uninstantiated' kind rather than being instantiated immediately.

Expr::CanThrow has migrated onto Sema, so it can instantiate exception specs
on-demand. Also, any odr-use of a function triggers the instantiation of its
exception specification (the exception specification could be needed by IRGen).
In passing, fix two places where a DeclRefExpr was created but the corresponding
function was not actually marked odr-used. We used to get away with this, but
don't any more.

Also fix a bug where instantiating an exception specification which refers to
function parameters resulted in a crash. We still have the same bug in default
arguments, which I'll be looking into next.

This, plus a tiny patch to fix libstdc++'s common_type, is enough for clang to
parse (and, in very limited testing, support) all of libstdc++4.7's standard
headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
cefc3afac14d29de5aba7810cc8fe6c858949e9d 16-Apr-2012 Douglas Gregor <dgregor@apple.com> Implement C++11 [expr.prim.general]p3, which permits the use of 'this'
in the declaration of a non-static member function after the
(optional) cv-qualifier-seq, which in practice means in the exception
specification and late-specified return type.

The new scheme here used to manage 'this' outside of a member function
scope is more general than the Scope-based mechanism previously used
for non-static data member initializers and late-parsesd attributes,
because it can also handle the cv-qualifiers on the member
function. Note, however, that a separate pass is required for static
member functions to determine whether 'this' was used, because we
might not know that we have a static function until after declaration
matching.

Finally, this introduces name mangling for 'this' and for the implicit
'this', which is intended to match GCC's mangling. Independent
verification for the new mangling test case would be appreciated.

Fixes PR10036 and PR12450.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
534986f2b21e6050bf00163cd6423fd92155a6ed 14-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Add an AttributedStmt type to represent a statement with C++11 attributes
attached. Since we do not support any attributes which appertain to a statement
(yet), testing of this is necessarily quite minimal.

Patch by Alexander Kornienko!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
28a83f57003469fb615ad27dd34bcf5b0a10da8c 10-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [code-complete] Introduce CodeCompletionTUInfo which will be used for caching
code-completion related strings specific to a translation unit (ASTContext and related data)

CodeCompletionAllocator does such limited caching, by caching the name assigned
to a DeclContext*, but that is not the appropriate place since that object has
a lifetime that can extend beyond that of an ASTContext.

Introduce CodeCompletionTUInfo which will be always tied to a translation unit
to do this kind of caching and move the caching of CodeCompletionAllocator into this
object, and propagate it to all the places where it will be needed.

The plan is to extend the caching where appropriate, using CodeCompletionTUInfo,
to avoid re-calculating code-completion strings.

Part of rdar://10796159.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
42963612a4187b55685b7f75489c11abd3fa100e 10-Apr-2012 Douglas Gregor <dgregor@apple.com> Rework implementation of null non-type template arguments based on
Richard's feedback, to properly catch non-constant expressions and
type mismatches. Finishes <rdar://problem/11193097>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
12d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6 09-Apr-2012 John McCall <rjmccall@apple.com> Fix the access check performed as part of the determination of whether
to define a special member function as deleted so that it properly
establishes an object context for the accesses to the base subobject
members.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154343 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b9abd87283ac6e929b7e12a577663bc99e61d020 07-Apr-2012 John McCall <rjmccall@apple.com> Fix several problems with protected access control:
- The [class.protected] restriction is non-trivial for any instance
member, even if the access lacks an object (for example, if it's
a pointer-to-member constant). In this case, it is equivalent to
requiring the naming class to equal the context class.
- The [class.protected] restriction applies to accesses to constructors
and destructors. A protected constructor or destructor can only be
used to create or destroy a base subobject, as a direct result.
- Several places were dropping or misapplying object information.

The standard could really be much clearer about what the object type is
supposed to be in some of these accesses. Usually it's easy enough to
find a reasonable answer, but still, the standard makes a very confident
statement about accesses to instance members only being possible in
either pointer-to-member literals or member access expressions, which
just completely ignores concepts like constructor and destructor
calls, using declarations, unevaluated field references, etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
cf2fa2f0c9d67adb98b282ec0eaa88f08df29804 06-Apr-2012 DeLesley Hutchins <delesley@google.com> Fixed scoping error for late parsed attributes in nested classes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f54486acc1cadf2791c3916ece66fded1e57ba0b 04-Apr-2012 Douglas Gregor <dgregor@apple.com> Move the computation of the lambda mangling information (mangling
number + context) to the point where we initially start defining the
lambda, so that the linkage won't change when that information is made
available. Fixes the assertion in <rdar://problem/11182962>.

Plus, actually mangle the context of lambdas properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
73f428cf2c5a0847014a3125b7bb8d271aaa7c65 04-Apr-2012 John McCall <rjmccall@apple.com> Enter an expression evaluation context when parsing
statement-expressions. Prevents cleanups and such from being
claimed by the first full-expression in the block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c5a89a1cc2f168ad0a115c560b8de5f1c952d8c5 02-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Basic semantic analysis support for inheriting constructor declarations in
dependent contexts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6c4c36c4ed1007143f5b8655eb68b313a7e12e76 30-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR10217: Provide diagnostics explaining why an implicitly-deleted special
member function is deleted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6960587df0bd1b421c11715807a4d2302a3aae3c 28-Mar-2012 Douglas Gregor <dgregor@apple.com> Unify and fix our checking of C++ [dcl.meaning]p1's requirements
concerning qualified declarator-ids. We now diagnose extraneous
qualification at namespace scope (which we had previously missed) and
diagnose these qualification errors for all kinds of declarations; it
was rather uneven before. Fixes <rdar://problem/11135644>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1af83c444e5a2f6f50a6e1c15e6ebc618ae18a5f 23-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Support for definitions of member enumerations of class templates outside the
class template's definition, and for explicit specializations of such enum
members.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
42aceadbc3806868cee8ac576347d258ac99e1f6 18-Mar-2012 Douglas Gregor <dgregor@apple.com> Diagnose tag and class template declarations with qualified
declarator-ids that occur at class scope. Fixes PR8019.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f1c66b40213784a1c4612f04c14cafa2b0e89988 15-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Instantiating a class template should not instantiate the definition of any
scoped enumeration members. Later uses of an enumeration temploid as a nested
name specifier should cause its instantiation. Plus some groundwork for
explicit specialization of member enumerations of class templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
393eed7fb901e49085c8583ff0439d1273b6f2fe 14-Mar-2012 Daniel Dunbar <daniel@zuster.org> [Sema] Fix SemaDiagnosticBuilder to be inline.
- As with DiagnosticBuilder, it is very important that SemaDiagnosticBuilder be
completely inline to ensure that the compiler can rip it apart and sink it to
registers.

This is good for another 30k reduction in code size.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
243d7abb0f09c616781627b864ebde6ee8d0cdc1 13-Mar-2012 Daniel Dunbar <daniel@zuster.org> [Basic] Eliminate DiagnosticBuilder::Suppress and matching ctor, this stuff is
not used anymore (good thing we are still paying for it!).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9cda03ff7fc40b727d0cc44b1702dbae09d63f42 13-Mar-2012 James Molloy <james.molloy@arm.com> Ensure that default arguments are handled correctly in sub scopes. For example:

void f () {
int g (int a, int b=4);
{
int g(int a, int b=5);
}
}

should compile.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
5a7a5bb20904a1d34255b772c87b930e798f59a8 11-Mar-2012 Douglas Gregor <dgregor@apple.com> When determining whether an identifier followed by a '<' in a member
access expression is the start of a template-id, ignore function
templates found in the context of the entire postfix-expression. Fixes
PR11856.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f4b88a45902af1802a1cb42ba48b1c474474f228 10-Mar-2012 John McCall <rjmccall@apple.com> Remove BlockDeclRefExpr and introduce a bit on DeclRefExpr to
track whether the referenced declaration comes from an enclosing
local context. I'm amenable to suggestions about the exact meaning
of this bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
36f5cfe4df32af6c5fe01228102512996f566f9d 09-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Support for raw and template forms of numeric user-defined literals,
and lots of tidying up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9fcce65e7e1307b5b8da9be13e4092d6bb94dc1d 07-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> AST representation for user-defined literals, plus just enough of semantic
analysis to make the AST representation testable. They are represented by a
new UserDefinedLiteral AST node, which is a sugared CallExpr. All semantic
properties, including full CodeGen support, are achieved for free by this
representation.

UserDefinedLiterals can never be dependent, so no custom instantiation
behavior is required. They are mangled as if they were direct calls to the
underlying literal operator. This matches g++'s apparent behavior (but not its
actual mangling, which is broken for literal-operator-ids).

User-defined *string* literals are now fully-operational, but the semantic
analysis is quite hacky and needs more work. No other forms of user-defined
literal are created yet, but the AST support for them is present.

This patch committed after midnight because we had already hit the quota for
new kinds of literal yesterday.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ebcb57a8d298862c65043e88b2429591ab3c58d3 06-Mar-2012 Ted Kremenek <kremenek@apple.com> Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,
NSNumber, and boolean literals. This includes both Sema and Codegen support.
Included is also support for new Objective-C container subscripting.

My apologies for the large patch. It was very difficult to break apart.
The patch introduces changes to the driver as well to cause clang to link
in additional runtime support when needed to support the new language features.

Docs are forthcoming to document the implementation and behavior of these features.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1cb2d742eb6635aeab6132ee5f0b5781d39487d7 02-Mar-2012 Nico Weber <nicolasweber@gmx.de> Add -Wstring-plus-int, which warns on "str" + int and int + "str".

It doesn't warn if the integer is known at compile time and within
the bounds of the string.

Discussion: http://comments.gmane.org/gmane.comp.compilers.clang.scm/47203



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
23f0267e2d56c0407f12e62df3561ecf75d74e6e 01-Mar-2012 Eli Friedman <eli.friedman@gmail.com> Implement "optimization" for lambda-to-block conversion which inlines the generated block literal for lambdas which are immediately converted to block pointer type. This simplifies the AST, avoids an unnecessary copy of the lambda and makes it much easier to avoid copying the result onto the heap.

Note that this transformation has a substantial semantic effect outside of ARC: it gives the converted lambda lifetime semantics similar to a block literal. With ARC, the effect is much less obvious because the lifetime of blocks is already managed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3f01c8a58b7b2d78303675182a8de6b7fbe45ae1 01-Mar-2012 Eli Friedman <eli.friedman@gmail.com> Tighten type-checking a bit to make it clearer how BuildCXXMemberCallExpr is used.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
77bfb8b43ec3f7dee3a71f6e854b03ad29dab84f 29-Feb-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: provide fixit hint when atomic property does not
have matching user defined setter/getter and a warning is issued.
In this case, a fixit note is displayed. // rdar://10267155


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
16f1f717af196b1448258857b2e6dcfe144b39d0 29-Feb-2012 James Molloy <james.molloy@arm.com> Reapply r151638 and r151641.

The bug that was caught by Apple's internal buildbots was valid and also showed another bug in my implementation.

These are now fixed, with regression tests added to catch them both (not Darwin-specific).

Original log:
====================

Revert r151638 because it causes assertion hit on PCH creation for Cocoa.h

Original log:
---------------------
Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped.

This fixes code such as:

enum e {x, y};
int f(enum {y, x} n) {
return 0;
}

This finally fixes PR5464 and PR5477.
---------------------

I also reverted r151641 which was enhancement on top of r151638.

====================




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ac6260187b6b2f26faa9264d170d649a501f58a9 29-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Make the odr-use logic work correctly for constant-expressions. PR12006.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
32a9a7543f0296b0ae141899005f788bbe4262ca 29-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r151638 because it causes assertion hit on PCH creation for Cocoa.h

Original log:
---------------------
Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped.

This fixes code such as:

enum e {x, y};
int f(enum {y, x} n) {
return 0;
}

This finally fixes PR5464 and PR5477.
---------------------

I also reverted r151641 which was enhancement on top of r151638.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
fbcf0405b7da1c8606e4223b4f91835643ecd5b4 28-Feb-2012 James Molloy <james.molloy@arm.com> Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped.

This fixes code such as:

enum e {x, y};
int f(enum {y, x} n) {
return 0;
}

This finally fixes PR5464 and PR5477.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
13a140caba448a66ffcc5ff0d32a87d6e4f4ad3f 25-Feb-2012 Ahmed Charles <ace2001ac@gmail.com> ArrayRef'ize various functions in the AST/Parser/Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f5cd5cc9a7ec114ef1a4c08491a37d2327697c4a 25-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix a regression from r151117: ADL requires that we attempt to complete any
associated classes, since it can find friend functions declared within them,
but overload resolution does not otherwise require argument types to be
complete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ed878af7914df535b32d64f555fa118413186672 25-Feb-2012 Douglas Gregor <dgregor@apple.com> Implement C++11 [over.match.copy]p1b2, which allows the use of
explicit conversion functions to initialize the argument to a
copy/move constructor that itself is the subject of direct
initialization. Since we don't have that much context in overload
resolution, we end up threading more flags :(.

Fixes <rdar://problem/10903741> / PR10456.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151409 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4ca8ac2e61c37ddadf37024af86f3e1019af8532 24-Feb-2012 Douglas Gregor <dgregor@apple.com> Implement a new type trait __is_trivially_constructible(T, Args...)
that provides the behavior of the C++11 library trait
std::is_trivially_constructible<T, Args...>, which can't be
implemented purely as a library.

Since __is_trivially_constructible can have zero or more arguments, I
needed to add Yet Another Type Trait Expression Class, this one
handling arbitrary arguments. The next step will be to migrate
UnaryTypeTrait and BinaryTypeTrait over to this new, more general
TypeTrait class.

Fixes the Clang side of <rdar://problem/10895483> / PR12038.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
644af7b50bd0541468b45c197f5b637e934d48a0 23-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make sure that all top-level decls in a @implementation are
marked as such.

Previously we missed tag declarations; fixes rdar://10902015

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4fe5be028b723fedc28bb33be96cde1ab2574ee6 22-Feb-2012 Bill Wendling <isanbard@gmail.com> ArrayRef-icize the function arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151151 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
76f3f69db1416425070177243e9f390122c553e0 22-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Implement C++11 [expr.call]p11: If the operand to a decltype-specifier is a
function call (or a comma expression with a function call on its right-hand
side), possibly parenthesized, then the return type is not required to be
complete and a temporary is not bound. Other subexpressions inside a decltype
expression do not get this treatment.

This is implemented by deferring the relevant checks for all calls immediately
within a decltype expression, then, when the expression is fully-parsed,
checking the relevant constraints and stripping off any top-level temporary
binding.

Deferring the completion of the return type exposed a bug in overload
resolution where completion of the argument types was not attempted, which
is also fixed by this change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f4b7de1cef3007cc0479775638198287384d9af1 21-Feb-2012 Douglas Gregor <dgregor@apple.com> Improve our handling of lambda expressions that occur within default
arguments. There are two aspects to this:

- Make sure that when marking the declarations referenced in a
default argument, we don't try to mark local variables, both because
it's a waste of time and because the semantics are wrong: we're not
in a place where we could capture these variables again even if it
did make sense.
- When a lambda expression occurs in a default argument of a
function template, make sure that the corresponding closure type is
considered dependent, so that it will get properly instantiated. The
second bit is a bit of a hack; to fix it properly, we may have to
rearchitect our handling of default arguments, parsing them only
after creating the function definition. However, I'd like to
separate that work from the lambdas work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ccc1b5eebc6ca8a904c58c0468b9a71483b7c7cf 21-Feb-2012 Douglas Gregor <dgregor@apple.com> Implement name mangling for lambda expressions that occur within the
default arguments of function parameters. This simple-sounding task is
complicated greatly by two issues:

(1) Default arguments aren't actually a real context, so we need to
maintain extra state within lambda expressions to track when a
lambda was actually in a default argument.
(2) At the time that we parse a default argument, the FunctionDecl
doesn't exist yet, so lambda closure types end up in the enclosing
context. It's not clear that we ever want to change that, so instead
we introduce the notion of the "effective" context of a declaration
for the purposes of name mangling.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9e8c92a9c9b949bbb0408fbbd9a58e34894b6efc 20-Feb-2012 Douglas Gregor <dgregor@apple.com> Basic support for name mangling of C++11 lambda expressions. Because
name mangling in the Itanium C++ ABI for lambda expressions is so
dependent on context, we encode the number used to encode each lambda
as part of the lambda closure type, and maintain this value within
Sema.

Note that there are a several pieces still missing:
- We still get the linkage of lambda expressions wrong
- We aren't properly numbering or mangling lambda expressions that
occur in default function arguments or in data member initializers.
- We aren't (de-)serializing the lambda numbering tables




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5f3c163b7b19a0c7e02509a0984ee1256bca890d 18-Feb-2012 David Chisnall <csdavec@swan.ac.uk> Implement #pragma redefine_extname.

This fixes PR5172 and allows clang to compile C++ programs on Solaris using the system headers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
999713eea940f4e087cc3ac878689c5c5c7a7225 18-Feb-2012 Douglas Gregor <dgregor@apple.com> Rewrite variable capture within lambda expressions and blocks,
eliminating a bunch of redundant code and properly modeling how the
captures of outside blocks/lambdas affect the types seen by inner
captures.

This new scheme makes two passes over the capturing scope stack. The
first pass goes up the stack (from innermost to outermost), assessing
whether the capture looks feasible and stopping when it either hits
the scope where the variable is declared or when it finds an existing
capture. The second pass then walks down the stack (from outermost to
innermost), capturing the variable at each step and updating the
captured type and the type that an expression referring to that
captured variable would see. It also checks type-specific
restrictions, such as the inability to capture an array within a
block. Note that only the first odr-use of each
variable needs to do the full walk; subsequent uses will find the
capture immediately, so multiple walks need not occur.

The same routine that builds the captures can also compute the type of
the captures without signaling errors and without actually performing
the capture. This functionality is used to determine the type of
declaration references as well as implementing the weird decltype((x))
rule within lambda expressions.

The capture code now explicitly takes sides in the debate over C++
core issue 1249, which concerns the type of captures within nested
lambdas. We opt to use the more permissive, more useful definition
implemented by GCC rather than the one implemented by EDG.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
7d5088aa52d6e32b309ad0af32ea520ddbc5f953 18-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Initial refactoring of 'ShouldDeleteSpecialMember', in preparation for providing
decent diagnostics. Finish the work of combining all the 'ShouldDelete'
functions into one. In unifying the code, fix a minor bug where an anonymous
union with a deleted default constructor as a member of a union wasn't being
considered as making the outer union's default constructor deleted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2aed8b88613863f3c439cdfb205bdf8b608fb205 16-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Revert "Revert "Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself.""

This reintroduces commit r150682 with a fix for the Bullet benchmark crash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1548d14f4092a817f7d90ad3e7a65266dc85fbc5 16-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Revert "Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself."
It leads to a compiler crash in the Bullet benchmark.

This reverts commit r12014.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5f688f4b15d02aa7ad159c46b1f78fe59d412f12 16-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself.

Holding the constructor directly makes no sense when list-initialized arrays come into play. The constructor is now held in a CXXConstructExpr, if construction is what is done. The new design can also distinguish properly between list-initialization and direct-initialization, as well as implicit default-initialization constructors and explicit value-initialization constructors. Finally, doing it this way removes redundance from the AST because CXXNewExpr doesn't try to handle both the allocation and the initialization responsibilities.

This breaks the static analysis of new expressions. I've filed PR12014 to track this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f6e2e0291b8964ed41b4325e21dd90b86e791f10 16-Feb-2012 Douglas Gregor <dgregor@apple.com> Implicitly define a lambda's conversion functions (to function
pointers and block pointers). We use dummy definitions to keep the
invariant that an implicit, used definition has a body; IR generation
will substitute the actual contents, since they can't be represented
as C++.

For the block pointer case, compute the copy-initialization needed to
capture the lambda object in the block, which IR generation will need
later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e4e68d45f89ff4899d30cbd196603d09b7fbc150 15-Feb-2012 Douglas Gregor <dgregor@apple.com> When overload resolution picks an implicitly-deleted special member
function, provide a specialized diagnostic that indicates the kind of
special member function (default constructor, copy assignment
operator, etc.) and that it was implicitly deleted. Add a hook where
we can provide more detailed information later.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
81f3bff7c202d688c9298bc049fdb5b6f77057b1 15-Feb-2012 Douglas Gregor <dgregor@apple.com> Implement code completion support for lambda capture lists.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c6889e7ed16604c51994e1f11becf213fdc64eb3 14-Feb-2012 Douglas Gregor <dgregor@apple.com> Implement C++ core issue 974, which permits default arguments for
lambda expressions. Because these issue was pulled back from Ready
status at the Kona meeting, we still emit an ExtWarn when using
default arguments for lambda expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150519 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
625bb569df0c34feec0d52c0ec5215f21ef2e054 14-Feb-2012 Dmitri Gribenko <gribozavr@gmail.com> Generalize -Wempty-body: warn when statement body is empty (closes: PR11329)

* if, switch, range-based for: warn if semicolon is on the same line.
* for, while: warn if semicolon is on the same line and either next
statement is compound statement or next statement has more
indentation.

Replacing the semicolon with {} or moving the semicolon to the next
line will always silence the warning.

Tests from SemaCXX/if-empty-body.cpp merged into SemaCXX/warn-empty-body.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a73652465bcc4c0f6cb7d933ad84e002b527a643 14-Feb-2012 Douglas Gregor <dgregor@apple.com> Implement support for lambda capture pack expansions, e.g.,

[&values...] { print(values...); }




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
dfca6f53ab97d28d43e3fa2564209df08f3d282c 13-Feb-2012 Douglas Gregor <dgregor@apple.com> Introduce support for template instantiation of lambda
expressions. This is mostly a simple refact, splitting the main "start
a lambda expression" function into smaller chunks that are driven
either from the parser (Sema::ActOnLambdaExpr) or during AST
transformation (TreeTransform::TransformLambdaExpr). A few minor
interesting points:

- Added new entry points for TreeTransform, so that we can
explicitly establish the link between the lambda closure type in the
template and the lambda closure type in the instantiation.
- Added a bit into LambdaExpr specifying whether it had an explicit
result type or not. We should have had this anyway.

This code is 'lightly' tested.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
5b9cc5df25c2198f270dd1d5c438fdce70d4051d 12-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Represent C++ direct initializers as ParenListExprs before semantic analysis
instead of having a special-purpose function.

- ActOnCXXDirectInitializer, which was mostly duplication of
AddInitializerToDecl (leading e.g. to PR10620, which Eli fixed a few days
ago), is dropped completely.
- MultiInitializer, which was an ugly hack I added, is dropped again.
- We now have the infrastructure in place to distinguish between
int x = {1};
int x({1});
int x{1};
-- VarDecl now has getInitStyle(), which indicates which of the above was used.
-- CXXConstructExpr now has a flag to indicate that it represents list-
initialization, although this is not yet used.
- InstantiateInitializer was renamed to SubstInitializer and simplified.
- ActOnParenOrParenListExpr has been replaced by ActOnParenListExpr, which
always produces a ParenListExpr. Placed that so far failed to convert that
back to a ParenExpr containing comma operators have been fixed. I'm pretty
sure I could have made a crashing test case before this.

The end result is a (I hope) considerably cleaner design of initializers.
More importantly, the fact that I can now distinguish between the various
initialization kinds means that I can get the tricky generalized initializer
test cases Johannes Schaub supplied to work. (This is not yet done.)

This commit passed self-host, with the resulting compiler passing the tests. I
hope it doesn't break more complicated code. It's a pretty big change, but one
that I feel is necessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
d6cf912e1e33167452f328d15b98a790c58c03c0 10-Feb-2012 Ted Kremenek <kremenek@apple.com> Revert r145999. This turned out to be a bad idea. Unfortunately, 'id' is used so profusely
in many APIs and large codebases that this made the deprecated warning trigger happy to
the point of not being useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bb3d14e55d267bf5228699c7bf0c8ccdb71c8f46 09-Feb-2012 Fariborz Jahanian <fjahanian@apple.com> objc: If a method is not implemented in the category implementation but
has been declared in its primary class, superclass,
or in one of their protocols, no need to issue unimplemented method.
// rdar://10823023


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e2c5913c48f66bfec9e58a8ad1d90e5eeffad586 09-Feb-2012 Douglas Gregor <dgregor@apple.com> Implement C++ [expr.prim.lambda]p2, which bans lambda expressions in
unevaluated operands. Be certain that we're marking everything
referenced within a capture initializer as odr-used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
76e3da57b0e8cf72d221f44d54566ef206341668 08-Feb-2012 Douglas Gregor <dgregor@apple.com> When completing a lambda expression, make sure to check and attach the
body of the lambda to the function call operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d7a3e2c5f61cd4893f95b69a424fe4def3aa0f69 07-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Revert my patches which removed Diagnostic.h includes by moving some operator overloads out of line.

This seems to negatively affect compile time onsome ObjC tests
(which use a lot of partial diagnostics I assume). I have to come
up with a way to keep them inline without including Diagnostic.h
everywhere. Now adding a new diagnostic requires a full rebuild
of e.g. the static analyzer which doesn't even use those diagnostics.

This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99.
This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789.
This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7.
This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f.
This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
9d9922af13edf3ddf8804a41a98d997324fdd58e 06-Feb-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed instantiation of DependentScopeDeclRefExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d79093af384ac0ea78f4237a001eae7467e06a61 05-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> constexpr: Implement DR1358: An instantiation of a constexpr function which
can't produce a constant expression is not ill-formed (so long as some
instantiation of that function can produce a constant expression).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6f42b62b6194f53bcbc349f5d17388e1936535d7 05-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> Basic: import OwningPtr<> into clang namespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a4e6453d42ab0c0d74c9b6e586bceaea25107662 04-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Remove an unused and unimplemented function prototype.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
00bd44d5677783527d7517c1ffe45e4d75a0f56f 04-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Move various diagnostic operator<< overloads out of line and remove includes of Diagnostic.h.

Fix all the files that depended on transitive includes of Diagnostic.h.
With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
f39aec17b89f8f0dd78e78c50ad2fa08f12272e3 04-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Don't allow a value of a scoped enumeration to be used as the first bound for an
array new expression. This lays some groundwork for the implicit conversion to
integral or unscoped enumeration which C++11 ICEs undergo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
cefc7b20fdb97b989163199e0849b4325e9b7804 04-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Make explicit captures which cause implicit captures work correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b942cb24a060435b18fef5b43eb33d77afc0d03a 03-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Implement implicit capture for lambda expressions.

Still left: explicit captures in lambdas need to cause implicit capture, and I need to take a look at the diagnostics for some cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b70126a328f89937f46db42f9e3cba1592887c91 03-Feb-2012 Douglas Gregor <dgregor@apple.com> When a pack expansion occurs in the template argument list of an alias
template without a corresponding parameter pack, don't immediately
substitute the alias template. This is under discussion in the C++
committee, and may become ill-formed, but for now we match GCC.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8deabc133c121f6c5561d0b2171a41cb2c29b2ce 03-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move isSentinelNullExpr() from Sema to ASTContext to make it more widely
available.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d2cce136878badcee6694b216479d7f1b72a1e68 03-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Add some code to accurately perform odr-used marking for variables per the C++11 rules.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149641 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5f2987c11491edb186401d4e8eced275f0ea7c5e 02-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Split Sema::MarkDeclarationReferenced into multiple functions; the additional entry points are needed to implement C++11 odr-use marking correctly. No functional change in this patch; I'll actually make the change which fixes the odr-use marking in a followup patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
20039ae1d9f520d8395899d807473b638fb48688 02-Feb-2012 Rafael Espindola <rafael.espindola@gmail.com> Reject mismatched "#pragma GCC visibility push" and "#pragma GCC visibility pop".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c36bedc90c687caa71748480c60707ea4608b092 01-Feb-2012 Anna Zaks <ganna@apple.com> Add a new compiler warning, which flags anti-patterns used as the size
argument in strncat.

The warning is ignored by default since it needs more qualification.

TODO: The warning message and the note are messy when
strncat is a builtin due to the macro expansion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a1f2114d9e81923c750f6b439302ac03552c37db 01-Feb-2012 Douglas Gregor <dgregor@apple.com> Introduce the lambda scope before determining explicit captures, which
cleans up and improves a few things:
- We get rid of the ugly dance of computing all of the captures in
data structures that clone those of CapturingScopeInfo, centralizing
the logic for accessing/updating these data structures
- We re-use the existing capture logic for 'this', which actually
works now.

Cleaned up some diagnostic wording in minor ways as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
16e46dd0c284296cea819dfbf67942ecef02894d 01-Feb-2012 Kaelyn Uhrain <rikka@google.com> Make the callback object to Sema::CorrectTypo mandatory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
013b3668b67c8cb3ad2ee516c5607a3eba11829f 30-Jan-2012 Benjamin Kramer <benny.kra@googlemail.com> SmallBitVectorize the deduced parameter set.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
34269df5db40b7c4b4f52aed579d9b3108ff79e4 30-Jan-2012 Jean-Daniel Dupas <devlists@shadowlab.org> Update on format attribute handling.
- Remove the printf0 special handling as we treat it as printf anyway.
- Perform basic checks (non-literal, empty) for all formats and not only printf/scanf.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c5b2e58840748145d1706c1d1481369d1863fabf 29-Jan-2012 Douglas Gregor <dgregor@apple.com> Implement code completion support for module import declarations, e.g.,

@import <complete with module names here>

or

@import std.<complete with submodule names here>

Addresses <rdar://problem/10710117>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149199 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
fad03b75e0297546c5d12ec420b5b79d5b7baa2a 27-Jan-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Avoid redundant NNS qualification in constructor/destructor names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
84b007fae6c0cd30fa07074d34fbe2bf61fa44f9 26-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Refactor to share code for handling return statements between lambda expressions and block literals. As it turns out, almost all the logic can be shared.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3943b1c0215da2a4171dd6c696cb75d19e5a04a9 25-Jan-2012 Kaelyn Uhrain <rikka@google.com> Allow typo correction to be disabled in BuildOverloadedCallExpr variant.

This suppresses typo correction for auto-generated call expressions such
as to 'begin' or 'end' within a C++0x for-range statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
cd78e612d6fa8e214e6a6bb0e739a0c3e419df91 25-Jan-2012 Kaelyn Uhrain <rikka@google.com> Avoid correcting unknown identifiers to types where types aren't allowed.

Pass a typo correction callback object from ParseCastExpr to
Sema::ActOnIdExpression to be a bit more selective about what kinds of
corrections will be allowed for unknown identifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d1bb4ae6cbc0f8bea4b329e040f58b18c03388e7 25-Jan-2012 Douglas Gregor <dgregor@apple.com> When we're substituting into a function parameter pack and expect to
get a function parameter pack (but don't due to weird substitutions),
complain. Fixes the last bit of PR11848.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148960 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5ac4b6917aa34fae6da64036539023a6155a3d48 25-Jan-2012 Douglas Gregor <dgregor@apple.com> Rework the external Sema source's ReadMethodPool() so that it doesn't
return pre-built lists. Instead, it feeds the methods it deserializes
to Sema so that Sema can unique them, which keeps the chains shorter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f211662199c87461f3b1475a549ab439c63ca83b 24-Jan-2012 David Blaikie <dblaikie@gmail.com> Support decltype in member initializers.

This is the last piece of N3031 (decltype in weird places) - supporting
the use of decltype in a class ctor's member-initializer-list to
specify the base classes to initialize.

Reviewed by Richard Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7514f31c8fa3fbb3428d0dca98c32145fb0faaa5 24-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename Sema::isNullExpr() -> Sema::isSentinelNullExpr() which is more descriptive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b832f6dea893f25b40500a04781286236281cb20 23-Jan-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Minor fixups for auto deduction of initializer lists.

Fix some review comments.
Add a test for deduction when std::initializer_list isn't available yet.
Fix redundant error messages. This fixes and outstanding FIXME too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4f1813e55a13a19d4981d245d1da583c1051305b 23-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Sema::isNullExpr() that contains the checks that
Sema::DiagnoseSentinelCalls() does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3fc809de96f9b0a4fcf7bc936399194d0b7198c8 21-Jan-2012 Rafael Espindola <rafael.espindola@gmail.com> Remove redundant argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
71b8fb5d4233420d2ed2f150a54ea61431bd8684 21-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Make clang's AST model sizeof and typeof with potentially-evaluated operands correctly, similar to what we already do with typeid.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
23323e0253716ff03c95a00fb6903019daafe3aa 20-Jan-2012 DeLesley Hutchins <delesley@google.com> Delayed template instantiation of late-parsed attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
b0f9dd22bf469028b2c40eab60ad1019c3e6089d 19-Jan-2012 Tanya Lattner <tonic@nondot.org> A few style changes.
Change CheckVectorLogicalOperands to pass params by ref.
Add another test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bcdd7d92883d771106e54357245733358eac9672 19-Jan-2012 Kaelyn Uhrain <rikka@google.com> Remove the now-unused CorrectTypoContext enum.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8ef7b203332b0c8d65876a1f5e6d1db4e6f40e4b 19-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> constexpr: converted constant expression handling for enumerator values, case
values and non-type template arguments of integral and enumeration types.

This change causes some legal C++98 code to no longer compile in C++11 mode, by
enforcing the C++11 rule that narrowing integral conversions are not permitted
in the final implicit conversion sequence for the above cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4798f8dfdb15fc03fa6b4104efed8762d52ebb18 18-Jan-2012 Kaelyn Uhrain <rikka@google.com> Convert DiagnoseEmptyLookup to use correction callbacks.

No new unit tests yet as there is no behavioral change
(except for slightly more specific filtering in
Sema::ActOnStartOfLambdaDefinition). Tests will be added
as the code paths are traced in greater depth to determine
how to improve the results--there are at least one or two
known bugs that require those improvements. This commit
lays the groundwork for those changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148382 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
98d3606cd5583f35ba1f8cb11bf3245dd4f7ea02 17-Jan-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Add Sema::isInitListConstructor. This will be needed for upcoming work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
62b7cfb73e202051e7ab0dad42ba213acd0dec7e 17-Jan-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Auto deduction support for std::initializer_list, including for-range support. This means you can now write:

for (int i : {1, 4, 512, 23, 251}) {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
395e04dbd7294bae4640aef1705cec3d052578b0 17-Jan-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Add Sema::isStdInitializerList, which will be necessary for the upcoming operations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
29c3f814b64808c6dac4597b61a50ceecdf141fc 17-Jan-2012 Jean-Daniel Dupas <devlists@shadowlab.org> Fix a couples of issues in format strings checking.
PR 10274: format function attribute with the NSString archetype yields no compiler warnings
PR 10275: format function attribute isn't checked in Objective-C methods



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148324 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7530c034c0c71a64c5a9173206d9742ae847af8b 17-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unreachable code in Clang. (replace with llvm_unreachable where appropriate or when GCC requires it)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ea8c59aaa6bd19976879142296f8fd12f8926738 17-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce a CodeCompletionResult::CreateCodeCompletionString() that
does not depend on Sema, it accepts an ASTContext and a Preprocessor.

Step towards making clang_getCursorCompletionString not depend on Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6fc9e1d98205649e4d0f741d194d288a45995a62 17-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce a static Sema::MarkDeducedTemplateParameters() that only depends
on an ASTContext.

This is a step towards making clang_getCursorCompletionString not depend on Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0a151a137a68bb656acbcce7ff2407613bb80cfc 17-Jan-2012 Anna Zaks <ganna@apple.com> Use Builtin ID as the return value
for FunctionDecl::getMemoryFunctionKind().

This is a follow up on the Chris's review for r148142: We don't want to
pollute FunctionDecl with an extra enum. (To make this work, added
memcmp and family to the library builtins.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4f692c27d74e249d6ef8d24792c35f3e5c620e2a 16-Jan-2012 Tanya Lattner <tonic@nondot.org> Add support for OpenCL 1.1 logical operations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d9b859a74ecaede23a78d37f364498102ef418c9 13-Jan-2012 Anna Zaks <ganna@apple.com> Move identification of memory setting and copying functions (memset,
memcmp, strncmp,..) out of Sema and into FunctionDecl so that the logic
could be reused in the analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7984de35644701c0d94336da7f2215d4c26d9f5b 13-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its:

- If the declarator is at the start of a line, and the previous line contained
another declarator and ended with a comma, then that comma was probably a
typo for a semicolon:

int n = 0, m = 1, l = 2, // k = 5;
myImportantFunctionCall(); // oops!

- If removing the parentheses would correctly initialize the object, then
produce a note suggesting that fix.

- Otherwise, if there is a simple initializer we can suggest which performs
value-initialization, then provide a note suggesting a correction to that
initializer.

Sema::Declarator now tracks the location of the comma prior to the declarator in
the declaration, if there is one, to facilitate providing the note. The code to
determine an appropriate initializer from the -Wuninitialized warning has been
factored out to allow use in both that and -Wvexing-parse.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b030b1949ff6bd9e71fedca78a34deeaf6d75e00 12-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Revert accidental commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a1796826729ba8c73c32dd49fa4945ff3cb12039 12-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Make sure adding a field to a struct never reduces its size. PR11745.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
746f5bcbfde5b25269169c63c66492311673b67d 12-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add IsImplicit field in ObjCMessageExpr that is true when the message
was constructed, e.g. for a property access.

This allows the selector identifier locations machinery for ObjCMessageExpr
to function correctly, in that there are not real locations to handle/report for
such a message.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7d5e6948e6a4e04ee67b607f931d90d3063579f2 11-Jan-2012 Kaelyn Uhrain <rikka@google.com> Add initial callback object support to Sema::CorrectTypo.

Also includes two examples of the callback: a wrapper/replacement for
the CorrectTypoContext enum, and a conversion of the two calls to
CorrectTypo in SemaDeclCXX.cpp (one of which provides verifiable
improvement to the typo correction, as demonstrated in the added test).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bdad7a2e21686296b78dac6190b78d11c996f6d7 10-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> Update C++11 scoped enumeration support to match the final proposal:
- reject definitions of enums within friend declarations
- require 'enum', not 'enum class', for non-declaring references to scoped
enumerations


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147824 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
06284c1dc56caed19850bc3766c89f51763724c3 07-Jan-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed TypeofExpr AST and code generation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
72899c34e3d1abfffa241ad0ce5c4bf175e5ea51 07-Jan-2012 Eli Friedman <eli.friedman@gmail.com> More lambda work: semantic analysis of capturing 'this'. It's a bit complicated, but we have to be careful about when exactly captures are marked given PotentiallyPotentiallyEvaluated contexts. (Actually, it's not 100% correct yet, but it's close enough for the moment.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
ec9ea7200718478e8a976529defbe21942a11c9c 05-Jan-2012 Eli Friedman <eli.friedman@gmail.com> More lambda work. Tweak the Sema interface slightly. Start adding the pieces to build the lambda class and its call operator. Create an actual scope for the lambda body.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
dc3b723d35067e5d13474247b94a10c869cc7e58 04-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Stub out the Sema interface for lambda expressions, and change the parser to use it. Unconditionally error on lambda expressions because they don't work in any meaningful way yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c13a34b690d2dc2a03c2fea75a0a1438636c19ce 03-Jan-2012 Douglas Gregor <dgregor@apple.com> Eliminate the uglified keyword __import_module__ for importing
modules. This leaves us without an explicit syntax for importing
modules in C/C++, because such a syntax needs to be discussed
first. In Objective-C/Objective-C++, the @import syntax is used to
import modules.

Note that, under -fmodules, C/C++ programs can import modules via the
#include mechanism when a module map is in place for that header. This
allows us to work with modules in C/C++ without committing to a syntax.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5948ae1021122164b22f74353bb7fe325a64f616 03-Jan-2012 Douglas Gregor <dgregor@apple.com> Introduce a non-uglified syntax for module imports in Objective-C:

@import identifier [. identifier]* ;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
bd9482d859a74bf2c45ef8b8aedec61c0e1c8374 01-Jan-2012 Douglas Gregor <dgregor@apple.com> Eliminate ObjCForwardProtocolDecl, which is redundant now that
ObjCProtocolDecl modules forward declarations properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
27c6da284f90e32cda0ec8f52a2b6ba5a2613252 01-Jan-2012 Douglas Gregor <dgregor@apple.com> Wire up redeclaration chains for Objective-C protocols, so that both
forward declarations and definitions of an Objective-C protocol are
represented within a single chain of ObjCProtocolDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5df37bd0242e838e465f0bd51a70af424d152053 26-Dec-2011 Rafael Espindola <rafael.espindola@gmail.com> Delay checking of typedefs of dependent types. Fixes PR11630.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2ccd89cff3f1c18b48f649240302446a7dae28b9 20-Dec-2011 Douglas Gregor <dgregor@apple.com> When performing name lookup for a redeclaration, ignore module
visibility restrictions. This ensures that all declarations of the
same entity end up in the same redeclaration chain, even if some of
those declarations aren't visible. While this may seem unfortunate to
some---why can't two C modules have different functions named
'f'?---it's an acknowedgment that a module does not introduce a new
"namespace" of names.

As part of this, stop merging the 'module-private' bit from previous
declarations to later declarations, because we want each declaration
in a module to stand on its own because this can effect, for example,
submodule visibility.

Note that this notion of names that are invisible to normal name
lookup but are available for redeclaration lookups is how we should
implement friend declarations and extern declarations within local
function scopes. I'm not tackling that problem now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
25b009a9d2a79929112d3c28c7dd1730bf5246c8 16-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> PR11594: Don't blindly build a UnaryOperator UO_Minus on an expression which
might not be an rvalue when checking array accesses. Instead, pass through a
flag indicating the array index is negated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
91ec7894ec186dd36f509682f00486c98d8228ed 16-Dec-2011 David Blaikie <dblaikie@gmail.com> Support decltype in pseudo destructors and dependent destructor calls.

Reviewed by Eli Friedman.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
daaefc5381f9aafbb1cb6f88fb5ac6aaf34d65bf 15-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> Produce more detailed diagnostics when static_assert condition is not an ICE.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
80fb7dd8e0c56632dc68f5864f70abb2fde0e1df 14-Dec-2011 Matt Beaumont-Gay <matthewbg@google.com> r146430 lost some compile-time performance on MultiSource/Benchmarks/MiBench/security-rijndael; this gets most of it back.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
53a75c07dbe79b3dd5dd88a0378aefa18f793083 08-Dec-2011 David Blaikie <dblaikie@gmail.com> Decltype in non-pseudo (& non-dependent) dtor calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b76a97e91dc4bea0b6b3da06c84e02f50cd351d3 07-Dec-2011 Fariborz Jahanian <fjahanian@apple.com> objc: issue deprecated/unavailable diagnostic when
methods with these attributes are sent to receivers
of 'id' type too. // rdar://10459930


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d64251fd56577dd5c78903454632361e094c6dc1 06-Dec-2011 Erik Verbruggen <erikjv@me.com> Extend warnings for missing '@end'.
Fixes PR2709.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
42d6d0c91ab089cb252ab2f91c16d4557f458a2c 04-Dec-2011 David Blaikie <dblaikie@gmail.com> Support decltype in nested-name-specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f1d1ca5b2b40e66d927c2abd16d8baa21af6911f 01-Dec-2011 Douglas Gregor <dgregor@apple.com> When sending a message to a receiver that has "unknown any" type,
force the unknown any type to "id" so that the message send can be
completed without requiring a case. Fixes <rdar://problem/10506646>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145552 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
01e19be69a37bc4ab7746c454cfaa6aec7bb7c6a 30-Nov-2011 John McCall <rjmccall@apple.com> Fix the instantiation of pseudo-object expressions. This is a
really bad way to go about this, but I'm not sure there's a better
choice without substantial changes to TreeTransform --- most
notably, preserving implicit semantic nodes instead of discarding
and rebuilding them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3d3589db579f7695667b913c5043dd264ebe546f 30-Nov-2011 Douglas Gregor <dgregor@apple.com> Switch the module-loading interfaces and parser from a simple
top-level module name to a module path (e.g., std.vector). We're still
missing a number of pieces for this actually to do something.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c8d7f586180995ba33d03c0f6115b6a7bdefe326 29-Nov-2011 Richard Smith <richard-llvm@metafoo.co.uk> Revert r145244. It causes us to create broken ASTs with missing type information
for some cast expressions.

Original commit message:

Removed useless ImplicitCast nodes in explicit cstyle and static casts


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
56f5d36fd13c5e271ebd05192c25c88d28e77f8d 28-Nov-2011 Nicola Gigante <nicola.gigante@gmail.com> Removed useless ImplicitCast nodes in explicit cstyle and static casts

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6efd4c55a1a481d92966a91141c03e8145234cf6 23-Nov-2011 Richard Trieu <rtrieu@google.com> Add feature to diagnostics that will provide more information on function
pointer mismatch. Cases covered are: initialization, assignment, and function
arguments. Additional text will give the extra information about the nature
of the mismatch: different classes for member functions, wrong number of
parameters, different parameter type, different return type, and function
qualifier mismatch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
22c107b2b99887b5aec6d1fd38210031e944e31f 19-Nov-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed HadMultipleCandidates loading.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
32509f1e60451d86e9fbc473b6e853ba10b5fd1e 15-Nov-2011 John McCall <rjmccall@apple.com> Resolve placeholder expressions before trying to deduce
'auto'. Introduce a convenience method to make this a bit
easier, and use it elsewhere.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
80ee6e878a169e6255d4686a91bb696151ff229f 10-Nov-2011 John McCall <rjmccall@apple.com> There's no good reason to track temporaries in ExprWithCleanups,
but it is sometimes useful to track blocks. Do so. Also
optimize the storage of these expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ba243b59a1074e0962f6abfa3bb9aa984eac1245 09-Nov-2011 David Blaikie <dblaikie@gmail.com> Fixing 80 col violations (& removing any trailing whitespace on files I was touching anyway)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
dbbdec994f5a96b5c25aaa679cd86ecabf545f7b 06-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make sure when setting AttributesAsWritten of a property that they do not
include ownership qualifiers from the type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
17015eff2b3166e445377b15913474b472775e7c 03-Nov-2011 Douglas Gregor <dgregor@apple.com> Refactor Sema::IsSimplyAccessible slightly, to work on a DeclContext rather than a class

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
76852c218a207ef43583515cb835b6e855353a0f 01-Nov-2011 Douglas Gregor <dgregor@apple.com> Rework the AST for the initializer of a delegating constructor, so
that it retains source location information for the type. Aside from
general goodness (being able to walk the types described in that
information), we now have a proper representation for dependent
delegating constructors. Fixes PR10457 (for real).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0216df8fd3ce58f5a68ef2ab141ea34c96c11164 29-Oct-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed FriendDecl source locations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
55733de16f492dadbf5f4d2809d6c610ba6d86ae 28-Oct-2011 Richard Trieu <rtrieu@google.com> Fix for PR9751 to change the behavior of -Wformat warnings. If the format
string is part of the function call, then there is no difference. If the
format string is not, the warning will point to the call site and a note
will point to where the format string is.

Fix-it hints for strings are moved to the note if a note is emitted. This will
prevent changes to format strings that may be used in multiple places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143168 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
eee242ff426bf79149f221798966e58688383c1e 27-Oct-2011 Douglas Gregor <dgregor@apple.com> Make the loading of information attached to an IdentifierInfo from an
AST file more lazy, so that we don't eagerly load that information for
all known identifiers each time a new AST file is loaded. The eager
reloading made some sense in the context of precompiled headers, since
very few identifiers were defined before PCH load time. With modules,
however, a huge amount of code can get parsed before we see an
@import, so laziness becomes important here.

The approach taken to make this information lazy is fairly simple:
when we load a new AST file, we mark all of the existing identifiers
as being out-of-date. Whenever we want to access information that may
come from an AST (e.g., whether the identifier has a macro definition,
or what top-level declarations have that name), we check the
out-of-date bit and, if it's set, ask the AST reader to update the
IdentifierInfo from the AST files. The update is a merge, and we now
take care to merge declarations before/after imports with declarations
from multiple imports.

The results of this optimization are fairly dramatic. On a small
application that brings in 14 non-trivial modules, this takes modules
from being > 3x slower than a "perfect" PCH file down to 30% slower
for a full rebuild. A partial rebuild (where the PCH file or modules
can be re-used) is down to 7% slower. Making the PCH file just a
little imperfect (e.g., adding two smallish modules used by a bunch of
.m files that aren't in the PCH file) tips the scales in favor of the
modules approach, with 24% faster partial rebuilds.

This is just a first step; the lazy scheme could possibly be improved
by adding versioning, so we don't search into modules we already
searched. Moreover, we'll need similar lazy schemes for all of the
other lookup data structures, such as DeclContexts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
458bacff986ed8d30e7ae191c823d4db6cfaf16b 27-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix crash on an @interface nested inside @implementation, rdar://10336158

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9138b4e96429cbaae00c52c15c960f72b6645088 26-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Pull out conversion on LHS of -> and . into its own function. This happens
implicitly in LookupMemberExpr and explicitly in cases where template
instantiation doesn't redo the lookup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3c3b7f90a863af43fa63043d396553ecf205351c 25-Oct-2011 John McCall <rjmccall@apple.com> Restore r142914 and r142915, now with missing file and apparent
GCC compiler workaround.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
327a50f46449c946c42d50d97689bcb30e2af7d9 25-Oct-2011 NAKAMURA Takumi <geek4civic@gmail.com> Revert r142914 and r142915, due to possibly missing file.

r142914: "Introduce a placeholder type for "pseudo object""
r142915: "Pull the pseudo-object stuff into its own file."

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a1b852f8e1bee5ed3604ee483803cef39ce57a20 25-Oct-2011 John McCall <rjmccall@apple.com> Introduce a placeholder type for "pseudo object"
expressions: expressions which refer to a logical rather
than a physical l-value, where the logical object is
actually accessed via custom getter/setter code.
A subsequent patch will generalize the AST for these
so that arbitrary "implementing" sub-expressions can
be provided.

Right now the only client is ObjC properties, but
this should be generalizable to similar language
features, e.g. Managed C++'s __property methods.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
65019acfc46ffb191fac4e781ac0c4b8d0c8434e 25-Oct-2011 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs in the name that guards a
Microsoft __if_exists/__if_not_exists statement. Also note that we
weren't traversing DeclarationNameInfo *at all* within the
RecursiveASTVisitor, which would be rather fatal for variadic
templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ba0513de93d2fab6db5ab30b6927209fcc883078 25-Oct-2011 Douglas Gregor <dgregor@apple.com> Implement support for dependent Microsoft __if_exists/__if_not_exists
statements. As noted in the documentation for the AST node, the
semantics of __if_exists/__if_not_exists are somewhat different from
the way Visual C++ implements them, because our parsed-template
representation can't accommodate VC++ semantics without serious
contortions. Hopefully this implementation is "good enough".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3896fc5d4daaf003e451e797e37de57dd8cf9cd5 25-Oct-2011 Douglas Gregor <dgregor@apple.com> Rework Microsoft __if_exists/__if_not_exists parsing and semantic
analysis to separate dependent names from non-dependent names. For
dependent names, we'll behave differently from Visual C++:

- For __if_exists/__if_not_exists at class scope, we'll just warn
and then ignore them.
- For __if_exists/__if_not_exists in statements, we'll treat the
inner statement as a compound statement, which we only instantiate
in templates where the dependent name (after instantiation)
exists. This behavior is different from VC++, but it's as close as
we can get without encroaching ridiculousness.

The latter part (dependent statements) is not yet implemented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
cb8f951deacd251d9b3a73dc65f341477e039de1 20-Oct-2011 Douglas Gregor <dgregor@apple.com> There's no point in marking a declaration invalid just because it
shadows a template parameter. Complain about the shadowing (or not,
under -fms-extensions), but don't invalidate the declaration. Merely
forget about the template parameter declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
013e5ce167d72b3617951002f8aea5ff79a37d72 19-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Move static array parameter checks to SemaExpr, per Doug's request

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
341350ee62abd1ad818e1e3d926cd718960e439b 18-Oct-2011 Douglas Gregor <dgregor@apple.com> Make it possible to compute the type of 'this' without capturing
it. Refactoring to be used in a moment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5acb0c98b363400f6ade0ae7250f0102224e806b 17-Oct-2011 John McCall <rjmccall@apple.com> Teach the ARC compiler to not require __bridge casts when
passing/receiving CF objects at +0 to/from Objective-C methods
or audited C functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142219 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
091fffeed8971a577bc3c8057c1ec40015a22775 16-Oct-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Drop the Diagnose parameter from Sema::PerformImplicitConversion again and instead use TryImplicitConversion in CheckSingleAssignmentConstraints when that function is in no-diagnostics mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2060650f2743650a815ce3daa414352911d408fd 14-Oct-2011 Douglas Gregor <dgregor@apple.com> When declaring an out-of-line template, attempt to rebuild any types
within the template parameter list that may have changed now that we
know the current instantiation. Fixes <rdar://problem/10194295>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141954 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
cda57822327499aeb6fe606f9cf5903cffca3444 14-Oct-2011 Nico Weber <nicolasweber@gmx.de> Extend -Wno-sizeof-array-argument to strncpy and friends.

This finds 2 bugs in chromium and 1 in hunspell, with 0 false positives.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5f1c822def3efffe1d8f7299fbbbc3b1cdd4833d 13-Oct-2011 Erik Verbruggen <erikjv@me.com> Allow for annotate attributes after access specifiers. When such
attributes are found, propagate them to subsequent declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6dbba4fc128e2e2f5b26be996392bd32c0707f13 12-Oct-2011 John McCall <rjmccall@apple.com> Catch placeholder types in DefaultLvalueConversion
and DefaultFunctionArrayLvalueConversion. To prevent
significant regression for should-this-be-a-call fixits,
and to repair some such regression from the introduction of
bound member placeholders, make those placeholder checks
try to build calls appropriately. Harden the build-a-call
logic while we're at it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
769bb2d0dbd173589747cc8e7428a66db3b2692e 11-Oct-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Get rid of ShouldDeleteMoveConstructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c32d684d6c787b332a64c9013598d5ef668c4b45 11-Oct-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Consolidate copy constructor deletion into ShouldDeleteSpecialMember.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
276b061970939293f1abaf694bd3ef05b2cbda79 11-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Initial implementation of __atomic_* (everything except __atomic_is_lock_free).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f11dbe9676832e599e046b2ed0f132a6bb858e0a 11-Oct-2011 Francois Pichet <pichet2000@gmail.com> [Microsoft] If -fms-compatibility, then downgrade missing typename error to warning at function prototype scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
fac9467d1676dc05761e12e41e13e01a3a3da52b 11-Oct-2011 Kaelyn Uhrain <rikka@google.com> Add typo correction for type names.

The main motivation was to do typo correction in C++ "new" statements,
though picking it up in other places where type names are expected was
pretty much a freebie.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2c712f50cd56eaf3662989b556e9c6b1e8fcd11a 11-Oct-2011 Kaelyn Uhrain <rikka@google.com> Move some bool flags out of function parameter lists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
36bc2c663f600e7c9dc1a800d36f16603ca3ea51 10-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> objc: Some refactoring of overriding method decl. code
for future work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
147545d698972cfd34ece30a5d55e8180784161e 10-Oct-2011 Douglas Gregor <dgregor@apple.com> Parse the initializer for a class member after handling its
declarator, so that the declarator is in scope for the
initializer. Fixes PR9989.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141539 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e16da07474c376fbbeda2d4238cf35e2bd664d5a 10-Oct-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Begin work consolidating ShouldDelete* functions.

Begin with just default constructors. One note is that as a side effect
of this, a conformance test was removed on the basis that this is almost
certainly a defect as with most of union initialization. As it is, clang
does not implement union initialization close to the standard as it's
quite broken as written. I hope to write a paper addressing the issues
eventually.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a180f04c091bf3ede4fe292ba6a29d61da09e936 07-Oct-2011 John McCall <rjmccall@apple.com> Move type-checking for C-style casts in C into the now-misnamed
SemaCXXCast.cpp. Should have no functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c076e37e2223cfe998fa5e657dece30da78fcdc4 07-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implicitly assume that a ObjC category to an unavailable interface is also unavailable;
only give an 'unavailable' error on the @implementation of the category. rdar://10234078

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3a387441ae339363ee5b254658f295e97bd9e913 07-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> When using an unavailable/deprecated interface Foo inside Foo's interface/implementation
don't emit unavailable errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
d12059673dcef32bc2b6bae5321654d33863afe6 06-Oct-2011 Erik Verbruggen <erikjv@me.com> Added CXAvailability_NotAccessible to indicate that a declaration is available, but not accessible from the current code completion context.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7cc58b4c927fca539d43eaa58e00dca95946eb7c 05-Oct-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Added a flag to identify resolved overloaded function references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b45ae256cfd5ef3ab22b4d715159f978d8120d45 05-Oct-2011 John McCall <rjmccall@apple.com> Refactor the analysis of C++ cast expressions so that even
C-style and functional casts are built in SemaCXXCast.cpp.
Introduce a helper class to encapsulate most of the random
state being passed around, at least one level down.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
11d77169555480ee0a04c6e5bc390d8fde41175d 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Pass from the parser the locations of selector identifiers when creating
objc method decls.

They are not stored in the AST yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
951376242c076c3f62dd78bf672909fc011991db 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Pass all the locations of the selector identifiers for a message expression from the parser.

They are not kept in the AST yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
78dd67e78c50a7abdc7c358e5eac1770d5fea22a 03-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> CUDA: diagnose invalid calls across targets

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1f24076313e3c4921134db555194605c9a1ea49e 03-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> CUDA: add separate diagnostics for too few/many exec config args

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
2cf031d33ce6801dc11183a3cb48168f53fe06c4 01-Oct-2011 John McCall <rjmccall@apple.com> Allow the results of cf_returns_not_retained function
calls, or calls to audited functions without an explicit
return attribute, to be casted without a bridge cast.
Tie this mechanism in with the existing exceptions to
the cast restrictions. State those restrictions more
correctly and generalize.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8dfac0baaf0f81d3945bcb306480e358ba8d1f08 30-Sep-2011 John McCall <rjmccall@apple.com> Add explicit attributes to mark functions as having had their
CoreFoundation object-transfer properties audited, and add a #pragma
to cause them to be automatically applied to functions in a particular
span of code. This has to be implemented largely in the preprocessor
because of the requirement that the region be entirely contained in
a single file; that's hard to impose from the parser without registering
for a ton of callbacks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140846 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0f32caff4dc351719ca3362d95f859d72fdd6f1b 30-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> Minor refactoring. Enumerators may inherit the deprecated/unavailable
attributes from the enumeration type.
// rdar://10201690


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
97db7265ac1993e14e5877292e23d5ed2e9cf719 29-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> c - Enumerators may inherit the deprecated/unavailable
attributes from the enumeration type.
// rdar://10201690


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8987b2385d9ba63ada66e1344ace79b04d5cb5c3 28-Sep-2011 Douglas Gregor <dgregor@apple.com> Only print _Bool as 'bool' when 'bool' is defined as an object-like
macro whose only replacement token is '_Bool'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3240fe3b715327c8fda6f5a3bc8a092b1fce82a7 28-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> objcetive-c-arc: When overriding a method, its ns_consumed patameter
attribute must match its overriden method. Same also for
ns_returns_retained/not_retained on the result type.
This is one half of // rdar://10187884


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c1c0dfb376b829b94d4c61e9f358ce23e6aa3169 27-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Get rid of useless helper Sema::CastCategory.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c737acb8e86564becc5939d681089d1851e6be1a 27-Sep-2011 Douglas Gregor <dgregor@apple.com> Revert r139989 and r140031, which implemented the Objective-C type
system change in <rdar://problem/10109725> that allows conversion from
'self' in class methods to the root of the class's hierarchy. This
conversion rule is a hack that has non-trivial repurcussions
(particularly with overload resolution).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2246368b1061ef48e00bfc95d519d4393dff9926 27-Sep-2011 Bill Wendling <isanbard@gmail.com> Revert r140589. It was causing failures during llvm compilation:

llvm[1]: Compiling CommandLine.cpp for Debug+Asserts build
if /Users/void/llvm/llvm-opt.obj/Release+Asserts/bin/clang++ -I/Users/void/llvm/llvm.obj/include -I/Users/void/llvm/llvm.obj/lib/Support -I/Users/void/llvm/llvm.src/include -I/Users/void/llvm/llvm.src/lib/Support -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -g -fno-exceptions -fno-common -Woverloaded-virtual -Wcast-qual -m64 -Wall -W -Wno-unused-parameter -Wwrite-strings -c -MMD -MP -MF "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp" -MT "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.o" -MT "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d" /Users/void/llvm/llvm.src/lib/Support/CommandLine.cpp -o /Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.o ; \
then /bin/mv -f "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp" "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d"; else /bin/rm "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp"; exit 1; fi
In file included from /Users/void/llvm/llvm.src/lib/Support/CommandLine.cpp:25:
/Users/void/llvm/llvm.src/include/llvm/Support/system_error.h:690:14: error: unknown type name 'make_error_condition'; did you mean 'error_condition'?
{*this = make_error_condition(_e);}
^~~~~~~~~~~~~~~~~~~~
error_condition
...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
93476ddd9ce490f9c08d78b640efad812cb019d1 27-Sep-2011 Kaelyn Uhrain <rikka@google.com> Add typo correction for the type name in C++ "new" statements

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d6471f7c1921c7802804ce3ff6fe9768310f72b9 26-Sep-2011 David Blaikie <dblaikie@gmail.com> Rename Diagnostic to DiagnosticsEngine as per issue 5397


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6df6548e44a61c444bd85dccd0398cba047c79b1 24-Sep-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Correctly parse braced member initializers (even in delayed parsing) and correctly pass
the information on to Sema. There's still an incorrectness in the way template instantiation
works now, but that is due to a far larger underlying representational problem.
Also add a test case for various list initialization cases of scalars, which test this
commit as well as the previous one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
14b0c194b356a1204d081765b3e6699687bed97c 24-Sep-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Give InitListChecker a verification-only mode, where it neither emits diagnostics nor
builds a semantic (structured) initializer list, just reports on whether it can match
the given list to the target type.
Use this mode for doing init list checking in the initial step of initialization, which
will eventually allow us to do overload resolution based on the outcome.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b0edea9f03cf81227fa35513802f8f146f65c528 24-Sep-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Inline Sema::CheckInitList into its only user.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
77b6de07be9186063c12928d2e9785a5d4eecbf6 22-Sep-2011 David Blaikie <dblaikie@gmail.com> ArrayRef-ifying the fields passed to Sema::ActOnFields


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a71f9d0a5e1f8cafdd23a17e292de22fdc8e99ff 22-Sep-2011 David Blaikie <dblaikie@gmail.com> ArrayRef-ifying the UnexpandedParameterPacks passed to Sema::CheckParameterPacksForExpansion


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1d4e8e9340c9699069a33a74562e883a305f7607 17-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> objc - Treat type of 'self' in class methods as root of
class of this method. // rdar://10109725


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
dd22509c82eb7681a0f46b41d61cb2e25a4d8fa1 15-Sep-2011 Richard Trieu <rtrieu@google.com> Finish the lex->LHS and rex->RHS cleanup in Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
768d6cae40ad4ff3aed5483269d068ff7a45e229 13-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Keep the source range of attributes. Depends on a llvm tablegen commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139600 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
dc05b11c67331016473fbc7909827b1b89c9616b 10-Sep-2011 John McCall <rjmccall@apple.com> When converting a block pointer to an Objective-C pointer type, extend
the lifetime of the block by copying it to the heap, or else we'll get
a dangling reference because the code working with the non-block-typed
object will not know it needs to copy.

There is some danger here, e.g. with assigning a block literal to an
unsafe variable, but, well, it's an unsafe variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d023aec8907831a18d3514a95b843a7ee06b6b5e 09-Sep-2011 Douglas Gregor <dgregor@apple.com> Specializations cannot be module-hidden. Diagnose attempts to do so.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e761230ae3751b525cadd8066c74ec278ee4ef57 09-Sep-2011 Douglas Gregor <dgregor@apple.com> __module_private__ is inherited by redeclarations of an entity, and
must also be present of the first declaration of that entity.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0bcc9bc6cd46757000245fb7b91302e6ec3478a1 09-Sep-2011 John McCall <rjmccall@apple.com> Contextually converting to 'id' is not a useful operation. Contextually
converting to an arbitrary Objective-C pointer type is. Without
significantly re-implementing anything, change the API to reflect this,
and as a minor optimization, strip the pointer conversion off before
potentially building it.

Mostly, this removes a really bizarre-looking bit of code from
BuildInstanceMessage.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
90ab75b5ad328d2b155ec83fd4e80cd0f7af5729 09-Sep-2011 Richard Trieu <rtrieu@google.com> Changed references of BaseTy, MemInitTy, CXXScopeTy, TemplateParamsTy to CXXBaseSpecifier, CXXCtorInitializer, NestedNameSpecifier, TemplateParameterList and removed their typedefs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b2fc69097d15f6374b9e5e6101f33960c34acbed 09-Sep-2011 Richard Trieu <rtrieu@google.com> Change references to StmtTy to Stmt and removed typedefs of StmtTy. Also removed typedef of AttrTy since it is not used.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8d267c57afb3af418ed5281b7a9bb4555d701a82 09-Sep-2011 Douglas Gregor <dgregor@apple.com> Modules: introduce the __module_private__ declaration specifier, which
indicates that a declaration is only visible within the module it is
declared in.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f81e5a9e3f3ff80c56e4afb4fe6311a8735f36e8 09-Sep-2011 Richard Trieu <rtrieu@google.com> Change all references of type ExprTy to Expr and get rid of the typedefs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ccd891ae75e9678f1138868e50508c8083d021fa 09-Sep-2011 Richard Trieu <rtrieu@google.com> Capitialize paramater names in SemaExpr.cpp and resolve any parameter name conflicts between declarations and definitions from this and previous refactorings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ed9d84a2112e2bd56befb5f4fa8fc5bdf71fafa3 08-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread safety: added support for function scopes in attribute arguments.

This patch was written by DeLesley Hutchins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139302 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
eff98fc3561f6b717f6348f04b3f4fe03e934466 08-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread Safety: Patch to implement delayed parsing of attributes within a
class scope.

This patch was also written by DeLesley Hutchins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
14068e83f30864ed278fa43c5954404b47e99e7d 08-Sep-2011 David Blaikie <dblaikie@gmail.com> Adding FixIts to static/inline main declaration diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139282 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
900693b715b3832a42ae87157332baece94ccdd8 07-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Make sure the FunctionDecl's created by "#pragma weak" have correct ParmVarDecl's. PR10878.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f8b7f7177d722d254e255a7754446148ef514789 06-Sep-2011 Douglas Gregor <dgregor@apple.com> Implement the Named Return Value Optimization (NRVO) for blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e2ca828119b8bff4a5c25c6db8ee4fec558451e7 01-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't try keeping a 'LeadingEmptyMacroLoc' in NullStmt. This fails
in the face of buffering C++/ObjC method bodies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
898267f67b8131c4bed4430e2cfaf69ccf4c2de1 01-Sep-2011 Richard Trieu <rtrieu@google.com> Extend the self-reference warning to catch when a constructor references itself upon initialization, such as using itself within its own copy constructor.

struct S {};
S s(s);


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8697d308c1bdd50e5c45757ac11be701c26e9e97 01-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: this patch (re)introduces objective-c's default property
synthesis. This new feature is currently placed under
-fobjc-default-synthesize-properties option
and is off by default pending further testing.
It will become the default feature soon.
// rdar://8843851


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138913 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
65030af6526748ce11534e92f0ccefc44091ba13 31-Aug-2011 Douglas Gregor <dgregor@apple.com> Switch __import__ over to __import_module__, so we don't conflict with
existing practice with Python extension modules. Not that Python
extension modules should be using a double-underscored identifier
anyway, but...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
140ab234c23f392d5422691c5de1ee3c15026def 31-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c - This patch buffers method implementations
and does the Sema on their body after the entire
class/category @implementation is seen. This change allows messaging
of forward private methods, as well as, access to
synthesized ivars of properties with foward synthesize
declarations; among others. In effect, this patch removes
several restrictions placed on objective-c due to in-place
semantics processing of methods.
This is part of // rdar://8843851.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
85ea7aa961deac1d754f610af8062ae3f8b4e2a5 30-Aug-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Declare and define implicit move constructor and assignment operator.

This makes the code duplication of implicit special member handling even worse,
but the cleanup will have to come later. For now, this works.
Follow-up with tests for explicit defaulting and enabling the __has_feature
flag to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
10af87932fe4bffad539b24d512a33a1803daeae 29-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Minor clean up of objc's decl context stuff.
No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
80cb6e69d9e85231588ae604e4bc2bc9a07389af 29-Aug-2011 Nico Weber <nicolasweber@gmx.de> Warn on missing [super finalize] calls.

This matches gcc's logic. Second half of PR10661.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
95ed7784a335aca53b0c6e952cf31a4cfb633360 27-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Treat top-level objective-c declarations
, such as list of forward @class decls, in a DeclGroup
node. Deal with its consequence throught clang. This
is in preparation for more Sema work ahead. // rdar://8843851.
Feel free to reverse if it breaks something important
and I am unavailable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6aa52ec6b969faabf3764baf79d89810b8249a7e 27-Aug-2011 Douglas Gregor <dgregor@apple.com> Introduce support for a simple module import declaration, which
loads the named module. The syntax itself is intentionally hideous and
will be replaced at some later point with something more
palatable. For now, we're focusing on the semantics:
- Module imports are handled first by the preprocessor (to get macro
definitions) and then the same tokens are also handled by the parser
(to get declarations). If both happen (as in normal compilation),
the second one is redundant, because we currently have no way to
hide macros or declarations when loading a module. Chris gets credit
for this mad-but-workable scheme.
- The Preprocessor now holds on to a reference to a module loader,
which is responsible for loading named modules. CompilerInstance is
the only important module loader: it now knows how to create and
wire up an AST reader on demand to actually perform the module load.
- We search for modules in the include path, using the module name
with the suffix ".pcm" (precompiled module) for the file name. This
is a temporary hack; we hope to improve the situation in the
future.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
467dc88512b4ba4bb16e274ea3771dc1415d31da 26-Aug-2011 Douglas Gregor <dgregor@apple.com> Introduce a -cc1 option "-emit-module", that creates a binary module
from the given source. -emit-module behaves similarly to -emit-pch,
except that Sema is somewhat more strict about the contents of
-emit-module. In the future, there are likely to be more interesting
differences.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f09530f88ece49993f1b72271b0417574e897956 25-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Reverse r138567 until a buildbot failure is investigated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d8e987bee9d39f9131e9be319483265fd894c108 25-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objc -arse: Use DeclGroup for forward class declarations;
as in @class foo, bar. More cleanup to follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9a1ecf0522ccb7a45577f856150c15af0ee1df2a 22-Aug-2011 Nico Weber <nicolasweber@gmx.de> Warn on missing [super dealloc] calls.

This matches gcc's logic. Half of PR10661.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a28948f34817476d02412fa204cae038e228c827 22-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Restore patch I reversed in r138040. Known buildbot
failures are resolved.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e6f07f538fd0eddd6c087fcc01d4e4ff19129c71 19-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Revers r138040. Need to look at a few buildbot failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3dbf2f5f00cfc8b25318c119c0d39f4a49d15ebe 19-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Bring objective-c handling of decl context
to modernity. Instead of passing down individual
context objects from parser to sema, establish decl
context in parser and have sema access current context
as needed. I still need to take of Doug's comment for
minor cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bd5da9d1a711e90b3bc265b4798954085c0b48d9 18-Aug-2011 Ted Kremenek <kremenek@apple.com> Reapply r137903, but fix the definition of size_t in the test case to use __SIZE_TYPE__ (and hence be portable).

Also, change the warning to -Wstrl-incorrect-size.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1cb4f664fd4f72a65a145e9ff8a7e2540ab09156 18-Aug-2011 Ted Kremenek <kremenek@apple.com> Revert r137903, "Add experimental -Wstrlcpy-size warning that looks to see if the size argument for strlcpy/strlcat is the size of the *source*, and not the size of the *destination*. This warning is off by default (for now)."

This currently doesn't work on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4b53117c9942db2e08f18be25d9ccf7daf6af0b2 18-Aug-2011 Ted Kremenek <kremenek@apple.com> Add experimental -Wstrlcpy-size warning that looks to see if the size argument for strlcpy/strlcat is the size of the *source*, and not the size of the *destination*. This warning is off by default (for now).

Warning logic provided by Geoff Keating.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
af0f4d0b2e38c810effc8b024ad2fb6604eec5d3 14-Aug-2011 Francois Pichet <pichet2000@gmail.com> Implement function template specialization at class scope extension in Microsoft mode. A new AST node is introduced: ClassScopeFunctionSpecialization. This node holds a FunctionDecl that is not yet specialized; then during the class template instantiation the ClassScopeFunctionSpecialization will spawn the actual function specialization.

Example:
template <class T>
class A {
public:
template <class U> void f(U p) { }
template <> void f(int p) { } // <== class scope specialization
};

This extension is necessary to parse MSVC standard C++ headers, MFC and ATL code.
BTW, with this feature in, clang can parse (-fsyntax-only) all the MSVC 2010 standard header files without any error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
730cfb18463d8c2f6d0e4d4380fdd67e4abe5d97 10-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Using existing infrastructure for finding
overridden methods to diagnose their type mismatch.
This is a general solution for previous fixes
for // rdar://6191214 and // rdar://9352731
and removes lots of duplicate code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2112190efa85f50af84a3c4efe03c5bf69247ba2 08-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: diagnose protocol inconsistencies in following
situation. When a class explicitly or implicitly (through inheritance)
"conformsTo" two protocols which conflict (have methods which conflict).
This patch fixes the previous patch where warnings were coming out in
non-deterministic order. This is 2nd part of // rdar://6191214.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
270ba59c4111c9e9d040cf3b95f1f3e0a8440dff 06-Aug-2011 Ted Kremenek <kremenek@apple.com> Revert 136984 and 136927.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d6c8865e6f306556b7eef972ceec2cc8ba026a0d 06-Aug-2011 Kaelyn Uhrain <rikka@google.com> Perform array bounds checking in more situations and properly handle special
case situations with the unary operators & and *. Also extend the array bounds
checking to work with pointer arithmetic; the pointer arithemtic checking can
be turned on using -Warray-bounds-pointer-arithmetic.

The changes to where CheckArrayAccess gets called is based on some trial &
error and a bunch of digging through source code and gdb backtraces in order
to have the check performed under as many situations as possible (such as for
variable initializers, arguments to function calls, and within conditional in
addition to the simpler cases of the operands to binary and unary operator)
while not being called--and triggering warnings--more than once for a given
ArraySubscriptExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
cc2f30c4ed7770b6005bd55b529a55c1fcc250fc 05-Aug-2011 Matt Beaumont-Gay <matthewbg@google.com> Extend memset/memcpy/memmove checking to include memcmp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ace5e76e5c707f4a8447abc01ef540fa6d57ff95 05-Aug-2011 Kaelyn Uhrain <rikka@google.com> Have the typo correction in DiagnoseEmptyLookup properly handle template
functions when performing function overload resolution.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6a3bec320e5617922f1f15657dcdaeb22610ca23 04-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: diagnose protocol inconsistencies in following
situation. When a class explicitly or implicitly (through inheritance)
"conformsTo" two protocols which conflict (have methods which conflict).
This is 2nd part of // rdar://6191214.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f0c1d8f804e7854bedf3f241409185951ee67866 03-Aug-2011 Kaelyn Uhrain <rikka@google.com> Improve overloaded function handling in the typo correction code.

Change TypoCorrection to store a set of NamedDecls instead of a single
NamedDecl. Also add initial support for performing function overload
resolution to Sema::DiagnoseEmptyLookup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
74133075f5024ce87e4c1eb644d77c20e1c521f4 03-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Methods declared in methods must type match
those declated in its protocols. First half or // rdar://6191214


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d2d8be6a27d0ef73d46039604682f7890e1cc3e0 30-Jul-2011 Douglas Gregor <dgregor@apple.com> Add code completion to produce "else" blocks after an "if"
statement. Fixes <rdar://problem/9229438>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
fefe91e6017321aa7db431b94cb3615f6c97da7a 29-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: warn if implementation of a method in category
masks an existing method in its primary class, class extensions,
and primary class's non-optional protocol methods; as primary
class, or one of its subclass's will implement this method.
This warning has potential of being noisy so it has its own
group. // rdar://7020493


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
dfe6543e12eca5c79421378b7fa6b3e8fc403e63 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Lazily deserialize Sema::VTableUses. Plus, fix the utterly and
completely broken deserialization mapping code we had for VTableUses,
which would have broken horribly as soon as our local-to-global ID
mapping became interesting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
31e37b2d7b4815fdea6a35d49f33005562f0d494 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Make Sema::WeakUndeclaredIdentifiers lazily deserialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ec12ce2f6da44bfc9048772327a3924498099d60 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Make Sema::LocallyScopedExternalDecls lazily deserialized. In theory,
we could turn this into an on-disk hash table so we don't load the
whole thing the first time we need it. However, it tends to be very,
very small (i.e., empty) for most precompiled headers, so it isn't all
that interesting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a126f17ca83b985300c1f65cee647bea108db657 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Switch Sema::DynamicClasses over to LazyVector

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d58a0a55e64a7c410a80e9d6dcd899e61e99cc4d 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Switch Sema::ExtVectorDecls over to LazyVector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0129b561a1452bf057f6b18b6a1de815d487ab81 27-Jul-2011 Douglas Gregor <dgregor@apple.com> Turn Sema::DelegatingCtorDecls into a LazyVector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
07524039dce5c820f111a1b3f772b4261f004b4a 27-Jul-2011 John McCall <rjmccall@apple.com> The lock operand to an @synchronized statement is also
supposed to be a full-expression; make it so. In ARC, make sure
we retain the lock for the entire protected block.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a2ee20aa9660851080135219cac5b31fbac08b78 27-Jul-2011 Douglas Gregor <dgregor@apple.com> Switch Sema::UnusedFileScopedDecls over to a LazyVector.
- Added LazyVector::erase() to support this use case.
- Factored out the LazyDecl-of-Decls to RecordData translation in
the ASTWriter. There is still a pile of code duplication here to
eliminate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a862320972e63349524dc9aa744dec1b95f54ba1 27-Jul-2011 Douglas Gregor <dgregor@apple.com> Introduce a new data structure, LazyVector, which is a vector whose
contents are lazily loaded on demand from an external source (e.g., an
ExternalASTSource or ExternalSemaSource). The "loaded" entities are
kept separate from the "local" entities, so that the two can grow
independently.

Switch Sema::TentativeDefinitions from a normal vector that is eagerly
populated by the ASTReader into one of these LazyVectors, making the
ASTReader a bit more like me (i.e., lazy).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
990567cb60e8530ba01b41d4e056e32b44b95ec0 27-Jul-2011 John McCall <rjmccall@apple.com> Clean up the analysis of the collection operand to ObjC
for-in statements; specifically, make sure to close over any
temporaries or cleanups it might require. In ARC, this has
implications for the lifetime of the collection, so emit it
with a retain and release it upon exit from the loop.

rdar://problem/9817306



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
191591336f639dad1504e863733fb831645c1644 27-Jul-2011 Jeffrey Yasskin <jyasskin@google.com> This patch implements as much of the narrowing conversion error specified by
[dcl.init.list] as is possible without generalized initializer lists or full
constant expression support, and adds a c++0x-compat warning in C++98 mode.

The FixIt currently uses a typedef's basename without qualification, which is
likely to be incorrect on some code. If it's incorrect on too much code, we
should write a function to get the string that refers to a type from a
particular context.

The warning is currently off by default. I'll fix LLVM and clang before turning
it on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2760455396abd72f0842122170dfab6126c46891 26-Jul-2011 Kaelyn Uhrain <rikka@google.com> Revert r136046 while fixing handling of e.g. &foo[index_one_past_size]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b48f7c059e74cd5395ca542c1a96be16e42f3d80 26-Jul-2011 Kaelyn Uhrain <rikka@google.com> Expand array bounds checking to work in the presence of unary & and *,
and to work with pointer arithmetic in addition to array indexing.

The new pointer arithmetic porition of the array bounds checking can be
turned on by -Warray-bounds-pointer-arithmetic (and is off by default).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
eee3ef177a171c06f826c331e7a9e256d01eaeb0 24-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objc: clang should warn if redeclaration of methods
declared in protocol in the class qualified by the
protocol have type conflicts. To reduce amount of
noise, this is done when class is implemented.
// rdar://9352731


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
686775deca8b8685eb90801495880e3abdd844c2 20-Jul-2011 Chris Lattner <sabre@nondot.org> now that we have a centralized place to do so, add some using declarations for
some common llvm types: stringref and smallvector. This cleans up the codebase
quite a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0ff6f8f038f32d85c32fd984673cea51ef737b22 20-Jul-2011 Richard Smith <richard-llvm@metafoo.co.uk> Replace r134583's fix for PR10290 with one which also works for non-value-dependent cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
7a084ec568f8336ec6f10011d0118a6b19e253cb 08-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objc++-arc: diagnose assignment/cast of a weak-unavailable
object to a __weak object/type. // rdar://9732636.
One item is yet todo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134655 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
04e5a2509d1eed48cc0c7115c52089bef35b36af 07-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: diagnose assignment/cast of a weak-unavailable
object to a __weak object/type. // rdar://9732636.
This is objc side of things. objc++ side tbd.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bca01b46850f867b2f4137f25c882022b58f8471 07-Jul-2011 Douglas Gregor <dgregor@apple.com> Properly implement the scope restriction on the NRVO for
throw-expressions, such that we don't consider the NRVO when the
non-volatile automatic object comes from outside the innermost try
scope (C++0x [class.copymove]p13). In C++98/03, our ASTs were
incorrect but it didn't matter because IR generation doesn't actually
apply the NRVO here. In C++0x, however, we were moving from an object
when in fact we should have copied from it. Fixes PR10142 /
<rdar://problem/9714312>.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5d98994c7749312a43ce6adf45537979a98e7afd 06-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Build up statistics about the work done for analysis based warnings.
Special detail is added for uninitialized variable analysis as this has
serious performance problems than need to be tracked.

Computing some of this data is expensive, for example walking the CFG to
determine its size. To avoid doing that unless the stats data is going
to be used, we thread a bit into the Sema object to track whether
detailed stats should be collected or not. This bit is used to avoid
computations whereever the computations are likely to be more expensive
than checking the state of the flag. Thus, counters are in some cases
unconditionally updated, but the more expensive (and less frequent)
aggregation steps are skipped.

With this patch, we're able to see that for 'gcc.c':
*** Analysis Based Warnings Stats:
232 functions analyzed (0 w/o CFGs).
7151 CFG blocks built.
30 average CFG blocks per function.
1167 max CFG blocks per function.
163 functions analyzed for uninitialiazed variables
640 variables analyzed.
3 average variables per function.
94 max variables per function.
96409 block visits.
591 average block visits per function.
61546 max block visits per function.

And for the reduced testcase in PR10183:
*** Analysis Based Warnings Stats:
98 functions analyzed (0 w/o CFGs).
8526 CFG blocks built.
87 average CFG blocks per function.
7277 max CFG blocks per function.
68 functions analyzed for uninitialiazed variables
1359 variables analyzed.
19 average variables per function.
1196 max variables per function.
2540494 block visits.
37360 average block visits per function.
2536495 max block visits per function.

That last number is the somewhat scary one that indicates the problem in
PR10183.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
19f74acdf8842ceece578b7307884f5ba22d7f59 06-Jul-2011 Rafael Espindola <rafael.espindola@gmail.com> Use attributes from the definition (if available) when
instantiating functions.

Fixes PR10272.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3242ee01d43c6b6f5db968cd2c82e5d18d71283c 04-Jul-2011 Anders Carlsson <andersca@mac.com> Remove unused parameter from ActOnDeclarator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0a85183be6930571f3af8e5a976d24c3f95e5b25 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;
(NSString**)&x; // Casting as (__strong NSString**).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
707f101d3302b76ee01e8ca29b1a61f081137b9f 02-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Remove Sema::ActOnCastOfParenListExpr and move most of its functionality to
newly introduced Sema::BuildVectorLiteral.
-Make Sema::ActOnCastExpr handle a vector initializer both when the cast'ed expression
is a ParenListExpr and when it is a ParenExpr.
-Ultimately make Sema::ActOnParenOrParenListExpr independent of what the cast type was.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
c89edf5aaa08683f4afcf61a7a1d183c08b76498 01-Jul-2011 Richard Smith <richard-llvm@metafoo.co.uk> Fix AST representations of alias-declarations which define tag types. Inside classes, the tag types need to have an associated access specifier, and inside function definitions, they need to be included in the declarations of the DeclStmt. These issues manifested as assertions during template instantiation, and also in a WIP constexpr patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d8bba9c15230d2b1b3893e272106aa79efc50251 28-Jun-2011 Douglas Gregor <dgregor@apple.com> Add support for C++ namespace-aware typo correction, e.g., correcting

vector<int>

to

std::vector<int>

Patch by Kaelyn Uhrain, with minor tweaks + PCH support from me. Fixes
PR5776/<rdar://problem/8652971>.

Thanks Kaelyn!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
6326e05fe8c2ff92b65b4759a91e45fad5ef886f 28-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Provide fix-it for '.' <-> '->' for Objective-C ivar/property access.
// rdar://7811841


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
555f57e3549fb5cc963a2ce38180c4f3643a6f95 25-Jun-2011 Douglas Gregor <dgregor@apple.com> When deciding how to parse "= something" as part of a member
declaration, determine whether the declaration will end up declaring a
function using semantic criteria (e.g., it will have function type)
rather than purely syntactic criteria (e.g., it has the form of a
function declarator). Fixes <rdar://problem/9670557>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
921c14322977253a60dcb171f45e468c95fe41f8 24-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: Check on a variety of unsafe assignment of retained
objects. // rdar://9495837


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b9b4b789ebd28d6fde1c42de820b036ffaf95162 23-Jun-2011 Eli Friedman <eli.friedman@gmail.com> Fix Sema::CheckVectorOperands so that it doesn't try to insert a cast expression into the LHS of a compound assignment. Fixes compound assignment of various "compatible" vector types, including NEON-vector and gcc-vector types.

<rdar://problem/9640356>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2b1ad8b42bbbe00a1845e566f52f1941b8dbc725 23-Jun-2011 Douglas Gregor <dgregor@apple.com> Move all of Sema's member-access-related checking out of SemaExpr.cpp
and into a new file, SemaExprMember.cpp, bringing SemaExpr.cpp just
under 10,000 lines of code (ugh). No functionality change, although I
intend to do some refactoring of this code to address PR8368 at some
point in the "near" future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
572bbec2e0e23f684108e3a410a67c8c60ff9179 23-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow unavailable function calls inside unavailable functions in C++/ObjC++ as well. rdar://9660196

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
661c67a9227708056850403847a10395308705e5 22-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Attempt to reapply this patch for caching copy assignment operator
lookup. Previously, it was breaking self-host, but it's been a week and
a half and I can't reproduce, so I need to see if it's still failing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
af9751747b098d77052cb71f1e648f29cfbadcc1 21-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: CodeGen part of unbridged cast of CF types.
// rdar://9474349


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1522a7c35e9872c5767721350fc8050be5b14fd2 20-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: allow explicit unbridged casts if the source of the cast is a
message sent to an objc method (or property access)
// rdar://9474349


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
18e0461ad72dcf6ec93cd3b1df7bf1b5a30b10b7 18-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Accept no-return stripping conversions for pointer type arguments after
deducing template parameter types. Recently Clang began enforcing the
more strict checking that the argument type and the deduced function
parameter type (after substitution) match, but that only consideres
qualification conversions.

One problem with this patch is that we check noreturn conversions and
qualification conversions independently. If a valid conversion would
require *both*, perhaps interleaved with each other, it will be
rejected. If this actually occurs (I'm not yet sure it does) and is in
fact a problem (I'm not yet sure it is), there is a FIXME to implement
more intelligent conversion checking.

However, this step at least allows Clang to resume accepting valid code
we're seeing in the wild.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
707a23e8b87410332b55bb4534fa1c799edef38a 16-Jun-2011 Douglas Gregor <dgregor@apple.com> Teach the warning about non-POD memset/memcpy/memmove to deal with the
__builtin_ versions of these functions as well as the normal function
versions, so that it works on platforms where memset/memcpy/memmove
are macros that map down to the builtins (e.g., Darwin). Fixes
<rdar://problem/9372688>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
dbfb371e297794e827ad2e5b33b45fafbfc46b29 16-Jun-2011 Douglas Gregor <dgregor@apple.com> Implement the consistency checking for C++ [temp.deduct.call]p3, which
checks that the deduced argument type for a function call matches the
actual argument type provided. The only place we've found where the
consistency checking should actually cause template argument deduction
failure is due to qualifier differences that don't fall into the realm
of qualification conversions (which are *not* checked when we
initially perform deduction). However, we're performing the full
checking as specified in the standard to ensure that no other cases
exist.

Fixes PR9233 / <rdar://problem/9039590>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
926df6cfabf3eaa4afc990c097fa4619b76a9b57 11-Jun-2011 Douglas Gregor <dgregor@apple.com> Implement Objective-C Related Result Type semantics.

Related result types apply Cocoa conventions to the type of message
sends and property accesses to Objective-C methods that are known to
always return objects whose type is the same as the type of the
receiving class (or a subclass thereof), such as +alloc and
-init. This tightens up static type safety for Objective-C, so that we
now diagnose mistakes like this:

t.m:4:10: warning: incompatible pointer types initializing 'NSSet *'
with an
expression of type 'NSArray *' [-Wincompatible-pointer-types]
NSSet *array = [[NSArray alloc] init];
^ ~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1:
note:
instance method 'init' is assumed to return an instance of its
receiver
type ('NSArray *')
- (id)init;
^

It also means that we get decent type inference when writing code in
Objective-C++0x:

auto array = [[NSMutableArray alloc] initWithObjects:@"one", @"two",nil];
// ^ now infers NSMutableArray* rather than id




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3bde0ce7a18d2513ebe286df67baa32700fd3d6b 10-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> This change is breaking selfhost. Revert it until I have more time
to study it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
53e669f4bd617dc4df1b1850bcd3998d7680bdc5 10-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement caching of copy assignment operator lookup.

I believe, upon, careful review, that this code causes us to incorrectly
handle exception specifications of copy assignment operators in C++03
mode. However, we currently do not seem to properly implement the subtle
distinction between copying of members and bases made by implicit copy
constructors and assignment operators in C++03 - namely that they are
limited in their overload selection - in all cases. As such, I feel that
committing this code is correct pending a careful review of our
implementation of these semantics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c530d1758cef1acc596f2ec905665da534e66d29 10-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement caching for copy constructors in similar situations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b320e0c322fb71d6235ebca9ec22940a97bdcdc7 10-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement caching of default constructors on the resolution table. This
isn't yet used for the less controlled environments of initialization.

Also a few random text fixups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bbf34c024398e7bae825686dcff4c3b901ec9f89 10-Jun-2011 Richard Trieu <rtrieu@google.com> Made changes to how 'struct'/'class' mismatches are handled in -Wmismatched-tags.
- Removed fix-it hints from template instaniations since changes to the
templates are rarely helpful.
- Changed the caret in template instaniations from the class/struct name to the
class/struct keyword, matching the other warnings.
- Do not offer fix-it hints when multiple declarations disagree. Warnings are
still given.
- Once a definition is found, offer a fix-it hint to all previous declarations
with wrong tag.
- Declarations that disagree with a previous definition will get a fix-it hint
to change the declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7299a4ef4d75901012e006f463d789447976a21b 06-Jun-2011 Francois Pichet <pichet2000@gmail.com> ok now, let's fix that MSVC warning for real.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c9f487a8aa73376b8cbee364663b50956fc641a2 06-Jun-2011 Francois Pichet <pichet2000@gmail.com> Fix MSVC warning:
"unsafe mix of type 'int' and type 'bool' in operation"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
308742c87e2311c3f349092e5b823c3821e61b10 04-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Reimplement r132572 on top of a FoldingSet, thus hopefully solving both
the self-host failures and Chandler's concerns.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
61eee0ca33b29e102f11bab77c8b74cc00e2392b 04-Jun-2011 Tanya Lattner <tonic@nondot.org> Add support for builtin astype:
__builtin_astype(): Used to reinterpreted as another data type of the same size using for both scalar and vector data types.
Added test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c5c9b538de70124a57bee0adbfdd7853a582176e 03-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Revert r132572 to figure out why it broke selfhost and clean it up as
suggested by Chandler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8fd7722fce4e4f9549897699ec3a4c752613b214 03-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Begin implementing a cache of special member lookups. Currently only
destructors are implemented but other special members are on the way,
which is where the real benefits of this will be visible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132572 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5aecb786a32d321e8d3462cd49e50092e8d55cd3 01-Jun-2011 Francois Pichet <pichet2000@gmail.com> Revert 132332 (Microsoft friend as a forward declaration), John McCall pointed out a better/simpler way to do it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8adc227de934e23c72eb8d9abf5c0e3dfffec131 31-May-2011 Francois Pichet <pichet2000@gmail.com> For compatibility with MSVC, a friend declaration also act as a forward declaration if the tag name is not already declared. The tag name is declared in the next outermost non record scope.
Example:

class A {
friend class B;
B* b;
};
B* global_b;


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8155910a192dafa423d6b932b7d127d48e4641e8 31-May-2011 Nick Lewycky <nicholas@mxc.ca> Whenever we instantiate a static data member, make sure to define any new
vtables! Fixes PR10020

This also allows us to revert the part of r130023 which added a big loop around
the template instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e72c55b9a11be9f00fa3f66f7ad6b73b2814e963 29-May-2011 Chandler Carruth <chandlerc@gmail.com> Fix a regression in the source locations for unary trait expressions.
I tried to use an assert to prove that I could remove each of the
arguments I did, but ended up writing my assert with inverted logic.
Doh! Reported by Xi Wang on cfe-dev. I have manually verified the source
locations and ranges for these using -ast-dump. I tried writing a test
case that would catch these, but these expressions aren't exposed in the
c-index-test's token annotation utility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
9d342d0121531bcbd2410f600a751dc85993bdee 26-May-2011 Chandler Carruth <chandlerc@gmail.com> Add a convenience interface for checking expression arguments to unary
traits which uses the information embedded in the expression. Use this
to simplify several interfaces which repeated information embedded in
the expression through explicit arguments. I added an assertion that the
only extra piece of data to come in from the parser matches what is
stored in the expression. No functionality change intended here.

Also cleaned up the doxygen comments for some of these methods and some
formatting oddities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
82713174914bdb927a254c5ee188e35fd79c4948 26-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Update our diagnostics to properly account for move operations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132096 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ffe37fdda5b4b4f162a45155c30d9f60ce110c12 25-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement a little bit of cleanup and a lot more of the base work
behind implicit moves. We now correctly identify move constructors and
assignment operators and update bits on the record correctly. Generation
of implicit moves (declarations or definitions) is not yet supported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132080 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
0ee33912f8ec3453856c8a32ed2c2e8007bed614 19-May-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Reapply r121528, fixing PR9941 by delaying the exception specification check for destructors until the class is complete and destructors have been adjusted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1d78032167c2f2d470e4270aadcb07ff71e6c7e1 18-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Revert r121528 as it breaks a simple testcase, which leads to, among
other things, libcxx not building.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0320a1d7b3305d1aef36ee68b77bebe170e1d30a 18-May-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Implement implicit exception specifications of destructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3b5904ba83fc9b968b1cd6f1ce78d01bfd6e8686 14-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Emit an error when trying to @encode an incomplete type.

There are APIs, e.g. [NSValue valueWithBytes:objCType:], which use the encoding to find out
the size of an object pointed to by a pointer. Make things safer by making it illegal to @encode
incomplete types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2b188085eccf741a9520ba86f1e6e32d0e0cd3f2 14-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> What I hope to be an implementation of defaulted copy assignment
operators.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7f410191f344dc26aa926de6593fdacaad9fd1a7 14-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> More progress towards defaulted copy assignment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131337 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
30de05c228d5d38dbfdeeeb598cb960646bf998a 14-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Start implementing defaulted copy assignment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
819e9bfe398bd556f43ca1f0c24d1b3fa21f41ef 13-May-2011 Fariborz Jahanian <fjahanian@apple.com> refactor CheckForwardProtocolDeclarationForCircularDependency returns
'true' on detecting protocol cycles. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
49634cf3b9b0c3da2aedc3bdefbf331bce167239 13-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Defaulting copy constructors now works reasonably well.

One more special member to go

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131287 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2be7e90b81509204b99b7bbf9753ad17b894a12a 13-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement defaulting of destructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
cb45a0f42964ab5fa1474b25abcc1ae3a8bd0ab8 13-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Hrm

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
96b69a7305e20c98f1a3e2e7cd52e2d6c5d53835 13-May-2011 Fariborz Jahanian <fjahanian@apple.com> After issuing diagnostics on circular protocol list,
don't build circular AST in protocol's protocol list
when user code has introduced it. Indexer and other
clients may crash. // rdar://9221614


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e4246a633b13197634225971b25df0cbdcec0c5d 12-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Properly parse the 'default' and 'delete' keywords.

They are actually grammatically considered definitions and parsed
accordingly.

This fixes the outstanding bugs regarding defaulting functions after
their declarations.

We now really nicely diagnose the following construct (try it!)

int foo() = delete, bar;

Still todo: Defaulted functions other than default constructors
Test cases (including for the above construct)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
cdee3fee8ca4df7fb9179f29cc3ba96ac4fd0f95 12-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement implicit deletion of default constructors.

Yes, I'm aware that the diagnostics are awful.

Tests to follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f961ea5716867b5e426fb2136edd6d1f04c3a7ca 10-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Re-do R131114 without breaking code.

I've edited one diagnostic which would print "copy constructor" for copy
constructors and "constructor" for any other constructor. If anyone is
extremely enamored with this, it can be reinstated with a simple boolean
flag rather than calling getSpecialMember, which is inappropriate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c840649ed5acccf68e1bc5a9d22f2ea017074586 10-May-2011 Douglas Gregor <dgregor@apple.com> Reimplement Sema::MatchTemplateParametersToScopeSpecifier() based on
the semantic context referenced by the nested-name-specifier rather
than the syntactic form of the nested-name-specifier. The previous
incarnation was based on my complete misunderstanding of C++
[temp.expl.spec]. The latest C++0x working draft clarifies the
requirements here, and this rewrite is intended to follow that.

Along the way, improve source location information in the
diagnostics. For example, if we report that a specific type needs or
doesn't need a 'template<>' header, we dig out that type in the
nested-name-specifier and highlight its range.

Fixes: PR5907, PR9421, PR8277, PR8708, PR9482, PR9668, PR9877, and
<rdar://problem/9135379>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
680404e0d91ac67c91097af6c62bc92f1fba5965 10-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Revert 131114. This fixes PR9884.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
001cad932380419c6fbfecbeec63e0579f5ecbf3 10-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Further implement defaulting constructors.

Focus is on default constructors for the time being. Currently the
exception specification and prototype are processed correctly. Codegen
might work but in all likelihood doesn't.

Note that due to an error, out-of-line defaulting of member functions is
currently impossible. It will continue to that until I muster up the
courage to admit that I secretly pray to epimetheus and that I need to
rework the way default gets from Parse -> Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a780da70f74ab09ed1f91c1e992abf850e5268ea 10-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> The last of the trivial constructor changes, make CXXSpecialMember
reflect our new, more accurate AST.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bb85f8edca8103aa10e4b2f4a6fcc3a251b0ea03 06-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Per Richard's suggestion, rename DefLoc to DefaultLoc where it appears.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1e862693c63067ae467b0b3884c44f753cd6e821 06-May-2011 Francois Pichet <pichet2000@gmail.com> Add support for Microsoft __if_exists and __if_not_exists construct inside function definition.
Allow to include or exclude code depending on if a symbol exists or not. Just like a #ifdef but for C/C++ symbols.

More doc: http://msdn.microsoft.com/en-us/library/x7wy9xh3(v=VS.100).aspx

Support at class and namespace scopes will be added later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
fe2695eec167b28578825576863228f86b392f24 06-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Do defaulted constructors properly.

Explictly defaultedness is correctly reflected on the AST, but there are
no changes to how that affects the definition of functions or much else
really.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5f802e51406664ca9b6e0d57fc7ce37ea97a1c65 06-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Revert r130912 in order to approach defaulted functions from the other
direction and not introduce things in the wrong place three different
times.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
ad7ec12ef2edbadb85a3754f0395ef2f06d4256c 05-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement some framework for defaulted constructors.

There's some unused stuff for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c9366ba8fff6461a5b7f0fd2626d1bce3e98e629 05-May-2011 Matt Beaumont-Gay <matthewbg@google.com> Implement Sema::isExprCallable.

We can use this to produce nice diagnostics (and try to fixit-and-recover) in
various cases where we might see "MyFunction" instead of "MyFunction()". The
changes in SemaExpr are an example of how to use isExprCallable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
fe57eef44cc80e5bb51e4f484835be08b8d84256 04-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement a better version of delegating constructor cycle detection.

This is more efficient as it's all done at once at the end of the TU.
This could still get expensive, so a flag is provided to disable it. As
an added bonus, the diagnostics will now print out a cycle.

The PCH test is XFAILed because we currently can't deal with a note
emitted in the header and I, being tired, see no other way to verify the
serialization of delegating constructors. We should probably address
this problem /somehow/ but no good solution comes to mind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
06bc9eb9908e42696775b395b290827bde468c8b 03-May-2011 Douglas Gregor <dgregor@apple.com> Extend -Wnon-pod-memset to also encompass memcpy() and memmove(),
checking both the source and the destination operands, renaming the
warning group to -Wnon-pod-memaccess and tweaking the diagnostic text
in the process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0f4be74ff0273e505d383f89174ef539828424ed 03-May-2011 Chandler Carruth <chandlerc@gmail.com> When parsing a template friend declaration we dropped the template
parameters on the floor in certain cases:
class X {
template <typename T> friend typename A<T>::Foo;
};

This was parsed as a *non* template friend declaration some how, and
received an ExtWarn. Fixing the parser to actually provide the template
parameters to the freestanding declaration parse triggers the code which
specifically looks for such constructs and hard errors on them.

Along the way, this prevents us from trying to instantiate constructs
like the above inside of a outer template. This is important as loosing
the template parameters means we don't have a well formed declaration
and template instantiation will be unable to rebuild the AST. That fixes
a crash in the GCC test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f4bbbf0aaf741cc7d014e2cf059670a6756f8cbd 02-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add a warning for when reinterpret_cast leads to undefined behavior, patch by Richard Trieu!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
fb44de956f27875def889482b5393475060392af 02-May-2011 John McCall <rjmccall@apple.com> Store a parameter index and function prototype depth in every
parameter node and use this to correctly mangle parameter
references in function template signatures.

A follow-up patch will improve the storage usage of these
fields; here I've just done the lazy thing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130669 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
059ce0d92eb5a7da900ae735dc0a2ea3d64f4b0b 01-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Fully implement delegating constructors!

As far as I know, this implementation is complete but might be missing a
few optimizations. Exceptions and virtual bases are handled correctly.

Because I'm an optimist, the web page has appropriately been updated. If
I'm wrong, feel free to downgrade its support categories.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
28bbe4b8acc338476fe0825769b41fb32b423c72 28-Apr-2011 John Wiegley <johnw@boostpro.com> Parsing/AST support for Structured Exception Handling

Patch authored by Sohail Somani.

Provide parsing and AST support for Windows structured exception handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
21ff2e516b0e0bc8c1dbf965cb3d44bac3c64330 28-Apr-2011 John Wiegley <johnw@boostpro.com> Implementation of Embarcadero array type traits

Patch authored by John Wiegley.

These are array type traits used for parsing code that employs certain
features of the Embarcadero C++ compiler: __array_rank(T) and
__array_extent(T, Dim).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7ccc95bceebb2d1c8fbe277c9e33bde7dc1ccbb1 27-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Add a warning (-Wnon-pod-memset) for calls to memset() with
a destination pointer that points to a non-POD type. This can flag such
horrible bugs as overwriting vptrs when a previously POD structure is
suddenly given a virtual method, or creating objects that crash on
practically any use by zero-ing out a member when its changed from
a const char* to a std::string, etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b7d98d35ea723624345f06e5895ddce2e0388ef0 27-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> If a null statement was preceded by an empty macro keep its instantiation source location
in NullStmt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
864c041e118155c2b1ce0ba36942a3da5a4a055e 26-Apr-2011 John McCall <rjmccall@apple.com> Make yet another placeholder type, this one marking that an expression is a bound
member function, i.e. something of the form 'x.f' where 'f' is a non-static
member function. Diagnose this in the general case. Some of the new diagnostics
are probably worse than the old ones, but we now get this right much more
universally, and there's certainly room for improvement in the diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c1a0a73c1fad684dd23e9aade02c4e00dbaeaee6 26-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Add ms_struct attribute on record typee
(and ignore it for now) - wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
62c9258f4a71569a66d805fc7776526a2c76b34e 25-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Recognize gcc's ms_struct pragma (and ignore for now).
This is wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
552622067dc45013d240f73952fece703f5e63bd 25-Apr-2011 John Wiegley <johnw@boostpro.com> t/clang/expr-traits

Patch authored by David Abrahams.

These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for
parsing code that employs certain features of the Embarcadero C++ compiler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
58a2cd8c0d52e710cbcc57a67eac7b51b0b831c4 24-Apr-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Synthesizing the definition of an implicit member is an AST modification, so notify any mutation listeners of it. This fixes a crasher in chained PCH, where an implicit destructor in a PCH gets a definition in a chained PCH, which is then lost. However, any further use of the destructor would cause its definition to be regenerated in the final file, hiding the bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
312eadb832cab4497a069409954500d8192b8f0d 24-Apr-2011 Douglas Gregor <dgregor@apple.com> Implement a new identifier-classification scheme where Sema
performs name lookup for an identifier and resolves it to a
type/expression/template/etc. in the same step. This scheme is
intended to improve both performance (by reducing the number of
redundant name lookups for a given identifier token) and error
recovery (by giving Sema a chance to correct type names before the
parser has decided that the identifier isn't a type name). For
example, this allows us to properly typo-correct type names at the
beginning of a statement:

t.c:6:3: error: use of undeclared identifier 'integer'; did you mean
'Integer'?
integer *i = 0;
^~~~~~~
Integer
t.c:1:13: note: 'Integer' declared here
typedef int Integer;
^


Previously, we wouldn't give a Fix-It because the typo correction
occurred after the parser had checked whether "integer" was a type
name (via Sema::getTypeName(), which isn't allowed to typo-correct)
and therefore decided to parse "integer * i = 0" as an expression. By
typo-correcting earlier, we typo-correct to the type name Integer and
parse this as a declaration.

Moreover, in this context, we can also typo-correct identifiers to
keywords, e.g.,

t.c:7:3: error: use of undeclared identifier 'vid'; did you mean
'void'?
vid *p = i;
^~~
void

and recover appropriately.

Note that this is very much a work-in-progress. The new
Sema::ClassifyName is only used for expression-or-declaration
disambiguation in C at the statement level. The next steps will be to
make this work for the same disambiguation in C++ (where
functional-style casts make some trouble), then push it
further into the parser to eliminate more redundant name lookups.

Fixes <rdar://problem/7963833> for C and starts us down the path of
<rdar://problem/8172000>.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
89ebaed91cca7fd296ec7804e4e9fb68949c1d0e 23-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> "note" location of forward class used as receiver of
a 'deprecated' selector in the diagnostics for the
selector. // rdar://9309223



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130062 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4a47e8d35dc1778ef7e428d9edd7676be67e725f 23-Apr-2011 Francois Pichet <pichet2000@gmail.com> Remove unnecessary const away cast in LateTemplateParserCallback.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d4a0caf78e7c18e7aca65fbfd799a6c024ff51fb 23-Apr-2011 Francois Pichet <pichet2000@gmail.com> Correctly emit a diagnostic for multiple templated function definitions in -flate-template-parsing mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130030 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
788440378c442562497c09610939cbe6218ab43d 23-Apr-2011 Douglas Gregor <dgregor@apple.com> At the end of the translation unit, defining a vtable can introduce
new templates that need to be instantiated and vice-versa. Iterate
until we've instantiated all required templates and defined all
required vtables. Fixed PR9325 / <rdar://problem/9055177>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8387e2a41eef6fa17fb140a18c29b6eee9dd2b8a 23-Apr-2011 Francois Pichet <pichet2000@gmail.com> Add -fdelayed-template-parsing option. Using this option all templated function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup.

Using this flag is necessary for compatibility with Microsoft template code.
This also provides some parsing speed improvement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bb9b80c308d7d3f758886243c7145404a50c66cf 21-Apr-2011 Richard Trieu <rtrieu@google.com> Add a fixit suggest for missing case keywords inside a switch scope. For instance, in the following code, 'case ' will be suggested before the '1:'

switch (x) {
1: return 0;
default: return 1;
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
fc8f0e14ad142ed811e90fbd9a30e419e301c717 15-Apr-2011 Chris Lattner <sabre@nondot.org> fix a bunch of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f111d935722ed488144600cea5ed03a6b5069e8f 15-Apr-2011 Peter Collingbourne <peter@pcc.me.uk> C1X: implement generic selections

As an extension, generic selection support has been added for all
supported languages. The syntax is the same as for C1X.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ad762fcdc16b9e4705b12b09d92b8c026212b906 15-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add support for C++0x's range-based for loops, as specified by the C++11 draft standard (N3291).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6943e9befee204becfae55de1298b3d5fee87934 13-Apr-2011 Francois Pichet <pichet2000@gmail.com> In Microsoft mode, within class scope, if a CXXScopeSpec's type is equal to the type of one of the base classes then downgrade the missing typename error to a warning. Up to now this is the only case I found where MSVC doesn't require "typename" at class scope. Really strange!
This fixes 1 error when parsing the MSVC 2008 header files.
Example:

template<class T> class A {
public:
typedef int TYPE;
};
template<class T> class B : public A<T> {
public:
A<T>::TYPE a; // no typename required because A<T> is a base class.
};


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129425 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
737d5447b5d20633992ee5388eca5270c28c8ae7 07-Apr-2011 Abramo Bagnara <abramo.bagnara@gmail.com> In C++ the argument of logical not should always be bool. Added missing implicit cast for scalars.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1de4d4e8cb2e9c88809fea8092bc6e835a5473d2 07-Apr-2011 John McCall <rjmccall@apple.com> Basic, untested implementation for an "unknown any" type requested by LLDB.
The idea is that you can create a VarDecl with an unknown type, or a
FunctionDecl with an unknown return type, and it will still be valid to
access that object as long as you explicitly cast it at every use. I'm
still going back and forth about how I want to test this effectively, but
I wanted to go ahead and provide a skeletal implementation for the LLDB
folks' benefit and because it also improves some diagnostic goodness for
placeholder expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2c3ee54e51d835a35bbf781c69e17f39e2ba0480 25-Mar-2011 Anders Carlsson <andersca@mac.com> Get rid of handling of the 'explicit' keyword from class-head. We still parse it though, although that will change shortly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
909a70d8a185f701c20bacc3c76f8f5979cbbc7c 25-Mar-2011 Nick Lewycky <nicholas@mxc.ca> Apply the nonnull attribute to constructor expressions too.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0a0d2b179085a52c10402feebeb6db8b4d96a140 23-Mar-2011 Douglas Gregor <dgregor@apple.com> Implement a new 'availability' attribute, that allows one to specify
which versions of an OS provide a certain facility. For example,

void foo()
__attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6)));

says that the function "foo" was introduced in 10.2, deprecated in
10.4, and completely obsoleted in 10.6. This attribute ties in with
the deployment targets (e.g., -mmacosx-version-min=10.1 specifies that
we want to deploy back to Mac OS X 10.1). There are several concrete
behaviors that this attribute enables, as illustrated with the
function foo() above:

- If we choose a deployment target >= Mac OS X 10.4, uses of "foo"
will result in a deprecation warning, as if we had placed
attribute((deprecated)) on it (but with a better diagnostic)
- If we choose a deployment target >= Mac OS X 10.6, uses of "foo"
will result in an "unavailable" warning (in C)/error (in C++), as
if we had placed attribute((unavailable)) on it
- If we choose a deployment target prior to 10.2, foo() is
weak-imported (if it is a kind of entity that can be weak
imported), as if we had placed the weak_import attribute on it.

Naturally, there can be multiple availability attributes on a
declaration, for different platforms; only the current platform
matters when checking availability attributes.

The only platforms this attribute currently works for are "ios" and
"macosx", since we already have -mxxxx-version-min flags for them and we
have experience there with macro tricks translating down to the
deprecated/unavailable/weak_import attributes. The end goal is to open
this up to other platforms, and even extension to other "platforms"
that are really libraries (say, through a #pragma clang
define_system), but that hasn't yet been designed and we may want to
shake out more issues with this narrower problem first.

Addresses <rdar://problem/6690412>.

As a drive-by bug-fix, if an entity is both deprecated and
unavailable, we only emit the "unavailable" diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a085da86242c9b8e3466f8cf6f4397e9f248fd20 17-Mar-2011 Richard Smith <richard-llvm@metafoo.co.uk> Fix PR9488: 'auto' type substitution can fail (for instance, if it creates a reference-to-void type). Don't crash if it does.
Also fix an issue where type source information for the resulting type was being lost.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127811 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
99439d474e7cb48497a2da4c35f70cdc1d5b153f 15-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Implement a hack to work around the changing exception specification of operator new in C++0x.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
90ba78c64d0c24cfbc1bf88728db9775d44d7f9f 12-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> Place duplicate argument declaration in in
method prototypes under the -Wduplicate-method-arg and
turn it off by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127552 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
fadb53b351977ca7f99a9a613596cba6531979a3 12-Mar-2011 Douglas Gregor <dgregor@apple.com> Fixes for some more expressions containing function templateids that
should be resolvable, from Faisal Vali!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f4e3cfbe8abd124be6341ef5d714819b4fbd9082 11-Mar-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for the OpenCL vec_step operator, by generalising and
extending the existing support for sizeof and alignof. Original
patch by Guy Benyei.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c57c17dced5fb16a83a2ffb2b7e8c148df69ba5a 10-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Avoid do drop outer template parameter lists on the floor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
61478065fbcafcf5295bb0fb796c9a92f2d861e0 09-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> Lookup selector in protocol list of qualified objc type
to avoid a bogus warning. // rdar:// 9072298



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a2026c96d3935e7909e049ad9096762844544ed6 08-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed source range for StaticAssertDecl and LinkageSpecDecl. Fixed source range for declarations using postfix types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
acba90f30876b4140b738f0d3dd0e50724053a96 08-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed NamespaceDecl source range.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ff676cb48fe8bf7be2feaa251dc7c5fb15af4730 08-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed source range for all DeclaratorDecl's.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
cc20945c787a56abe418947fc6a2c520bcec66c0 07-Mar-2011 Douglas Gregor <dgregor@apple.com> Support explicit template specialization and instantiation for members
of a C++0x inline namespace within enclosing namespaces, as noted in
C++0x [namespace.def]p8.

Fixes <rdar://problem/9006349>, a libc++ failure where Clang was
rejected an explicit specialization of std::swap (since libc++ puts it
into an inline, versioned namespace std::__1).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6784304db526cde59046d613c4175ce2caf93e44 05-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed LabelDecl source range and cleaned creation code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6cd9d4aa13c2145c8b4398453974515b734bfe42 04-Mar-2011 Douglas Gregor <dgregor@apple.com> Teach Sema::ActOnCXXNestedNameSpecifier and Sema::CheckTemplateIdType
to cope with non-type templates by providing appropriate
errors. Previously, we would either assert, crash, or silently build a
dependent type when we shouldn't. Fixes PR9226.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
21e006e51a7f9889f55f5bc7b3ca8b50d17571ec 03-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed source range for FileScopeAsmDecl. Others source range fixes will follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
67714230a191bc3c01f33378f34f34ef377991a6 03-Mar-2011 Douglas Gregor <dgregor@apple.com> When we use the default template arguments of a template template
parameter, save the instantiated default template arguments along with
the explicitly-specified template argument list. That way, we prefer
the default template template arguments corresponding to the template
template parameter rather than those of its template template argument.

This addresses the likely direction of C++ core issue 150, and fixes
PR9353/<rdar://problem/9069136>, bringing us closer to the behavior of
EDG and GCC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9151c11836f5fbb36cedfe4d22df7e00e77a1d42 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Kill off TreeTransform::TransformNestedNameSpecifier() in favor of the
source-location-preserving
TreeTransform::TranformNestedNameSpecifierLoc(). No functionality
change: the victim had no callers (that themselves had callers) anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1d752d7d68359fd8f7701585d4658aa70e129261 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Kill off the TreeTransform::TransformTemplateName overload that has
poor source-location information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
eca5d22c16eb784e5f35ca816fa22e0c0e060417 02-Mar-2011 John McCall <rjmccall@apple.com> Support a new InheritableAttr subclass, InheritableParamAttr, which is
used for attributes that are okay to inherit when written on a parameter.
Dependent on LLVM r126827.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
059101f922de6eb765601459925f4c8914420b23 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source-location information into dependent
template specialization types. This also required some parser tweaks,
since we were losing track of the nested-name-specifier's source
location information in several places in the parser. Other notable
changes this required:

- Sema::ActOnTagTemplateIdType now type-checks and forms the
appropriate type nodes (+ source-location information) for an
elaborated-type-specifier ending in a template-id. Previously, we
used a combination of ActOnTemplateIdType and
ActOnTagTemplateIdType that resulted in an ElaboratedType wrapped
around a DependentTemplateSpecializationType, which duplicated the
keyword ("class", "struct", etc.) and nested-name-specifier
storage.

- Sema::ActOnTemplateIdType now gets a nested-name-specifier, which
it places into the returned type-source location information.

- Sema::ActOnDependentTag now creates types with source-location
information.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3aea4dac830cb03d883a13ab30c28a3a53beca58 01-Mar-2011 Ted Kremenek <kremenek@apple.com> For C++, enhance -Warray-bounds to recursively analyze array subscript accesses in ?: expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
e29425bd22fbb9200bbec7b743197b9c6dad3e40 28-Feb-2011 Douglas Gregor <dgregor@apple.com> Teach Sema::CheckTypenameType to use nested-name-specifiers with
source-location information. We don't actually preserve this
information in any of the resulting TypeLocs (yet), so it doesn't
matter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
aa2187de137e5b809dcbbe14f3b61ae907a3d8aa 28-Feb-2011 Douglas Gregor <dgregor@apple.com> When we encounter a dependent template name within a
nested-name-specifier, e.g.,

T::template apply<U>::

represent the dependent template name specialization as a
DependentTemplateSpecializationType, rather than a
TemplateSpecializationType with a dependent TemplateName.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a02411e4d58b1730bea2a990822858ecc31e8eb1 27-Feb-2011 Douglas Gregor <dgregor@apple.com> Eliminate a silly little Parse/Sema dance when parsing typename
specifiers such as

typename T::template apply<U>

Previously, we would turn T::template apply<U> into a
TemplateSpecializationType. Then, we'd reprocess that
TemplateSpecializationType and turn it into either a
TemplateSpecializationType wrapped in an ElaboratedType (when we could
resolve "apply" to a template declaration) or a
DependentTemplateSpecializationType. We now produce the same ASTs but
without generating the intermediate TemplateSpecializationType.

The end goal here is to avoid generating TemplateSpecializationTypes
with dependent template-names, ever. We're not there yet.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4171766318a2564fbc9a739be0a2851f441c0d29 26-Feb-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement delegating constructors partially.

This successfully performs constructor lookup and verifies that a
delegating initializer is the only initializer present.

This does not perform loop detection in the initialization, but it also
doesn't codegen delegating constructors at all, so this won't cause
runtime infinite loops yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126552 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c22b5fff39a7520207f165fb16a27a34b944bd9c 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Use NestedNameSpecifierLoc within out-of-line variables, function, and
tag definitions. Also, add support for template instantiation of
NestedNameSpecifierLocs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c34348a7ef1a6b3f92a644a227953800cd1f9947 24-Feb-2011 Douglas Gregor <dgregor@apple.com> Retain complete source-location information for C++
nested-name-specifiers throughout the parser, and provide a new class
(NestedNameSpecifierLoc) that contains a nested-name-specifier along
with its type-source information.

Right now, this information is completely useless, because we don't
actually store the source-location information anywhere in the
AST. Call this Step 1/N.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2e4c34ac53d08633b9473df921db4c7e4c9cd577 24-Feb-2011 Douglas Gregor <dgregor@apple.com> Teach CXXScopeSpec to handle the extension of a nested-name-specifier
with another component in the nested-name-specifiers, updating its
representation (a NestedNameSpecifier) and source-location information
(currently a SourceRange) simultaneously. This is groundwork for
adding source-location information to nested-name-specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
21206d5e3167d5e8066c005c1773afc80ff50ae6 24-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Implement a warning for known shift overflows on constant shift
expressions. Consider the code:

int64_t i = 10 << 30;

This compiles fine, but most developers expect it to produce the value
for 10 gigs, not -2 gigs. This is actually undefined behavior because
the LHS is a signed integer type.

The warning is currently gated behind -Wshift-overflow.

There is a special case where only the sign bit is overridden that gets
a custom error message and is by default ignored. This case is much less
likely to cause observed buggy behavior, it's just undefined behavior
according to the spec. This warning can be enabled with
-Wshift-sign-overflow.

Original patch by Oleg Slezberg, with style tweaks and some correctness
fixes by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
79c42c88efa708d03caa109e3e2ec57a2e6abebe 23-Feb-2011 Ted Kremenek <kremenek@apple.com> Add doxygen comments to Sema::DiagRuntimeBehavior().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3ed6fc08a9cd293d012fa49ab2a615e618d7c3fa 23-Feb-2011 Ted Kremenek <kremenek@apple.com> Issue AnalysisBasedWarnings as part of calling Sema::PopBlockOrFunctionScope(). No real functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126287 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
762696fff298627b72b63dbb0becf57f689801ca 23-Feb-2011 Ted Kremenek <kremenek@apple.com> Update Sema::DiagRuntimeBehavior() to take an optional Stmt* to indicate the code the diagnostic is associated with.

This Stmt* is unused, but we will use it shortly for pruning diagnostics associated
with unreachable code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
406c38e8c1f105acfd438f94dfbc17af817aa4a5 23-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> Fix PR9276: We were missing the checks for auto deducing to different types in the same declaration group in the template instantiation case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
21761c8378a493c32ab0f7d2b8880986a0ba73a3 22-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Warn when type modifiers on objc method declarations in
protocols do not match with method implementation.
// rdar://7076235


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
483b9f3bc05c5409e2c6643f1c9d91e21c8ff9d2 21-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> Tweaks to C++0x deduced auto type support:
* Flag indicating 'we're parsing this auto typed variable's initializer' moved from VarDecl to Sema
* Temporary template parameter list for auto deduction is now allocated on the stack.
* Deduced 'auto' types are now uniqued.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
1be8eec3ddd2a23c19b453c2639226174eb5d4a8 19-Feb-2011 Douglas Gregor <dgregor@apple.com> Handle the resolution of a reference to a function template (which
includes explicitly-specified template arguments) to a function
template specialization in cases where no deduction is performed or
deduction fails. Patch by Faisal Vali, fixes PR7505!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
15e310a3b970b64a84cb30f0005bc396b4d978cb 19-Feb-2011 John McCall <rjmccall@apple.com> Warn about code that uses variables and functions with internal linkage
without defining them. This should be an error, but I'm paranoid about
"uses" that end up not actually requiring a definition. I'll revisit later.

Also, teach IR generation to not set internal linkage on variable
declarations, just for safety's sake. Doing so produces an invalid module
if the variable is not ultimately defined.

Also, fix several places in the test suite where we were using internal
functions without definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
82214a80c0163e01e4d8dec1426023c89277dbb4 19-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Initial steps to improve diagnostics when there is a NULL and
a non-pointer on the two sides of a conditional expression.

Patch by Stephen Hines and Mihai Rusu.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4ae493cccbfbf122ec6ebac0e330232c22fa8489 18-Feb-2011 Chris Lattner <sabre@nondot.org> implement basic support for __label__. I wouldn't be shocked if there are
bugs from other clients that don't expect to see a LabelDecl in a DeclStmt,
but if so they should be easy to fix.

This implements most of PR3429 and rdar://8287027



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
337e550218128e7d922c09bb354fbc71de90c568 18-Feb-2011 Chris Lattner <sabre@nondot.org> Switch labels over to using normal name lookup, instead of their
own weird little DenseMap. Hey look, we now emit unused label
warnings deterministically, amazing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3406458512c3cdfe2076c46b9aedb4621297efd5 17-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Clean up the style of this function to match the conventions in the rest
of Clang, and reflows the code a bit to make it easier to read.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
57ad37823e198f977cac605dbfbaefb4daf325e9 17-Feb-2011 Chris Lattner <sabre@nondot.org> Step #2/N of __label__ support: keep pushing LabelDecl forward,
making them be template instantiated in a more normal way and
make them handle attributes like other decls.

This fixes the used/unused label handling stuff, making it use
the same infrastructure as other decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
56ca35d396d8692c384c785f9aeebcf22563fe1e 17-Feb-2011 John McCall <rjmccall@apple.com> Change the representation of GNU ?: expressions to use a different expression
class and to bind the shared value using OpaqueValueExpr. This fixes an
unnoticed problem with deserialization of these expressions where the
deserialized form would lose the vital pointer-equality trait; or rather,
it fixes it because this patch also does the right thing for deserializing
OVEs.

Change OVEs to not be a "temporary object" in the sense that copy elision is
permitted.

This new representation is not totally unawkward to work with, but I think
that's really part and parcel with the semantics we're modelling here. In
particular, it's much easier to fix things like the copy elision bug and to
make the CFG look right.

I've tried to update the analyzer to deal with this in at least some
obvious cases, and I think we get a much better CFG out, but the printing
of OpaqueValueExprs probably needs some work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a0125d8520f65aca581378c235384e7affefa1fc 16-Feb-2011 Ted Kremenek <kremenek@apple.com> Add trivial buffer overflow checking in Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
afc4578f8e55d4377b291e2325b2e9bc2cd72e89 15-Feb-2011 Douglas Gregor <dgregor@apple.com> Implement a special code-completion pattern for "IBAction". Fixes
<rdar://problem/8767704>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125604 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
68e3c2eef52701a178fbcc2bb424f31dd4b36931 15-Feb-2011 Douglas Gregor <dgregor@apple.com> When code-completing within a list of declaration specifiers,
separately handle the case of a local declaration-specifier list,
including all types in the set of options. Fixes
<rdar://problem/8790735> and <rdar://problem/8662831>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
eee1d5434ebfa955ffc3c493aecd68bb7b3f4838 14-Feb-2011 John McCall <rjmccall@apple.com> When parsing an out-of-line member function declaration, we must delay
access-control diagnostics which arise from the portion of the declarator
following the scope specifier, just in case access is granted by
friending the individual method. This can also happen with in-line
member function declarations of class templates due to templated-scope
friend declarations.

We were really playing fast-and-loose before with this sort of thing,
and it turned out to work because *most* friend functions are in file
scope. Making us delay regardless of context exposed several bugs with
how we were manipulating delay. I ended up needing a concept of a
context that's independent of the declarations in which it appears,
and then I actually had to make some things save contexts correctly,
but delay should be much cleaner now.

I also encapsulated all the delayed-diagnostics machinery in a single
subobject of Sema; this is a pattern we might want to consider rolling
out to other components of Sema.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f315fa81eef1977b3457fd7a7d4639e060fe7278 14-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> OpenCL: add support for __kernel, kernel keywords and EXTENSION,
FP_CONTRACT pragmas. Patch originally by ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
321b8179afaf803dcc56b2a19f7b0891a03c92c8 14-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Move support for "#pragma STDC FP_CONTRACT" to Parser; add Sema actions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e3c8c64e7735c3589e1a34e6000c93183a55920c 12-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Implement objective-c++'s block pointer type matching involving
types which are contravariance in argument types and covariance
in return types. // rdar://8979379.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7f53253223b29d77f1e9c5c0ce93a19932761b77 09-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Fix scoping of method declarations and issue
warning when same parameter name used multiple times.
// rdar://8877730


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e08ce650a2b02410eddd1f60a4aa6b3d4be71e73 09-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> AST, Sema, Serialization: add CUDAKernelCallExpr and related semantic actions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1e52dfc648ce0b25ef57ae29ef1b4337d80011ef 08-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Support for objextive-c++ use of property-dot syntax as receiver
in liu of a class method getter.
// rdar://8962253


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f677ea3cc9598d9952ad7ffab5fb322ba4c5be31 05-Feb-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Basic implementation of inherited constructors. Only generates declarations, and probably only works for very basic use cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d89d86fe4acaa4782b0ed8a684bbc1b32cb48b70 04-Feb-2011 Douglas Gregor <dgregor@apple.com> Tighten up the semantics of default template arguments, per C++0x
[temp.param]p9 and C++ DR226. Fixes PR8747.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
799ef666685d6c97d64d1970a6f68bf7923360c2 03-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement -Woverloaded-virtual.

The difference with gcc is that it warns if you overload virtual methods only if
the method doesn't also override any method. This is to cut down on the number of warnings
and make it more useful like reported here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20423.
If we want to warn that not all overloads are overriden we can have an additional
warning like -Wpartial-override.

-Woverloaded-virtual, unlike gcc, is added to -Wmost. Addresses rdar://8757630.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
26743b20e4a8c2a986e6453f0c38beba0afef633 03-Feb-2011 John McCall <rjmccall@apple.com> Capture a few implicit references to 'self'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5808ce43f8d7e71f5acacc9ca320268c4f37565a 03-Feb-2011 John McCall <rjmccall@apple.com> More capturing of 'this': implicit member expressions. Getting that
right for anonymous struct/union members led to me discovering some
seemingly broken code in that area of Sema, which I fixed, partly by
changing the representation of member pointer constants so that
IndirectFieldDecls aren't expanded. This led to assorted cleanups with
member pointers in CodeGen, and while I was doing that I saw some random
other things to clean up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
dae687575010c9c49a4b552f5eef82cd6279d9ac 01-Feb-2011 Douglas Gregor <dgregor@apple.com> Create a special allocator class for code completion, so that all of
the string copying goes through a single place that can have
associated state.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
218937c13ef5b0625a70aad41ca7a92da9278bd2 01-Feb-2011 Douglas Gregor <dgregor@apple.com> Allocate CodeCompletionString and all of its components in a
BumpPtrAllocator, rather than manually new/delete'ing them. This
optimization also allows us to avoid allocating memory for and copying
constant strings (e.g., "return", "class").

This also required embedding the priority and availability of results
within the code completion string, to avoid extra memory allocation
within libclang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0e2dc3a1159806c8303b0979be1ce1526cc64ed3 01-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Warn for "if ((a == b))" where the equality expression is needlessly wrapped inside parentheses.
It's highly likely that the user intended an assignment used as condition.

Addresses rdar://8848646.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
86c05f3f28bcf07c97dfb1881686fc43be2f47c2 01-Feb-2011 John McCall <rjmccall@apple.com> Perform the bad-address-space conversions check as part of
CheckPointerTypesForAssignment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e4be87eb661ff12524074184f43b9d11d06ad376 01-Feb-2011 John McCall <rjmccall@apple.com> Make Check*PointerTypesForAssignment private and tell them that they're
working on canonical types already.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0413db4a26b0a1577b75c2979b0eb21f3490d17a 31-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Amazing that there are still issues with the fields of anonymous struct/unions..
Allow taking the address of such a field for a pointer-to-member constant. Fixes rdar://8818236.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b608b987718c6d841115464f79ab2d1820a63e17 28-Jan-2011 Douglas Gregor <dgregor@apple.com> Give OpaqueValueExpr a source location, because its source location
might be queried in places where we absolutely require a valid
location (e.g., for template instantiation). Fixes some major
brokenness in the use of __is_convertible_to.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1eee5dc0465c0ab4810e21d365e881152d7f53c0 27-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach the evaluation of the __is_convertible_to trait to translate
access control errors into SFINAE errors, so that the trait provides
enough support to implement the C++0x std::is_convertible type trait.

To get there, the SFINAETrap now knows how to set up a SFINAE context
independent of any template instantiations or template argument
deduction steps, and (separately) can set a Sema flag to translate
access control errors into SFINAE errors. The latter can also be
useful if we decide that access control errors during template argument
deduction should cause substitution failure (rather than a hard error)
as has been proposed for C++0x.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
14d0aee957f11b9613fa4312919bec3cc5456a1c 27-Jan-2011 Douglas Gregor <dgregor@apple.com> Fix a horrible bug in our handling of C-style casting, where a C-style
derived-to-base cast that also casts away constness (one of the cases
for static_cast followed by const_cast) would be treated as a bit-cast
rather than a derived-to-base class, causing miscompiles and
heartburn.

Fixes <rdar://problem/8913298>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2c9a03f3b249e4d9d76eadf758a33142adc4d0a4 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Rvalue references for *this: implement the implicit conversion rules
for the implicit object argument to a non-static member function with
a ref-qualifier (C++0x [over.match.funcs]p4).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124311 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
dfc2f1035d23e294b298766a3cf51dfe249d53a2 22-Jan-2011 Anders Carlsson <andersca@mac.com> Mark classes as final or explicit. Diagnose when a class marked 'final' is used as a base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
07f402cff25354c5f06f307f19b0c57c09d964bd 21-Jan-2011 Douglas Gregor <dgregor@apple.com> Generalize the NRVO move-construction-based initialization routine. No functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f5d8f466c3eebaffc51468812bdcbe7f0fe4891a 21-Jan-2011 Douglas Gregor <dgregor@apple.com> Promote the static getNRVOCandidate() function, which computed the
NRVO candidate for a return statement, to
Sema::getCopyElisionCandidate(), and teach it enough to also determine
the NRVO candidate for a throw expression. We still don't use the
latter information, however.

Along the way, implement core issue 1148, which eliminates copy
elision from catch parameters and clarifies that copy elision cannot
occur from function parameters (which we already implemented).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c80e8115278ba1537c8b517a083ecbd0a018b579 21-Jan-2011 Peter Collingbourne <peter@pcc.me.uk> Sema: process non-inheritable attributes on function declarations early

This allows us to simplify the handling for the overloadable attribute,
removing a number of FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
60700390a787471d3396f380e0679a6d08c27f1f 21-Jan-2011 Peter Collingbourne <peter@pcc.me.uk> Sema: support for processing non-inheritable declaration attributes early

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123960 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2e1c730167d2b978c66558c029d163ffe64b9656 20-Jan-2011 Anders Carlsson <andersca@mac.com> Diagnose when a virtual member function marked final is overridden.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4ebf1605166e0b6cc967a51429949a0722f79665 20-Jan-2011 Anders Carlsson <andersca@mac.com> Make CheckOverrideControl a member of Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
69a87357310260c4b2c5dce2cdcd10c3fd3a0a58 20-Jan-2011 Anders Carlsson <andersca@mac.com> Pass the VirtSpecifiers along to Sema::ActOnCXXMemberDeclarator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f2ae52605a49e5fc7a581f2c1ae02f1811034578 20-Jan-2011 Douglas Gregor <dgregor@apple.com> Sema::BuildCXXMemberCallExpr() can fail due to access or ambiguities,
so allow it to propagate the failure outward. Fixes the crashing part
of <rdar://problem/8876150>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6952f1e4256c5b43aee5e98cea4e9b663bd1d413 19-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement support for non-type template parameter packs whose type is
a pack expansion, e.g., the parameter pack Values in:

template<typename ...Types>
struct Outer {
template<Types ...Values>
struct Inner;
};

This new implementation approach introduces the notion of an
"expanded" non-type template parameter pack, for which we have already
expanded the types of the parameter pack (to, say, "int*, float*",
for Outer<int*, float*>) but have not yet expanded the values. Aside
from creating these expanded non-type template parameter packs, this
patch updates template argument checking and non-type template
parameter pack instantiation to make use of the appropriate types in
the parameter pack.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2998d6b0e6d5476c473f68012a851fe4a0f609c8 19-Jan-2011 John McCall <rjmccall@apple.com> When building the copy expression for a __block variable, make sure
there's a respectable point of instantiation. Also, make sure we do
this operation even when instantiating a dependently-typed variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
b918d0f5d8f147e1e26c34e6cf42a79af2d2ec41 17-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Convert "#pragma unused(...)" into tokens for the parser.
This allows us to cache a "#pragma unused" that occurs inside an inline C++ member function.
Fixes rdar://8829590&8770988.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6a24bfda084f06a0b252b7befe8cbb17fce7f94e 14-Jan-2011 Douglas Gregor <dgregor@apple.com> Handle substitutions into function parameter packs whose patterns
contain multiple parameter packs at different levels.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
67fd1251aad51bb80d050b7fa5e506fef0ec8e02 14-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach PackExpansionExpr to keep track of the number of pack expansions
it will expand to, if known. Propagate this information throughout Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
2fc1bb76e719d0620b4a6e2134413933b21ca6b6 12-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach TreeTransform how to transform a pack expansion type into
another pack expansion type. This can happen when rebuilding types in
the current instantiation.

Fixes <rdar://problem/8848837> (Clang crashing on libc++ <functional>).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5c7bf42ef16dc767615bed10f3b7b3c1265314e1 11-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement C++ [temp.func.order]p5 more directly, by passing down the
number of explicit call arguments. This actually fixes an erroneous
test for [temp.deduct.partial]p11, where we were considering
parameters corresponding to arguments beyond those that were
explicitly provided.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
21371ea7cf647f4f0f783faac325925cb8febb1c 11-Jan-2011 Douglas Gregor <dgregor@apple.com> When mapping from a function parameter pack to the set of function
parameters it expanded to, map exactly the number of function
parameters that were expanded rather than just running to the end of
the instantiated parameter list. This finishes the implementation of
the last sentence of C++0x [temp.deduct.call]p1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d3731198193eee92796ddeb493973b7a598b003e 10-Jan-2011 Douglas Gregor <dgregor@apple.com> Work-in-progress implementation of C++0x [temp.arg.explicit]p9, which
allows an argument pack determines via explicit specification of
function template arguments to be extended by further, deduced
arguments. For example:

template<class ... Types> void f(Types ... values);
void g() {
f<int*, float*>(0, 0, 0); // Types is deduced to the sequence int*, float*, int
}

There are a number of FIXMEs in here that indicate places where we
need to implement + test retained expansions, plus a number of other
places in deduction where we need to correctly cope with the
explicitly-specified arguments when deducing an argument
pack. Furthermore, it appears that the RecursiveASTVisitor needs to be
auditied; it's missing some traversals (especially w.r.t. template
arguments) that cause it not to find unexpanded parameter packs when
it should.

The good news, however, is that the tr1::tuple implementation now
works fully, and the tr1::bind example (both from N2080) is actually
working now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
cbb67480094b3bcb5b715acd827cbad55e2a204c 08-Jan-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Renamed CXXBaseOrMemberInitializer to CXXCtorInitializer. This is both shorter,
more accurate, and makes it make sense for it to hold a delegating constructor
call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
97fcc4977b21da43ab106607ad472149b7d4785a 08-Jan-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Check for delegating constructors and (currently) return an error about them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
91fc73e7ffb1fa1da0276518359d3bd4ed11c843 07-Jan-2011 Douglas Gregor <dgregor@apple.com> When instantiating the arguments to an initializer, use the
TreeTransform version of TransformExprs() rather than explicit loop,
so that we expand pack expansions properly. Test cast coming soon...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
12c9c00024a01819e3a70ef6d951d32efaeb9312 07-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement substitution of a function parameter pack for its set of
instantiated function parameters, enabling instantiation of arbitrary
pack expansions involving function parameter packs. At this point, we
can now correctly compile a simple, variadic print() example:

#include <iostream>
#include <string>

void print() {}

template<typename Head, typename ...Tail>
void print(const Head &head, const Tail &...tail) {
std::cout << head;
print(tail...);
}

int main() {
std::string hello = "Hello";
print(hello, ", world!", " ", 2011, '\n');
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a009b59fc2c550a229b9146aabda8e33fe3a7771 07-Jan-2011 Douglas Gregor <dgregor@apple.com> Factor out the template transformation of a sequence of function
parameters into parameter types, so that substitution of
explicitly-specified function template arguments uses the same
path. This enables the use of explicitly-specified function template
arguments with variadic templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
603cfb4da2f7ba08a1c3452c2fbf70585b8e7621 06-Jan-2011 Douglas Gregor <dgregor@apple.com> Initial implementation of function parameter packs. This implementation allows:

1) Declaration of function parameter packs
2) Instantiation of function parameter packs within function types.
3) Template argument deduction of function parameter packs when
matching two function types.

We're missing all of the important template-instantiation logic for
function template definitions, along with template argument deduction
from the argument list of a function call, so don't even think of
trying to use these for real yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b1fa3dc2f914aaa8b5a851c6b5115ec239d20495 05-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use the proper enum as parameter, instead of unsigned. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
61c4d28e36cd3f1be392cb77f07436d1fa6b0f9f 05-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement support for template template parameter packs, e.g.,

template<template<class> class ...Metafunctions>
struct apply_to_each;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122874 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
54c53cca105ed595e12fecf04e415c3712bda936 05-Jan-2011 Douglas Gregor <dgregor@apple.com> Improve our handling of non-type template parameters in partial
specializations. We weren't dealing with any of the cases where the
type of the non-type template argument differs from the type of the
corresponding template parameter in the primary template. We would
think that the template parameter in the partial specialization was
not deducible (and warn about it, incorrectly), then fail to convert a
deduced parameter to the type of the template parameter in the partial
specialization (which may involve truncation, among other
things). Fixes PR8905.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ee8aff06f6a96214731de17b2cb6df407c6c1820 04-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement the sizeof...(pack) expression to compute the length of a
parameter pack.

Note that we're missing proper libclang support for the new
SizeOfPackExpr expression node.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3fb9e4b89f72823f162096086f0f964e6dcf66d6 04-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement pack expansion of base initializers, so that we can
initialize those lovely mixins that come from pack expansions of base
specifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f90b27ad077c3339b62befc892382845339f9490 03-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement pack expansions whose pattern is a base-specifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bacb9493770ff19cfd8f7bc46a075f14b4d08159 03-Jan-2011 Douglas Gregor <dgregor@apple.com> Unwrap template argument packs when checking the template arguments of
a class template partial specialiation, and look through pack
expansions when checking the conditions of C++0x [temp.class.spec]p8.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122774 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
925910d488051cbd4e38f350c1e9d69c473f09a0 03-Jan-2011 Douglas Gregor <dgregor@apple.com> Diagnose the presence of unexpanded parameter packs within class
template partial specialization arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
be230c36e32142cbdcdbe9c97511d097beeecbab 03-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement support for pack expansions whose pattern is a non-type
template argument (described by an expression, of course). For
example:

template<int...> struct int_tuple { };

template<int ...Values>
struct square {
typedef int_tuple<(Values*Values)...> type;
};

It also lays the foundation for pack expansions in an initializer-list.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
743b82bf3c500de45715498dbf25f0fb39e71462 02-Jan-2011 Peter Collingbourne <peter@pcc.me.uk> Unkown -> Unknown

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
194252d41408b4e765bbaadfe77b5c4502489454 24-Dec-2010 Chris Lattner <sabre@nondot.org> don't use #pragma mark, it isn't portable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122540 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1a3942a18b1ca2f9c00ebdd016bea0ef15a0f9a0 24-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> ifndef _MSC_VER out #pragma mark on MSVC. It still tries to parse the text even
though it doesn't know what it is, and complains about invalid tokens ;/.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
b9c6631941619fb8c74f1056fbc56270629201c1 23-Dec-2010 Douglas Gregor <dgregor@apple.com> Reimplement the comparison of a class template partial
specialization's template arguments against the primary template's
template arguments using the obvious, correct method of checking the
injected-class-name type (C++ [temp.class.spec]p9b3). The previous
incarnation of this comparison attempted to use its own formulation of
the injected-class-name, which is redudant and, with the introduction
of variadic templates, became wrong (again).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e02e26293cf8e3bad1059b39cea75c6582896da6 22-Dec-2010 Douglas Gregor <dgregor@apple.com> Implement template argument deduction for pack expansions whose
pattern is a template argument, which involves repeatedly deducing
template arguments using the pattern of the pack expansion, then
bundling the resulting deductions into an argument pack.

We can now handle a variety of simple list-handling metaprograms using
variadic templates. See, e.g., the new "count" metaprogram.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bdb2d5056fd675c27307b34efd371bbba6839e92 21-Dec-2010 Douglas Gregor <dgregor@apple.com> Fix a major inconsistency in the representation of Objective-C
classes, categories, protocols, and class extensions, where the
methods and properties of these entities would be inserted into the
DeclContext in an ordering that doesn't necessarily reflect source
order. The culprits were Sema::ActOnMethodDeclaration(), which did not
perform the insertion of the just-created method declaration into
the DeclContext for these Objective-C entities, and
Sema::ActOnAtEnd(), which inserted all method declarations at the
*end* of the DeclContext.

With this fix in hand, clean up the code-completion actions for
property setters/getters that worked around this brokenness in the AST.

Fixes <rdar://problem/8062781>, where this problem manifested as poor
token-annotation information, but this would have struck again in many
other places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b99268b3083c882103bd1bd08bdcc9a76a2b4795 21-Dec-2010 Douglas Gregor <dgregor@apple.com> Implement instantiation of pack expansions whose pattern is a type-id
in an exception specification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8e5fc9be37c6828ad008f22730e3baac1bef1686 21-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> Warn when message is sent to receiver of
unknown type and there is a possibility that
at runtime method is resolved to a deprecated or
unavailable method. Addreses // rdar://8769853


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8491ffe86c50241b47c6d7ef8cd9ee00f5e675da 20-Dec-2010 Douglas Gregor <dgregor@apple.com> Implement basic support for template instantiation of pack expansions
whose patterns are template arguments. We can now instantiate, e.g.,

typedef tuple<pair<OuterTypes, InnerTypes>...> type;

where OuterTypes and InnerTypes are template type parameter packs.

There is a horrible inefficiency in
TemplateArgumentLoc::getPackExpansionPattern(), where we need to
create copies of TypeLoc data because our interfaces traffic in
TypeSourceInfo pointers where they should traffic in TypeLocs
instead. I've isolated in efficiency in this one routine; once we
refactor our interfaces to traffic in TypeLocs, we can eliminate it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7536dd5e6c99584481b7dab68b7e7d8df9c54054 20-Dec-2010 Douglas Gregor <dgregor@apple.com> Introduce a new type, PackExpansionType, to capture types that are
pack expansions, e.g. given

template<typename... Types> struct tuple;

template<typename... Types>
struct tuple_of_refs {
typedef tuple<Types&...> types;
};

the type of the "types" typedef is a PackExpansionType whose pattern
is Types&.

This commit introduces support for creating pack expansions for
template type arguments, as above, but not for any other kind of pack
expansion, nor for any form of instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a669c534cf414339060868d70d2348fea9ce6c7d 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Add tests checking for unexpanded parameter packs in declarations that
occur within statements. Teach Sema::ActOnExceptionDeclarator() to
check for unexpanded parameter packs in the exception type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
781def075d4a486a5b367c6730fe77cb1f721ac1 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs in non-type template parameter types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6f52675ec400a0ee89ec6214c4845b8ee274304a 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs in default arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a31040f16604849b3b1dc36015056c81bae68ad1 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs within variable initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121938 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6ccab97c17c17f38eb92c7fe02c766508875bd97 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs in friend declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
56c04588ef3cfa1bbc968fd68de2480a4e66971d 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs in using declarations. As a
drive-by, make sure to check for unexpanded parameter packs within the
name of a declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0c9e4799fd78d350a037498b2c797f2b2558791c 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs in enumeration types and enumerators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
399ad970a25efcbfa7111e17f48285a70fba2731 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs in static assertion expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e186269a8a41dbff1ebea2c251048892979d1078 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs in various kinds of
declarations. This is a work in progress, as I go through the C++
declaration grammar to identify where unexpanded parameter packs can
occur.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
d0937224f383c7cc72c947119380f9713a070c73 13-Dec-2010 Douglas Gregor <dgregor@apple.com> Variadic templates: extend Type, NestedNameSpecifier, TemplateName,
and TemplateArgument with an operation that determines whether there
are any unexpanded parameter packs within that construct. Use this
information to diagnose the appearance of the names of parameter packs
that have not been expanded (C++ [temp.variadic]p5). Since this
property is checked often (every declaration, ever expression
statement, etc.), we extend Type and Expr with a bit storing the
result of this computation, rather than walking the AST each time to
determine whether any unexpanded parameter packs occur.

This commit is deficient in several ways, which will be remedied with
future commits:
- Expr has a bit to store the presence of an unexpanded parameter
pack, but it is never set.
- The error messages don't point out where the unexpanded parameter
packs were named in the type/expression, but they should.
- We don't check for unexpanded parameter packs in all of the places
where we should.
- Testing is sparse, pending the resolution of the above three
issues.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f40f0d5a382395e0301d7dcbeaa2b8e90b8973b1 10-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Keep the source location of the selector in ObjCMessageExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
90f1450c109fbbd333001165bbd986061f7c4513 10-Dec-2010 John McCall <rjmccall@apple.com> Treat visibility on an enclosing namespace as a non-explicit source of
visibility. Fixes PR8713.

I've disabled a test which was testing that you can #pragma pop visibility
to get out of a namespace's visibility attribute. We should probably just
diagnose that as an error unless it's instrumental to someone's system
headers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f187237d916afa97c491ac32fe98be7d335c5b63 08-Dec-2010 Francois Pichet <pichet2000@gmail.com> Remove the TypesCompatibleExprClass AST node. Merge its functionality into BinaryTypeTraitExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6f18fca241bf060bccbea52e5e436e17562bc9b3 07-Dec-2010 John McCall <rjmccall@apple.com> Kill FullExpr, as it was not, in fact, used anywhere in the code base.
I'm not opposed to the idea in concept, but there's no point in preserving
abortive experiments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6ad6f2848d7652ab2991286eb48be440d3493b28 07-Dec-2010 Francois Pichet <pichet2000@gmail.com> Type traits intrinsic implementation: __is_base_of(T, U)
New AST node introduced: BinaryTypeTraitExpr; to be reused for more intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
409fa9ab9579de04c5d68fb6a6a8d094545b1e77 06-Dec-2010 John McCall <rjmccall@apple.com> Split out a function to do lvalue conversion on objects; this is basically
FunctionArrayLvalueConversion but without the function/array decay. Generally
this is only appropriate for use sites that know the type of the expression
and thus that it can't be subject to the decays.

Also make sure we do lvalue-to-rvalue on the bases of ivar references.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121035 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
894aed964fae942b62326881dc106801dabfd04c 06-Dec-2010 Chandler Carruth <chandlerc@gmail.com> Un-templatetize this method. It's definition is out of line in the .cpp file,
so that's not a valid thing to do at all. Instead, switch to a ValueDecl
argument, the template isn't really necessary here.

When handling the types explicitly in the code, it becomes awkward to cerate
the CXXBaseOrMemberInitializer object in so many places. Re-flow the code to
calculate the Init expression first, and then create the initializer. If this
is too gross, we can factor the init expression logic into helper functions,
but it's not past my threshold yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4765fa05b5652fcc4356371c2f481d0ea9a1b007 06-Dec-2010 John McCall <rjmccall@apple.com> Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoretical
reason this is limited to C++, and it's certainly not limited to temporaries.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
00eb3f9c5b33e3d99aee1f8b75dd9c9678fdd66b 04-Dec-2010 Francois Pichet <pichet2000@gmail.com> More anonymous struct/union redesign. This one deals with anonymous field used in a constructor initializer list:

struct X {
X() : au_i1(123) {}
union {
int au_i1;
float au_f1;
};
};

clang will now deal with au_i1 explicitly as an IndirectFieldDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f6a1648197562e0b133440d612d9af297d0a86cc 04-Dec-2010 John McCall <rjmccall@apple.com> Although we currently have explicit lvalue-to-rvalue conversions, they're
not actually frequently used, because ImpCastExprToType only creates a node
if the types differ. So explicitly create an ICE in the lvalue-to-rvalue
conversion code in DefaultFunctionArrayLvalueConversion() as well as several
other new places, and consistently deal with the consequences throughout the
compiler.

In addition, introduce a new cast kind for loading an ObjCProperty l-value,
and make sure we emit those nodes whenever an ObjCProperty l-value appears
that's not on the LHS of an assignment operator.

This breaks a couple of rewriter tests, which I've x-failed until future
development occurs on the rewriter.

Ted Kremenek kindly contributed the analyzer workarounds in this patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a88cefd266c428be33cc06f7e8b00ff8fc97c1ff 03-Dec-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added struct/class syntactic info for c++0x scoped enum.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2a5f99eb4e2af771faacfceb9f78e230129c5e5a 25-Nov-2010 Nick Lewycky <nicholas@mxc.ca> Tie DefineVTablesUsed() in with recursive function instantiation so that we emit
a useful template instantiation stack. Fixes PR8640.

This also causes a slight change to where the "instantianted from" note shows up
in truly esoteric cases (see the change to test/SemaCXX/destructor.cpp), but
that isn't directly the fault of this patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8e161ed8e63bd9d3783a987d837b72b2b96c4512 23-Nov-2010 Francois Pichet <pichet2000@gmail.com> Microsoft C anonymous struct implementation.
Documentation: http://msdn.microsoft.com/en-us/library/z2cx9y4f.aspx

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
87c2e121cf0522fc266efe2922b58091cd2e0182 21-Nov-2010 Francois Pichet <pichet2000@gmail.com> Major anonymous union/struct redesign.
A new AST node is introduced:
def IndirectField : DDecl<Value>;
IndirectFields are injected into the anonymous's parent scope and chain back to
the original field. Name lookup for anonymous entities now result in an
IndirectFieldDecl instead of a FieldDecl.
There is no functionality change, the code generated should be the same.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
44aa1f397855f130e88e62ffc1029f7f83bb5d2e 20-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r119838 "Don't warn for empty 'if' body if there is a macro that expands to nothing"
and use a better and more general approach, where NullStmt has a flag to indicate whether it was preceded by an empty macro.

Thanks to Abramo Bagnara for the hint!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7663f396651716c82280f8fdcf97ad8e27c1ce5a 20-Nov-2010 Nick Lewycky <nicholas@mxc.ca> A bundle of whitespace changes, separated out from the functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a25b6a4b43e8b9611f7506e5fe1b448833b10a46 19-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't warn for empty 'if' body if there is a macro that expands to nothing, e.g:

if (condition)
CALL(0); // empty macro but don't warn for empty body.

Fixes rdar://8436021.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9c4eb1f3438370355f51dc8c62f2ca4803e3338d 19-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactoring.
Move ErrorTrap from clang/Sema to clang/Basic as DiagnosticErrorTrap and use it in Scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0943168ac126b8047f30f6bd215fbe7db14d61ba 18-Nov-2010 John McCall <rjmccall@apple.com> Add an assertion, fix a whole bunch of bugs, comment the assertion
out because there are still bugs left.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
45ab4b5f8961dadcef6545ed6956da5daf95c6cb 18-Nov-2010 Craig Silverstein <csilvers2000@yahoo.com> In some situations, TemplateArgumentLoc wasn't setting TypeSourceLoc (see
http://llvm.org/bugs/show_bug.cgi?id=8558). This patch fixes it. Thanks to
rjmccall for all the coaching!

Approved by rjmccall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f89e55ab1bfb3ea997f8b02997c611a02254eb2d 18-Nov-2010 John McCall <rjmccall@apple.com> Calculate the value kind of an expression when it's created and
store it on the expression node. Also store an "object kind",
which distinguishes ordinary "addressed" l-values (like
variable references and pointer dereferences) and bitfield,
@property, and vector-component l-values.

Currently we're not using these for much, but I aim to switch
pretty much everything calculating l-valueness over to them.
For now they shouldn't necessarily be trusted.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1380a147d4578b619c215b23aa79ce17036d3c46 18-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Rename -Wargument-larger-than -> -Wlarge-by-value-copy
-Improve the diagnostic message
-Add some comments

Suggestions by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3532fdd1db8ff6f353f2a5b215cebe3e0e2ff3c2 18-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce option -Wargument-larger-than[=N] which warns about function definitions if they take by-value
or return by-value any POD that is larger than some threshold (default is 64 bytes).

Implements rdar://8548050.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a4ffd85a6684e42f900aad5459e58ad91bb88755 17-Nov-2010 Douglas Gregor <dgregor@apple.com> For an Objective-C @synthesize statement, e.g.,

@synthesize foo = _foo;

keep track of the location of the ivar ("_foo"). Teach libclang to
visit the ivar as a member reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1c23e91ef66688d20868b6bab3b5589a119eb603 16-Nov-2010 John McCall <rjmccall@apple.com> Kill off the remaining places which generate CK_Unknown casts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
daa8e4e888758d55a7a759dd4a91b83921cef222 15-Nov-2010 John McCall <rjmccall@apple.com> Assorted work leading towards the elimination of CK_Unknown.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
15d7d12226f83de24f96f4bf4e27ebba30fef51e 11-Nov-2010 John McCall <rjmccall@apple.com> Extend the bitfield-truncation warning to initializations.
rdar://problem/8652606



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
910f8008fea79120489a53593fe971b0b8a4a740 08-Nov-2010 Douglas Gregor <dgregor@apple.com> Remove broken support for variadic templates, along with the various
abstractions (e.g., TemplateArgumentListBuilder) that were designed to
support variadic templates. Only a few remnants of variadic templates
remain, in the parser (parsing template type parameter packs), AST
(template type parameter pack bits and TemplateArgument::Pack), and
Sema; these are expected to be used in a future implementation of
variadic templates.

But don't get too excited about that happening now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ca45da0c6da20d9c0c903370f99af5e9a186e0da 02-Nov-2010 Douglas Gregor <dgregor@apple.com> Teach code completion to provide property results when the property
can be used to automatically synthesize an ivar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bf8cafadb9d4e0d7a90fe78fc175efb80ae34d42 02-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Properly handle temporaries that are created in a AsmStmt.

Previously the temporaries would get destroyed before the asm call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
82aa713bcda99f388836c2a30bb868d9c9974817 01-Nov-2010 Douglas Gregor <dgregor@apple.com> Require that the types of the parameters of a block literal are complete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117942 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
428edafa9eb80e01dd40aab31d4166a787a741e1 25-Oct-2010 Chandler Carruth <chandlerc@gmail.com> Improve the tracking of source locations for parentheses in constructor calls.
This adds them where missing, and traces them through PCH. We fix at least one
bug in the extents found by the Index library, and make a lot of refactoring
tools which care about the exact formulation of a constructor call easier to
write. Also some minor cleanups to more consistently follow the friend pattern
instead of the setter pattern when rebuilding a serialized AST.

Patch originally by Samuel Benzaquen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5b629aa86c987f276d00453b6c9ab8424f7903fe 23-Oct-2010 John McCall <rjmccall@apple.com> Parse attributes on enumerators and instantiate attributes on enum decls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117182 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0bab54cf82cd679152197c7a2eb938f8aa9f07dd 21-Oct-2010 Douglas Gregor <dgregor@apple.com> Always treat 'main' as an extern "C" function, so that we detect
redeclarations of main appropriately rather than allowing it to be
overloaded. Also, disallowing declaring main as a template.

Fixes GCC DejaGNU g++.old-deja/g++.other/main1.C.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9a632eaa0ee73e4db701a8df74e92909d1fa350e 20-Oct-2010 Douglas Gregor <dgregor@apple.com> Fix handling of property and ivar lookup in typo correction; the two
kinds of lookup into Objective-C classes were tangled together, a
situation that was compounded by automatically synthesized ivars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3eedbb06dd35b021bb614250585d4a6a5b7936e7 20-Oct-2010 Douglas Gregor <dgregor@apple.com> Introduce a simple cache for unqualified typo corrections, so that we
don't repeatedly loop through identifiers, correcting the same typo'd
identifier over and over again.

We still bail out after 20 typo corrections, but this should help
improve performance in the common case where we're typo-correcting
because the user forgot to include a header.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9a34edb710917798aa30263374f624f13b594605 19-Oct-2010 John McCall <rjmccall@apple.com> Redirect templated friend class decls to a new Sema callback and
construct an unsupported friend when there's a friend with a templated
scope specifier. Fixes a consistency crash, rdar://problem/8540527


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8ac2d449820fd0df00fcbde5bf82165c1f49854d 14-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Eliminate usage of ObjCSuperExpr used for
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116483 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a6c1e3a56afb76876cd06e3646fd7ca57a38d4bb 14-Oct-2010 Douglas Gregor <dgregor@apple.com> Diagnose when a 'static' member function overrides a virtual function
in a base class. Fixes PR8168.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6b0656a7c386662e1bec5f23a3bd0bf2687a9635 13-Oct-2010 Douglas Gregor <dgregor@apple.com> Eliminate the use of ObjCSuperExpr in code completion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
35495eb14f22c4e96956912e23ca2a433227ad8c 13-Oct-2010 Douglas Gregor <dgregor@apple.com> Compute whether a type is variably modified as we build the type,
rather than walking the type's structure every time we request this
information. Performance optimization; no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116409 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9b623639378d53a675921ddfa7316034d571881e 13-Oct-2010 Douglas Gregor <dgregor@apple.com> Introduce support for emitting diagnostics (warnings + their notes)
that are suppressed during template argument deduction. This change
queues diagnostics computed during template argument deduction. Then,
if the resulting function template specialization or partial
specialization is chosen by overload resolution or partial ordering
(respectively), we will emit the queued diagnostics at that point.

This addresses most of PR6784. However, the check for unnamed/local
template arguments (which existed before this change) is still only
skin-deep, and needs to be extended to look deeper into types. It must
be improved to finish PR6784.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8cfb7a39caa44797522773cf417ad9c1a6ffbc6f 12-Oct-2010 Douglas Gregor <dgregor@apple.com> If we end up instantiating a function parameter whose default argument
has not yet been parsed, note that the default argument hasn't been
parsed and keep track of all of the instantiations of that function
parameter. When its default argument does get parsed, imbue the
instantiations with that default argument. Fixes PR8245.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116324 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
ce2d186a421526e94d9e417ced141ae6c891cf48 09-Oct-2010 Benjamin Kramer <benny.kra@googlemail.com> Don't rely on a StringRef being null-terminated (it's not) for deprecation messages.
Store pointer and length of the message in DelayedDiagnostic and hide the gory union details.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
b4eb64d8426c0eaa58d398961e0e74ff85063d7c 08-Oct-2010 John McCall <rjmccall@apple.com> Track the location of the context requiring an implicit conversion and use it
to white-list conversions required by system headers. rdar://problem/8232669



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c4b35cfdb977f6427fe0d5725bf104e1b425d72e 06-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Add message to attribute(deprecated).
attribute(unavailable) to do next.
// rdar:// 6734520.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4a1bb8c4d708d5594e62c9ec7e25e273cae8a1ed 05-Oct-2010 Douglas Gregor <dgregor@apple.com> Register the __builtin_va_list_type node when we parse it, rather than
waiting until we think we need it: we didn't catch all of the places
where we actually needed it, and we probably wouldn't ever. Fixes a
C++ PCH crasher.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
57a4087b349702062cd7c93735106270964be0d5 02-Oct-2010 Chris Lattner <sabre@nondot.org> kill off CheckX86BuiltinFunctionCall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115382 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
85606ebf3dd1b5dd81a59ef25b5ad47627664774 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Reinstate r114925 and r114929, both steps toward
<rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c5be7b0fc804d8e6f87298ec03c94d8cccd74f29 28-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> vla expressions used in __typeof__ must be evaluated.
Fixes rdar://8476159.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1a18600b85aaa691122983dd8dcf4225cfc9ef68 28-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't warn for an unused label if it has 'unused' attribute. Fixes rdar://8483139.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114954 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2a674e8e443b7a3e77957078248fb52b3b1ec321 28-Sep-2010 Bill Wendling <isanbard@gmail.com> Temporarily revert 114929 114925 114924 114921. It looked like they (or at least
one of them) was causing a series of failures:

http://google1.osuosl.org:8011/builders/clang-x86_64-darwin10-selfhost/builds/4518

svn merge -c -114929 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114929 into '.':
U include/clang/Sema/Sema.h
U include/clang/AST/DeclCXX.h
U lib/Sema/SemaDeclCXX.cpp
U lib/Sema/SemaTemplateInstantiateDecl.cpp
U lib/Sema/SemaDecl.cpp
U lib/Sema/SemaTemplateInstantiate.cpp
U lib/AST/DeclCXX.cpp
svn merge -c -114925 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114925 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/AST/DeclCXX.cpp
svn merge -c -114924 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114924 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/Sema/SemaDecl.cpp
G lib/AST/DeclCXX.cpp
U lib/AST/ASTContext.cpp
svn merge -c -114921 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114921 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/Sema/SemaDecl.cpp
G lib/AST/DeclCXX.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
e10288c1e9e06dbd715f47bfaa22ce5d65fdf096 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Centralize the management of CXXRecordDecl::DefinitionData's
HasTrivialConstructor, HasTrivialCopyConstructor,
HasTrivialCopyAssignment, and HasTrivialDestructor bits in
CXXRecordDecl's methods. This completes all but the Abstract bit and
the set of conversion functions, both of which will require a bit of
extra work. The majority of <rdar://problem/8459981> is now
implemented (but not all of it).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4a2e9ea0c191176ebe996516a9cf4f93b7e932cc 23-Sep-2010 Ted Kremenek <kremenek@apple.com> For properties declared in a @protocol and redeclared in a class extension, use the class extension
as the lexical DeclContext for the @property declaration that gets auto-created for the @interface.

Fixes: <rdar://problem/8467189>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8254aa62d9189395be1eed61194cd4b5ee6cb4a2 21-Sep-2010 Ted Kremenek <kremenek@apple.com> For ObjCPropertyDecls in class extensions, use the class extension as the lexical DeclContext for newly created
ObjCMethodDecls. Further, use the location of the new property declaration as the location of new ObjCMethodDecls
(if they didn't previously exist).

This fixes more of the issues reported in <rdar://problem/7410145>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114456 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
70c5ac70ace21b011dc2d4001bae26cdcf62ff8d 21-Sep-2010 Douglas Gregor <dgregor@apple.com> Refactor code completion for expressions that occur as arguments in
Objective-C message sends. There is no functionality change here; this
is prep work for using the parameter types to help guide the
expression results when code-completing the argument.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1fb019bf42f5757c027edb56e5bb70233787a39c 18-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Problem with gnu conditional extension with missing
LHS and when conditional expression is an array. Since
it will be decayed, saved expression must be saved with
decayed expression. This is necessary to preserve semantics
of this extension (and prevent an IRGen crash which expects
an array to always be decayed). I am sure there will be other
cases in c++ (aggregate conditionals for example) when saving of the
expression must happen after some transformation on conditional
expression has happened.
Doug, please review. Fixes // rdar://8446940


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ac5fd8404fa8ecfae28be76f98fd0d926350354c 18-Sep-2010 Douglas Gregor <dgregor@apple.com> Continue parsing more postfix expressions, even after semantic
errors. Improves code completion in yet another case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c7b6d883360092808b0ae81b7829fa8196ef42a1 16-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement code completion for Objective-C class message sends that are
missing the opening bracket '[', e.g.,

NSArray <CC>

at function scope. Previously, we would only give trivial completions
(const, volatile, etc.), because we're in a "declaration name"
scope. Now, we also provide completions for class methods of NSArray,
e.g.,

alloc

Note that we already had support for this after the first argument,
e.g.,

NSArray method:x <CC>

would get code completion for class methods of NSArray whose selector
starts with "method:". This was already present because we recover
as if NSArray method:x were a class message send missing the opening
bracket (which was committed in r114057).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
78edf515544f0b9dddf69d6c1678fd83e94d8352 15-Sep-2010 Douglas Gregor <dgregor@apple.com> Improve code completion for Objective-C message sends when the opening
'[' is missing. Prior commits improving recovery also improved code
completion beyond the first selector, e.g., at or after the "to" in

calculator add:x to:y

but not after "calculator". We now provide the same completions for

calculator <CC>

that we would for

[calculator <CC>

if "calculator" is an expression whose type is something that can
receive Objective-C messages.

This code completion works for instance and super message sends, but not
class message sends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0268810a46780144a2d5fb5a017c938d1199189c 15-Sep-2010 Douglas Gregor <dgregor@apple.com> Introduce a new code-completion context for a parenthesized
expression, e.g., after the '(' that could also be a type cast. Here,
we provide types as code-completion results in C/Objective-C (C++
already had them), although we wouldn't in a normal expression context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
c4e1a6815235ade1a4affe3511ca5ce2dcc64467 15-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> RHS of property expression assignment requires
copy initialization before passing it to
a setter. Fixes radar 8427922.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0dfd848fa4c9664852ba8c929a8bd3fce93ddca2 13-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Eagerly evaluate type traits in Sema instead of lazily in AST. They actually need Sema access to be correct, fixes coming up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
be0f7bd61c7b2879d02ae75aad7a91d92f819d94 11-Sep-2010 Douglas Gregor <dgregor@apple.com> When parsing default function arguments, do not mark any declarations
used in the default function argument as "used". Instead, when we
actually use the default argument, make another pass over the
expression to mark any used declarations as "used" at that point. This
addresses two kinds of related problems:

1) We were marking some declarations "used" that shouldn't be,
because we were marking them too eagerly.
2) We were failing to mark some declarations as "used" when we
should, if the first time it was instantiated happened to be an
unevaluated context, we wouldn't mark them again at a later point.

I've also added a potentially-handy visitor class template
EvaluatedExprVisitor, which only visits the potentially-evaluated
subexpressions of an expression. I bet this would have been useful for
noexcept...

Fixes PR5810 and PR8127.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2e156225a29407a50dd19041aa5750171ad44ea3 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Define and implement CXXNoexceptExpr. Create it in Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
02bc21a88ecbdf49b2e674c210a4cbf8c48c6e58 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Parse the noexcept operator and stub out sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3c0a78d2d028cdec935a7902728b0e2cf2b78eb5 10-Sep-2010 Chandler Carruth <chandlerc@gmail.com> Re-devirtualize this. A new virtual method snuck in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113582 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
83cb94269015bf2770ade71e616c5322ea7e76e1 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Simplify template instantiation for C++ exception declarations,
eliminating an unnecessary use of TemporaryBase in the process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
a1a04786cea2445759026edacd096abd1fbf4a05 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Eliminate the comma locations from all of the Sema routines that deal
with comma-separated lists. We never actually used the comma
locations, nor did we store them in the AST, but we did manage to
waste time during template instantiation to produce fake locations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
3d37c0ada0e46b87be0a10e8d52d990a97d3907a 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Add proper type-source information to UnaryTypeTraitExpr, including
libclang visitation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
4eb4f0f96289cbece50c1270e02af3caf8779705 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Fix a few minor issues with parsing and semantic analysis of C++
typeid expressions:
- make sure we have a proper source location for the closing ')'
- cache the declaration of std::type_info once we've found it



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
01b7c3028da5bbcb9f8e52ba67e4613070de0e60 08-Sep-2010 Francois Pichet <pichet2000@gmail.com> Microsoft's __uuidof operator implementation part 1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ab6677ec401cfd2c82b34e4cdfebd55a9dc25778 08-Sep-2010 Douglas Gregor <dgregor@apple.com> Provide proper type-source location information for
CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and
CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the
process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1bb2a93ab7b1499dda6f6b58865bd0dce1864228 07-Sep-2010 Douglas Gregor <dgregor@apple.com> Improve source-location information for CXXNewExpr, by hanging on to
the TypeSourceInfo for the allocated type. Fixes PR7501.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8c465e6494d16a19127873dc9bdc55177ac6b6fd 03-Sep-2010 John McCall <rjmccall@apple.com> Devirtualize Sema, kill off DeleteExpr and DeleteStmt, and reformat.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
85dd015707143f763617098ec9458bf61db420f1 02-Sep-2010 Zhanyong Wan <wan@google.com> Fixes a warning when compiling Clang (Sema has virtual methods but a non-virtual dtor). Reviewed by chandlerc and nlewycky.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
6cf750298d3621d8a10a6dd07fcee8e274b9d94d 30-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Revert my user-defined literal commits - r1124{58,60,67} pending
some issues being sorted out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0016d519b831859526b79405cdae4c64c73731c8 29-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement C++0x user-defined string literals.

The extra data stored on user-defined literal Tokens is stored in extra
allocated memory, which is managed by the PreprocessorLexer because there isn't
a better place to put it that makes sure it gets deallocated, but only after
it's used up. My testing has shown no significant slowdown as a result, but
independent testing would be appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0133f525a23e18dd444880f7554f25fbcbd834e5 28-Aug-2010 Douglas Gregor <dgregor@apple.com> Basic code completion support for the base and member initializers in
a constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d078e641450bbc5a20df8d3b54f87b27e398acb3 28-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Parser support for inline namespaces

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1a480c403a3b141ab89c9c59cf7b681102a1bfab 27-Aug-2010 Douglas Gregor <dgregor@apple.com> Suggest "const" and "volatile" code completions after a function
declarator, the very definition of "low-hanging fruit".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
03d8aec611380d30ddb0659bb61be9289c3871b3 27-Aug-2010 Douglas Gregor <dgregor@apple.com> Add a super-cool code completion for send-to-super. When we're typing
a message send to "super" from a method that appears to be meant to
override a superclass method (same kind, same selector, same argument
types), provide a "super" completion that fills in the selector along
with forwarding the method's arguments (as placeholders).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9c72c6088d591ace8503b842d39448c2040f3033 27-Aug-2010 John McCall <rjmccall@apple.com> Propagate whether an id-expression is the immediate argument of
an '&' expression from the second caller of ActOnIdExpression.

Teach template argument deduction that an overloaded id-expression
doesn't give a valid type for deduction purposes to a non-static
member function unless the expression has the correct syntactic
form.

Teach ActOnIdExpression that it shouldn't try to create implicit
member expressions for '&function', because this isn't a
permitted form of use for member functions.

Teach CheckAddressOfOperand to diagnose these more carefully.
Some of these cases aren't reachable right now because earlier
diagnostics interrupt them.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
458433d2f0f5c96a9e0d21decdd44bebccf20b11 26-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement code completion for @selector expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ea318642072d3d94b5c3cff0fa6f4b33d2db0768 26-Aug-2010 John McCall <rjmccall@apple.com> Move things around so that Sema.h no longer depends on even DeclBase.h.
It still depends on Type because DeclarationName.h does.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d931b086984257de68868a64a235c2b4b34003fb 26-Aug-2010 John McCall <rjmccall@apple.com> De-memberify the VarDecl and FunctionDecl StorageClass enums.
This lets us remove Sema.h's dependency on Expr.h and Decl.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
9c3087b0b0bea2fd782205c1274ebfc4290265e0 26-Aug-2010 John McCall <rjmccall@apple.com> Restore r112114 now that SmallVector<...,0> is safe.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0ad106fec9dd188e20026c80d814f836e15780e3 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> Revert r112114, "Pull DelayedDiagnostic and AccessedEntity out into their own
header.", it is teh broken.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
679063472244a6cb6d4b52894ac020022690620d 26-Aug-2010 John McCall <rjmccall@apple.com> Pull DelayedDiagnostic and AccessedEntity out into their own header.
This works courtesy of the new SmallVector<..., 0> specialization that
doesn't require a complete type. Note that you'll need to pull at least
SmallVector.h from LLVM to compile successfully.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
c1a3e5e73859ece9f106ae9d84c78bef4111956a 25-Aug-2010 Douglas Gregor <dgregor@apple.com> Initialize the translation-unit scope before lexing the first
token. The first token might be something that ends up triggering code
completion, which in turn requires a valid Scope. Test case forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
55817afdf9d453a443262a733f6caf6692dca118 25-Aug-2010 Douglas Gregor <dgregor@apple.com> Introduce a preprocessor code-completion hook for contexts where we
expect "natural" language and should not provide any completions,
e.g., comments, string literals, #error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5baba9d98364a3525d6afa15a04cdad82fd6dd30 25-Aug-2010 John McCall <rjmccall@apple.com> More incremental progress towards not including Expr.h in Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
62c78d54bee499dd87f768f48b21c9b5ec15e516 25-Aug-2010 Chandler Carruth <chandlerc@gmail.com> Rename *PendingImplicitInstantiations to *PendingInstantiations. No
functionality changed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
781472fe99a120098c631b0cbe33c89f8cef5e70 25-Aug-2010 John McCall <rjmccall@apple.com> Split FunctionScopeInfo and BlockScopeInfo into their own header.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
384aff8b94bb0d1ad6c5667b90621e5699815bb2 25-Aug-2010 John McCall <rjmccall@apple.com> Remove Sema.h's dependency on DeclCXX.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
50df6ae41f232612e5e88b19e0db9900d08d2f6c 25-Aug-2010 John McCall <rjmccall@apple.com> Remove the DenseSet dependency from Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112030 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0a2c5e256abb4dc031c21fe4dc92c4f3afe9947c 25-Aug-2010 John McCall <rjmccall@apple.com> Teach Sema to live without CodeCompleteConsumer.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2a7fb27913999d132cf9e10e03dc5271faa2e9d3 25-Aug-2010 John McCall <rjmccall@apple.com> Move more stuff out of Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
30ecc0ac0e90fed2670cefc8b67f1b3f53f2701b 25-Aug-2010 John McCall <rjmccall@apple.com> Sort the forward declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112024 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f29c5233085a5af795c3c01b94d319e5b3235d56 25-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement code completion for preprocessor expressions and in macro
arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
120d63cd4465230c2cd56508c7cd8e0ad00848e7 24-Aug-2010 John McCall <rjmccall@apple.com> Move some of SemaOverload's API to various places in Overload.h, and kill
some of it off completely.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
1fbb447e9d43c2c676e94081fbfee7eb6cbe933b 24-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement preprocessor code completion where a macro name is expected,
e.g., after #ifdef/#ifndef or #undef, or inside a defined <macroname>
expression in a preprocessor conditional.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111954 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9 24-Aug-2010 Douglas Gregor <dgregor@apple.com> Introduce basic code-completion support for preprocessor directives,
e.g., after a "#" we'll suggest #if, #ifdef, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
aab0132698c7550d0095986fb1fb4887bf18c3e8 24-Aug-2010 John McCall <rjmccall@apple.com> Sema doesn't need these STL headers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
fbce0e1d582f10d890111d8d27f6e88055be6422 24-Aug-2010 John McCall <rjmccall@apple.com> It turns out that this template is only instantiated at one type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
5f1e0942a32657b625702aa52f82430d0120f424 24-Aug-2010 John McCall <rjmccall@apple.com> More header elimination. The goal of all this is to allow Parser to
#include Sema.h while keeping all the AST declarations opaque. That may
not be reasonably attainable, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
7a1fad38256eb4c5129359be85ba1ea1678eb5c9 24-Aug-2010 John McCall <rjmccall@apple.com> Remove a header dependency from Sema.h at the cost of some type safety.
If someone wants to fix this some other way....



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
60d7b3a319d84d688752be3870615ac0f111fb16 24-Aug-2010 John McCall <rjmccall@apple.com> OwningExprResult -> ExprResult. This patch brought to you by
M-x query-replace-regexp
\(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
d32b0225e29fcafb2b2b2a4b1c51dcb1518af9c6 24-Aug-2010 Douglas Gregor <dgregor@apple.com> Provide code completion results for the context-sensitive Objective-C
keywords "in", "out", "inout", "byref", "bycopy", and "oneway".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
d097be8f81fbf4ed96ac10bae18562dd8202666b 24-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Handling remaining rule for synthesize bitfields in
class extensions (nonfragile-abi2).For every class @interface and class
extension @interface, if the last ivar is a bitfield of any type,
then add an implicit `char :0` ivar to the end of that interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
fb6294123b9de1605adae69d85cb4fddf81a9bc5 23-Aug-2010 Douglas Gregor <dgregor@apple.com> Introduce a code-completion hook for the Objective-C collection
argument in a for-each statement (e.g., "for (id x in <blah>)"), which
restricts the expression completions provided to Objective-C types (or
class types in C++).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
2ccccb3ff40c64927817a7e1ddf1da8c188ed224 23-Aug-2010 Douglas Gregor <dgregor@apple.com> Introduce a new code-completion point when we're parsing a
declarator. Here, we can only see a few things (e.g., cvr-qualifiers,
nested name specifiers) and we do not want to provide other non-macro
completions. Previously, we would end up in recovery mode and would
provide a large number of non-relevant completions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
ca0408fb49c1370430672acf2d770b7151cf71de 23-Aug-2010 John McCall <rjmccall@apple.com> Sundry incremental steps towards killing off Action.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
2c18bb7c9fca66c30b6eabbdcbc6399d24a54fa9 20-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> objective-c ivar refactoring patch. Iterations
over ivars for a varienty of puposes is now
consolidated into two small routines; DeepCollectObjCIvars
and ShallowCollectObjCIvars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h
cf807c4dfdb23e8fa3f400e0b24ef5b79db7a530 19-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Generate Attr subclasses with TableGen.

Now all classes derived from Attr are generated from TableGen.
Additionally, Attr* is no longer its own linked list; SmallVectors or
Attr* are used. The accompanying LLVM commit contains the updates to
TableGen necessary for this.

Some other notes about newly-generated attribute classes:

- The constructor arguments are a SourceLocation and a Context&,
followed by the attributes arguments in the order that they were
defined in Attr.td

- Every argument in Attr.td has an appropriate accessor named getFoo,
and there are sometimes a few extra ones (such as to get the length
of a variadic argument).

Additionally, specific_attr_iterator has been introduced, which will
iterate over an AttrVec, but only over attributes of a certain type. It
can be accessed through either Decl::specific_attr_begin/end or
the global functions of the same name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
94c3b561a4f24c5c44a1e2ee6f28f530e6a041ba 18-Aug-2010 John McCall <rjmccall@apple.com> Rip out the existing retroactive abstract-class usage checker,
which in a fit of zeal wanted to walk the entire translation unit,
and replace it with a new checker that walks the types of declarations
nested within the class. Also, look into templates when doing this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
dd7744d01e513e941f47893b16dfebae2c1c9911 16-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Emit diagnostic error when the field of an anonymous struct is non trivial.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
8071e4212ae08f8014e0c3ae6d18b7388003a5cc 15-Aug-2010 Douglas Gregor <dgregor@apple.com> Extend the code-completion caching infrastructure to include global
declarations (in addition to macros). Each kind of declaration maps to
a certain set of completion contexts, and the ASTUnit completion logic
introduces the completion strings for those declarations if the actual
code-completion occurs in one of the contexts where it matters.

There are a few new code-completion-context kinds. Without these,
certain completions (e.g., after "using namespace") would need to
suppress all global completions, which would be unfortunate.

Note that we don't get the priorities right for global completions,
because we don't have enough type information. We'll need a way to
compare types in an ASTContext-agnostic way before this can be
implemented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
bbc6454bb98d6a6ecbaafa715222c5db834307f2 15-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Commit improved version of 111026 & 111027.

Unused warnings for functions:
-static functions
-functions in anonymous namespace
-class methods in anonymous namespace
-class method specializations in anonymous namespace
-function specializations in anonymous namespace

Unused warnings for variables:
-static variables
-variables in anonymous namespace
-static data members in anonymous namespace
-static data members specializations in anonymous namespace

Reveals lots of opportunities for dead code removal in llvm codebase that will
interest my esteemed colleagues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
87c08a5d6b9e1e44ae6f554df40139d3a6f60b33 14-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement caching of code-completion results for macro definitions
when the CXTranslationUnit_CacheCompletionResults option is given to
clang_parseTranslationUnit(). Essentially, we compute code-completion
results for macro definitions after we have parsed the file, then
store an ASTContext-agnostic version of those results (completion
string, cursor kind, priority, and active contexts) in the
ASTUnit. When performing code completion in that ASTUnit, we splice
the macro definition results into the results provided by the actual
code-completion (which has had macros turned off) before libclang gets
those results. We use completion context information to only splice in
those results that make sense for that context.

With a completion involving all of the macros from Cocoa.h and a few other
system libraries (totally ~8500 macro definitions) living in a
precompiled header, we get about a 9% performance improvement from
code completion, since we no longer have to deserialize all of the
macro definitions from the precompiled header.

Note that macro definitions are merely the canary; the cache is
designed to also support other top-level declarations, which should be
a bigger performance win. That optimization will be next.

Note also that there is no mechanism for determining when to throw
away the cache and recompute its contents.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
05eac86d547892847ca95b5350e28d681150fa68 13-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert 111026 & 111027, build breakage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
30c0dd86f0dc3c1a1fba29581d04e8ed0bdb659d 13-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> The unused warnings extravaganza continues. Warn for:

-static variables
-variables in anonymous namespace (fixes rdar://7794535)
-static data members in anonymous namespace
-static data members specializations in anonymous namespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
f6d1d43d68016e975f22264343631a55b9701495 13-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Expand the unused warnings for functions. Warn for:

-static function declarations
-functions in anonymous namespace
-class methods in anonymous namespace
-class method specializations in anonymous namespace
-function specializations in anonymous namespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
49b96d1a382ae9f31456166f1a734d3f7f30b992 13-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change Sema's UnusedStaticFuncs to UnusedFileScopedDecls to allow also keeping track of unused file scoped variables.

This is only preparation, currently only static function definitions are tracked, as before.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
40db2991d746a2901d6441cee261552a20a4a48a 13-Aug-2010 John McCall <rjmccall@apple.com> Make two methods have compatible signatures with the methods they override.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
46ea32a4b54481b7575499cb9f8d275f1d4cdd54 13-Aug-2010 Douglas Gregor <dgregor@apple.com> Add a ParseAST overload that takes a Sema object, so that the caller
can create (and hold on to) the Sema object. Also, move Sema-related
initialization/finalization with its various consumers and external
sources into the Sema constructor and destructor, rather than placing
it in ParseAST.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
b7f4ffe073fa419613946461a2583ba2fcb72280 12-Aug-2010 John McCall <rjmccall@apple.com> Implement -Wcast-align. The initial design of this diagnostic diverges
from GCC's in that we warn on *any* increase in alignment requirements, not
just those that are enforced by hardware. Please let us know if this causes
major problems for you (which it shouldn't, since it's an optional warning).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
d69fd7f34fd2de35845e834e987009efec09b937 12-Aug-2010 John McCall <rjmccall@apple.com> Fixing the build isn't good enough; back out r110956 and r110953.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
0eeb81baac6e82b065c0b03ad28ad1e580e78790 12-Aug-2010 Douglas Gregor <dgregor@apple.com> Add a ParseAST overload that takes a Sema object, so that the caller
can create (and hold on to) the Sema object. Also, move Sema-related
initialization/finalization with its various consumers and external
sources into the Sema constructor and destructor, rather than placing
it in ParseAST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Sema/Sema.h
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/include/clang/Sema/Sema.h