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

http://b/26987366

(cherry picked from commit 87d948ecccffea9e9e37d0d053b246e2d6d6c47b)

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

Change-Id: I0393bcc952590a7226af8c4b58534a8ee5fd2d99
/external/clang/lib/Parse/ParseDecl.cpp
58878f85ab89b13e9eea4af3ccf055e42c557bc8 06-May-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r235153

Change-Id: Ia94bbcb6da7c75b6e7c2afedd1001094d62a7324
/external/clang/lib/Parse/ParseDecl.cpp
3ea9e33ea25e0c2b12db56418ba3f994eb662c04 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r233350

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

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

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

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

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

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

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

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/Parse/ParseDecl.cpp
03e463e293f5ecf62cb8c807d00edb9fbb1f99d7 16-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196212:
------------------------------------------------------------------------
r196212 | alp | 2013-12-02 22:13:01 -0800 (Mon, 02 Dec 2013) | 22 lines

Emit an extension warning when changing system header tokens

clang converts keywords to identifiers for compatibility with various system
headers such as GNU libc.

Implement a -Wkeyword-compat extension warning to diagnose those cases. The
warning is on by default but will generally be ignored in system headers. It
can however be enabled globally to aid standards conformance testing.

This also changes the __uptr keyword avoidance from r195710 to no longer
special-case system headers, bringing it in line with other similar workarounds
in clang.

Implementation returns bool for symmetry with token annotation functions.

Some examples:

warning: keyword '__is_pod' will be treated as an identifier for the remainder of the translation unit [-Wkeyword-compat]
struct __is_pod

warning: keyword '__uptr' will be treated as an identifier here [-Wkeyword-compat]
union w *__uptr;
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@197359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
307c92ecb82e59a8fa82912906e1b168a157cb82 05-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196387:
------------------------------------------------------------------------
r196387 | aaronballman | 2013-12-04 07:32:26 -0800 (Wed, 04 Dec 2013) | 1 line

When parsing ignored attribute arguments, presuming the first argument is an unresolved identifier the same way that we do for unknown arguments. This resolves PR18075, where we regressed the handling of OpenBSD's bounded attribute.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
7f3ec66c405045ae67abf54f728845f36e91baa9 26-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195710:
------------------------------------------------------------------------
r195710 | alp | 2013-11-25 17:30:10 -0800 (Mon, 25 Nov 2013) | 10 lines

Unbreak -fms-extensions with GNU libc headers

GNU libc uses '__uptr' as a member name in C mode, conflicting with the
eponymous MSVC pointer modifier keyword.

Detect and mark the token as an identifier when these specific conditions are
met. __uptr will continue to work as a keyword for the remainder of the
translation unit.

Fixes PR17824.
------------------------------------------------------------------------


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

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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
8fe2475a4b4c00475709c13d43eb9a57cce87cbc 18-Nov-2013 Alexey Bataev <a.bataev@hotmail.com> Replaced bool parameters in SkipUntil function with single bit-based parameter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d1fa81ccbce1ba2d8f467e7c2800250b81ea2e35 13-Nov-2013 Serge Pavlov <sepavloff@gmail.com> Warn on duplicate function specifier

This patch fixes PR8264. Duplicate qualifiers already are diagnozed,
now the same diagnostics is issued for duplicate function specifiers.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
9feedb862e46f46d302f250ade1cac7108ba880b 04-Nov-2013 Aaron Ballman <aaron@aaronballman.com> Attributes which accept a type as their sole argument are no longer hard coded into the parser. Instead, they are automatically listed through tablegen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d386fef64f1fd00fc9a97efb963d8ec393fd1ace 31-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Factor out custom parsing for iboutletcollection and vec_type_hint attributes
into a separate "parse an attribute that takes a type argument" codepath. This
results in both codepaths being a lot cleaner and simpler, and fixes some bugs
where the type argument handling bled into the expression argument handling and
caused us to both accept invalid and reject valid attribute arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193731 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d92aa2d2880d1c30baff996cb4c4f0836dbc355e 24-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR17666: Instead of allowing an initial identifier argument in any attribute
which we don't think can't have one, only allow it in the tiny number of
attributes which opts into this weird parse rule.

I've manually checked that the handlers for all these attributes can in fact
cope with an identifier as the argument. This is still somewhat terrible; we
should move more fully towards picking the parsing rules based on the
attribute, and make the Parse -> Sema interface more type-safe.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
8d1ab8a083d5613b24bbfd68bf02cd2a295dab22 14-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Don't get confused by a virt-specifier after a trailing-return-type - it's not
an accidentally-included name for the declarator.


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

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

As an example of what compiles through this commit:

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

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

Please see attached tests for more examples.

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



Some implementation notes:

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

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

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

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

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

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

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

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

Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
c561714647f16b028f2c098ae810bd553138d17b 13-Sep-2013 Benjamin Kramer <benny.kra@googlemail.com> As Aaron pointed out it's simpler to reject wide string availability attr messages in the parser.

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

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

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

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

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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
9ec28913dcec67bf3f6b841f34d1401229ba4604 06-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> C++11 attributes after 'constructor-name (' unambiguously signal that we have a
constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
efb288c3c1e67cb94410fd43aa0352922bcb5d52 05-Sep-2013 Richard Trieu <rtrieu@google.com> For "expected unqualified-id" errors after a double colon, and the double colon
is at the end of the line, point to the location after the double colon instead
of at the next token. There is more context to be given this way. In addition,
the next token can be several lines later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
4c6c411b9efe99d1bd12d43758afa8efc13066b0 03-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> Update GCC attribute argument parsing comment to better reflect what's going on
here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
8edabd95dd4c9099fd124c5e50322730b9200d23 03-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> Factor out parsing and allocation of IdentifierLoc objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e720311db86d0060c24be9465b667a781a70dc2e 31-Aug-2013 Aaron Ballman <aaron@aaronballman.com> Possibly appeasing the build bots from r189711

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

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

This reverts commit 606f5d7a99b11957e057e4cd1f55f931f66a42c7.

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

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


As an example of what compiles:

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

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

Please see attached tests for more examples.

Some implementation notes:

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

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

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

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

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

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

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

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

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

Thanks!




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5a428206903750157e57a8006f1593435ec2f147 16-Aug-2013 Eli Friedman <eli.friedman@gmail.com> Fix for dependent contexts in alias templates.

When we are parsing a type for an alias template, we are not entering
the context, so we can't look into dependent classes. Make sure the
parser handles this correctly.

PR16904.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
2521813d45e0af47b27673a095329ee33932d49c 06-Aug-2013 Larisse Voufo <lvoufo@google.com> A bit of clean up based on peer's feedback...

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
a38253c3e7dbd2b5aadb0556845dc3848168b904 11-Jul-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR5066: If a declarator cannot have an identifier, and cannot possibly be
followed by an identifier, then diagnose an identifier as being a bogus part of
the declarator instead of tripping over it. Improves diagnostics for cases like

std::vector<const int *p> my_vec;


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
3e3d20b2b26a885fcae855bb0b02dbc42d7c5739 03-Jul-2013 Bill Schmidt <wschmidt@linux.vnet.ibm.com> "bool" should be a context-sensitive keyword in Altivec mode.

PR16456 reported that Clang implements a hybrid between AltiVec's
"Keyword and Predefine Method" and its "Context Sensitive Keyword
Method," where "bool" is always a keyword, but "vector" and "pixel"
are context-sensitive keywords. This isn't permitted by the AltiVec
spec. For consistency with gcc, this patch implements the Context
Sensitive Keyword Method for bool, and stops treating true and false
as keywords in Altivec mode.

The patch removes KEYALTIVEC as a trigger for defining these keywords
in include/clang/Basic/TokenKinds.def, and adds logic for "vector
bool" that mirrors the existing logic for "vector pixel." The test
case is taken from the bug report.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
7c64ef05e179d29646030e9d453081844ecc537a 21-Jun-2013 Larisse Voufo <lvoufo@google.com> Bug Fix: Template explicit instantiations should not have definitions (FixIts yet to be tested.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
9109bf10d50d3b5aa57205db1b8e38a31e3ae477 17-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> C++11: don't warn about the deprecated 'register' keyword if it's combined with
an asm label.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184069 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
6b759f4d3c8bce0fe1f416953ef790c68e7c30b2 14-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Suppress the c++11 -Wdeprecated warning for 'register' if it is expanded from a
macro defined in a system header. glibc uses it in macros, apparently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
79f4bb7aad1b7c53f8a3bc43d89de0efdef8286d 13-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add -Wdeprecated warnings and fixits for things deprecated in C++11:
- 'register' storage class
- dynamic exception specifications

Only the former check is enabled by default for now (the latter might be quite noisy).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
122e601886ae527d6e7100c589339c05190a168a 08-Jun-2013 Serge Pavlov <sepavloff@gmail.com> Recognition of empty structures and unions is moved to semantic stage

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
cafeb948e6067b8dc897c441da522367917b06f9 07-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR16243: Use CXXThisOverride during template instantiation, and fix up the
places which weren't setting it up properly. This allows us to get the right
cv-qualifiers for 'this' when it appears outside a method body in a class
template.


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

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

Patch reviewed by Richard Smith.


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

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
3ce0de611e7f754df9ba9f883333eef8399f7af7 04-May-2013 Aaron Ballman <aaron@aaronballman.com> Properly parsing __declspec(safebuffers), though there is no semantic hookup. For more information about safebuffers, see MSDN: http://msdn.microsoft.com/en-us/library/dd778695(v=vs.110).aspx

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
92eb7d847cb1273a63d5e3b7dc98a7c97a81b703 03-May-2013 Douglas Gregor <dgregor@apple.com> Use attribute argument information to determine when to parse attribute arguments as expressions.

This change partly addresses a heinous problem we have with the
parsing of attribute arguments that are a lone identifier. Previously,
we would end up parsing the 'align' attribute of this as an expression
"(Align)":

template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align((Align)))) char storage[Size];
};

while this would parse as a "parameter name" 'Align':

template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align(Align))) char storage[Size];
};

The code that handles the alignment attribute would completely ignore
the parameter name, so the while the first of these would do what's
expected, the second would silently be equivalent to

template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align)) char storage[Size];
};

i.e., use the maximal alignment rather than the specified alignment.

Address this by sniffing the "Args" provided in the TableGen
description of attributes. If the first argument is "obviously"
something that should be treated as an expression (rather than an
identifier to be matched later), parse it as an expression.

Fixes <rdar://problem/13700933>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
fa5f03052bc39d9c8f2fa8b4002597a8219760a4 03-May-2013 Douglas Gregor <dgregor@apple.com> Revert r180970; it's causing breakage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
3796d1539a39b999fd50bed7aea726ef6f845e17 03-May-2013 Douglas Gregor <dgregor@apple.com> Use attribute argument information to determine when to parse attribute arguments as expressions.

This change partly addresses a heinous problem we have with the
parsing of attribute arguments that are a lone identifier. Previously,
we would end up parsing the 'align' attribute of this as an expression
"(Align)":

template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align((Align)))) char storage[Size];
};

while this would parse as a "parameter name" 'Align':

template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align(Align))) char storage[Size];
};

The code that handles the alignment attribute would completely ignore
the parameter name, so the while the first of these would do what's
expected, the second would silently be equivalent to

template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align)) char storage[Size];
};

i.e., use the maximal alignment rather than the specified alignment.

Address this by sniffing the "Args" provided in the TableGen
description of attributes. If the first argument is "obviously"
something that should be treated as an expression (rather than an
identifier to be matched later), parse it as an expression.

Fixes <rdar://problem/13700933>.


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


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ed5a292592c61f1b0d2da60dddea2fc11fb3f157 23-Apr-2013 Richard Trieu <rtrieu@google.com> Warn that scoped enumerations are a C++11 extenstion when compiling in
C++98 mode. This improves on the previous diagnostic message of:

error: expected identifier or '{'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
840462670ba7a6bc26265a2306b35f2f0f01f51c 21-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> The 'constexpr implies const' rule for non-static member functions is gone in
C++1y, so stop adding the 'const' there. Provide a compatibility warning for
code relying on this in C++11, with a fix-it hint. Update our lazily-written
tests to add the const, except for those ones which were testing our
implementation of this rule.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
bd95745d0efb0d3c6e7cc2f946438a8b2c39c858 18-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [Parser] Handle #pragma pack/align inside C structs.

Fixes PR13580. Patch by Serge Pavlov!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
b004a8e5aa700108de2acc8f81b0dd2ec7518899 16-Apr-2013 Douglas Gregor <dgregor@apple.com> Fix PR4296: Add parser detection/error recovery for nested functions, from Serve Pavlov!


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

Patch by Tong Shen!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ec64244f5939fa81596fbeddad966cca4b4a4c51 13-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Parsing support for thread_local and _Thread_local. We give them the same
semantics as __thread for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
12849d0ed2e88f8c6420944538b9c9d1985df14a 08-Apr-2013 Douglas Gregor <dgregor@apple.com> <rdar://problem/13540921> Fix a crasher when an Objective-C for-in loop gets a non-variable iteration declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
74b9fa16e5d1e1a5f3adb065043db46ad20a4575 03-Apr-2013 Andy Gibbs <andyg1001@hotmail.co.uk> Enable use of _Static_assert inside structs and unions in C11 mode (as per C11 6.7.2.1p1).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f50f3f7cee281f4e59854b0f56a78abe02fcd25d 03-Apr-2013 Andy Gibbs <andyg1001@hotmail.co.uk> Assert that Parser::ParseStructUnionBody is not called for C++ code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
725fe0ede4c5355666a300f4fd7dae9454f35a37 01-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR15633: Note that we are EnteringContext when parsing the nested name
specifier for an enumeration. Also fix a crash-on-invalid if a non-dependent
name specifier is used to declare an enum template.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ab2d09b6287a5dc6fa94d78739444f46f9a78bfb 28-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [Parser] Don't code-complete twice.

When we are consuming the current token just to enter a new token stream, we push
the current token in the back of the stream so that we get it again.

Unfortunately this had the effect where if the current token is a code-completion one,
we would code-complete once during consuming it and another time after the stream ended.

Fix this by making sure that, in this case, ConsumeAnyToken() will consume a code-completion
token without invoking code-completion.

rdar://12842503

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178199 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d92277928eefcf958080707ed6e154f406a5d054 15-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR15290: 'this' is not permitted in the declaration of a friend function,
therefore references to members should not be transformed into implicit uses of
'this'. Patch by Ismail Pazarbasi!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
c2ac68e09f4adf0f9fcfe53c1fcc5e87d069806a 08-Mar-2013 Benjamin Kramer <benny.kra@googlemail.com> Remove unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
37453b9580e293eef3bd60bd36047a93ac4515b1 08-Mar-2013 Joey Gouly <joey.gouly@arm.com> Add support for the OpenCL attribute 'vec_type_hint'.

Patch by Murat Bolat!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
672edb0a04a5273e3a501f3b196844c125290780 22-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> Don't accidentally and silently accept C++11 attributes in decl-specifier-seqs
in C++98.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
68ea3aeff1be9412658f4c96fdab0d8ad875be6c 22-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> Per the grammar in [dcl.dcl]p1, a simple-declaration can only have attributes
if it has declarators. We were missing the check for this in a couple of places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175876 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
30f2a74f882adcadb8060d914684f65a401d87ba 20-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR15311: Finish implementation of the suggested resolution of core issue 1488,
which allows grouping parens in an abstract-pack-declarator. This was already
mostly implemented, but missed some cases. Add an ExtWarn for use of this
extension until CWG ratifies it.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
975d52c759a0da21461668bac840bb5d21061d1b 20-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> Don't repeat the function name in the comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
1b9e8f7e0bf2c6a2857f1b2208ca5f83b567b835 12-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> Accept over-qualified constructor in MSVC emulation mode

MSVC accepts this:

class A {
A::A();
};

Clang accepts regular member functions with extra qualification as an MS
extension, but not constructors. This changes the parser to defer rejecting
qualified constructors so that the same Sema logic can apply to constructors as
regular member functions. This also improves the error message when MS
extensions are disabled (in my opinion). Before it was:

/Users/jason/Desktop/test.cpp:2:8: error: expected member name or ';' after declaration specifiers
A::A();
~~~~ ^
1 error generated.

After:

/Users/jason/Desktop/test.cpp:2:6: error: extra qualification on member 'A'
A::A();
~~~^
1 error generated.

Patch by Jason Haslam.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
3f6f51e28231f65de9c2dd150a2d757b2162cfa3 08-Feb-2013 Jordan Rose <jordan_rose@apple.com> Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.

Nearly all of these changes are one-to-one replacements; the few that
aren't have to do with custom identifier validation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ed4330bc159b8311080d03caacac9a8cbf42370c 07-Feb-2013 DeLesley Hutchins <delesley@google.com> Thread safety analysis: make sure that expressions in attributes are parsed
in an unevaluated context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
21f18c4fda167dc5f72feddbd6a7ac1b63200a0d 07-Feb-2013 Guy Benyei <guy.benyei@intel.com> Add OpenCL samplers as Clang builtin types and check sampler related restrictions.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
4cd81c5bf5957b2b10ddf253035f6e1596082108 29-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Implement C++11 [dcl.align]p1 and C11 6.7.5/2 rules for alignas and _Alignas.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
33f04a208a1a6e73da73460142327ff05e8c391b 29-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Treat alignas and _Alignas as keyword attributes. This allows us to
pretty-print them properly (modulo the more general badness in alignment
attribute printing).


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
3a2b7a18a4504f39e3ded0d2b5749c5c80b8b9b5 28-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Finish semantic analysis for [[carries_dependency]] attribute.

This required plumbing through a new flag to determine whether a ParmVarDecl is
actually a parameter of a function declaration (as opposed to a function
typedef etc, where the attribute is prohibited). Weirdly, this attribute (just
like [[noreturn]]) cannot be applied to a function type, just to a function
declaration (and its parameters).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
db55c04cb3384b192a418a840a9ba6321941fc0d 26-Jan-2013 Richard Trieu <rtrieu@google.com> Give a more informative error message when the dot or arrow operator is used
on a type. Currently, it gives a generic "expected unqualified-id" error.
The new error message is "cannot use (dot|arrow) operator on a type".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e6b9d802fb7b16d93474c4f1c179ab36202e8a8b 20-Jan-2013 Guy Benyei <guy.benyei@intel.com> Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
de03c15ad92b44a4be11507ca2501bb9dd014dce 17-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Parsing support for C11's _Noreturn keyword. No semantics yet.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
7b19cb116d0909de72dc8242b0a4e6c5ed39d421 14-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> *this is const in a trailing-return-type for a constexpr member function.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ebf0fa87f28937543f38cd175c2e12afafa57247 11-Jan-2013 Nikola Smiljanic <popizdeh@gmail.com> Pass false instead of 0 since isStar parameter of getArray has type bool. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
6a502c4430088fe3bac7b5886cd9425f7e306b63 08-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR14855: don't silently swallow a nested-name-specifier after a type name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
4e24f0f711e2c9fde79f19fa1c80deaab3f3b356 02-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> s/CXX0X/CXX11/g, except for __GNU_EXPERIMENTAL_CXX0X__, and update a few nearby 'C++0x' comments.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
22aa6901b8134c51771245255b32cd7d026e7913 21-Dec-2012 Chad Rosier <mcrosier@apple.com> Remove unused arguments and rename to conform to coding standards.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ccbb4027d9fec8247b7af08f9134515da8e470a4 21-Dec-2012 Chad Rosier <mcrosier@apple.com> Indent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
9cab1c9281e7477f66b8217077baef41c1df5558 21-Dec-2012 Chad Rosier <mcrosier@apple.com> Remove unnecessary checks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
16f90bfe53ed637156c315cbbeddcf2d91266d67 20-Dec-2012 Chad Rosier <mcrosier@apple.com> Use the MaybeParseMicrosoftAttributes function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
b13621d08e20ac7aa550e05896de8a57ee99c1e8 18-Dec-2012 Guy Benyei <guy.benyei@intel.com> Re-commit r170428 changes with Linux style file endings.

Add OpenCL images as clang builtin types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
7f92f2d8d9b7a07900c030183bc13a9ff60057cc 18-Dec-2012 Guy Benyei <guy.benyei@intel.com> Revert changes from r170428, as I accidentally changed the line endings of these files to Windows style.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
736104a7619c53ef92553780273d7357a3cdde81 18-Dec-2012 Guy Benyei <guy.benyei@intel.com> Add OpenCL images as clang builtin types.

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
9852f58f50b4fc20914fbce5b4454135a42343f4 01-Dec-2012 Benjamin Kramer <benny.kra@googlemail.com> Don't include Type.h in DeclarationName.h.

Recursively prune some includes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
2e39713a3d72c243a2bcd13cc8f5036ba6b487d9 26-Nov-2012 Michael Han <Michael.Han@autodesk.com> Improve diagnostic on C++11 attribute specifiers that appear at wrong syntactic locations around class specifiers.

This change list implemented logic that explicitly detects several combinations of locations where C++11 attribute
specifiers might be incorrectly placed within a class specifier. Previously we emit generic diagnostics like
"expected identifier" for such cases; now we emit specific diagnostic against the misplaced attributes, this also
fixed a bug in old code where attributes appear at legitimate locations were incorrectly rejected.

Thanks to Richard Smith for reviewing!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168626 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
97f8461a2c553f68a258612d2322e4281c3f0915 17-Nov-2012 Andy Gibbs <andyg1001@hotmail.co.uk> Made the "expected string literal" diagnostic more expressive

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
f64231e9f47234826fbcdc3b4fe0370ef6c9961d 06-Nov-2012 Michael Han <Michael.Han@autodesk.com> Teach Clang parser to reject C++11 attributes that appertain to declaration specifiers.

We don't support any C++11 attributes that appertain to declaration specifiers so reject
the attributes in parser until we support them; this also conforms to what g++ 4.8 is doing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
161db02a747e0c8e717f542674c0581c03fc3c93 02-Nov-2012 DeLesley Hutchins <delesley@google.com> Thread safety analysis: Fixed ICE caused by double delete when late parsed
attributes are attached to function declarations nested inside a class method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
cef3a7bf84817c58c7666df9e87199b9a6b8b9a3 02-Nov-2012 Eli Friedman <eli.friedman@gmail.com> Change diagnostics for enums with fixed underlying type so in C++98 mode, we cite C++11.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
53aec2a2770afc242c70fd88975cd0ea389087c0 25-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> 'constexpr' and 'friend' are both declaration specifiers. Teach the parser this, for better error recovery.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d654f2d722d4cb6366edcb8f27e99745fcbae486 18-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> DR1528: C++11 doesn't allow repeated cv-qualifiers in declarators after all.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166152 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ac8ea058febf6041871386d135ac2b955ab5d83a 15-Oct-2012 Abramo Bagnara <abramo.bagnara@bugseng.com> Fixed FunctionTypeLoc range for trailing return type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
3ea19c8307932655092235b57f04a5e6658bbc46 11-Oct-2012 David Blaikie <dblaikie@gmail.com> Fix a crash-on-invalid when parsing a reference to an invalid auto declaration

auto x((unknown));
int& y = x;

would crash because we were not flagging 'x' as an invalid declaration here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
59c0a818a79be850f7ae8fdafd57a1710e5b809a 04-Oct-2012 Abramo Bagnara <abramo.bagnara@bugseng.com> Fixed FunctionTypeLoc source range.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
45bed131a1a4219cc0bfb3c9f666dca54ddb59fa 04-Oct-2012 Michael Han <Michael.Han@autodesk.com> Fix scope location when parsing GNU attributes.

For GNU attributes, instead of reusing attribute source
location for the scope location, use SourceLocation() since
GNU attributes don not have scope tokens.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
6880f492365cc4fa4c941aa83688635003ee7498 03-Oct-2012 Michael Han <Michael.Han@autodesk.com> Improve C++11 attribute parsing.

- General C++11 attributes were previously parsed and ignored. Now they are parsed and stored in AST.
- Add support to parse arguments of attributes that in 'gnu' namespace.
- Differentiate unknown attributes and known attributes that can't be applied to statements when emitting diagnostic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
b3cd3c0c8a234803dcb9b9c0dfe10106674141cd 14-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix some dead stores which the static analyzer warned about. No functionality
change (the problematic cases in ParseDecl.cpp are currently impossible).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
6666ed4ed2e2bc13da5ac5d0a4947019137d45be 31-Aug-2012 Joao Matos <ripzonetriton@gmail.com> Improved MSVC __interface support by adding first class support for it, instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5354e77e60e82828c7c2361f5c688c2667ab59cc 24-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Now that ASTMultiPtr is nothing more than a array reference, make it a MutableArrayRef.

This required changing all get() calls to data() and using the simpler constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
377da4c6b78c0130fb6141313636c8fda7b60b72 21-Aug-2012 David Blaikie <dblaikie@gmail.com> Use LLVM_BUILTIN_TRAP instead of lame volatile int traps.

(from a todo mentioned in r159469 & originally suggested by Chandler Carruth)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162302 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d30fb9e2462d3cfe04d4f32cb40bf1edd9e3b383 20-Aug-2012 DeLesley Hutchins <delesley@google.com> Thread-safety analysis: fix scoping issues related to 'this', including an
ICE in friend functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
95526a480f252514d63a00bb032a2cb205dbf021 16-Aug-2012 DeLesley Hutchins <delesley@google.com> Thread safety analysis: prevent a compiler error in cases where a
late-parsed attribute is attached to an invalid declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
be1d4ecb6885872f9d4e02d3afafdc9532eeb350 10-Aug-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C++: Delayed parsing of most common
member functions defined inside an objc class
implementation. wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
dcdff46dd8e6d749283fe6c43adfcfe780c1d562 09-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Minor simplification for r161534.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
817a8866b900458d88d13d8ba10829eaef493040 09-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Fix r161534 so it actually builds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161539 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f66a0dda541cd859a928193efba6dc5d7ba8fe54 09-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Handle deprecation diagnostics correctly for C struct fields and Objective-C properties/ivars. <rdar://problem/6642337>.



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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ec98f2fe45acd9a475752a27fb33fbe96c1fcb44 27-Jul-2012 Peter Collingbourne <peter@pcc.me.uk> Fix an assertion failure when code completing an auto variable's initialiser.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
42926a065572a63610f651bb1589fe1217e2e0a7 24-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> Pedantic -pedantic correction. Duplicate cv-qualifiers are permitted in C++11
unless they appear in a decl-specifier-seq.


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
eab9d6f9065b042d39fbaf9842c9d8cc968dd6d0 23-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> Add diagnostics for comma at end of enum and for extra semicolon at namespace
scope to -Wc++11-extensions. Move extra semicolon after member function
definition diagnostic out of -pedantic, since C++ allows a single semicolon
there. Keep it in -Wextra-semi, though, since it's still questionable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
090d1bd613380a4155c5a79cbd1d5fb4a7368ac6 20-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> Fixes an ObjC++ parse crash caused by delayed parsing
of c-functions nested in namespace in method implementations
by turning off its delayed parsing until a proper solution is
figured out. pr13418


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160552 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
94f29f4bf5d6b49dd1b7fc16cfa1521adc0c71c0 09-Jul-2012 Jordan Rose <jordan_rose@apple.com> Better parser recovery in Objective-C containers.

Previously it was possible to get an infinite-loop-on-invalid with a namespace
decl within @interface. Since 'namespace' is normally a safe place to retry
top-level parsing, we just didn't consume the token.

This adds a flag that tracks whether we have temporarily left Objective-C
scope to parse a C-like declaration, and uses that to better recover from
parse problems by stopping at possible method declarations and at @end. To
fix the original problem, we do /not/ stop at 'namespace' when in an
Objective-C @interface or @protocol context (but still do in @implementation).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
39700f81c5b42e6be93be10275602915f872fc86 05-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c++ parsing. Turn off delayed parsing
of out-of-line c++ method definition which happens
to be inside an objc class implementation
until I can figure out how to do it. This is to fix
a broken project.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
b0ed95c27318730e265d84227a234e83e5e5523b 04-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> Obj-C++11 parser: handle a fall out of delayed
c-function parsing when a declaration with
C++0x braced-init-list is inside an @implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
3b5f9dc024232fe3bde347f6b52155ff7f55a232 04-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> Obj-C++11 parser: fix broken parsing of c-function
defined in class implementations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
cda104171088d721f627420962fc940d69c313b4 04-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> Obj-C++11 parser: turn off buffering of
c-function defined in objc class
implementation for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
139be7007eba3bd491ca50297888be507753a95d 02-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> A ':' after an enum-specifier at class scope is a bitfield, not a typo for a ';'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f70a88612a4bc2de2872a518267b9b4891ab6431 30-Jun-2012 Jordan Rose <jordan_rose@apple.com> Add support for the C11 _Alignof keyword.

This behaves like the existing GNU __alignof and C++11 alignof keywords;
most of the patch is simply adding the third token spelling to various places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e75d9cfbf41a0ee9e456a665776f91fdd9773b36 30-Jun-2012 David Blaikie <dblaikie@gmail.com> Use -frewrite-includes for crash reports.

In future changes we should:
* use __builtin_trap rather than derefing 'random' volatile pointers.
* avoid dumping temporary files into /tmp when running tests, instead
preferring a location that is properly cleaned up by lit.

Review by Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
8decdee5fd87190b52e65cef500c81547ae6485b 27-Jun-2012 Chad Rosier <mcrosier@apple.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
c9f351700721150a985f21844fbfec55b04e861d 25-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> Extend the "expected ';' after struct" logic to also apply to enums, and to
struct and enum forward-declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
1e12b3d777b36b80527da566192f8aeefad8f9d4 24-Jun-2012 John McCall <rjmccall@apple.com> Recognize GNU attributes after 'enum class'. Fixes the libc++ build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
2edf0a2520313cde900799b1eb9bd11c9c776afe 23-Jun-2012 Sean Hunt <scshunt@csclub.uwaterloo.ca> Clean up a large number of C++11 attribute parse issues, including parsing
attributes in more places where we didn't and catching a lot more issues.

This implements nearly every aspect of C++11 attribute parsing, except for:
- Attributes are permitted on explicit instantiations inside the declarator
(but not preceding the decl-spec)
- Attributes are permitted on friend declarations of functions.
- Multiple instances of the same attribute in an attribute-list (e.g.
[[noreturn, noreturn]], not [[noreturn]] [[noreturn]] which is conforming)
are allowed.
The first two are marked as expected-FIXME in the test file and the latter
is probably a defect and is currently untested.

Thanks to Richard Smith for providing the lion's share of the testcases.

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

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

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

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

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

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

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
adc6cbf5b502f1b58078455ab4fca66c7daac239 18-Jun-2012 Michael J. Spencer <bigcheesegs@gmail.com> [MSExtensions] Add support for __forceinline.

__forceinline is a combination of the inline keyword and __attribute__((always_inline))

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


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

Patch by João Matos!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
268efba18e171d47e847ccdf313498905c32acfa 17-May-2012 Benjamin Kramer <benny.kra@googlemail.com> CXXThisScopeRAII objects aren't free, don't compute one if it's unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5641b0d02563840c51c33b93dc663c55306093f3 17-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang/AST] When declaring a local class, don't neglect to set the end location
of the DeclStmt node, otherwise libclang will not work for anything inside that
class.

rdar://10837710

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
4b0e6f1da341510c1ad83eaf4c836f3134d0156a 16-May-2012 Richard Trieu <rtrieu@google.com> Move the warnings for extra semi-colons under -Wextra-semi. Also, added
a warning for an extra semi-colon after function definitions. Added logic
so that a block of semi-colons on a line will only get one warning instead
of a warning for each semi-colon.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
7514db27036372f209e5e14d3ed021f7cbc23f51 15-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> Typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
8f0a7e7845f619575f8af0b0bf46d027b20a0b63 15-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> If we see a declaration which is either missing a type or has a malformed type,
and the thing we have has a scope specifier, and we're in a context that doesn't
allow declaring a qualified name, then the error is a malformed type, not a
missing type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
827adaff666e53ae2f2db994bcd62ebe1ff5b9ce 15-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> Don't use the implicit int rule for error recovery in C++. Instead, try to
disambiguate whether the type name was forgotten or mistyped.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
a971d2410fabb093954c4119d2287ac24208ea8d 09-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> Push the knowledge that we are parsing a type-id/type-name further into the
parser, and use it to emit better diagnostics in cases where an identifer
can't be looked up as a type name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f63eee78a3ed50a974d0963623a06888ecd4ef6b 09-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> Stop AltiVec parsing from going down the 'implicit int' codepath as part of its
normal parse for token sequences like 'vector pixel foo'. This incidentally also
fixes a couple of wrong-parse issues.


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

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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
6deb820a1d2f98e8eda7df1da057cecce8655289 02-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> Disable our non-standard delayed parsing of exception specifications. Delaying
the parsing of such things appears to be a conforming extension, but it breaks
libstdc++4.7's std::pair.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155975 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
8bb21d32e9ccc9d9c221506dff26acafa8724cca 28-Apr-2012 Chris Lattner <sabre@nondot.org> switch some uses of ExpectAndConsume(tok::semi to use ExpectAndConsumeSemi. This allows
us to improve this diagnostic (telling us to insert another ")":

t.c:2:19: error: expected ';' at end of declaration
int x = 4+(5-12));
^
;
to:
t.c:2:19: error: extraneous ')' before ';'
int x = 4+(5-12));
^

...telling us to remove the ")". This is PR12595. There are more uses of ExpectAndConsumeSemi
that could be switched over, but I don't hit them on a daily basis :)





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155759 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
392b3f5798a62fe038082df0a5e2244b08b917d8 27-Apr-2012 Kaelyn Uhrain <rikka@google.com> Imrpove the note text for when a non-type decl hides a tag type

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
aec2ac67e7190bdb88abb1d427b82ae3284ea756 27-Apr-2012 Kaelyn Uhrain <rikka@google.com> Add note to help explain why a tag such as 'struct' is needed to refer
to a given type, when the reason is that there is a non-type decl with
the same name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
2b2a0876c9d3a92c5216a578373817974fe159a0 24-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Don't try to delay parsing the exception specification for a data member of a
class; we would never actually parse it and attach it to the type.


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


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

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

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

Fixes PR10036 and PR12450.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d306cf7b21c7924fdf5655265f4b22ff85db4fae 14-Apr-2012 Benjamin Kramer <benny.kra@googlemail.com> Delete late parsed attributes instead of leaking them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
994d73f8473cb2cd3ce2f69c9575c95015be788a 11-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Part of PR10101: after a parse error in a declaration, try harder to find the
right place to pick up parsing. In C++, this had a tendency to skip everything
declared within headers if the TU starts with garbage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
6ce48a70ace62eb0eaf7b2769d05c5f13b7c7b6c 11-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Support C++11 attributes at the start of a parameter-declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
2c6dbd7f5586c3acb0024552967268517b753145 10-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Fix GCC's pedantic return-type warning -- this enum is fully covered.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
c56298d87a9df507805a548d7d515e8b511df2c0 10-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Parsing of C++11 attributes:
* Alternative tokens (such as 'compl') are treated as identifiers in
attribute names.
* An attribute-list can start with a comma.
* An ellipsis may not be used with either of our currently-supported
C++11 attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
6ee326af4e77e6f05973486097884d7431f2108d 10-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Disambiguation of '[[':
* In C++11, '[[' is ill-formed unless it starts an attribute-specifier. Reject
array sizes and array indexes which begin with a lambda-expression. Recover by
parsing the lambda as a lambda.
* In Objective-C++11, either '[' could be the start of a message-send.
Fully disambiguate this case: it turns out that the grammars of message-sends,
lambdas and attributes do not actually overlap. Accept any occurrence of '[['
where either '[' starts a message send, but reject a lambda in an array index
just like in C++11 mode.

Implement a couple of changes to the attribute wording which occurred after our
attributes implementation landed:
* In a function-declaration, the attributes go after the exception specification,
not after the right paren.
* A reference type can have attributes applied.
* An 'identifier' in an attribute can also be a keyword. Support for alternative
tokens (iso646 keywords) in attributes to follow.

And some bug fixes:
* Parse attributes after declarator-ids, even if they are not simple identifiers.
* Do not accept attributes after a parenthesized declarator.
* Accept attributes after an array size in a new-type-id.
* Partially disamiguate 'delete' followed by a lambda. More work is required
here for the case where the lambda-introducer is '[]'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
5a5a971908a1fd064454db44c42333a3aecf3d5b 04-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> For PR11916: Add support for g++'s __int128 keyword. Unlike __int128_t, this is
a type specifier and can be combined with unsigned. This allows libstdc++4.7 to
be used with clang in c++98 mode.

Several other changes are still required for libstdc++4.7 to work with clang in
c++11 mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
9988f28fe7a6c19239a7426fea1ab23f9a8aac9c 29-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Reject 'template<typename...Ts> void f(Ts ...(x));'. Add a special-case
diagnostic and a fix-it to explain to the user where the ellipsis is
supposed to go.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
2259286fc5c1514089b17ec93e26ca56ba8ac2b6 28-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> If we see '(...' where we're expecting an abstract-declarator, that doesn't
necessarily mean we've found a function declarator. If the next token is not
a ')', this is actually a parenthesized pack expansion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5d8388ce6e62031d33dc6698fd1586bd3fa3955e 27-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Add cross-referencing comments to ParseDirectDeclarator to note that
isConstructorDeclaration also needs updating for any extension to the
grammar of a direct-declarator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
412e0cc52ea644d804dcfa87194800371f91a977 27-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> When we see 'Class(X' or 'Class::Class(X' and we suspect that it names a
constructor, but X is not a known typename, check whether the tokens could
possibly match the syntax of a declarator before concluding that it isn't
a constructor. If it's definitely ill-formed, assume it is a constructor.

Empirical evidence suggests that this pattern is much more often a
constructor with a typoed (or not-yet-declared) type name than any of the
other possibilities, so the extra cost of the check is not expected to be
problematic.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
3e280b58db5e7dc2bab736fa65af2b8157916726 18-Mar-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Add the missing compatibility warning for braced initializers as default arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
6d96d3ad1d95a58d81cc8b573d9bce444bbf8021 15-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Small cleanup: move trailing-return-type special-casing into
getDeclSpecContextFromDeclaratorContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
84407ba82a10235962901ce269b7b3276d17f01d 14-Mar-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Parse brace initializers as default arguments. PR12236.

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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
69730c115c2d0fec2f20609d905d920a5a41b29b 12-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix parsing of type-specifier-seq's. Types are syntactically allowed to be
defined here, but not semantically, so

new struct S {};

is always ill-formed, even if there is a struct S in scope.

We also had a couple of bugs in ParseOptionalTypeSpecifier caused by it being
under-loved (due to it only being used in a few places) so merge it into
ParseDeclarationSpecifiers with a new DeclSpecContext. To avoid regressing, this
required improving ParseDeclarationSpecifiers' diagnostics in some cases. This
also required teaching ParseSpecifierQualifierList about constexpr... which
incidentally fixes an issue where we'd allow the constexpr specifier in other
bad places.


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

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

Reviewed by Chris Lattner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
93a7067302d670ad771ba02ea3ff757dae43c853 11-Mar-2012 Douglas Gregor <dgregor@apple.com> Document the availability attribute

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
d78ef5b941ce2937228b010e8443f92025f9d683 08-Mar-2012 Douglas Gregor <dgregor@apple.com> Streamline BalancedDelimiterTracker, by eliminating the duplicate
paren/brace/bracket tracking (the Consume* functions already did it),
removing the use of ConsumeAnyToken(), and moving the hot paths inline
with the error paths out-of-line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e53ac8aea2d9e8bbb11191398ea3cc2edb2d171a 07-Mar-2012 Michael Han <Michael.Han@autodesk.com> Refactor Clang sema attribute handling.

This submission improves Clang sema handling by using Clang tablegen
to generate common boilerplate code. As a start, it implements AttributeList
enumerator generation and case statements for AttributeList::getKind.

A new field "SemaHandler" is introduced in Attr.td and by default set to 1
as most of attributes in Attr.td have semantic checking in Sema. For a small
number of attributes that don't appear in Sema, the value is set to 0.

Also there are a small number of attributes that only appear in Sema but not
in Attr.td. Currently these attributes are still hardcoded in Sema AttributeList.

Reviewed by Delesley Hutchins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
7ec419aa8f4ff83bc8ff707b45b9bec47fef3a1a 02-Mar-2012 DeLesley Hutchins <delesley@google.com> Issue warning when late-parsed attributes have no declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
2287c5e2352fc51cd74e8a9a7725cbf87e41c007 02-Mar-2012 DeLesley Hutchins <delesley@google.com> Make late-parsed attributes follow the conventions of ordinary
GNU attributes to a better extent, by allowing them in more
places on a declator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
6454a02e7bbda180ef3867b6ae3c1aee327a34a7 01-Mar-2012 Aaron Ballman <aaron@aaronballman.com> Added support for parsing declspecs on enumerations. Fixes PR8783

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

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

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

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

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

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

This fixes code such as:

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

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

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

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




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

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

This fixes code such as:

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

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

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

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

This fixes code such as:

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

This finally fixes PR5464 and PR5477.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d81e961f905e3ea57f6808e5a5686a8324270984 23-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Update parser's disambiguation to cope with braced function-style casts in
C++11, and with braced-init-list initializers in conditions. This exposed an
ambiguity with enum underlying types versus bitfields, which we resolve by
treating 'enum E : T {' as always defining an enumeration (even if it would
only successfully parse as a bitfield). This appears to be g++ compatible.


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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
c24a2335677f3d1bd2cab1019ac445d650f52123 16-Feb-2012 DeLesley Hutchins <delesley@google.com> Allow thread safety attributes on function definitions.
For compatibility with gcc, clang will now parse gcc attributes on
function definitions, but issue a warning if the attribute is not a
thread safety attribute. Warning controlled by -Wgcc-compat.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
ecfcd5655758955d8958dc2a7a7b2c8eff2395b7 12-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Drive-by fix of incorrect diagnostic, and a test case for said diagnostic. The double error is unfortunate, but I really don't see an alternative whose effort is worth it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
849639d8b548519cc5a00c0c9253f0c0d525060d 07-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make parsing of objc @implementations more robust.

Parsing of @implementations was based on modifying global state from
the parser; the logic for late parsing of methods was spread in multiple places
making it difficult to have a robust error recovery.

-it was difficult to ensure that we don't neglect parsing the lexed methods.
-it was difficult to setup the original objc container context for parsing the lexed methods
after completing ParseObjCAtImplementationDeclaration and returning to top level context.

Enhance parsing of @implementations by centralizing it in Parser::ParseObjCAtImplementationDeclaration().
ParseObjCAtImplementationDeclaration now returns only after an @implementation is fully parsed;
all the data and logic for late parsing of methods is now in one place.

This allows us to provide code-completion for late parsed methods with mis-matched braces.
rdar://10775381

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f7ccbad5d9949e7ddd1cbef43d482553b811e026 05-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> Basic: import SmallString<> into clang namespace

(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
8fe83e1df954d72c0f4ffc15d20a5222ec151c21 04-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Move a method from IdentifierTable.h out of line and remove the SmallString include.

Fix all the transitive include users.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
6895a644ca9df03af14ad06deaa950a09dd352d2 27-Jan-2012 John McCall <rjmccall@apple.com> Be sure to emit delayed diagnostics after parsing the declaration
of a for-range variable. Fixes PR11793.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f96708d477e1a41a7c1c8087bcf1869045cf4f1c 24-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> fixes location of "availability" attribute so warning is displayed at
its line. // rdar://10711037


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
fcaf27e185695bdf755e202aeba9632e0a8ef3c6 19-Jan-2012 Richard Trieu <rtrieu@google.com> Extend the error of invalid token after declarations to include fixits for
!=, %=, ^=, &=, *=, -=, |=, /=, <<=, <=, >=, and >>= to =.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148499 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d6c7c67313634b317a0d63c32be0511a121bb33d 18-Jan-2012 Richard Trieu <rtrieu@google.com> Change the error when a '+=' follows a declaration to suggest a fixit to '=' instead of just suggesting a ';'.

Old error:
plusequaldeclare1.cc:3:8: error: expected ';' at end of declaration
int x += 6;
^
;

New error:
plusequaldeclare1.cc:3:9: error: invalid '+=' at end of declaration; did you
mean '='?
int x += 6;
^~
=



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
9baf39df74caa56696b293e763fdd7ef002e51ca 13-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> objc parsing. Fixes a crash when parsing array initialization
inside a class implementation with parse errors. // rdar://10633434


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
1c94c16317c1a35c1549e022958188eea2567089 09-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> Extend the diagnostic for a ',' at the end of a declaration where a ';' was
intended to cover C++ class definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
1d7bcf4b35f8bc0a0a40f4ea7b06b55c63725108 06-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> Tweak to r147599 for PR10828: Move the check from the parser into sema, and use
the Semantic Powers to only warn on class types (or dependent types), where the
constructor or destructor could do something interesting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
cb7709c06027448c754dd03e2e521d82d04818bf 05-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR10828: Produce a warning when a no-arguments function is declared in block
scope, when no other indication is provided that the user intended to declare a
function rather than a variable.

Remove some false positives from the existing 'parentheses disambiguated as a
function' warning by suppressing it when the declaration is marked as 'typedef'
or 'extern'.

Add a new warning group -Wvexing-parse containing both of these warnings.

The new warning is enabled by default; despite a number of false positives (and
one bug) in clang's test-suite, I have only found genuine bugs with it when
running it over a significant quantity of real C++ code.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ffbe9b9c64ab2e94b9d48ec56e511f75826fc80a 23-Dec-2011 Benjamin Kramer <benny.kra@googlemail.com> Mass rename C1x references to C11. The name hasn't proliferated like "C++0x" so this patch is surprisingly small.

Also drop -Wc1x-extensions in favor of -Wc11-extensions. I don't think we need to keep this around for compatibility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
4805f158203017bdf575003235473284134c1071 14-Dec-2011 DeLesley Hutchins <delesley@google.com> Allow empty argument lists in thread safety attributes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
006e42f0c8b65b783d565ef10b938a9e82fc02e3 10-Dec-2011 Fariborz Jahanian <fjahanian@apple.com> Add ability to supply additional message to availability macros,
// rdar://10095131


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5a477dbf7589f516effe56fa2ed7d4680b5c1094 09-Dec-2011 Fariborz Jahanian <fjahanian@apple.com> deprecated enum should not warn when used initializing another deprecated enumerator.
// rdar://10535640


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
58196dc06ee27cd4150ef483123e1e3b2c772821 01-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> Revert most of r145372 for now. Lookahead beyond the ';' in a function
declaration tickles a bug in the way we handle visibility pragmas.

The improvement to error recovery for template function definitions declared
with the 'typedef' specifier in r145372 is unrelated and not reverted here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
874d253668f9ed183ca409cdff9d424925ee7800 29-Nov-2011 Richard Smith <richard-llvm@metafoo.co.uk> PR10101: Recover better from a common copy-paste error: if a function
declaration at namespace scope is followed by a semicolon and an open-brace
(or in C++, a 'try', ':' or '='), then the error is probably a function
definition with a spurious ';', rather than a mysterious '{'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
efaa93aaa2653f4eb40e6a22e504a448da94aaf8 07-Nov-2011 Douglas Gregor <dgregor@apple.com> Tighten up the conditions under which we consider ourselves to be
entering the context of a nested-name-specifier. Fixes
<rdar://problem/10397846>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
fe9b2a84105b898b48a2935d50d209c880f36aa3 24-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Simplify parsing ellipsis in Parser::ParseAlignArgument, spotted by Doug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
0b64ba926752110cff1344a46b36e29396cc4d25 23-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Fix grammar for C++11 alignment specifiers, and add a few FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
0706df40064d4d7559b4304af79d519033414b84 19-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Improve the diagnostic when a comma ends up at the end of a declarator group
instead of a semicolon (as sometimes happens during refactorings). When such a
comma is seen at the end of a line, and is followed by something which can't
possibly be a declarator (or even something which might be a plausible typo for
a declarator), suggest that a semicolon was intended.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
b224343723f514123dc7181ba9543ac361b35416 19-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> objc: allow class name qualified with protocols in
iboutletcollection attribute. But ignore protocol
list. // rdar://10296078


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
7a81e41a5e92dad2dd2a4edf27960c5d7f9c8063 18-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> objc: diagnose invalid argument to an
iboutletcollection attribute intead of crashing.
// rdar://10296078


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
fe0a0fb65f18a8495d97a700ca62fe639ffd85e9 17-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Refactor __attribute__ parsing, and add a diagnostic if the r_paren at the end
of an attrib is missing. gcc does not allow the closing parenthesis to be omitted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
7fe6208c3fa91f835813bb78236ef5c2bbf81053 15-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement -Wc++98-compat warnings for the parser.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
aa4a99b4a62615db243f7a5c433169f2fc704420 15-Oct-2011 Anton Korobeynikov <asl@math.spbu.ru> Provide half floating point support as a storage only type.
Lack of half FP was a regression compared to llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
4a8dfb511e8f84b2e38b7a86d8ddf05ac1e1a41b 12-Oct-2011 Douglas Gregor <dgregor@apple.com> Introduce BalancedDelimiterTracker, to better track open/close
delimiter pairs and detect when we exceed the implementation limit for
nesting depth, from Aaron Ballman!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
b001de7458d17c17e6d8b8034c7cfcefd3b70c00 07-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Support for C1x _Atomic specifier (see testcase). This is primarily being committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic.

Thanks to Jeffrey Yasskin for the thorough review!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
b8b0e75aeec85a7a268fdba311de4f1cd527fae1 06-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> OpenCL: add a non-standard extension, cl_clang_storage_class_specifiers,
which enables support for C99 storage-class specifiers.

This extension is intended to be used by implementations to implement
OpenCL C built-in functions.

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
82d0b0aab9088e977c2a44c4a5a90479c63149fe 29-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for alignment-specifiers in C1X and C++11, remove
support for the C++0x draft [[align]] attribute and add the C1X
standard header file stdalign.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f19076848566cb52a40ddbdb2555c53d12e9a003 29-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for parsing the optional attribute-specifier-seq at the
end of a decl-specifier-seq

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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ffcc3105d223899740e79f3f8199f3881df4d1de 13-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Record the full source range of an attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
5471bc85b69912e3b448de004498a80c0de32296 08-Sep-2011 Douglas Gregor <dgregor@apple.com> Allow C++0x enumerations with a fixed underlying type in
Objective-C. The @encode'ing of such an enumeration type is the same
as its underlying type. <rdar://problem/5276348>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
87e96eb04ba26022e03263da9d75299ea72adb8f 04-Sep-2011 Richard Smith <richard-llvm@metafoo.co.uk> PR10458: Last part of providing 'auto' type specifier as an extension in C++98: permit it within type-ids.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
8f4fb190852d3f86787c7e2c3dfc1b96143197ae 04-Sep-2011 Richard Smith <richard-llvm@metafoo.co.uk> PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept for-range and auto with an ExtWarn, and produce a -Wc++0x-compat warning in C++98 mode when auto is used as a storage class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
7d100872341f233c81e1d7b72b40457e62c36862 04-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support code-completion for C++ inline methods and ObjC buffering methods.

Previously we would cut off the source file buffer at the code-completion
point; this impeded code-completion inside C++ inline methods and,
recently, with buffering ObjC methods.

Have the code-completion inserted into the source buffer so that it can
be buffered along with a method body. When we actually hit the code-completion
point the cut-off lexing or parsing.

Fixes rdar://10056932&8319466

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e8cff36db2b6ec332ab39b1dbe7466e574a9362d 30-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objc - fixes a regression in declaring c decls nested in
objective-c containers due to recent changes to objc decl
contexts. // rdar://10041908


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138803 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
58fd97a6f4f7c909aeef46b501ab46f3d6eac671 25-Aug-2011 Francois Pichet <pichet2000@gmail.com> Add support for Microsoft __ptr32 keyword.
Patch by Chris Cudmore!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138533 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
3bd9aa4593b4332d477407d9b5a42f3c4ababb21 18-Aug-2011 Francois Pichet <pichet2000@gmail.com> Add support for MSVC __unaligned attribute. Necessary to parse MSVC headers in 64-bit mode (ie: when _M_IA64 or _M_AMD64 is defined)

more info: http://msdn.microsoft.com/en-us/library/ms177389.aspx

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
b51e0315d4ffd12670441ea2284ae1188485df14 09-Aug-2011 Caitlin Sadowski <supertri@google.com> Thread Safety: Added basic argument parsing for all new attributes.

This patch special cases the parser for thread safety attributes so that all
attribute arguments are put in the argument list (instead of a special
parameter) since arguments may not otherwise resolve correctly without two-token
lookahead.

This patch also adds checks to make sure that attribute arguments are
lockable objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ae7902c4293d9de8b9591759513f0d075f45022a 04-Aug-2011 Douglas Gregor <dgregor@apple.com> Parsing of C++0x lambda expressions, from John Freeman with help from
David Blaikie!


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


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
57c13008c634f47d8ca1b6aa9d7965d82a05c502 06-Jul-2011 John McCall <rjmccall@apple.com> Properly protect colons when parsing a nested-name-specifier as part
of an enum specifier in dialects which permit fixed underlying types.
Fixes the rejects-valid part of PR10264.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
3fd1ba0fa133d1c6e641770d0bc56606587d3eef 05-Jul-2011 Douglas Gregor <dgregor@apple.com> Clean up and refactor ParseFunctionDeclarator to reduce code
repetition and better reflect the actual grammar, from John Freeman!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
25a767651d14db87aa03dd5fe3e011d877dd4100 22-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce DelayedCleanupPool useful for simplifying clean-up of certain resources that, while their
lifetime is well-known and restricted, cleaning them up manually is easy to miss and cause a leak.

Use it to plug the leaking of TemplateIdAnnotation objects. rdar://9634138.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e3d49b44ad0596b2998ecf2e7ca78d59188920e5 19-Jun-2011 Francois Pichet <pichet2000@gmail.com> Handle decltype keyword in Parser::isDeclarationSpecifier.
Fixes PR10154. Found by parsing MFC 2010 code with clang.

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

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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
dbef1bb8a8118b7b73e184e08fccfe0eaf914dda 05-Jun-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Parse C++0x generalized initializers.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
373197b9ca6975ecc9241ec06ec9856afbfcc9e7 07-May-2011 Francois Pichet <pichet2000@gmail.com> Don't fail at parsing __declspec(property(get=get_func_name)). Just skip everything inside property() for now while we wait for the BoostPro people to provide a complete patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
bfad9150bfa894195a43c5f487117672a449f90f 28-Apr-2011 Douglas Gregor <dgregor@apple.com> libstdc++ 4.4 uses __is_signed as an identifier, while Clang treats it
as a keyword for the __is_signed type trait. Cope with this conflict
via some hackish recovery: if we see a declaration of the form

static const bool __is_signed

then we stop treating __is_signed as a keyword and instead treat it as
an identifier. It's ugly, but it's better than making the __is_signed
type trait conditional on some language flag. Fixes PR9804.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
338d7f7362d18fa9c39c6bb5282b4e20574a9309 28-Apr-2011 Francois Pichet <pichet2000@gmail.com> Upgrade Microsoft's __int8, __int16, __int32 and __int64 types from builtin defines to real types.

Otherwise statements like:
__int64 var = __int64(0);

would be expanded to:
long long var = long long(0);

and fail to compile.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d0719b183ae331e0e8731c486f21392e0eb288c3 27-Apr-2011 Douglas Gregor <dgregor@apple.com> Clean out some cruft I introduced when adding Sema::ClassifyName()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d9d75e57dfa22366c0379c92beac1db82db34e9a 27-Apr-2011 Douglas Gregor <dgregor@apple.com> Simplify the parser's handling of Sema::ClassifyName() for types, by
creating a type-annotation token rather than jumping into the
declaration parsing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
b8a9d3b8016c0b8cc58e8523de0f4766cf3fa6bf 21-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fixit suggestion for adding missing tag name should have a space after the tag name. Fixes rdar://9295072

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129917 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e106a0bfac30a8a215a68cc28aeb46b054dcb91f 19-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Avoid superfluous warning after an error is detcted and reported.
// rdar://9132143


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
c6eb44b321c543c5bcf28727228a0cceced57e2e 15-Apr-2011 Peter Collingbourne <peter@pcc.me.uk> C1X: implement static asserts

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
b53e417ba487f4193ef3b0485b420e0fdae643a2 26-Mar-2011 Douglas Gregor <dgregor@apple.com> Extend the new 'availability' attribute with support for an
'unavailable' argument, which specifies that the declaration to which
the attribute appertains is unavailable on that platform.


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



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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127755 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
18d8b7996b1eb35f3f5fd2d1e6eef3d72843fbeb 14-Mar-2011 Douglas Gregor <dgregor@apple.com> Disable 'auto' type deduction in Objective-C. It likes 'id' a bit too
much to be useful.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127625 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
796aa443ab5ed036f42ef33fed629e1b4b34871b 12-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Forgotten part of previous commit.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
7acafd032e145dbdbbed9274ca57ec2c86b912bc 05-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Parser support for noexcept specifications.

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

enum clang::NestedNameSpecifier::SpecifierKind

Fixes in this iteration include:

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

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

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

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




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


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

The commit message from r126737:

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

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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
9ddba32f25c0315cd3a6c7b63e0275b27cc1d973 24-Feb-2011 Douglas Gregor <dgregor@apple.com> Tweak the CXXScopeSpec API a bit, so that we require the
nested-name-specifier and source range to be set at the same time.


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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
12e3ecec906f65580059a9d8555849a272c2db81 23-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Provide Fixit warning when 'auto' is intended as storage
specifier in legacy code. Patch is reviewed offline by Doug.
// rdar://9036633.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
86f208c1a112c3e8984e63daec15ccf0a1a84329 22-Feb-2011 Douglas Gregor <dgregor@apple.com> Enable enumeration types with a fixed underlying type, e.g.,

enum X : long { Value = 0x100000000 };

when in Microsoft-extension mode (-fms-extensions). This (now C++0x)
feature has been supported since Microsoft Visual Studio .NET 2003.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
b9075601840893a8f7a21918ac4c7e28dcb67f1a 22-Feb-2011 Douglas Gregor <dgregor@apple.com> Fix a little bug in the handling of enumeration types with a fixed
underlying type: we weren't parsing unnamed enumeration types with a
fixed underlying type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
483b9f3bc05c5409e2c6643f1c9d91e21c8ff9d2 21-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> Tweaks to C++0x deduced auto type support:
* Flag indicating 'we're parsing this auto typed variable's initializer' moved from VarDecl to Sema
* Temporary template parameter list for auto deduction is now allocated on the stack.
* Deduced 'auto' types are now uniqued.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
6c6b0ebc33c4db48355078a45a21cb6867e298b1 21-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Turn on 'auto' in plain objc mode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
34b41d939a1328f484511c6002ba2456db879a29 20-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement the C++0x deduced 'auto' feature.

This fixes PR 8738, 9060 and 9132.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126069 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
e2f82f71385051ce5abfba317d2f592aa332c588 11-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Reject forbidden storage class specifiers in OpenCL. Patch by George Russell!

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
dfaa5fb15da115315513ce356169450a5963977f 31-Jan-2011 Francois Pichet <pichet2000@gmail.com> Allow Microsoft attributes in a constructor's parameter list.
This fixes a few compile errors when parsing <regex> from MSVC 2008 with clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
1f3810623fc7adbff149585a49a3f174dafdea81 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Improve the extension warning for the use of ref-qualifiers, to
distinguish them from rvalue references. Using the rvalue-references
warning was weird when the ref-qualifier was '&'.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
16cf8f5b6f582876b64e132715280fc473f876b9 25-Jan-2011 Douglas Gregor <dgregor@apple.com> Downgrade the error about rvalue references to an extension warning
and turn on __has_feature(cxx_rvalue_references). The core rvalue
references proposal seems to be fully implemented now, pending lots
more testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
dec0984fce504a39a7f085774fb67cfd9957be58 18-Jan-2011 Jeffrey Yasskin <jyasskin@google.com> Fix warnings found by gcc-4.6, from -Wunused-but-set-variable and
-Wint-to-pointer-cast.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
8678d44d973989a7af70311572626036219307e2 06-Jan-2011 Douglas Gregor <dgregor@apple.com> Fix an embarrassing think in the disambiguation logic for the ellipsis in a parameter-type-list

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



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

void f(T...)

where T may or may not contain unexpanded parameter packs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
075f8f1b6bed4d1b224c74f87508534cc6392ce6 10-Dec-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added ParenType type node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
a88cefd266c428be33cc06f7e8b00ff8fc97c1ff 03-Dec-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added struct/class syntactic info for c++0x scoped enum.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
a61b3e7443056f8d05b24ca4cbea90fe66235d6b 01-Dec-2010 Douglas Gregor <dgregor@apple.com> After parsing a ':' in an enum-specifier within class context,
disambiguate between an expression (for a bit-field width) and a type
(for a fixed underlying type). Since the disambiguation can be
expensive (due to tentative parsing), we perform a simplistic
disambiguation based on one-token lookahead before going into the
full-blown tentative parsing. Based on a patch by Daniel Wallin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120582 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f27f03e215cbd7a7bdfb35a95e524c9eea8ba940 22-Nov-2010 Nico Weber <nicolasweber@gmx.de> Remove the other FIXME I added. This is covered by the Index test and not testable via -ast-dump.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
c43271e3178078758017f76bc9615e0361088a0d 22-Nov-2010 Nico Weber <nicolasweber@gmx.de> Try to get the bots green after r119966.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
46f936e055d763437accd1e5a1bc49e7e5dbc0a3 19-Nov-2010 Douglas Gregor <dgregor@apple.com> When parsing something that looks like an ill-formed
protocol-qualifier list without a leading type (e.g., <#blah#>), don't
complain about it being an archaic protocol-qualifier list unless it
actually parses as one.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
4383e18fc3d79fd536c6992432e180a11bcb657d 16-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Emit a specific diagnostic when typedefing C++ bool, mirroring gcc.
Fixes rdar://8365458

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
8113ecfa4e41e2c888b1794389dfe3bce6386493 10-Nov-2010 Ted Kremenek <kremenek@apple.com> Region-allocate all AttributeList objects from a factory object instead of manually managing them
using new/delete and OwningPtrs. After memory profiling Clang, I witnessed periodic leaks of these
objects; digging deeper into the code, it was clear that our management of these objects was a mess. The ownership rules were murky at best, and not always followed. Worse, there are plenty of error paths where we could screw up.

This patch introduces AttributeList::Factory, which is a factory class that creates AttributeList
objects and then blows them away all at once. While conceptually simple, most of the changes in
this patch just have to do with migrating over to the new interface. Most of the changes have resulted in some nice simplifications.

This new strategy currently holds on to all AttributeList objects during the lifetime of the Parser
object. This is easily tunable. If we desire to have more bound the lifetime of AttributeList
objects more precisely, we can have the AttributeList::Factory object (in Parser) push/pop its
underlying allocator as we enter/leave key methods in the Parser. This means that we get
simple memory management while still having the ability to finely control memory use if necessary.

Note that because AttributeList objects are now BumpPtrAllocated, we may reduce malloc() traffic
in many large files with attributes.

This fixes the leak reported in: <rdar://problem/8650003>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
78b810559d89e996e00684335407443936ce34a1 10-Nov-2010 John McCall <rjmccall@apple.com> Diagnose attempst to template using declarations and using directives.
Recover from the latter and fail early for the former. Fixes PR8022.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118669 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
729ad83035f4e62eaec403fbdc7c1c843fa30f59 09-Nov-2010 Chris Lattner <sabre@nondot.org> fix PR8380, a crash on invalid due to an illogical DeclSpec SourceRange being constructed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118625 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
9bd1d8d174a9d15ae343246c8322299248b9e92a 22-Oct-2010 Douglas Gregor <dgregor@apple.com> Teach the C++ simple-type-specifier parser and tentative parses about
protocol-qualified types such as id<Protocol>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
334d47e92e9f241576fdeb7477b69a03136ba854 11-Oct-2010 Francois Pichet <pichet2000@gmail.com> Add parsing support for Microsoft attributes. MS attributes will just be skipped and not inserted into the AST for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
1274ccd90aec0b205fc838c3d504821ccfb55482 09-Oct-2010 Douglas Gregor <dgregor@apple.com> Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a
bit by me).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
a6eb5f81d13bacac01faff70a947047725b4413f 08-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> When we encounter a '==' in a context expecting a '=', assume the user made a typo:

t.c:1:7: error: invalid '==' at end of declaration; did you mean '='?
int x == 0;
^~
=

Implements rdar://8488464.

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

auto f(int) -> int

from Daniel Wallin!

(With a few minor bug fixes from me).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
37bf9d2bb74944c9d9a52522412bc077629977f1 24-Sep-2010 Anders Carlsson <andersca@mac.com> Allow the use of C++0x deleted functions as an extension in C++98.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
9497a73ad0d54859edbf48beb93ebb19a7ae50c9 16-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement automatic bracket insertion for Objective-C class message
sends. These are far trickier than instance messages, because we
typically have something like

NSArray alloc]

where it appears to be a declaration of a variable named "alloc" up
until we see the ']' (or a ':'), and at that point we can't backtrace.
So, we use a combination of syntactic and semantic disambiguation to
treat this as a message send only when the type is an Objective-C type
and it has the syntax of a class message send (which would otherwise
be ill-formed).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
751f6922376dfe9432795b65a3649179e4ef5cf5 07-Sep-2010 Douglas Gregor <dgregor@apple.com> Improve recovery when a comma is missing between enumerators in an
enumeration definition. Fixes <rdar://problem/7159693>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
52fc314e1b5e1baee6305067cf831763d02bd243 03-Sep-2010 Dawn Perchik <dawn@burble.org> Add symantic support for the Pascal calling convention via
"__attribute((pascal))" or "__pascal" (and "_pascal" under
-fborland-extensions). Support still needs to be added to llvm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
88e64ca96d6c00c6f3bd43772cd325bede795d2a 31-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Enable inline namespaces in C++03 as an extension.

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
911093e535ad16602b0a387b36039eeb5da685b4 25-Aug-2010 John McCall <rjmccall@apple.com> Reformatting.



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



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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
ae2fb144fef905a860a49e8066fb28521447f7c9 23-Aug-2010 Douglas Gregor <dgregor@apple.com> When complaining about a duplicate declspec, provide a Fix-It that
removes the copy. Patch from Eelis van der Weegen, tweaked/updated by
me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
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/lib/Parse/ParseDecl.cpp
d226f65006733ed7f709c3174f22ce33391cb58f 21-Aug-2010 John McCall <rjmccall@apple.com> DeclPtrTy -> Decl *



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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
46877cd012c6637a9c98d5f27afbc3cbf73e57d0 18-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Get rid of extra nesting when checking for invalid type,
per Doug's comment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111328 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
1b72fa7222abb1a53e063f0805c759993d445471 18-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Diagnose if type of iboutletcollection attribute is a builtin type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111324 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d6577428627bd4b7f8cd87e213151ebe6a587a9f 16-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a crash when parsing malformed out-of-line member function
definition. radar 8307865.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e6b1bb6e7fe906d164637ca33503b8fafdbc99e5 11-Aug-2010 Douglas Gregor <dgregor@apple.com> Once code completion has completed, pass a "completion context" on to
the code-completion consumer. The consumer can use this information to
augument, filter, or display the code-completion results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
2b602adf9798eaf13850efaf8ed41c69d3cf7da6 06-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce a new token kind 'cxx_defaultarg_end' to mark the end of C++ default arguments that were part of
lexed method declarations.

This avoid interference with tokens coming after the point where the default arg tokens were 'injected', e.g. for

typedef struct Inst {
void m(int x=0);
} *InstPtr;

when parsing '0' the next token would be '*' and things would be messed up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
0333296d142d45bf2723635848928815b7491f91 29-Jul-2010 Douglas Gregor <dgregor@apple.com> Reword the empty struct/union warning in C to note that such structs and unions have size 0 in C, size 1 in C++. Put this warning under -Wc++-compat.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
004659a56916f2f81ede507c12516c146d6c0df3 12-Jul-2010 Chris Lattner <sabre@nondot.org> Fix PR7617 by not entering ParseFunctionDefinition when
a function prototype is followed by a declarator if we
aren't parsing a K&R style identifier list.

Also, avoid skipping randomly after a declaration if a
semicolon is missing. Before we'd get:

t.c:3:1: error: expected function body after function declarator
void bar();
^

Now we get:

t.c:1:11: error: invalid token after top level declarator
void foo()
^
;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
c82daefa3062721e98947e08193cd81b4e9df915 12-Jul-2010 Chris Lattner <sabre@nondot.org> add a const qualifier, refactor some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
23c94dbb6631fecdb55ba401aa93722803d980c6 02-Jul-2010 Douglas Gregor <dgregor@apple.com> Move the "current scope" state from the Parser into Action. This
allows Sema some limited access to the current scope, which we only
use in one way: when Sema is performing some kind of declaration that
is not directly driven by the parser (e.g., due to template
instantiatio or lazy declaration of a member), we can find the Scope
associated with a DeclContext, if that DeclContext is still in the
process of being parsed.

Use this to make the implicit declaration of special member functions
in a C++ class more "scope-less", rather than using the NULL Scope hack.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
36d36806f1972f7ec1d2a3f59155187278c56508 17-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make sure parens/braces/brackets are correctly balanced.

In a line like:

(;

the semicolon leaves Parser:ParenCount unbalanced (it's 1 even though we stopped looking for a right paren).
This may affect later parsing and result in bad recovery for parsing errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f13ca06e57ac094ed05ea08c26a499af1ba0ce88 17-Jun-2010 Douglas Gregor <dgregor@apple.com> Make the "extra ';' inside a struct or union" diagnostic more
precise. Fixes PR7336.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
a8f031fa67ea2f0d7e3a97207f7bc6f118e5fa06 16-Jun-2010 Douglas Gregor <dgregor@apple.com> Add some missing parentheses, from Anton Yartsev

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5ac3bdb2cb0113b640c54f01468d21985c08b252 30-May-2010 Douglas Gregor <dgregor@apple.com> Teach code completion to adjust its completion priorities based on the
type that we expect to see at a given point in the grammar, e.g., when
initializing a variable, returning a result, or calling a function. We
don't prune the candidate set at all, just adjust priorities to favor
things that should type-check, using an ultra-simplified type system.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
0511552e20c79ec48638038b9a10a70a34654e5c 29-May-2010 Fariborz Jahanian <fjahanian@apple.com> Empty enum in c is now error to match gcc's behavior.
(radar 8040068).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
dc8453422bec3bbf70c03920e01498d75783d122 25-May-2010 Douglas Gregor <dgregor@apple.com> Improve code completion in failure cases in two ways:
1) Suppress diagnostics as soon as we form the code-completion
token, so we don't get any error/warning spew from the early
end-of-file.
2) If we consume a code-completion token when we weren't expecting
one, go into a code-completion recovery path that produces the best
results it can based on the context that the parser is in.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
aec0371e62be013a2e6466688ccf6a7460880262 21-May-2010 John McCall <rjmccall@apple.com> Propagate access specifiers to anonymous union members nested within classes.
Fixes <rdar://problem/7987650>.



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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f813a2c03fcb05381b3252010435f557eb6b3cde 18-May-2010 Douglas Gregor <dgregor@apple.com> Add support for Microsoft's __thiscall, from Steven Watanabe!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
9a65b8110595b10f7017173db3d69b3371c8e685 14-May-2010 Chris Lattner <sabre@nondot.org> Improve error recovery in C/ObjC when the first argument of a function
declarator is incorrect. Not being a typename causes the parser to
dive down into the K&R identifier list handling stuff, which is almost
never the right thing to do.

Before:

r.c:3:17: error: expected ')'
void bar(intptr y);
^
r.c:3:9: note: to match this '('
void bar(intptr y);
^
r.c:3:10: error: a parameter list without types is only allowed in a function definition
void bar(intptr y);
^

After:

r.c:3:10: error: unknown type name 'intptr'; did you mean 'intptr_t'?
void bar(intptr y);
^~~~~~
intptr_t
r.c:1:13: note: 'intptr_t' declared here
typedef int intptr_t;
^

This fixes rdar://7980651 - poor recovery for bad type in the first arg of a C function



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
83a944763b0948c608eb48f101ec10a1ae5da46a 14-May-2010 Chris Lattner <sabre@nondot.org> Refactor ParseFunctionDeclaratorIdentifierList to have the first
identifier in the identifier list consumed before it is called.
No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
8fc6d236b8d05bad4b41a9be689b26d931adedd5 03-May-2010 Douglas Gregor <dgregor@apple.com> It's okay to reference an enum in a template definition, even though
it's ill-formed to form an enum template. Fixes <rdar://problem/7933063>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
48c89f4aa708e28310cb0c94b2d9d044b0ab806c 24-Apr-2010 Douglas Gregor <dgregor@apple.com> Be more careful around dependent nested-name-specifiers, complaining
when they are not complete (since we could not match them up to
anything) and ensuring that enum parsing can cope with dependent
elaborated-type-specifiers. Fixes PR6915 and PR6649.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102247 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
14b91628961ab50cc6e724bbcd408fdee100662d 23-Apr-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make Parser::ConsumeAndStoreUntil() more consistent with Parser::SkipUntil().

ConsumeAndStoreUntil would stop at tok::unknown when caching an inline method
definition while SkipUntil would go past it while parsing the method.

Fixes PR 6903.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
c0b39640de335809ca7544f802751112619f30cc 16-Apr-2010 Douglas Gregor <dgregor@apple.com> Audit uses of Sema::LookupSingleName for those lookups that are
intended for redeclarations, fixing those that need it. Fixes PR6831.

This uncovered an issue where the C++ type-specifier-seq parsing logic
would try to perform name lookup on an identifier after it already had
a type-specifier, which could also lead to spurious ambiguity errors
(as in PR6831, but with a different test case).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ba9d853bec0d9cc10ac5fdeab807cc4b13d65791 13-Apr-2010 John McCall <rjmccall@apple.com> Parse constructor names in friend declarations. Part of the fix for
PR6207.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101119 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
9ab14541716928894821cf5d53d6b4c95ffdf3a3 08-Apr-2010 Jeffrey Yasskin <jyasskin@google.com> Make CXXScopeSpec invalid when incomplete, and propagate that into any
Declarator that depends on it. This fixes several redundant errors and bad
recoveries.


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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5c5db553b5c256d0a6f55dde7325c1c829b88e8e 05-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6782, an accept invalid. We weren't emitting the diagnostic
returned by SetTypeSpecType.


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


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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ec1afbfd8e880d0169aab0ececa2e7e1611f4955 16-Mar-2010 Douglas Gregor <dgregor@apple.com> Make sure we actually override ReadHeaderFileInfo when we meant to

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98655 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
9b9edd619a7e616d3287435cb5a3f9b1aea648e8 02-Mar-2010 Douglas Gregor <dgregor@apple.com> Diagnose the declaration of enum templates. Also, be a bit more
careful about value-dependent enumerators. Fixes PR5786.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
00225547b51b42f7400eed36475b6672418a1151 01-Mar-2010 Douglas Gregor <dgregor@apple.com> Robustify instantiation of templates when there are errors in the
template definition. Do this both by being more tolerant of errors in
our asserts and by not dropping a variable declaration completely when
its initializer is ill-formed. Fixes the crash-on-invalid in PR6375,
but not the original issue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
2e0a715595a21adeb7172995df59317741301aa3 01-Mar-2010 John McCall <rjmccall@apple.com> Don't infinite-loop if TryAnnotateCXXScopeToken fails to annotate but doesn't
signal an error. This can happen even when the current token is '::' if
this is a ::new or ::delete expression.

This was an oversight in my recent parser refactor; fixes PR 5825.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
1b49242de4e8bc718d7611c33a1d76ce35864020 28-Feb-2010 Chris Lattner <sabre@nondot.org> pull some altivec stuff out of line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97405 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
b3a4e432c90be98c6d918087750397e86d030368 28-Feb-2010 Chris Lattner <sabre@nondot.org> Implement PR6423 by using one token of lookahead to disambiguate
an *almost* always incorrect case. This only does the lookahead
in the insanely unlikely case, so it shouldn't impact performance.

On this testcase:

struct foo {
}
typedef int x;

Before:

t.c:3:9: error: cannot combine with previous 'struct' declaration specifier
typedef int x;
^

After:

t.c:2:2: error: expected ';' after struct
}
^
;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97403 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
9ba6166f4a78722e7df8ffbd64eb788bfdf2764a 26-Feb-2010 John McCall <rjmccall@apple.com> Fix an assertion-on-error during tentative constructor parsing by
propagating error conditions out of the various annotate-me-a-snowflake
routines. Generally (but not universally) removes redundant diagnostics
as well as, you know, not crashing on bad code. On the other hand,
I have just signed myself up to fix fiddly parser errors for the next
week. Again.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
3c3aaf9bdff81af40212e9a1ac517ad7c793d5cc 19-Feb-2010 Douglas Gregor <dgregor@apple.com> Only parse C++0x attribute specifiers in declarators when in C++0x
mode. This allows us to detect invalid VLAs in Objective-C++
mode. This should be the last of <rdar://problem/7660386>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
23e907ab9119ccfdff17b3808a770c5a6707fb95 14-Feb-2010 John McCall <rjmccall@apple.com> Improve the diagnostic given when referring to a tag type without a tag (in C)
or that's been hidden by a non-type (in C++).

The ideal C++ diagnostic here would note the hiding declaration, but this
is a good start.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
1e37765c9257ef1d051f54a674eaa964bdba9693 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Clean up ownership of 'AttributeList' objects in Parser. Apparently
we would just leak them all over the place, with no clear ownership of
these objects at all. AttributeList objects would get leaked on both
error and non-error paths.

Note: I introduced the usage of llvm::OwningPtr<AttributeList> to
manage these objects, which is particularly useful for methods with
multiple return sites. In at least one method I used them even when
they weren't strictly necessary because it clarified the ownership
semantics and made the code easier to read. Should the excessive
'take()' and 'reset()' calls become a performance issue we can always
re-evaluate.

Note+1: I believe I have not introduced any double-frees, but it would
be nice for someone to review this.

This fixes <rdar://problem/7635046>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
82287d19ded35248c4ce6a425ce74116a13ce44e 05-Feb-2010 John Thompson <John.Thompson.JTSoftware@gmail.com> First stage of adding AltiVec support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d9bafa76f8d6eb9e4f4974ed322217f8df6bb82e 03-Feb-2010 Sebastian Redl <sebastian.redl@getdesigned.at> In some contexts, type declarations cannot occur. Pass this information down to ParseClassSpecifier, to make its decision easier. Fixes PR6200.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
3e156ad9adc7332e626eedbc86aa4e3b03f17ca5 02-Feb-2010 Chris Lattner <sabre@nondot.org> improve diagnostics on missing ; in a struct. Before:

t.c:4:3: error: expected ';' at end of declaration list
int y;
^
t.c:4:8: warning: extra ';' inside a struct or union
int y;
^
t.c:6:1: warning: expected ';' at end of declaration list
};
^

After:

t.c:3:8: error: expected ';' at end of declaration list
int x // expected-error {{expected ';' at end of declaration list}}
^
;
t.c:5:8: warning: expected ';' at end of declaration list
int z
^
;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
b988f9cde9bce0848d081b5cd1f6a48b86ec8108 25-Jan-2010 Douglas Gregor <dgregor@apple.com> Move the type specifier location for elaborated-type-specifiers from
the tag kind (union, struct, class, enum) over to the name of the tag,
if there is a name, since most clients want to point at the name.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
b6ac2451bfed36206c5cec7217372c4299f67f2b 13-Jan-2010 Douglas Gregor <dgregor@apple.com> Whenever completing ordinary names for an Objective-C source, also
provide completions for @ keywords. Previously, we only provided
@-completions after an @ was actually typed, which is useful but
probably not the common case.

Also, make sure a few Objective-C 2.0 completions only show up when
Objective-C 2.0 support is enabled (the default).


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



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

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

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

C(int); // constructor

and

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

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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
01dfea02d1da297e8b53db8eea3d3cc652acda8d 11-Jan-2010 Douglas Gregor <dgregor@apple.com> Improve code completion by introducing patterns for the various C and
C++ grammatical constructs that show up in top-level (namespace-level)
declarations, member declarations, template declarations, statements,
expressions, conditions, etc. For example, we now provide a pattern
for

static_cast<type>(expr)

when we can have an expression, or

using namespace identifier;

when we can have a using directive.

Also, improves the results of code completion at the beginning of a
top-level declaration. Previously, we would see value names (function
names, global variables, etc.); now we see types, namespace names,
etc., but no values.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
a3ddec2b5e4ddb87ad4285994d618c20cb3879d4 28-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Fix 80-col violation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
b4debaebedfeb3161cd7bce0d13f005ab442fa5e 22-Dec-2009 Douglas Gregor <dgregor@apple.com> Enter the scope of an initializer for direct-initialization as well as
for copy-initialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91909 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
731ad843b7bf1862f6547ac79539f0f5b4c539bd 19-Dec-2009 John McCall <rjmccall@apple.com> Just push a new scope when parsing an out-of-line variable definition.
Magically fixes all the terrible lookup problems associated with not pushing
a new scope. Resolves an ancient xfail and an LLVM misparse.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
aa87d33309f505b68c3bfc17486c93e4d224b24f 12-Dec-2009 John McCall <rjmccall@apple.com> Remember the type name's scope specifier in the DeclSpec.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e7e278bce2301990107cef3f873cbbf7da94469a 11-Dec-2009 John McCall <rjmccall@apple.com> Don't enter a new scope for a namespace-qualified declarator unless we're
in a file context. In well-formed code, only happens with friend functions.
Fixes PR 5760.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91146 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
a1efc8c8c6460d860d6509b05b341e77ed9bfe87 10-Dec-2009 Chris Lattner <sabre@nondot.org> fix incorrect parsing of bitfields pointed out by Doug. I chose
to use ColonProtectionRAIIObject in the C codepath even though it
won't matter for consistency.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d167ca0d26e43292b8b9e8d5300d92784ae0e27d 10-Dec-2009 Chris Lattner <sabre@nondot.org> rename ExtensionRAIIObject.h -> RAIIObjectsForParser.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
29d9c1adfadf65e2d847d44bec37746844b9e0e3 06-Dec-2009 Chris Lattner <sabre@nondot.org> remove some extraneous syntax: sourceloc implicitly converts to sourcerange.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
bbd37c62e34db3f5a95c899723484a76c71d7757 21-Nov-2009 Sean Hunt <rideau3@gmail.com> Added rudimentary C++0x attribute support.
The following attributes are currently supported in C++0x attribute
lists (and in GNU ones as well):
- align() - semantics believed to be conformant to n3000, except for
redeclarations and what entities it may apply to
- final - semantics believed to be conformant to CWG issue 817's proposed
wording, except for redeclarations
- noreturn - semantics believed to be conformant to n3000, except for
redeclarations
- carries_dependency - currently ignored (this is an optimization hint)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
314b97f8c564b465af605efaee23f91ec18a982b 10-Nov-2009 Douglas Gregor <dgregor@apple.com> Improve parsing of template arguments to lay the foundation for
handling template template parameters properly. This refactoring:

- Parses template template arguments as id-expressions, representing
the result of the parse as a template name (Action::TemplateTy)
rather than as an expression (lame!).

- Represents all parsed template arguments via a new parser-specific
type, ParsedTemplateArgument, which stores the kind of template
argument (type, non-type, template) along with all of the source
information about the template argument. This replaces an ad hoc
set of 3 vectors (one for a void*, which was either a type or an
expression; one for a bit telling whether the first was a type or
an expression; and one for a single source location pointing at
the template argument).

- Moves TemplateIdAnnotation into the new Parse/Template.h. It never
belonged in the Basic library anyway.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
2ac67239b4ab81c439ffcc56367574c869f87dae 05-Nov-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Parse C++0x constexpr. Test case follows when this does something useful.

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




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
4ba397170fb07ccee48f9d116d44643c234eb0ee 03-Nov-2009 John McCall <rjmccall@apple.com> CFieldCallback doesn't need to create an ExtensionRAIIObject: it's actually
automatically shadowed by the ExtensionRAIIObject created by
ParseStructDeclaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
2d1c21414199a7452f122598189363a3922605b1 03-Nov-2009 Douglas Gregor <dgregor@apple.com> Replace the code that parses member access expressions after "." or
"->" with a use of ParseUnqualifiedId. Collapse
ActOnMemberReferenceExpr, ActOnDestructorReferenceExpr (both of them),
ActOnOverloadedOperatorReferenceExpr,
ActOnConversionOperatorReferenceExpr, and
ActOnMemberTemplateIdReferenceExpr into a single, new action
ActOnMemberAccessExpr that does the same thing more cleanly (and can
keep more source-location information).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d8ac05753dc4506224d445ff98399c01da3136e5 03-Nov-2009 John McCall <rjmccall@apple.com> Reorganize the parsing of decl groups / function definitions so that
declarators are parsed primarily within a single function (at least for
these cases). Remove some excess diagnostics arising during parse failures.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
bdd563ec391b0a83fc6d04b8a8ea3022aa702f74 03-Nov-2009 John McCall <rjmccall@apple.com> Switch ParseStructDeclaration to a callback-based API. This will make
it easier to track within Sema whether the parser is parsing a declaration.



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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
a786fdbf6c1d8ff08c3e61c7eb6bf2872895e2b4 14-Oct-2009 Douglas Gregor <dgregor@apple.com> Improve diagnostics when the parser encounters a declarator with an
unknown type name, e.g.,

foo::bar x;

when "bar" does not refer to a type in "foo".

With this change, the parser now calls into the action to perform
diagnostics and can try to recover by substituting in an appropriate
type. For example, this allows us to easily diagnose some missing
"typename" specifiers, which we now do:

test/SemaCXX/unknown-type-name.cpp:29:1: error: missing 'typename'
prior to dependent type name 'A<T>::type'
A<T>::type A<T>::f() { return type(); }
^~~~~~~~~~
typename

Fixes PR3990.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
71b0addffbdeed29cc062c962e236c34107755d6 29-Sep-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Keep protocol source locations when parsing protocol references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
9d7b35303c6f1eaee85039d0f934c456e063cd0a 28-Sep-2009 Douglas Gregor <dgregor@apple.com> Parse a C++ scope specifier followed by a "typename" annotation token as a type name within the declaration specifiers. Fixes PR5061.


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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d5a423b279e787e9fdd8309fe52cb515388c54ea 25-Sep-2009 Douglas Gregor <dgregor@apple.com> WIP implementation of explicit instantiation of function templates,
member functions of class template specializations, and static data
members. The mechanics are (mostly) present, but the semantic analysis
is very weak.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ed5d651b0d4b99d0b68bb8d4633e49b98c95bd8f 22-Sep-2009 Douglas Gregor <dgregor@apple.com> In C++, a variadic function does not need an ellipsis prior to the comma. Parse it in both C and C++, but diagnose it as an error in C with a fix-it hint to add the comma.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
791215b7a24666912c0b71175d2ca5ba082f666e 21-Sep-2009 Douglas Gregor <dgregor@apple.com> Code completion for ordinary names when we're starting a declaration, expression, or statement

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
374929f7e88f6c7a96382b3eb4201b721c418372 18-Sep-2009 Douglas Gregor <dgregor@apple.com> Implement code completion for tags, e.g., code completion after "enum"
will provide the names of various enumerations currently
visible. Introduced filtering of code-completion results when we build
the result set, so that we can identify just the kinds of declarations
we want.

This implementation is incomplete for C++, since we don't consider
that the token after the tag keyword could start a
nested-name-specifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
c4e7019d5c9034a2d84ee4695f8e98dc025ac131 11-Sep-2009 John McCall <rjmccall@apple.com> Support elaborated dependent types and diagnose tag mismatches.



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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
2dd078ae50ff7be1fb25ebeedde45e9ab691a4f0 03-Sep-2009 Douglas Gregor <dgregor@apple.com> Rewrite of our handling of name lookup in C++ member access expressions, e.g.,

x->Base::f

We no longer try to "enter" the context of the type that "x" points
to. Instead, we drag that object type through the parser and pass it
into the Sema routines that need to know how to perform lookup within
member access expressions.

We now implement most of the crazy name lookup rules in C++
[basic.lookup.classref] for non-templated code, including performing
lookup both in the context of the type referred to by the member
access and in the scope of the member access itself and then detecting
ambiguities when the two lookups collide (p1 and p4; p3 and p7 are
still TODO). This change also corrects our handling of name lookup
within template arguments of template-ids inside the
nested-name-specifier (p6; we used to look into the scope of the
object expression for them) and fixes PR4703.

I have disabled some tests that involve member access expressions
where the object expression has dependent type, because we don't yet
have the ability to describe dependent nested-name-specifiers starting
with an identifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
42c39f39184c5ce9d7f489e5dcb7eec770728a9a 26-Aug-2009 Douglas Gregor <dgregor@apple.com> When we know that we are parsing a class-name, implicitly construct a
TypenameType if getTypeName is looking at a member of an unknown
specialization. This allows us to properly parse class templates that
derived from type that could only otherwise be described by a typename type,
e.g.,

template<class T> struct X {};
template<typename T> struct Y : public X<T>::X { };

Fixes PR4381.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
91a2886d558ea6ca7a0bed73ab5acea5ae78eac2 26-Aug-2009 Douglas Gregor <dgregor@apple.com> Fix bug in __extension__ handling for declarations, from Abramo
Bagnara with a fix from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
495c35d291da48c4f5655bbb54d15128ddde0d4d 26-Aug-2009 Douglas Gregor <dgregor@apple.com> Improve support for out-of-line definitions of nested templates and
their members, including member class template, member function
templates, and member classes and functions of member templates.

To actually parse the nested-name-specifiers that qualify the name of
an out-of-line definition of a member template, e.g.,

template<typename X> template<typename Y>
X Outer<X>::Inner1<Y>::foo(Y) {
return X();
}

we need to look for the template names (e.g., "Inner1") as a member of
the current instantiation (Outer<X>), even before we have entered the
scope of the current instantiation. Since we can't do this in general
(i.e., we should not be looking into all dependent
nested-name-specifiers as if they were the current instantiation), we
rely on the parser to tell us when it is parsing a declaration
specifier sequence, and, therefore, when we should consider the
current scope specifier to be a current instantiation.

Printing of complicated, dependent nested-name-specifiers may be
somewhat broken by this commit; I'll add tests for this issue and fix
the problem (if it still exists) in a subsequent commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
dec06664a1c4d8984251083db2215875aea1c80d 21-Aug-2009 Douglas Gregor <dgregor@apple.com> Introduce support for constructor templates, which can now be declared
and will participate in overload resolution. Unify the instantiation
of CXXMethodDecls and CXXConstructorDecls, which had already gotten
out-of-sync.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79658 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
82bf01061b97404fed8c422fc0eda0a380689cc9 20-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Keep track of the right paren ')' source location in a function declarator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
9abf2aedae7538cfd85f3ff0898a6d14385c8e36 16-Aug-2009 Anders Carlsson <andersca@mac.com> AddInitializerToDecl can't take a FullExprArg. Make it take an ExprArg, and create the CXXExprWithTemporaries before setting the initializer on the VarDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
fee13819693c8492f0c364bc704645e844ef737a 08-Aug-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Patch should implement packed enums - PR4098. Credit to Anders Johnsen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78471 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
67d1a67f3db2f1aa69083c5c94164d6e0ee05b32 06-Aug-2009 John McCall <rjmccall@apple.com> First pass at friend semantics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
fec54013fcd0eb72642741584ca04c1bc292bef8 03-Aug-2009 John McCall <rjmccall@apple.com> Refactor methods on DeclSpec to take a diagnostic& parameter, and reflect this
elsewhere. Very slightly decouples DeclSpec users from knowing the exact
diagnostics to report, and makes it easier to provide different diagnostics in
some places.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
0f434ecbead44c1f4d5f9dda088f9827fa0dc40f 31-Jul-2009 John McCall <rjmccall@apple.com> Rename Action::TagKind to Action::TagUseKind, which removes both a misnomer
and a name collision.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77658 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5c15fe1f59a08c6e2215f99a3b251e14c73b36e2 31-Jul-2009 John McCall <rjmccall@apple.com> sp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
bd1099efde211cbb63fce3feee4ebcc6bac58781 23-Jul-2009 Douglas Gregor <dgregor@apple.com> Clean up the ActOnTag action, so that there is only a single entry
point that covers templates and non-templates. This should eliminate
the flood of warnings I introduced yesterday.

Removed the ActOnClassTemplate action, which is no longer used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d33c868d386ef47c2942e2dbff0d9955a8591fa9 20-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Issue a more descriptive diagnostics when mis-declaring
a destructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f5c209d23b20ada4a9b6235db50317239cbf6ae1 14-Jul-2009 Alisdair Meredith <public@alisdairm.net> Basic support for C++0x unicode types. Support for literals will follow in an incremental patch

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
07a5b282fbe719986df9ed05543081ea0ed94aa5 14-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Pass the right brace SourceLocation from the Parser to the TagDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
6a75cd9c1d54625fca7b5477ab9545bcdbd85ea4 11-Jul-2009 Anders Carlsson <andersca@mac.com> Implement more of C++0x 'auto'. A variable with an auto type specifier must have an initializer. Also, move some tests around to match the C++0x draft better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
675431d5a8b6aed1bd7322aa2da5cd8eb0ae76b7 06-Jul-2009 Douglas Gregor <dgregor@apple.com> Parsing fix for out-of-line constructors, from Piotr Rak

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
1bc5bbf39a26d2604884216a511bd51aec1784f6 01-Jul-2009 Ted Kremenek <kremenek@apple.com> Fix: <rdar://problem/7021553> clang -fsyntax-only crashes (in ParseDeclarationSpecifiers ... from ParseObjCTypeName)

Another case where we should use SmallVector::data() instead of taking the
address of element 0 of a SmallVector when the SmallVector has no elements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
0b7f789945acfa0494238069895d74d44812cdea 27-Jun-2009 Anders Carlsson <andersca@mac.com> Fix test.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
6f3d838867538638b9bbf412028e8537ae12f3e5 26-Jun-2009 Nate Begeman <natebegeman@mac.com> OpenCL 1.0 support: attributes


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e542c862bdf9a9bcb4f468be8fa6561372430611 24-Jun-2009 Douglas Gregor <dgregor@apple.com> Start propagating template parameter lists to the right places to
handle function templates. There's no actual code for function
templates yet, but at least we complain about typedef templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d7f37bf8b9a211455c5037df7b7e88e5a9510119 23-Jun-2009 Douglas Gregor <dgregor@apple.com> Implement implicit instantiation of the member functions of a class template
specialization. At present, all implicit instantiations occur at the
end of the translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e0762c92110dfdcdd207db461a4ea17afd168f1e 20-Jun-2009 Douglas Gregor <dgregor@apple.com> Keep track of when declarations are "used" according to C and
C++. This logic is required to trigger implicit instantiation of
function templates and member functions of class templates, which will
be implemented separately.

This commit includes support for -Wunused-parameter, printing warnings
for named parameters that are not used within a function/Objective-C
method/block. Fixes <rdar://problem/6505209>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
0ffd9ffb633ca4886c7db4dd12dc36bdad3d797c 18-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement correct name lookup inside an initializer of a C++ class static data member.

Fixes "test/CXX/basic/basic.lookup/basic.lookup.unqual/p13.cpp" test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5e300d1a8e37f24e71f8cf204b982f20f85cf91a 12-Jun-2009 Anders Carlsson <andersca@mac.com> It's an error to use a function declared in a class definition as a default argument before the function has been declared.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
290eeb0ec2b6b91f3621e05ef541deb257fbea73 09-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add more parser support for Microsoft extensions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
a23b4856476320435e1ae59f71f19fc30b1c9992 08-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add real parsing for __declspec. It doesn't make much of a difference
at the moment because we ignore the result.



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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f5dcd3885865c931fdbd16f36237af70743d53c6 30-May-2009 Anders Carlsson <andersca@mac.com> AddInitializerToDecl needs to take a full expression.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
c1dc653b08226c1d8e1732f9d8b03b82869900bc 29-May-2009 Eli Friedman <eli.friedman@gmail.com> If a declarator group declares a type, make sure to add that declaration
to the DeclGroup.



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

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

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

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

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

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

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

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

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





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72555 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5ab0640efb436a721d408c853b771932d1a6ffce 22-May-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactor the common code of 'ParseTypeofSpecifier' and 'ParseSizeofAlignofExpression' into a new
'ParseExprAfterTypeofSizeofAlignof' method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72256 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
6409625011e4a11ff07956ff46a44d6ca4473992 22-May-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Parse typeof-specifier the same way as sizeof/alignof are parsed.

-Makes typeof consistent with sizeof/alignof
-Fixes a bug when '>' is in a typeof expression, inside a template type param:
A<typeof(x>1)> a;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
45db71d295cfda888a6187d950bba695ce21a287 21-May-2009 Douglas Gregor <dgregor@apple.com> Merge the ASTVector and ASTOwningVector templates, since they offered
redundant functionality. The result (ASTOwningVector) lives in
clang/Parse/Ownership.h and is used by both the parser and semantic
analysis. No intended functionality change.



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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
c6e35aae23bc3cea7daf5ee075fa695c01c0f66f 16-May-2009 Mike Stump <mrs@apple.com> Implement a FIXME, we now pass in the locations of the braces for enums.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
4d9a16f36d3b768672d50e6d02000f982ae448d7 13-May-2009 Douglas Gregor <dgregor@apple.com> Implement parsing for explicit instantiations of class templates, e.g.,

template class X<int>;

This also cleans up the propagation of template information through
declaration parsing, which is used to improve some diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
1426e534b4fca6a05b1120d634aae46be79ca17c 12-May-2009 Douglas Gregor <dgregor@apple.com> Refactor the parsing of declarations so that template declarations can
parse just a single declaration and provide a reasonable diagnostic
when the "only one declarator per template declaration" rule is
violated. This eliminates some ugly, ugly hackery where we used to
require thatn the layout of a DeclGroup of a single element be the
same as the layout of a single declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f47f7a1c4082b42b21f1c7dc211ff90f4b38258a 06-May-2009 Anders Carlsson <andersca@mac.com> Add parsing of friend specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71067 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
4649cac75c3cb80d543c6d90269388277228508d 01-May-2009 Anders Carlsson <andersca@mac.com> Rework the way we handle constructor decls to be less hacky and fix PR3948 completely.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5a8cb0bda09c91d6530d943b72b1a6ac95862430 30-Apr-2009 Anders Carlsson <andersca@mac.com> Just because a declaration has the same name as its containing class doesn't mean that it's a constructor. Fixes rdar://problem/6815988.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
7dc813462dd9fd3f6f4296f896a12de14264fef8 29-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Have the parser communicate the exception specification to the action.

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

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

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

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


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




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5cb10d3b1ad546b232e72275eaaf56d72823901d 25-Apr-2009 Chris Lattner <sabre@nondot.org> fix the sizeof error recovery issue (sizeof-interface.m:attributeRuns)
by correctly propagating the fact that the type was invalid up to the
attributeRuns decl, then returning an ExprError when attributeRuns is
formed (like we do for normal declrefexprs).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
75b163f4c832696edf4d66d8ac1ec0ed5ea59e17 21-Apr-2009 Mike Stump <mrs@apple.com> Fixup codegen for write barriers for block variables. Radar 6786715


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f4382f50b7ab9f445c3f5b3ddaa59e6da25ea3bb 15-Apr-2009 Chris Lattner <sabre@nondot.org> Make the implicit-int handling error recovery stuff handle C++
nested name specifiers. Now we emit stuff like:

t.cpp:8:13: error: unknown type name 'X'
static foo::X P;
~~~~ ^

instead of:

t.cpp:8:16: error: invalid token after top level declarator
static foo::X P;
^

This is inspired by a really awful error message I got from
g++ when I misspelt diag::kind as diag::Kind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e40c295d017a8f75a945fe9ed2aa9d8bb7a7341a 14-Apr-2009 Chris Lattner <sabre@nondot.org> refactor "implicit int error recovery" code out of
ParseDeclarationSpecifiers into its own function, no
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
b6645dd9ca7a44e9b5f657e14820d5edcc511ee5 14-Apr-2009 Chris Lattner <sabre@nondot.org> Fix a regression in a previous patch that broke implicit
int in a bitfield. Shantonu found this in a gcc testsuite file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
51172d12a5eb449193cee3a779ab1f299ba1a945 13-Apr-2009 Chris Lattner <sabre@nondot.org> fix a comment typo Sebastian noticed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
c83c27af6820585f4b6964f1e1f13f237a0d14fc 13-Apr-2009 Chris Lattner <sabre@nondot.org> add support for handling C++'0x unified initializer syntax
to isValidAfterIdentifierInDeclarator, as suggested by Sebastian.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
8129edbb576c297df8631c3db4ac1339f4a9e8ad 13-Apr-2009 Chris Lattner <sabre@nondot.org> Fix some C++ error recovery problems in init declarator parsing
that I noticed working on other things.

Instead of emitting:

t2.cc:1:8: error: use of undeclared identifier 'g'
int x(*g);
^
t2.cc:1:10: error: expected ')'
int x(*g);
^
t2.cc:1:6: note: to match this '('
int x(*g);
^

We now only emit:

t2.cc:1:7: warning: type specifier missing, defaults to 'int'
int x(*g);
^


Note that the example in SemaCXX/nested-name-spec.cpp:f4 is still
not great, we now produce both of:

void f4(undef::C); // expected-error {{use of undeclared identifier 'undef'}} \
expected-error {{variable has incomplete type 'void'}}

The second diagnostic should be silenced by something getting marked invalid.
I don't plan to fix this though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
33c6ebef6f9acad6eb667fff77ff78f0c169332c 13-Apr-2009 Chris Lattner <sabre@nondot.org> mark the declspec as invalid when we recover instead of forcing to int,
this allows downstream diags to be properly silenced.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68917 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
4c97d762d8c5a84f6554e5bfb31d28c90df64158 12-Apr-2009 Chris Lattner <sabre@nondot.org> Diagnose invalid uses of tagged types with a missing tag. For example, in:

struct xyz { int y; };
enum abc { ZZZ };

static xyz b;
abc c;

we used to produce:

t2.c:4:8: error: unknown type name 'xyz'
static xyz b;
^
t2.c:5:1: error: unknown type name 'abc'
abc c;
^

we now produce:

t2.c:4:8: error: use of tagged type 'xyz' without 'struct' tag
static xyz b;
^
struct
t2.c:5:1: error: use of tagged type 'abc' without 'enum' tag
abc c;
^
enum

GCC produces the normal:
t2.c:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘b’
t2.c:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘c’

rdar://6783347


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
c199ab3ea1381e8e9cdd720eb87bb4f65cdf5086 12-Apr-2009 Chris Lattner <sabre@nondot.org> Implement the first set of changes for PR3963 and rdar://6759604,
which tries to do better error recovery when it is "obvious" that an
identifier is a mis-typed typename. In this case, we try to parse
it as a typename instead of as the identifier in a declarator, which
gives us several options for better error recovery and immediately
makes diagnostics more useful. For example, we now produce:

t.c:4:8: error: unknown type name 'foo_t'
static foo_t a = 4;
^

instead of:

t.c:4:14: error: invalid token after top level declarator
static foo_t a = 4;
^

Also, since we now parse "a" correctly, we make a decl for it,
preventing later uses of 'a' from emitting things like:

t.c:12:20: error: use of undeclared identifier 'a'
int bar() { return a + b; }
^

I'd really appreciate any scrutiny possible on this, it
is a tricky area.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
75e3606728e30e00b3be0779243b55305e167828 03-Apr-2009 Chris Lattner <sabre@nondot.org> add fixit advice to an archiac ObjC issue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
97144fc41a9419bf6d74fc9450e8ef3f6e11f7e0 02-Apr-2009 Chris Lattner <sabre@nondot.org> fix a FIXME, providing accurate source range info for DeclStmt's. The end
of the range is now the ';' location. For something like this:

$ cat t2.c

#define bool int
void f(int x, int y) {
bool b = !x && y;
}

We used to produce:
$ clang-cc t2.c -ast-dump
typedef char *__builtin_va_list;

void f(int x, int y)
(CompoundStmt 0x2201f10 <t2.c:3:22, line:5:1>
(DeclStmt 0x2201ef0 <line:2:14> <----
0x2201a20 "int b =
(BinaryOperator 0x2201ed0 <line:4:10, col:16> 'int' '&&'
(UnaryOperator 0x2201e90 <col:10, col:11> 'int' prefix '!'
(DeclRefExpr 0x2201c90 <col:11> 'int' ParmVar='x' 0x2201a50))
(DeclRefExpr 0x2201eb0 <col:16> 'int' ParmVar='y' 0x2201e10))")


Now we produce:

$ clang-cc t2.c -ast-dump
typedef char *__builtin_va_list;

void f(int x, int y)
(CompoundStmt 0x2201f10 <t2.c:3:22, line:5:1>
(DeclStmt 0x2201ef0 <line:2:14, line:4:17> <------
0x2201a20 "int b =
(BinaryOperator 0x2201ed0 <col:10, col:16> 'int' '&&'
(UnaryOperator 0x2201e90 <col:10, col:11> 'int' prefix '!'
(DeclRefExpr 0x2201c90 <col:11> 'int' ParmVar='x' 0x2201a50))
(DeclRefExpr 0x2201eb0 <col:16> 'int' ParmVar='y' 0x2201e10))")



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
9b3064b55f3c858923734e8b1c9831777fc22554 02-Apr-2009 Douglas Gregor <dgregor@apple.com> Add code modification hints to various parsing-related diagnostics.

Plus, reword a extension warnings to avoid talking about "ISO C" when
the extension might also be available in C++ or C++0x.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
31a19b6989bbf326d2de5ae12e712e2a65ca9c34 01-Apr-2009 Douglas Gregor <dgregor@apple.com> Make parsing a semantic analysis a little more robust following Sema
failures that involve malformed types, e.g., "typename X::foo" where
"foo" isn't a type, or "std::vector<void>" that doens't instantiate
properly.

Similarly, be a bit smarter in our handling of ambiguities that occur
in Sema::getTypeName, to eliminate duplicate error messages about
ambiguous name lookup.

This eliminates two XFAILs in test/SemaCXX, one of which was crying
out to us, trying to tell us that we were producing repeated error
messages.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
c45c232440dfafedca1a3773b904fb42609b1b19 31-Mar-2009 Douglas Gregor <dgregor@apple.com> Parsing and AST representation for dependent template names that occur
within nested-name-specifiers, e.g., for the "apply" in

typename MetaFun::template apply<T1, T2>::type

At present, we can't instantiate these nested-name-specifiers, so our
testing is sketchy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
cd1477562e7cf03279850885583d615e1f631dd4 29-Mar-2009 Chris Lattner <sabre@nondot.org> hoist some code for handling objc foreach construct out of Declaration processing
into ParseForStatement. Merge two tests into one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
23c4b1883b13dc17484b7214091b73f3ba29096e 29-Mar-2009 Chris Lattner <sabre@nondot.org> hoist checks for ; and in out of ParseInitDeclaratorListAfterFirstDeclarator
into ParseSimpleDeclaration, and improve a diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
682bf92db408a6cbc3d37b5496a99b6ef85041ec 29-Mar-2009 Chris Lattner <sabre@nondot.org> Push DeclGroup much farther throughout the compiler. Now the various
productions (except the already broken ObjC cases like @class X,Y;) in
the parser that can produce more than one Decl return a DeclGroup instead
of a Decl, etc.

This allows elimination of the Decl::NextDeclarator field, and exposes
various clients that should look at all decls in a group, but which were
only looking at one (such as the dumper, printer, etc). These have been
fixed.

Still TODO:

1) there are some FIXME's in the code about potentially using
DeclGroup for better location info.
2) ParseObjCAtDirectives should return a DeclGroup due to @class etc.
3) I'm not sure what is going on with StmtIterator.cpp, or if it can
be radically simplified now.
4) I put a truly horrible hack in ParseTemplate.cpp.

I plan to bring up #3/4 on the mailing list, but don't plan to tackle
#1/2 in the short term.



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

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

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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
239a53edc946f3756635b2d230f62ed43dbbbef7 28-Mar-2009 Chris Lattner <sabre@nondot.org> tidy whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d57959af02b4af695276f4204443afe6e5d86bd8 28-Mar-2009 Douglas Gregor <dgregor@apple.com> Initial implementation of parsing, semantic analysis, and template
instantiation for C++ typename-specifiers such as

typename T::type

The parsing of typename-specifiers is relatively easy thanks to
annotation tokens. When we see the "typename", we parse the
typename-specifier and produce a typename annotation token. There are
only a few places where we need to handle this. We currently parse the
typename-specifier form that terminates in an identifier, but not the
simple-template-id form, e.g.,

typename T::template apply<U, V>

Parsing of nested-name-specifiers has a similar problem, since at this
point we don't have any representation of a class template
specialization whose template-name is unknown.

Semantic analysis is only partially complete, with some support for
template instantiation that works for simple examples.



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


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
06c0fecd197fef21e265a41bca8dc5022de1f864 25-Mar-2009 Douglas Gregor <dgregor@apple.com> Pass access specifiers through to member classes and member enums.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
9135c72fd17bf313072fa12cfe66eb2437ef8e9d 25-Mar-2009 Douglas Gregor <dgregor@apple.com> Fix parsing of template classes prefixed by nested-name-specifiers

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
50de12f5783b57c74fd30ebfa3945181313625ff 24-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Parse deleted function definitions and hook them up to Doug's machinery.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f919bfe282b8a94d956290dc9812b456fa2b447e 24-Mar-2009 Chris Lattner <sabre@nondot.org> random cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
743de1f671ee0ef213c7404cfdc85579dd12c56e 23-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Recognize rvalue references in C++03, but complain about them. This leads to far better error recovery.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e4e5b054b4917f0ee493bb2fda5b1ec749bfb9a1 19-Mar-2009 Douglas Gregor <dgregor@apple.com> Introduce a representation for types that we referred to via a
qualified name, e.g.,

foo::x

so that we retain the nested-name-specifier as written in the source
code and can reproduce that qualified name when printing the types
back (e.g., in diagnostics). This is PR3493, which won't be complete
until finished the other tasks mentioned near the end of this commit.

The parser's representation of nested-name-specifiers, CXXScopeSpec,
is now a bit fatter, because it needs to contain the scopes that
precede each '::' and keep track of whether the global scoping
operator '::' was at the beginning. For example, we need to keep track
of the leading '::', 'foo', and 'bar' in

::foo::bar::x

The Action's CXXScopeTy * is no longer a DeclContext *. It's now the
opaque version of the new NestedNameSpecifier, which contains a single
component of a nested-name-specifier (either a DeclContext * or a Type
*, bitmangled).

The new sugar type QualifiedNameType composes a sequence of
NestedNameSpecifiers with a representation of the type we're actually
referring to. At present, we only build QualifiedNameType nodes within
Sema::getTypeName. This will be extended to other type-constructing
actions (e.g., ActOnClassTemplateId).

Also on the way: QualifiedDeclRefExprs will also store a sequence of
NestedNameSpecifiers, so that we can print out the property
nested-name-specifier. I expect to also use this for handling
dependent names like Fibonacci<I - 1>::value.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
05532f2a88161eb6d9b796614f1b82dca541ff22 15-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Parser support for rvalue references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f53597fb16142bdb4a66901f8c0b768db4f2a548 15-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a bunch of actions to smart pointers, and also bring PrintParserCallbacks a bit more in line with reality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
511d7aba3b12853fdb88729a0313b80a60eab8ad 11-Mar-2009 Anders Carlsson <andersca@mac.com> Add parser support for static_assert.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
61f72cbd037e58f12cfe90cd442373f44092f030 09-Mar-2009 Steve Naroff <snaroff@apple.com> Implement property '.' notation on Factory/Class objects. Parser changes aren't very pretty:-(

This fixes <rdar://problem/6496506> Implement class setter/getter for properties.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e950d4bbb7c785c7a7abdd0ad98f372b8c7980b8 07-Mar-2009 Douglas Gregor <dgregor@apple.com> Clean up some error messages with anonymous structs/unions and member declaration parsing. Fixes PR3680

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
49f28ca787d8db7cac3c8898334f70ea55374c98 05-Mar-2009 Chris Lattner <sabre@nondot.org> rename PrettyStackTraceDecl -> PrettyStackTraceActionsDecl.
Introduce a new PrettyStackTraceDecl.
Use it to add the top level LLVM IR generation stuff in
Backend.cpp to stack traces. We now get crashes like:

Stack dump:
0. Program arguments: clang t.c -emit-llvm
1. <eof> parser at end of file
2. t.c:1:5: LLVM IR generation of declaration 'a'
Abort

for IR generation crashes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
27b7f1028255149978356f85c4825522d234a253 05-Mar-2009 Chris Lattner <sabre@nondot.org> Include struct context info for parser/sema crashes. This
gives us:

Stack dump:
0. using-directive.cpp:26:16: in compound statement ('{}')
1. using-directive.cpp:26:16: parsing function body 'A::K1::foo'
2. using-directive.cpp:25:3: parsing struct/union/class body 'A::K1'
3. using-directive.cpp:5:1: parsing namespace 'A'
4. clang using-directive.cpp
Abort

for code like:

namespace A {
...
class K1 {
void foo() { <<crash>>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ae50fa0a9e7217b043ed4ffe175af4b26dc90f34 05-Mar-2009 Chris Lattner <sabre@nondot.org> Include information about compound statements when crashing in sema or the
parser. For example, we now print out:

0. t.c:5:10: in compound statement {}
1. t.c:3:12: in compound statement {}
2. clang t.c -fsyntax-only



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e64c5491d0097b280eb553696ee9c0d8fa139f82 27-Feb-2009 Chris Lattner <sabre@nondot.org> cleanup


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65646 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
7f43d6764797ab21216421aeb00f4ec314d503d1 26-Feb-2009 Douglas Gregor <dgregor@apple.com> Implementing parsing of template-ids as class-names, so that we can
derive from a class template specialization, e.g.,

class B : public A<int> { };



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
39a8de10c18365bde7062d8959b7ed525449c561 25-Feb-2009 Douglas Gregor <dgregor@apple.com> Implement parsing of nested-name-specifiers that involve template-ids, e.g.,

std::vector<int>::allocator_type

When we parse a template-id that names a type, it will become either a
template-id annotation (which is a parsed representation of a
template-id that has not yet been through semantic analysis) or a
typename annotation (where semantic analysis has resolved the
template-id to an actual type), depending on the context. We only
produce a type in contexts where we know that we only need type
information, e.g., in a type specifier. Otherwise, we create a
template-id annotation that can later be "upgraded" by transforming it
into a typename annotation when the parser needs a type. This occurs,
for example, when we've parsed "std::vector<int>" above and then see
the '::' after it. However, it means that when writing something like
this:

template<> class Outer::Inner<int> { ... };

We have two tokens to represent Outer::Inner<int>: one token for the
nested name specifier Outer::, and one template-id annotation token
for Inner<int>, which will be passed to semantic analysis to define
the class template specialization.

Most of the churn in the template tests in this patch come from an
improvement in our error recovery from ill-formed template-ids.



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


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

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

although this would be rejected:

void f(...);

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
cc636688c4fd10b1732ce3e33b2b106024d545ca 18-Feb-2009 Douglas Gregor <dgregor@apple.com> Implement basic parsing and semantic analysis for explicit
specialization of class templates, e.g.,

template<typename T> class X;

template<> class X<int> { /* blah */ };

Each specialization is a different *Decl node (naturally), and can
have different members. We keep track of forward declarations and
definitions as for other class/struct/union types.

This is only the basic framework: we still have to deal with checking
the template headers properly, improving recovery when there are
failures, handling nested name specifiers, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
55f6b14230c94272efbbcdd89a92224c8db9f225 09-Feb-2009 Douglas Gregor <dgregor@apple.com> Start processing template-ids as types when the template-name refers
to a class template. For example, the template-id 'vector<int>' now
has a nice, sugary type in the type system. What we can do now:

- Parse template-ids like 'vector<int>' (where 'vector' names a
class template) and form proper types for them in the type system.
- Parse icky template-ids like 'A<5>' and 'A<(5 > 0)>' properly,
using (sadly) a bool in the parser to tell it whether '>' should
be treated as an operator or not.

This is a baby-step, with major problems and limitations:
- There are currently two ways that we handle template arguments
(whether they are types or expressions). These will be merged, and,
most likely, TemplateArg will disappear.
- We don't have any notion of the declaration of class template
specializations or of template instantiations, so all template-ids
are fancy names for 'int' :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ab197baec16bacade82325fb274cf6b992ac5d8a 09-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement Declarator::getSourceRange().

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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ddc29e116db3c3f4144355e67a0137b38b6bb6d1 06-Feb-2009 Douglas Gregor <dgregor@apple.com> Semantic checking for class template declarations and
redeclarations. For example, checks that a class template
redeclaration has the same template parameters as previous
declarations.

Detangled class-template checking from ActOnTag, whose logic was
getting rather convoluted because it tried to handle C, C++, and C++
template semantics in one shot.

Made some inroads toward eliminating extraneous "declaration does not
declare anything" errors by adding an "error" type specifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
76ad2e85575722e8a38a2bd4648ab4304d9fcd24 05-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Put the invalid flag of OwningResult into the Action pointer.
This shrinks OwningResult by one pointer. Since it is no longer larger than OwningPtr, merge the two.
This leads to simpler client code and speeds up my benchmark by 2.7%.
For some reason, this exposes a previously hidden bug, causing a regression in SemaCXX/condition.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
aaba5e346dffdbad5d1c42765a89e4a7afb0da67 04-Feb-2009 Douglas Gregor <dgregor@apple.com> Basic representation of C++ class templates, from Andrew Sutton.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
b696ea3a0693798daeafd896d77f0b8f1fec3cc5 04-Feb-2009 Douglas Gregor <dgregor@apple.com> Diagnose ambiguities in getTypeName. Fixes http://llvm.org/bugs/show_bug.cgi?id=3475

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f64ef62699ae470437d3689888cb284fd31e9bd9 30-Jan-2009 Steve Naroff <snaroff@apple.com> Simplify/cleanup r63219 (based on Chris review).


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
b43a50ff1b0b171ece84425b0ad83a9a31f038fa 28-Jan-2009 Steve Naroff <snaroff@apple.com> Name change (isTypeName->getTypeName).
Since it doesn't return a bool, is shouldn't be prefixed with 'is'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
2d081c47cdaa2fa37848bddb0062e61c4607cb0b 28-Jan-2009 Steve Naroff <snaroff@apple.com> Change Parser::ParseFunctionDeclarator() to annotate typename tokens.

This removes ~10% of the calls to Sema::isTypeName(), which amount to a little less than a 1% reduction in usertime (for Cocoa.h).


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

Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5ac8aff3d7431dc7e4d64d960574a10c9f7e0078 26-Jan-2009 Douglas Gregor <dgregor@apple.com> Some micro-optimizations for DISABLE_SMART_POINTERS:
- When it's safe, ActionResult uses the low bit of the pointer for
the "invalid" flag rather than a separate "bool" value. This keeps
GCC from generating some truly awful code, for a > 3x speedup in the
result-passing microbenchmark.
- When DISABLE_SMART_POINTERS is defined, store an ActionResult
within ASTOwningResult rather than an ASTOwningPtr. Brings the
performance benefits of the above to smart pointers with
DISABLE_SMART_POINTERS defined.

Sadly, these micro-benchmark performance improvements don't seem to
make much of a difference on Cocoa.h right now. However, they're
harmless and might help with future optimizations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f30208ad5b334e93582e846a2a0c92f38a607b8a 24-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Add support for declaring pointers to members.
Add serialization support for ReferenceType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
80d0c892c7ca163c0f8b1546c866caaefb7ef559 21-Jan-2009 Chris Lattner <sabre@nondot.org> Inline ParseOptionalTypeSpecifier into ParseDeclarationSpecifiers.
This avoids call overhead and extraneous switches when parsing
very simple declspecs like "int" "void" etc, which are pretty common :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
837acd040662ba3e9fcfbf4be754416b00b18216 21-Jan-2009 Chris Lattner <sabre@nondot.org> ParseOptionalTypeSpecifier should consume a token if it returns true.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5af2f35c6ad1cb78b2aed3705d221954d1689b8a 20-Jan-2009 Chris Lattner <sabre@nondot.org> Optimize Declarator to avoid malloc/free traffic for the argument list of a
function DeclaratorChunk in common cases. This uses a fixed array in
Declarator when it is small enough for the first function declarator chunk
in a declarator.

This eliminates all malloc/free traffic from DeclaratorChunk::getFunction
when running on Cocoa.h except for five functions: signal/bsd_signal/sigset,
which have multiple Function DeclChunk's, and
CFUUIDCreateWithBytes/CFUUIDGetConstantUUIDWithBytes, which take more than
16 arguments.

This patch was pair programmed with Steve.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
cd965b97cfac7b7a53a835810ec2bc2ac7a9dd1a 18-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a few expression actions to smart pointers.
These actions are extremely widely used (identifier expressions and literals); still no performance regression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f512e82f56671b695a32d019103e62a302838b7e 18-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Rename move_convert to move_arg and move_res. The new names are less misleading (and shorter).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
41f2b32df5faff10c305ef1892fcb02846e4f489 17-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Catch a foreach parse error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62382 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
4920f1ffb62b13b88e579476803c093f97f3e17f 12-Jan-2009 Douglas Gregor <dgregor@apple.com> Implement support for anonymous structs and unions in C. Both C and
C++ handle anonymous structs/unions in the same way. Addresses several
bugs:

<rdar://problem/6259534>
<rdar://problem/6481130>
<rdar://problem/6483159>

The test case in PR clang/1750 now passes with -fsyntax-only, but
CodeGen for inline assembler still fails.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5a2f5d304897220f16e00c05cf122dd95e859aa9 10-Jan-2009 Douglas Gregor <dgregor@apple.com> Allow multiple Microsoft calling-convention keywords. Fixes rdar://problem/6486133

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
3218c4bb3b5d7250f12420de6db7ef3e3f805a75 09-Jan-2009 Douglas Gregor <dgregor@apple.com> When we see a reference to a struct, class, or union like "struct X"
that is neither a definition nor a forward declaration and where X has
not yet been declared as a tag, introduce a declaration
into the appropriate scope (which is likely *not* to be the current
scope). The rules for the placement of the declaration differ slightly
in C and C++, so we implement both and test the various corner
cases. This implementation isn't 100% correct due to some lingering
issues with the function prototype scope (for a function parameter
list) not being the same scope as the scope of the function
definition. Testcase is FIXME'd; this probably isn't an important issue.

Addresses <rdar://problem/6484805>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
72de6676bd30f9081ee4166bbe07b4c270258ce6 08-Jan-2009 Douglas Gregor <dgregor@apple.com> Unify the code for defining tags in C and C++, so that we always
introduce a Scope for the body of a tag. This reduces the number of
semantic differences between C and C++ structs and unions, and will
help with other features (e.g., anonymous unions) in C. Some important
points:

- Fields are now in the "member" namespace (IDNS_Member), to keep
them separate from tags and ordinary names in C. See the new test
in Sema/member-reference.c for an example of why this matters. In
C++, ordinary and member name lookup will find members in both the
ordinary and member namespace, so the difference between
IDNS_Member and IDNS_Ordinary is erased by Sema::LookupDecl (but
only in C++!).
- We always introduce a Scope and push a DeclContext when we're
defining a tag, in both C and C++. Previously, we had different
actions and different Scope/CurContext behavior for enums, C
structs/unions, and C++ structs/unions/classes. Now, it's one pair
of actions. (Yay!)

There's still some fuzziness in the handling of struct/union/enum
definitions within other struct/union/enum definitions in C. We'll
need to do some more cleanup to eliminate some reliance on CurContext
before we can solve this issue for real. What we want is for something
like this:

struct X {
struct T { int x; } t;
};

to introduce T into translation unit scope (placing it at the
appropriate point in the IdentifierResolver chain, too), but it should
still have struct X as its lexical declaration
context. PushOnScopeChains isn't smart enough to do that yet, though,
so there's a FIXME test in nested-redef.c



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
47f5209a80c7c75592e87eb296d2b51e03208ae0 06-Jan-2009 Steve Naroff <snaroff@apple.com> Another tweak to handle the MS extensions (<rdar://problem/5956221>).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
7a0ab5f387722c83e19c7133b46b16988eb19e45 06-Jan-2009 Chris Lattner <sabre@nondot.org> rename MaybeParseCXXScopeSpecifier -> ParseOptionalCXXScopeSpecifier and
MaybeParseTypeSpecifier -> ParseOptionalTypeSpecifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
b31757b68afe06ba442a05775d08fe7aa0f6f889 06-Jan-2009 Chris Lattner <sabre@nondot.org> rename tok::annot_qualtypename -> tok::annot_typename, which is both
shorter and more accurate. The type name might not be qualified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
074149e11baf5f7db12f84efd5c34ba6e35d5cdf 05-Jan-2009 Douglas Gregor <dgregor@apple.com> Introduce support for "transparent" DeclContexts, which are
DeclContexts whose members are visible from enclosing DeclContexts up
to (and including) the innermost enclosing non-transparent
DeclContexts. Transparent DeclContexts unify the mechanism to be used
for various language features, including C enumerations, anonymous
unions, C++0x inline namespaces, and C++ linkage
specifications. Please refer to the documentation in the Clang
internals manual for more information.

Only enumerations and linkage specifications currently use transparent
DeclContexts.

Still to do: use transparent DeclContexts to implement anonymous
unions and GCC's anonymous structs extension, and, later, the C++0x
features. We also need to tighten up the DeclContext/ScopedDecl link
to ensure that every ScopedDecl is in a single DeclContext, which
will ensure that we can then enforce ownership and reduce the memory
footprint of DeclContext.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5e02c47a7085831586344a9728763cb50540c7f7 05-Jan-2009 Chris Lattner <sabre@nondot.org> sink a call to TryAnnotateCXXScopeToken down into the
applicable cases in ParseDeclarationSpecifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
166a8fccc36e07a86b8a8cfbc76205c32cd671ff 05-Jan-2009 Chris Lattner <sabre@nondot.org> sink calls to TryAnnotateTypeOrScopeToken down into the only cases that they
can interact with.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f780abc21c39cd4731b9e38f2d2d9f7d1510bd7b 30-Dec-2008 Douglas Gregor <dgregor@apple.com> Parser support for C++ using directives, from Piotr Rak

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
70316a065bcf11c88143e22c88d530ebd320832f 26-Dec-2008 Douglas Gregor <dgregor@apple.com> Add support for out-of-line definitions of conversion functions and member operators

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61442 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
86bc6cf05ad3ff7198671c394ba5157974e8a39c 25-Dec-2008 Steve Naroff <snaroff@apple.com> Add parser support for __forceinline, __w64, __ptr64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
239f07384fe5e7194e780d98a17553084efeeb44 25-Dec-2008 Steve Naroff <snaroff@apple.com> Add parser support for __cdecl, __stdcall, and __fastcall.
Change preprocessor implementation of _cdecl to reference __cdecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f59e17ecf06ac60065e2d02058bd6f21f5d216cc 24-Dec-2008 Steve Naroff <snaroff@apple.com> Add explicit "fuzzy" parse support for Microsoft declspec.
Remove previous __declspec macro that would effectively erase the construct prior to parsing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
c4b4e7b8f6ca9b036824e048af49cd2a52b57cdf 24-Dec-2008 Douglas Gregor <dgregor@apple.com> Keep track of template arguments when we parse them. Right now, we don't actually do anything with the template arguments, but they'll be used to create template declarations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
61366e9cd41a6dbde4e66416dac21269c8ac1d94 24-Dec-2008 Douglas Gregor <dgregor@apple.com> Correct the order in which we cope with end-of-class-definition
semantics and improve our handling of default arguments. Specifically,
we follow this order:

- As soon as the see the '}' in the class definition, the class is
complete and we add any implicit declarations (default constructor,
copy constructor, etc.) to the class.
- If there are any default function arguments, parse them
- If there were any inline member function definitions, parse them

As part of this change, we now keep track of the the fact that we've
seen unparsed default function arguments within the AST. See the new
ParmVarDecl::hasUnparsedDefaultArg member. This allows us to properly
cope with calls inside default function arguments to other functions
where we're making use of the default arguments.

Made some C++ error messages regarding failed initializations more
specific.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d6fb7ef028d9aa0b3e8943b7bc049c524437b407 18-Dec-2008 Douglas Gregor <dgregor@apple.com> Ultrasimplistic sketch for the parsing of C++ template-ids. This won't
become useful or correct until we (1) parse template arguments
correctly, (2) have some way to turn template-ids into types,
declarators, etc., and (3) have a real representation of templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
378c7e487333bae6dbe848fa70936f0fd8bb0ae9 18-Dec-2008 Chris Lattner <sabre@nondot.org> add a simple fast-path for the common case of [] and [4] in
array size declarators. No need to go through all the trouble
of parsing crazy things like [static const 4] when most code
doesn't need it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5a69d1ce71579147c306f21c4cf205ef9519d63d 18-Dec-2008 Chris Lattner <sabre@nondot.org> disallow attributes in a few callers of ParseTypeQualifierListOpt,
these completely ignore parsed attributes anyway, so don't try
to read them.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61197 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
72b505b7904b3c9320a1312998800ba76e4f5841 16-Dec-2008 Douglas Gregor <dgregor@apple.com> Delay parsing of default arguments of member functions until the class
is completely defined (C++ [class.mem]p2).

Reverse the order in which we process the definitions of member
functions specified inline. This way, we'll get diagnostics in the
order in which the member functions were declared in the class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
798d119415323ebcd029ffe1e0fb442a4ca8adbb 13-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Some utilities for using the smart pointers in Actions, especially Sema. Convert a few functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
20df9b7ab9388b2a488c5b1293cd196b1e073b4e 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a big bunch of expression parsers to use smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
2f7ece7c77eb17e24e8f0f4e1b7fb01aa5111f96 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert selected expression parsers to use smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
44b4321feab46299d3f5cfd404680884752a0fcf 11-Dec-2008 Douglas Gregor <dgregor@apple.com> Unifies the name-lookup mechanisms used in various parts of the AST
and separates lexical name lookup from qualified name lookup. In
particular:
* Make DeclContext the central data structure for storing and
looking up declarations within existing declarations, e.g., members
of structs/unions/classes, enumerators in C++0x enums, members of
C++ namespaces, and (later) members of Objective-C
interfaces/implementations. DeclContext uses a lazily-constructed
data structure optimized for fast lookup (array for small contexts,
hash table for larger contexts).

* Implement C++ qualified name lookup in terms of lookup into
DeclContext.

* Implement C++ unqualified name lookup in terms of
qualified+unqualified name lookup (since unqualified lookup is not
purely lexical in C++!)

* Limit the use of the chains of declarations stored in
IdentifierInfo to those names declared lexically.

* Eliminate CXXFieldDecl, collapsing its behavior into
FieldDecl. (FieldDecl is now a ScopedDecl).

* Make RecordDecl into a DeclContext and eliminates its
Members/NumMembers fields (since one can just iterate through the
DeclContext to get the fields).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
8935b8b49053122ddd3ab4cd59af0fe5eb9c23cf 10-Dec-2008 Douglas Gregor <dgregor@apple.com> Use a scoped object to manage entry/exit from a parser scope rather than explicitly calling EnterScope/ExitScope

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
effa8d1c97b00a3f53e972b0e61d9aade5ea1c57 10-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Modify the move emulation according to the excellent design of Howard Hinnant. Makes for much nicer syntax when smart pointers are used consistently. Also, start converting internal argument passing of Parser to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60809 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
15faa7fdfb496489dec9470aa5eb699b29ecdacc 09-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Kick out the proof-of-concept ASTOwner and replace it with ASTOwningResult

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
0e9eabca263e8922bec0e2b38c8670eba9a39a1f 09-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Consistently use smart pointers for stmt and expr nodes in parser local variables.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
adcac8824a9cff13f1ef61a69e38c1041cba12ee 02-Dec-2008 Douglas Gregor <dgregor@apple.com> Basic support for parsing templates, from Andrew Sutton

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
314fe782fda562d1fe7d14d7135cc3f7736321c0 26-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Attempt to unravel the if/else mess in Parser::ParseDirectDeclarator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
4bdd91c09fd59e0c154d759288beff300e31e1d0 26-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement some suggestions by Daniel:

-Change Parser::ParseCXXScopeSpecifier to MaybeParseCXXScopeSpecifier
-Remove Parser::isTokenCXXScopeSpecifier and fold it into MaybeParseCXXScopeSpecifier
-Rename Parser::TryAnnotateScopeToken to TryAnnotateCXXScopeToken and only allow it to be called when in C++

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ab4c91c708ca0c7d80f513af74926271e25b2f56 26-Nov-2008 Daniel Dunbar <daniel@zuster.org> Only call TryAnnotateScopeToken when parsing C++.
- This improves -parse-noop of Carbon.h by +2%, and I believe
compensates for the majority of the performance regression in r58913.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60063 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
a55e52c0802cae3b7c366a05c461d3d15074c1a3 25-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Use RAII objects to ensure proper destruction of expression and statement AST nodes in the parser in most cases, even on error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
0fe7bea6fca9737c6c145aaa4a2ad3abe595782a 25-Nov-2008 Douglas Gregor <dgregor@apple.com> Simple parsing of exception specifications, with no semantic analysis yet

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
08631c5fa053867146b5ee8be658c229f6bf127c 23-Nov-2008 Chris Lattner <sabre@nondot.org> Convert IdentifierInfo's to be printed the same as DeclarationNames
with implicit quotes around them. This has a bunch of follow-on
effects and requires tweaking to a whole lot of code. This causes
a regression in two tests (xfailed) by causing it to emit things like:

Line 10: duplicate interface declaration for category 'MyClass1' ('Category1')

instead of:

Line 10: duplicate interface declaration for category 'MyClass1(Category1)'

I will fix this in a follow-up commit.

As part of this, I had to start switching stuff to use ->getDeclName() instead
of Decl::getName() for consistency. This is good, but I was planning to do this
as an independent patch. There will be several follow-on patches
to clean up some of the mess, but this patch is already too big.



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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
da83bac90aca45d6a228b53a05b30bffeadc1cbd 19-Nov-2008 Chris Lattner <sabre@nondot.org> remove uses of IdentifierInfo::getName()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e94ca9e4371c022329270436b3dd77adc4ddfa8f 18-Nov-2008 Douglas Gregor <dgregor@apple.com> Extend DeclarationName to support C++ overloaded operators, e.g.,
operator+, directly, using the same mechanism as all other special
names.

Removed the "special" identifiers for the overloaded operators from
the identifier table and IdentifierInfo data structure. IdentifierInfo
is back to representing only real identifiers.

Added a new Action, ActOnOperatorFunctionIdExpr, that builds an
expression from an parsed operator-function-id (e.g., "operator
+"). ActOnIdentifierExpr used to do this job, but
operator-function-ids are no longer represented by IdentifierInfo's.

Extended Declarator to store overloaded operator names.
Sema::GetNameForDeclarator now knows how to turn the operator
name into a DeclarationName for the overloaded operator.

Except for (perhaps) consolidating the functionality of
ActOnIdentifier, ActOnOperatorFunctionIdExpr, and
ActOnConversionFunctionExpr into a common routine that builds an
appropriate DeclRefExpr by looking up a DeclarationName, all of the
work on normalizing declaration names should be complete with this
commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
1ab3b96de160e4fbffec2a776e284a48a3bb543d 18-Nov-2008 Chris Lattner <sabre@nondot.org> Change a couple of the Parser::Diag methods to return DiagnosticInfo
and let the clients push whatever they want into the DiagnosticInfo
instead of hard coding a few forms. Also switch various clients to
use Diag(Tok, ...) instead of Diag(Tok.getLocation(), ...) as the
canonical form to simplify the code a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
10bd36882406cdf4805e35add1ce2f11ab9ae152 17-Nov-2008 Douglas Gregor <dgregor@apple.com> Eliminate all of the placeholder identifiers used for constructors,
destructors, and conversion functions. The placeholders were used to
work around the fact that the parser and some of Sema really wanted
declarators to have simple identifiers; now, the code that deals with
declarators will use DeclarationNames.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
43c7bad105f742988e7ca40564285c83bea854a5 17-Nov-2008 Douglas Gregor <dgregor@apple.com> Some cleanups for C++ operator overloading

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
669d5d74b880a8497b92a3ec159145713f4d6519 15-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implement parsing and semantic checking of the 'mutable' keyword.
Thanks to Doug for the review. Actual effects of mutable to follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
7d7e6727a5de032c86dcb58ae734e7c1603c26e6 13-Nov-2008 Douglas Gregor <dgregor@apple.com> Don't build identifiers for C++ constructors, destructors, or
conversion functions. Instead, we just use a placeholder identifier
for these (e.g., "<constructor>") and override NamedDecl::getName() to
provide a human-readable name.

This is one potential solution to the problem; another solution would
be to replace the use of IdentifierInfo* in NamedDecl with a different
class that deals with identifiers better. I'm also prototyping that to
see how it compares, but this commit is better than what we had
previously.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
1f6f54be86a514d531ec231fd837858a43cfe72e 11-Nov-2008 Chris Lattner <sabre@nondot.org> Fix PR3031 by silencing follow-on errors in invalid declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
eb83ecde1a822b1c38cd060a85a08c1ac9f82cf8 08-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement support for C++ nested-name-specifiers ('foo::bar::x') in the Parser side.
No Sema functionality change, just the signatures of the Action/Sema methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58913 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
59c940c3f8c2392ac1cb93feb7f2a4894ba1b0fd 08-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r58880, it breaks test/SemaCXX/constructor.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
99163252709b0c8334d8a49388344aaa2f0f3361 08-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> In a declarator, consider an identifier a constructor only if it is followed by '('.

Previously:

class C {
int C; // Declarator::SetConstructor was called here.
};

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
c7ed9c60b8ee04b119e23441cae2cfec74536ba9 07-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Changes in preparation for nested-name-specifiers.

-When parsing declarators, don't depend on "CurScope->isCXXClassScope() == true" for constructors/destructors
-For C++ member declarations, don't depend on "Declarator.getContext() == Declarator::MemberContext"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
2f1bc5285ccd40f411af5f5993f013e27e74ab78 07-Nov-2008 Douglas Gregor <dgregor@apple.com> Parsing, ASTs, and semantic analysis for the declaration of conversion
functions in C++, e.g.,

struct X {
operator bool() const;
};

Note that these conversions don't actually do anything, since we don't
yet have the ability to use them for implicit or explicit conversions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
12e083c805c0f86be4f8e54b06e75b2c3dc1da64 07-Nov-2008 Douglas Gregor <dgregor@apple.com> Separate the parsing of type-specifiers from other declaration specifiers, so that we can parse a C++ type-specifier-seq

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
1cd1b1e987f5e2f060d7972b13d83239b36d77d6 06-Nov-2008 Douglas Gregor <dgregor@apple.com> Parsing, ASTs, and semantic analysis for the declaration of overloaded
operators in C++. Overloaded operators can be called directly via
their operator-function-ids, e.g., "operator+(foo, bar)", but we don't
yet implement the semantics of operator overloading to handle, e.g.,
"foo + bar".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
42a552f8200ba5948661aee0106fce0c04e39818 05-Nov-2008 Douglas Gregor <dgregor@apple.com> Parsing, representation, and preliminary semantic analysis of destructors.

Implicit declaration of destructors (when necessary).

Extended Declarator to store information about parsed constructors
and destructors; this will be extended to deal with declarators that
name overloaded operators (e.g., "operator +") and user-defined
conversion operators (e.g., "operator int").



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

Implement diagnostic for formation of a reference to cv void.

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
b48fe3812047e84164925c8938ce82be0624c40c 31-Oct-2008 Douglas Gregor <dgregor@apple.com> Add support for parsing and representing C++ constructor declarations.

Notes:
- Constructors are never found by name lookup, so they'll never get
pushed into any scope. Instead, they are stored as an
OverloadedFunctionDecl in CXXRecordDecl for easy overloading.
- There's a new action isCurrentClassName that determines whether an
identifier is the name of the innermost class currently being defined;
we use this to identify the declarator-id grammar rule that refers to
a type-name.
- MinimalAction does *not* support parsing constructors.
- We now handle virtual and explicit function specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58499 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
27c8dc06f65d7abcf6a7e7f64a7960c9a150ca01 29-Oct-2008 Douglas Gregor <dgregor@apple.com> Implement initialization of a reference (C++ [dcl.init.ref]) as part
of copy initialization. Other pieces of the puzzle:

- Try/Perform-ImplicitConversion now handles implicit conversions
that don't involve references.
- Try/Perform-CopyInitialization uses
CheckSingleAssignmentConstraints for C. PerformCopyInitialization
is now used for all argument passing and returning values from a
function.
- Diagnose errors with declaring references and const values without
an initializer. (Uses a new Action callback, ActOnUninitializedDecl).

We do not yet have implicit conversion sequences for reference
binding, which means that we don't have any overloading support for
reference parameters yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
971c4fae6092976338b755af1d47dac07c8f16e3 24-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Add support for cv-qualifiers after function declarators.
-Add withConst/withVolatile/withRestrict methods to QualType class, that return the QualType plus the respective qualifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
c46d1a1f8af67a87689d7db9eaf96027282ccaea 20-Oct-2008 Chris Lattner <sabre@nondot.org> implement a couple fixme's by implementing __extension__ properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
aab740af64daaa8d94d34789a6ea7e2d2fc5ab39 20-Oct-2008 Chris Lattner <sabre@nondot.org> Support attributes in *yet another* place. Is there any place you
can't stick an attributes?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
7399ee0aa6ffaeab0a8f83408b1c5127fb2bf5b8 20-Oct-2008 Chris Lattner <sabre@nondot.org> Fix a parser bug where we let attributes interfere with our disambiguation
of whether a '(' was a grouping paren or the start of a function declarator.
This is PR2796.

Now we eat the attribute before deciding whether the paren is grouping or
not, then apply it to the resultant decl or to the first argument as needed.

One somewhat surprising aspect of this is that attributes interact with
implicit int in cases like this:

void a(x, y) // k&r style function
void b(__attribute__(()) x, y); // function with two implicit int arguments
void c(x, __attribute__(()) y); // error, can't have attr in identifier list.

Fun stuff.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
7c186be76786e6b744b29b0eeda52cf74db865ab 20-Oct-2008 Chris Lattner <sabre@nondot.org> Remove an implemented fixme, only treat < as a type specifier
when ObjC is turned on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e75d849d9141d8e47d05a91b7b5c04194854e47a 18-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Just do a diagIfAmbiguous -> warnIfAmbiguous rename.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
259b0d91f2ff90d8daf39221fe133bf1596c5ffb 16-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Issue a warning when there's an ambiguous function declarator (that could be a direct initializer for a variable defition).
Idea originated from here: http://thread.gmane.org/gmane.comp.gcc.devel/101524

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
3f2a8a0de575b02408384f92914729b7518d4e77 07-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> In ParseParenDeclarator match "D.setGroupingParens(true);" with another setGroupingParens call after the ')' is parsed.
Fixes this bug:
int (x)(0); // error, expected function declarator where the '(0)' initializer is

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
73a0d889eda0f000a441319e39540509175b8e81 06-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement support for C++ direct initializers in declarations, e.g. "int x(1);".

This is how this kind of initializers appear in the AST:
-The Init expression of the VarDecl is a functional type construction (of the VarDecl's type).
-The new VarDecl::hasCXXDirectInitializer() returns true.

e.g, for "int x(1);":
-VarDecl 'x' has Init with expression "int(1)" (CXXFunctionalCastExpr).
-hasCXXDirectInitializer() of VarDecl 'x' returns true.

A major benefit is that clients that don't particularly care about which exactly form was the initializer can handle both cases without special case code.
Note that codegening works now for "int x(1);" without any changes to CodeGen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e25d270b4d8e1d348bf74710c19b3c58d00933cb 06-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow variadic arguments without named ones for C++, e.g. "void(...);"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
78c8d80f19cb0bccd4f3d590e71a230e727cfab5 05-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Handle ambiguities between expressions and type-ids that occur inside parentheses, e.g.:

sizeof(int()) -> "int()" is type-id
sizeof(int()+1) -> "int()+1" is expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5e592d889071d15d455deeafcc53955ccfcd0424 03-Oct-2008 Daniel Dunbar <daniel@zuster.org> Remove a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
1bfe1c2129771c06fb58ae5e8c079ae30e138309 03-Oct-2008 Daniel Dunbar <daniel@zuster.org> Pass postfix attributes to ActOnFields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
4f9b9f1e6848904fdeca0a9cd693940ecf566bc1 22-Sep-2008 Steve Naroff <snaroff@apple.com> Fix http://llvm.org/bugs/show_bug.cgi?id=2816.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e281b4cb3c2f85e10412040b35c2699bc883b716 11-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fold Parser::ParseTag into Parser::ParseEnumSpecifier, as suggested in this post:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-September/002721.html

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
0f072032931fec955c6c022d38f692deff707744 05-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support "typeof unary-expression" (GNU C++ extension).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
4ef1c99433a5147f0f75d0dc6ba75af95ee79a68 28-Aug-2008 Steve Naroff <snaroff@apple.com> Fix Parser::ParseDeclaratorInternal(): add langopts test when recognizing blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5618bd4a52c45fbbb605e3ba885663b2164db8a3 27-Aug-2008 Steve Naroff <snaroff@apple.com> First wave of changes to support "blocks" (an extension to C).
This commit adds the declaration syntax (and associated type).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
0919f9e8006020e33dc9a8169f2785c43ba16ba2 16-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Set the SourceRange ending of DeclSpec, when Parser::ParseTypeofSpecifier finishes.

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


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
914701ed49f31323176a784b49df05a0d177d1ad 05-Aug-2008 Daniel Dunbar <daniel@zuster.org> Move AsmLabel into Declarator instead of just a parameter to
ActOnDeclarator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
a80f8749f2968d19595ca2544114932bf0ca2c11 05-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add more Parser/Sema support for GCC asm-label extension.
- ActOnDeclarator now takes an additional parameter which is the
AsmLabel if used. Its unfortunate that this bubbles up this high,
but we cannot just lump it in as an attribute without mistakenly
*accepting* it as an attribute.
- The actual asm-label itself is, however, encoded as an AsmLabelAttr
on the FunctionDecl.
- Slightly improved parser error recovery on malformed asm-labels.
- CodeGen support still missing...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
39caa088097dbd2c805041bfd964b3fb9026d0be 01-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Wherever a type is used/returned from the Action module, use TypeTy instead of DeclTy or void.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e13b9595dc1e2f4288bec34f3412359f648e84a5 26-Jul-2008 Chris Lattner <sabre@nondot.org> pull protocol resolution out into ActOnStartProtocolInterface.
This temporarily duplicates ParseObjCProtocolReferences, but it
will be removed in the future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
eacc39212e5960b2680067c006384c2e4804873a 26-Jul-2008 Chris Lattner <sabre@nondot.org> simplify some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f3948c41ca339da6b8dfd6006b68e5e305a8cee1 26-Jul-2008 Chris Lattner <sabre@nondot.org> < only starts a declspec in objc mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
fc416a4e0ddc74b358b83d60891a7689ba22d520 26-Jul-2008 Chris Lattner <sabre@nondot.org> remove fixed fixme


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
3bd934a624660db940612ca3c5dfd7128ede79e5 26-Jul-2008 Chris Lattner <sabre@nondot.org> Fix hte next wave of problems with protocol qualified ID:
1) reject stuff like "id<foo> short" and "<foo> short". 2) set
the declspec range correctly 3) only parse protocol qualifiers
when in objc mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
bce6135441fd489527a9ad1776d0472335be596d 26-Jul-2008 Chris Lattner <sabre@nondot.org> improve handling of the horrible GCC objc extension that treats "<foo>"
like "id<foo>". This 1) fixes an infinite loop in the parser on things
like "short<foo>" 2) emits a warning about this bogus construct and 3)
changes the testcase to be substantially reduced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
7caeabd868d46cf4e68478c6e9136dae4e735d21 22-Jul-2008 Chris Lattner <sabre@nondot.org> minor cleanup to the actions interface to pass around SmallVectorImpl instead
of a specific smallvector size.

Fix protocol lists to pass down proper location info, so we get diagnostics
like this:

t.m:3:35: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
^

instead of this:

t.m:3:44: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
^


Add a new IdentifierLocPair typedef which is just a pair<IdentifierInfo*, SourceLocation>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53883 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5a6ddbf295d2ea1c28cfb67d82db22f3893ede6f 21-Jun-2008 Chris Lattner <sabre@nondot.org> add parser and sema support for the funny ObjC '@defs' thing.
Patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d3ded1ffacf1a47ffae151e10c7f74b19c2ef57d 05-Jun-2008 Steve Naroff <snaroff@apple.com> Support "<p>" as a short-hand for "id<p>". Here's a comment from GCC (the only documentation I could find on it).

/* Make "<SomeProtocol>" equivalent to "id <SomeProtocol>" - nisse@lysator.liu.se. */

This commit adds the parser magic. The type associated with <p> is still incorrect. Will discuss with Chris.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
00bc645d154f8f30bfbfb2fe508caf087793157c 10-May-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Implement proper name lookup for namespaces.
-identifierResolver exposes an iterator interface to get all decls through the scope chain.
-The semantic staff (checking IdentifierNamespace and Doug's checking for shadowed tags were moved out of IdentifierResolver and back into Sema. IdentifierResolver just gives an iterator for all reachable decls of an identifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e37ac4ff1620ed2d7026f52baccbfa022d79ced1 13-Apr-2008 Douglas Gregor <dgregor@apple.com> This patch adds very basic support for parsing and type-checking class
inheritance in C++. It'll parse the base-specifier list, e.g.,

class D : public B1, virtual public B2 { };

and do some of the simpler semantic checks (B1 and B2 are classes;
they aren't unions or incomplete types, etc).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
99dc91422144483c20d1c7381bc9ac634b646b04 13-Apr-2008 Chris Lattner <sabre@nondot.org> This patch is just the easy part of the class names patch, which
allows the parsing of "class" in addition to "struct" and "union" to
declare a record. So this patch allows:

class C { };
class C c1;

But it does not contain the lookup bits, so this won't work yet:

C c2;

Patch by Doug Gregor!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
9e979557eea3875c9e3d100c68188233dd7f46c0 13-Apr-2008 Chris Lattner <sabre@nondot.org> Default argument cleanups and minor improvements, patch by
Doug Gregor!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
1d78cc443084134428c4c333fab25148900c3ca4 11-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Patch for:
1) objc ivar processing is split out of ActOnField into its own ActOnIvar method.
2) the new objc ivar action takes visibility info directly, eliminating
AllVisibilities in ParseObjCClassInstanceVariables.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ebe457c3443af253bc14ae77c2013b088370a66b 10-Apr-2008 Chris Lattner <sabre@nondot.org> reduce the amount of 'C++ magic' this code depends on :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
e13594279a952537ac903325efff57e3edca79d9 10-Apr-2008 Chris Lattner <sabre@nondot.org> refactor Parser::ParseStructDeclaration to return a vector of uninterpreted
declarators. This allows the clients (C structs, objc classes, objc
properties, [future] C++ classes) etc, to do custom processing before invoking
an action.

This has two benefits in the short term:
1) objc ivar processing should be split out of ActOnField into its own ActOn method.
2) the new objc ivar action can take visibility info directly, eliminating
AllVisibilities in ParseObjCClassInstanceVariables.
3) objc properties can pass their own special sauce down to sema as well.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
60b1e3ebe4ced60f7d65027c610fb3cda0a3cf70 10-Apr-2008 Chris Lattner <sabre@nondot.org> Simplify lifetime of location object.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
04421087832a031c90bd58f128c7c0e741db8dd2 08-Apr-2008 Chris Lattner <sabre@nondot.org> Add support for C++ default arguments, and rework Parse-Sema
interaction for function parameters, fixing PR2046.

Patch by Doug Gregor!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
3420766281f1d9626cfa710c000247f9625f26d4 06-Apr-2008 Chris Lattner <sabre@nondot.org> move a semantic check out of the parser into sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
f97409f352d12d4fcefb591b3757fcf3532865d5 06-Apr-2008 Chris Lattner <sabre@nondot.org> now that identifier list parsing is split out, simplify handling of
normal typed argument lists.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
3825c2eb00f108854942533a4993327889c081c3 06-Apr-2008 Chris Lattner <sabre@nondot.org> reject 'int test(x, x) int x; {}'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
aaf9ddbeab08a43203cf6b9ca4986c8c6fe6fdc6 06-Apr-2008 Chris Lattner <sabre@nondot.org> reject 'typedef int y; int test(x, y)'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
50c6477a06186aeee50415fd90e5f71da68e8616 06-Apr-2008 Chris Lattner <sabre@nondot.org> simplify Parser::ParseFunctionDeclaratorIdentifierList



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
66d28650752eeac0b02802a1d8cea425cb6b1c0f 06-Apr-2008 Chris Lattner <sabre@nondot.org> split parsing of identifier lists in function declarators out into
their own method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
ef4715c3feb2c77f07171577510ef861753280b6 06-Apr-2008 Chris Lattner <sabre@nondot.org> split code for handling grouping parens in declarators from code that
handles function argument parens in declarators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
a711dd0131590075c0f61954d98b9927613d0557 06-Apr-2008 Chris Lattner <sabre@nondot.org> another minor simplification


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
5dcc6ce4a68b3bd4b89c5697c9728e1533e71e03 06-Apr-2008 Chris Lattner <sabre@nondot.org> Use token lookahead to simplify some code that is rarely executed.
Since it is rare, the cost is not significant and we enjoy the
simplification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
d658b562e80d6ef7a1118e34ff12802c6e2fcced 05-Apr-2008 Chris Lattner <sabre@nondot.org> Fix handling of implicit int, resolving PR2012 and reverting (and
subsuming) my patch for PR1999.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp
bda0b626e74513950405c27525af87e214e605e2 16-Mar-2008 Chris Lattner <sabre@nondot.org> Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it. This follows the main
llvm tree, and allows the libraries to be built in parallel. The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in. This speeds
up parallel builds, particularly incremental ones.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseDecl.cpp