History log of /external/clang/lib/Parse/ParseTentative.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

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

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.cpp
bafa74f360cb3ec82fa8c688845330f491d167fd 07-Nov-2013 David Majnemer <david.majnemer@gmail.com> [-fms-extensions] Add support for __FUNCDNAME__

Summary:
Similar to __FUNCTION__, MSVC exposes the name of the enclosing mangled
function name via __FUNCDNAME__. This implementation is very naive and
unoptimized, it is expected that __FUNCDNAME__ would be used rarely in
practice.

Reviewers: rnk, rsmith, thakis

CC: cfe-commits, silvas

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

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

Summary: Some MS headers use these features.

Reviewers: rnk, rsmith

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.cpp
20a7cf4d782e32b2752e651a11ed3712d2debd65 03-Apr-2013 Kaelyn Uhrain <rikka@google.com> Give the default CorrectionCandidateCallback::ValidateCandidate some
smarts so that it doesn't approve of keywords and/or type names when it
knows (based on its flags) that those kinds of corrections are not
wanted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
576f32c5e1f3ac5555ea20bb9effce2d59ad2fa9 20-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> Teach statement / declaration disambiguation about C++11-style generalized initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.cpp
ea30e2f8667668173cf7433c3c80cf603bd922a4 25-Sep-2012 John McCall <rjmccall@apple.com> Add the Microsoft __is_interface_class type trait.
Patch by Andy Gibbs!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
40b2e19cae6ab85407856c70f76278f9efbeeb7c 23-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> When disambiguating an expression-statement from a declaraton-statement, if the
statement starts with an identifier for which name lookup will fail either way,
look at later tokens to disambiguate in order to improve error recovery.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.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/ParseTentative.cpp
5969a5f1b730775af4afb8f95f6c8c306ab08227 23-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> Do not warn about a function decl / direct init ambiguity if the function has a trailing return type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160646 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.cpp
28ad063b279378b19cb0704f977429df366a151e 23-Jun-2012 Nico Weber <nicolasweber@gmx.de> Support L__FUNCTION__ in microsoft mode, PR11789

Heavily based on a patch from
Aaron Wishnick <aaron.s.wishnick@gmail.com>.

I'll clean up the duplicated function in CodeGen as
a follow-up, later today or tomorrow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
25582fc0aeac053cdc115ee95cbed53f28bf592e 17-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> Recover better from a missing 'typename' in a function template definition.
Disambiguate past such a potential problem, and use the absence of 'typename'
to break ties in favor of a parenthesized thingy being an initializer, if
nothing else in the declaration disambiguates it as declaring a function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
1a200a87c1bacee11b7c4283ae5f3f3f74a3c1b2 01-May-2012 Kaelyn Uhrain <rikka@google.com> A couple of very small tweaks suggested by Doug in reply to r155580 and r155163.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
434ed260eb28cacd1b87fc2429dfee66d61dfcf0 20-Apr-2012 Kaelyn Uhrain <rikka@google.com> In Parser::isCXXDeclarationSpecifier, consider a non-type identifier
followed by an identifier as declaration specificer (except for ObjC).
This allows e.g. an out-of-line C++ member function definitions to be
recognized as functions and not as variable declarations if the type
name for the first parameter is not recognized as a type--say, when there
is a function name shadowing an enum type name and the parameter is
missing the "enum" keyword needed to distinguish the two.

Note that returning TPResult::Error() instead of TPResult::True()
appears to have the same end result, while TPResult::Ambiguous()
results in a crash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.cpp
eb52f86a62db523e3c993686b3ed92c55d59d53c 09-Apr-2012 David Blaikie <dblaikie@gmail.com> Fix bugs found by -Wconstant-conversion improvements currently under review.

Specifically, using a an integer outside [0, 1] as a boolean constant seems to
be an easy mistake to make with things like "x == a || b" where the author
intended "x == a || x == b".

The bug caused by calling SkipUntil with three token kinds was also identified
by a VC diagnostic & reported by Francois Pichet as review feedback for my
commit r154163. I've included test cases to verify the error recovery that was
broken/poorly implemented due to this bug.

The other fix (lib/Sema/SemaExpr.cpp) seems like that code was never actually
reached in any of Clang's tests & is related to Objective C features I'm not
familiar with, so I've not been able to construct a test case for it. Perhaps
someone else can.

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

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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
25d0a0f67d9e949ffbfc57bf487012f5cbfd886e 23-Feb-2012 Douglas Gregor <dgregor@apple.com> Provide the __is_trivially_assignable type trait, which provides
compiler support for the std::is_trivially_assignable library type
trait.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.cpp
443aac9bd22624c6abb1fe7e581ac30c4e654eea 25-Jan-2012 Nick Lewycky <nicholas@mxc.ca> With a little more work in the tentative parse determining whether a statement
is a declaration-stmt or an expression, we can discern a subset of cases where
the user erred in omitting the typename keyword before a dependent type name.
Fixes PR11358!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
5e089fe1affb63d670ea02010b104bd9fa3477a1 24-Jan-2012 David Blaikie <dblaikie@gmail.com> Support decltype as a simple-type-specifier.

This makes all sorts of fun examples work with decltype.
Reviewed by Richard Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.cpp
9490ab433deef70105d817616928d700f87642d9 20-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Fix tentative parsing so it knows how to handle an ambiguous for-range-declaration. PR11601.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.cpp
5e9392ba18f5925e26cc5714d1412eda0d219826 03-Dec-2011 Douglas Gregor <dgregor@apple.com> Implement support for the __is_final type trait, to determine whether
a class is marked 'final', from Alberto Ganesh Barbati! Fixes
PR11462.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145775 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.cpp
5cee1195584fa8672253139c86e922daeda69b9e 27-Jul-2011 Douglas Gregor <dgregor@apple.com> Add support for C++0x unicode string and character literals, from Craig Topper!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.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/ParseTentative.cpp
feb375d31b7e9108b04a9f55b721d5e0c793a558 13-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement the __is_trivially_copyable type trait

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.cpp
3840281126e7d10552c55f6fd8b1ec9483898906 24-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Add support for '__is_literal_type' spelling of the existing
'__is_literal' type trait for GCC compatibility. At least one relased
version if libstdc++ uses this name for the trait despite it not being
documented anywhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
b7e9589bce9852b4db9575f55ac9137572147eb5 23-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Implement basic __is_trivial type-trait support, enough to close PR9472.
This introduces a few APIs on the AST to bundle up the standard-based
logic so that programmatic clients have access to exactly the same
behavior.

There is only one serious FIXME here: checking for non-trivial move
constructors and move assignment operators. Those bits need to be added
to the declaration and accessors provided.

This implementation should be enough for the uses of __is_trivial in
libstdc++ 4.6's C++98 library implementation.

Ideas for more thorough test cases or any edge cases missing would be
appreciated. =D

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
4e61ddd644e9c6293697a966d98d7c1905cf63a8 23-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Sort the type traits in a few places where they weren't previously
sorted in order to prepare for adding some new ones.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.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/ParseTentative.cpp
60618fa7f88d5162bb5b40988b6b38d4d75d6fc6 12-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Propagate the new exception information to FunctionProtoType.
Change the interface to expose the new information and deal with the enormous fallout.
Introduce the new ExceptionSpecificationType value EST_DynamicNone to more easily deal with empty throw specifications.
Update the tests for noexcept and fix the various bugs uncovered, such as lack of tentative parsing support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.cpp
9f3611365d0f2297a910cf246e056708726ed10a 27-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement the Microsoft __is_convertible_to type trait, modeling the
semantics after the C++0x is_convertible type trait. This
implementation is not 100% complete, because it allows access errors
to be hard errors (rather than just evaluating false).

Original patch by Steven Watanabe!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124425 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
e3c7a7ca66c02567543dbb5ec493818e00e8b177 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Rvalue references for *this: tentative parsing and template argument deduction.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123913 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.cpp
346af03b21db01264852afb8a86719c9284855fe 08-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Handle parameter attributes when tentative parsing for function/variable disambiguation.
Fixes rdar://8739801.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.cpp
6229c8e7ecccbc6b661df0b4399eb205587c61b4 29-Sep-2010 Chris Lattner <sabre@nondot.org> enhance tentative parsing to handle ms extensions, patch by Martin Vejnar!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.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/ParseTentative.cpp
f459beb2fa7c5441eae4b1f5311f6a2ea60f6b00 29-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> ObjClang++: Allow declaration of block variable in a collection
statement header (fixes radar 8295106).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.cpp
06b7080b04ba799379469c03471558e4222921ce 15-Jul-2010 Douglas Gregor <dgregor@apple.com> When we're performing tentative parsing to determine whether the
parser is looking at a declaration or an expression, use a '=' to
conclude that we are parsing a declaration.

This is wrong. However, our previous approach of finding a comma after
the '=' is also wrong, because the ',' could be part of a
template-argument-list. So, for now we're going to use the same wrong
heuristic as GCC and Visual C++, because less real-world code is
likely to be broken this way. I've opened PR7655 to keep track of our
wrongness; note also the XFAIL'd test.

Fixes <rdar://problem/8193163>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.cpp
51e2a5d45d321c53355fe038b3a3e7a2f502afa4 30-Apr-2010 John McCall <rjmccall@apple.com> Fix a tentative-parse error with unqualified template ids in cast expressions.
Also resolve a long-working FIXME in the test case I modified.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.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/ParseTentative.cpp
2ee9b408a5cf3055fd974f01025b80fb3fd5f7e6 19-Dec-2009 Chris Lattner <sabre@nondot.org> eliminate a call to NextToken() when parsing ::foo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
ae03cb5a84d13c7a0d4b21865bd63aabd18120d2 19-Dec-2009 John McCall <rjmccall@apple.com> Teach TryAnnotateTypeOrScopeToken to deal with already-annotated
scope specifiers. Fix a tentative parsing bug that came up in LLVM.
Incidentally fixes some random FIXMEs in an existing testcase.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.cpp
1e054213f8416a48866105216ad4a45f1e7c24de 21-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Consider nested-names as part of the declarator when resolving an ambiguous statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.cpp
f58f45e6d76792df8c643ce1c6d364dce5db4826 22-May-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Handle correctly a very ugly part of the C++ syntax. We cannot disambiguate between a parenthesized type-id and
a paren expression without considering the context past the parentheses.

Behold:
(T())x; - type-id
(T())*x; - type-id
(T())/x; - expression
(T()); - expression

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.cpp
8b642592a35167a3780074e78674e0bece87c40c 10-Feb-2009 Douglas Gregor <dgregor@apple.com> Teach the type-id/expression disambiguator about different
disambiguation contexts, so that we properly parse template arguments
such as

A<int()>

as type-ids rather than as expressions. Since this can be confusing
(especially when the template parameter is a non-type template
parameter), we try to give a friendly error message.

Almost, eliminate a redundant error message (that should have been a
note) and add some ultra-basic checks for non-type template
arguments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.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/ParseTentative.cpp
8edef7c31d27fc9d5d163660702a8a7730a0d19f 25-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Make tentative parsing of pointer-to-member decls work, and fix other stuff pointed out by Doug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.cpp
7ec5658f92fd5b65f682b6e942b95210426fc6e2 06-Jan-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/5956221> clang ObjC rewriter: Microsoft-specific __fastcall keyword unrecognized.

This fix is C++ specific.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.cpp
e584926b8602c26d442f34090dfd5293695f4af5 05-Jan-2009 Chris Lattner <sabre@nondot.org> push the call in isCXXDeclarationSpecifier to TryAnnotateTypeOrScopeToken
down into the two cases that it can possibly affect. This avoids calls
to it that obviously can't do anything.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
3eb1c546857087b5e1377d172f37868ade960664 17-Dec-2008 Douglas Gregor <dgregor@apple.com> Removed the warning

warning: statement was disambiguated as declaration

because it is currently firing in cases where the declaration would
not actually parse as a statement. We'd love to bring this warning
back if we can make it more accurate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
a4f34eaab2c8b32582af339279d5dc9ba648174c 22-Nov-2008 Chris Lattner <sabre@nondot.org> Teach tentative parsing to handle block pointers (rdar://6394309)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
ef708fd4abccf4d21b1f82ab2ab62f6ae7cc1265 18-Nov-2008 Chris Lattner <sabre@nondot.org> remove the last couple obsolete forms of Parser::Diag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.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/ParseTentative.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/ParseTentative.cpp
d3616a8d0b1506966cb669c19dbfc91bf42c810a 06-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> A tiny optimization; use isCXXFunctionDeclarator only when it's appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
d3dbbb68b1050da2f58d4bea6b23016f451968c9 05-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add some text from the C++ standard and additional ambiguity resolution tests.
No funcitonality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57136 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.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/ParseTentative.cpp
b9f341916e484ff6ba2c2d28c8b2dd5fa12b0015 05-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Found a subtle bug caused by an implicit enum-to-bool conversion (of the TentativeParsingResult enum).
This was the motivation of the following changes:

-'TentativeParsingResult' enum is replaced by a 'TPResult' class that basically encapsulates the enum.
-TPR_true, TPR_false, TPR_ambiguous, and TPR_error enum constants are replaced by TPResult::True(), TPResult::False(), etc. calls that return a TPResult object.
-Also fixed the subtle bug in Parser::isCXXFunctionDeclarator (caught by the above changes as a compilation error).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57125 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
ca35baa788ccba7a213365b9d64d6b2f7bdb9afe 05-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix Parser::isCXXConditionDeclaration to properly resolve declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
a8a4598b6f2a07339ab8a1248295a07d771a2b2a 05-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Disambiguate between a declaration or expression for the 'condition' part of a if/switch/while/for statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
1ee2c43bc0c281b60b29f1883e1e206cae28aed6 05-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Consider GNU attributes when doing ambiguity resolution.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp
5404a156be26de1c63ca9916187f970848bb4dbb 05-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Resolve ambiguous C++ statements (C++ 6.8p1).
'ParseTentative.cpp' implements the functionality needed to resolve ambiguous C++ statements, to either a declaration or an expression, by "tentatively parsing" them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Parse/ParseTentative.cpp