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

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

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

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

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

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
155c877e2010845fb4d168bc59e55256bcb486a7 18-Nov-2013 NAKAMURA Takumi <geek4civic@gmail.com> clang/Parse/Parser.h: Fix annotations properly in SkipUntilFlags. [-Wdocumentation]

Use ///< after member.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
7faf81ff1dc8f8dc724e928ba90ccbfad0fdc2bc 16-Nov-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR17949: Fix crash if someone puts a namespace inside a class template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
b310439121c875937d78cc49cc969bc1197fc025 09-Nov-2013 Richard Smith <richard-llvm@metafoo.co.uk> Try to recover a bit better if a close brace is missing from the end of a class
definition. If we see something that looks like a namespace definition inside a
class, that strongly indicates that a close brace was missing somewhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
961d0573487933199cb287ce8c472121812b3c78 28-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Fix a parser crash when there are #pragmas in a context which requires a single
statement (after a case label, if, etc). Patch by Olivier Goffart!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
d661d50118716e9695af5a893a2df45e87a6b3c8 22-Oct-2013 Chandler Carruth <chandlerc@gmail.com> Revert r193073 and the attempt to fix it in r193170.

This patch wasn't reviewed, and isn't correctly preserving the behaviors
relied upon by QT. I don't have a direct example of fallout, but it
should go through the standard code review process. For example, it
should never have removed the QT test case that was added when fixing
those users.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
fb90266d8bb5a977de45d07e702277f4cb54d74e 21-Oct-2013 Serge Pavlov <sepavloff@gmail.com> Fix to PR8880 (clang dies processing a for loop).

Due to statement expressions supported as GCC extension, it is possible
to put 'break' or 'continue' into a loop/switch statement but outside its
body, for example:

for ( ; ({ if (first) { first = 0; continue; } 0; }); )

Such usage must be diagnosed as an error, GCC rejects it. To recognize
this and similar patterns the flags BreakScope and ContinueScope are
temporarily turned off while parsing condition expression.

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


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

Summary: Some MS headers use these features.

Reviewers: rnk, rsmith

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
5eed7e00b4ac8d589ca83e126dafa8767e8a0358 15-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Tidy up and improve error recovery for C++11 attributes in bad places. Based on
a patch by Michael Han.


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

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

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

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

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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
4fce06cd52a8f4714524baa13b544ead9fd298a4 14-Aug-2013 Eli Friedman <eli.friedman@gmail.com> Fix Altivec vector literal parser hack for C++11.

It doesn't make any sense to accept "..." in the argument to a C-style cast,
so use a separate expression list parsing routine which rejects it. PR16874.

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


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


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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
3b7deda7137e62810a810ce25b062927a9fc7c71 24-May-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [modules] If we hit a failure while loading a PCH/module, abort parsing instead of trying to continue in an invalid state.

Also don't let libclang create a PCH with such an error.

Fixes rdar://13953768

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
440d456c5cf9613a3ee6a3297f892ddd8da5b8f8 22-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR16094: I should have known Obj-C init-capture disambiguation couldn't be
*that* easy...

Try a bit harder to disambiguate. This is mostly straightforward, but for
=-style initializers, we actually need to know where an expression ends:

[foo = bar baz]

is a message send, whereas

[foo = bar + baz]

is a lambda-introducer. Handle this by parsing the expression eagerly, and
replacing it with an annotation token. By chance, we use the *exact same*
parsing rules in both cases (except that we need to assume we're inside a
message send for the parse, to turn off various forms of inapplicable
error recovery).


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

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

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

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

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

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

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
7adf79a620cb7fbde0608e21727425930676b7db 06-May-2013 Reid Kleckner <reid@kleckner.net> Move PragmaCommentHandler to lib/Parse in preparation for calling Sema

Summary:
No functionality change. The existing tests for this pragma only verify
that we can preprocess it.

Reviewers: rsmith

CC: cfe-commits

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

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

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

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

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

This commit depends on an LLVM commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
098b8140c082e5a69b18ca83ef2eb3091939d54f 29-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Keep the parser's template depth up to date when parsing local templates and
late-parsed templates. Patch by Faisal Vali!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
85192c7fe187d5486e12dbc6960af28f16a558a0 16-Apr-2013 Tareq A. Siraj <tareq.a.sriaj@intel.com> Parser support for #pragma clang __debug captured

This patch implements parsing ‘#pragma clang __debug’ as a first step for
implementing captured statements. Captured statements are a mechanism for
doing outlining in the AST.
see http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html.

Currently returns StmtEmpty

Author: Andy Zhang <andy.zhang@intel.com>

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
e145bfd06c7eaf0cff0f7d825d1c6244127c26df 04-Apr-2013 Nico Weber <nicolasweber@gmx.de> Make the ObjC attributes diagnostics a bit more informative.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
9f4f5f1ca1e1967daf64d5422717c9b1e75eeb9e 03-Apr-2013 Nico Weber <nicolasweber@gmx.de> Emit a nicer diagnostic for misplaced attributes on ObjC directives.

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


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


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
4cc0cf1a54541b26b258c45cd7a3c80c9401eaad 20-Mar-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C [qoi] more gracefull recovery when
'}' is missing for the ivar declarations.
// rdar://6854840


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
0b91cc47a5642de2e1f567fe0f29420acdcdebbe 10-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> Handle _Pragma on a u8, u, or U string literal per the C11 specification. Also
handle raw string literals here. C++11 doesn't yet specify how they will
behave, but discussion on core suggests that we should just strip off
everything but the r-char-sequence.


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

Post-commit CR feedback from Jordan Rose regarding r175594.

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


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


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


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


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
898dd70865e42962fbeba346f7abcdc937664e2b 09-Jan-2013 Hal Finkel <hfinkel@anl.gov> Remove the unused Parser::ParseTranslationUnit function

Parser::ParseTranslationUnit is now dead because the loop over
ParseTopLevelDecl is in ParseAST.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
07fc1ba7553f2f5bf26984091197311decd9028e 07-Jan-2013 Michael Han <fragmentshaders@gmail.com> Add fixit hints for misplaced C++11 attributes around class specifiers.

Following r168626, in class declaration or definition, there are a combination of syntactic locations
where C++11 attributes could appear, and among those the only valid location permitted by standard is
between class-key and class-name. So for those attributes appear at wrong locations, fixit is used to
move them to expected location and we recover by applying them to the class specifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171757 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
80ad52f327b532bded5c5b0ee38779d841c6cd35 02-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> s/CPlusPlus0x/CPlusPlus11/g


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
d32b94d4d685522d1552d3d1345ae9616d7f27ab 31-Dec-2012 Nico Weber <nicolasweber@gmx.de> Remove some remnants of OwningExprResult / OwningStmtResult.

These got deleted late 2010 during the Actions/Sema unification.
No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
909610266e67ce40a9d8a4df8be81b3de999b120 20-Dec-2012 Daniel Jasper <djasper@google.com> Move operator precedence calculation to new header

Thereby, it can be reused by clang-format and others.
Review: http://llvm-reviews.chandlerc.com/D229

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
b707a4762fcc47c12b5f487856ba0781c9399295 14-Dec-2012 Nico Weber <nicolasweber@gmx.de> Don't require a space between the two ">" in "vector<id<protocol>>" in objc++11.

C++11 allowed writing "vector<vector<int>>" without a space between the two ">".
This change allows this for protocols in template lists too in -std=c++11 mode,
and improves the diagnostic in c++98 mode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f5e9d035840a4539222708032d75a0515e2508a8 14-Dec-2012 Nico Weber <nicolasweber@gmx.de> fix another spello

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f88836d949e42452167d312e57a1425b3859d36b 27-Nov-2012 Nico Weber <nicolasweber@gmx.de> Move PrettyStackTraceParserEntry to ParseAST.cpp

r128056 moved PrettyStackTraceParserEntry construction from Parser.h
to ParseAST.cpp, so there's no need to keep this class in a header.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168731 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
c4027c82ad4a61f2da1b893ac8fe47bf11e5d50d 10-Nov-2012 David Blaikie <dblaikie@gmail.com> PR14296: function parameter name collisions in function try/catch

C++11 3.3.3/2 "A parameter name shall not be redeclared in the outermost block
of the function definition nor in the outermost block of any handler associated
with a function-try-block."

It's not totally clear to me whether the "FIXME" case is covered by this, but
Richard Smith thinks it probably should be. It's just a bit more involved to
fix that case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
a60d21d9ffd2a995c58dc5c5a4e3d9a014e3bc60 03-Nov-2012 Lang Hames <lhames@gmail.com> Support interleaving of other pragmas with FP_CONTRACT at the beginning of a
compound statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
919b9557b4f0155dfaaea309493ff2a702fca676 02-Nov-2012 Richard Trieu <rtrieu@google.com> When finding a '(' after '::', emit error with hint to remove '(' and matching
')', if found. Don't crash.
Fixes PR11852.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
286d6236850ed3710822e659afdfdf08a315716b 27-Oct-2012 Mahesha S <mahesha.llvm@gmail.com> Reverted back the changes made in 166868 and in 166869

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
68de140b5d1df4c21cbf5ef1be2abcbfbc835cb5 27-Oct-2012 Mahesha S <mahesha.llvm@gmail.com> Feature:
OpenMP support.

Sub-Feature:
Support for "#pragma omp ..." registration with
Preprocessor.

Files Changed/Added:
* include/clang/Basic/DiagnosticGroups.td (C)
* include/clang/Basic/DiagnosticParseKinds.td (C)
* include/clang/Basic/TokenKinds.def (C)
* include/clang/Parse/Parser.h (C)
* lib/Parse/Parser.cpp (C)

Test Cases Changed/Added:
* test/Preprocessor/pragma_omp.c (A)
* test/Preprocessor/pragma_omp_ignored_warning.c (A)


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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
e402e72273cde2a64fa6097c1fe93f500038675d 25-Sep-2012 John McCall <rjmccall@apple.com> Fix for r163013 regression and further __interface enhancement.
Patch by Andy Gibbs!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
4b0824229b96d024a96f3c7dd75ab70652c05c5b 18-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> If a comma operator is followed by a token which unambiguously indicates the
start of a statement or the end of a compound-statement, diagnose the comma as
a typo for a semicolon. Patch by Ahmed Bougacha! Additional test cases and
minor refactoring by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
6944e20065955414a56a6aab9b7e271e3e826a88 17-Sep-2012 Axel Naumann <Axel.Naumann@cern.ch> Open up a few higher-level functions for tools.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
d295970adc93ed4035d18df23673c2a72d124cc8 30-Aug-2012 Douglas Gregor <dgregor@apple.com> Extend the "__is_pod" hack, which demotes various type trait keywords
(__is_pod, __is_signed, etc.) to normal identifiers if they are
encountered in certain places in the grammar where we know that prior
versions of libstdc++ or libc++ use them, to still allow the use of
these keywords as type traits. Fixes <rdar://problem/9836262> and PR10184.


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

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

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


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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162067 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
e6b3fea007e25842d6523043b17f7dde8c4d0107 11-Aug-2012 Fariborz Jahanian <fjahanian@apple.com> Removed an unused function I added a while back.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
8a10d9fcb5a207a519be95ff9281c3536f79cf03 06-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> Added a new memberfor Parser, to be used soon
for doing delayed parsing of c++ method defined in
objc class implementations.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159626 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
056e2c30050a94141150ba561268d90b4d18e378 20-Jun-2012 Dmitri Gribenko <gribozavr@gmail.com> Unbreak GCC build: GCC doesn't like clang::Parser::CommentHandler and class clang::CommentHandler to have same name.


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

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


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

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
19a2702042b7e3ee838cca458b35f607111a3897 18-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> Extend the error recovery for a template-argument-list terminated by '>>' to
also deal with '>>>' (in CUDA), '>=', and '>>='. Fix the FixItHints logic to
deal with cases where the token is followed by an adjacent '=', '==', '>=',
'>>=', or '>>>' token, where a naive fix-it would result in a differing token
stream on a re-lex.


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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
c86c40b912e53fb11ff8f745ed616035b8b7259c 06-Jun-2012 Douglas Gregor <dgregor@apple.com> Whenever we have a BalancedDelimiterTracker, we have a 'nested' scope
where '>' is going to behave as an operator (and not as a '>' closing
a template argument list).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
d73ef135ba029db59c0b5649e6117845d9e39600 06-Jun-2012 Jordan Rose <jordan_rose@apple.com> Add pedantic warning -Wempty-translation-unit (C11 6.9p1).

In standard C since C89, a 'translation-unit' is syntactically defined to have
at least one "external-declaration", which is either a decl or a function
definition. In Clang the latter gives us a declaration as well.

The tricky bit about this warning is that our predefines can contain external
declarations (__builtin_va_list and the 128-bit integer types). Therefore our
AST parser now makes sure we have at least one declaration that doesn't come
from the predefines buffer.

Also, remove bogus warning about empty source files. This doesn't catch source
files that only contain comments, and never fired anyway because of our
predefines.

PR12665 and <rdar://problem/9165548>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
32dcb1b45d7428611903b6106bd12b7fbc33d391 29-May-2012 Chad Rosier <mcrosier@apple.com> Revert r155737, restoring the MaxDepth in the BalancedDelimiterTracker to 256.
r155737 turned out to be a temporary work around. The correct fix was in r155823.


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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
de88246a7bc57bc4995ad4e6fde8f245d70b130e 30-Apr-2012 Douglas Gregor <dgregor@apple.com> Restore paren, bracket and brace counts in parser when
TentativeParsingAction is reverted, from Pasi Parviainen! Fixes
PR12480 / <rdar://problem/11341251>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
0eed2cbba09af1ab089f5b1dd9dd34be87fe0d9a 28-Apr-2012 Chad Rosier <mcrosier@apple.com> Bump up the MaxDepth in the BalancedDelimiterTracker.

The Avida Project (http://avida.devosoft.org) exceeds the 256 limit.
rdar://11289131


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


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154844 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
13bb701f2f876356400a34b0917a417c66b5d70d 14-Apr-2012 Benjamin Kramer <benny.kra@googlemail.com> Parser: Don't manage TemplateAnnotationIds in a delayed cleanup pool.

Instead, make it the allocation function's responsibility to add them
to a list and clear it when a top-level decl is finished.

This plugs leakage of TemplateAnnotationIds. DelayedCleanupPool is
ugly and unused, remove it.

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

Patch by Alexander Kornienko!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
6a91d385618ea4d28236c496f540a26877c95525 12-Apr-2012 Erik Verbruggen <erikjv@me.com> Added a flag to the parser to skip method bodies.


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

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

Reviewed by Chris Lattner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
aa49a7d70e58dac2aeb40664ba16d2ea571b8c95 09-Mar-2012 Daniel Dunbar <daniel@zuster.org> [AST/etc] Mark {getSourceRange(),getStartLoc(),getEndLoc()} as LLVM_READONLY.
- The theory here is that we have these functions sprinkled in all over the
place. This should allow the optimizer to at least realize it can still do
load CSE across these calls.
- I blindly marked all instances as such, even though the optimizer can infer
this attribute in some instances (some of the inline ones) as that was easier
and also, when given the choice between thinking and not thinking, I prefer
the latter.

You might think this is mere frivolity, but actually this is good for a .7 -
1.1% speedup on 403.gcc/combine.c, JSC/Interpreter.cpp,
OGF/NSBezierPath-OAExtensions.m.

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
99831e4677a7e2e051af636221694d60ba31fcdb 06-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> User-defined literals: reject string and character UDLs in all places where the
grammar requires a string-literal and not a user-defined-string-literal. The
two constructs are still represented by the same TokenKind, in order to prevent
a combinatorial explosion of different kinds of token. A flag on Token tracks
whether a ud-suffix is present, in order to prevent clients from needing to look
at the token's spelling.


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

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

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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
aa5ab26ed93382b812147f532dcbf4afb5494040 24-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Handle "#pragma GCC visibility" in a few more places. Switch over "#pragma pack" to use the same handling that gcc does. Fixes <rdar://problem/10871094> and <rdar://problem/10893316>.

(Hopefully, common usage of these pragmas isn't irregular enough to break our current handling. Doug has ideas for a more crazy approach if necessary.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
e43fe993a079795ac3d2ba7c9ec5e2a0c8069918 22-Feb-2012 Kaelyn Uhrain <rikka@google.com> Fix typo correction of template arguments to once again allow type names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
552e29985a710f4ced62b39d70557501bd31ca9b 21-Feb-2012 Douglas Gregor <dgregor@apple.com> Implement name mangling for lambda expressions that occur within the
initializers of data members (both static and non-static).


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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
b3f323d6c41cb614a249dbc4af7493762786521a 17-Feb-2012 Douglas Gregor <dgregor@apple.com> Disambiguate between C++11 lambda expressions and C99 array
designators in the parser. In the worst case, this disambiguation
requires tentative parsing just past the closing ']', but for most
cases we'll be able to tell by looking ahead just one token (without
going into the heavyweight tentative parsing machinery).


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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
426fc94ed3bce15b55c43692537e3833388f0352 26-Jan-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix our handling of #pragma GCC visibility.
Now the lexer just produces a token and the parser is the one responsible for
activating it.
This fixes problem like the one pr11797 where the lexer and the parser were not
in sync. This also let us be more strict on where in the file we accept
these pragmas.

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

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

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

@import identifier [. identifier]* ;



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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
9241057266d3460392cbb7fec6ec942d3330ece3 23-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Pass context and access to Parser::ParseExplicitInstantiation() for
good parser error recovery and for not crashing.

We still have a accepts-invalid-code bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
5cb94a78202ccb1007df0be86884297761f4a53a 23-Dec-2011 Nico Weber <nicolasweber@gmx.de> Add -Wdangling-else.

This works like described in http://drdobbs.com/blogs/cpp/231602010
Fixes http://llvm.org/PR11609



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
9d24a8be93b28488dbfb9bbe8aa6fe35b21a5b0c 13-Dec-2011 Francois Pichet <pichet2000@gmail.com> Implement the Microsoft __if_exists/if_not_exists extension in initializer-list.
Necessary to parse Microsoft ATL code.

Example:
int array[] = {
0,
__if_exists(CLASS::Type) {2, }
3
};

will declare an array of 2 or 3 elements depending on if CLASS::Type exists or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
e1fca502e7f1349e9b4520a4ca9a02413bcf2b14 08-Dec-2011 Francois Pichet <pichet2000@gmail.com> Remove unused parameter from the LateParsedTemplatedFunction constructor.

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


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
2fea2242fe7e7c37df1e96316616febeaf4e29eb 29-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix leaking of LexedMethod objects created for caching objc method definitions tokens
for late parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
a8fbc053eb08c929174bf519a0e9733e4ef90bfa 09-Nov-2011 David Blaikie <dblaikie@gmail.com> Fix 80 cols violations & remove trailing whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
d3891e9fb7eb25436e5c537189030bed0d5a1dcf 09-Nov-2011 Douglas Gregor <dgregor@apple.com> Workaround for compilers that don't implement C++ DR45, from Tom Honermann!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
45fa560c72441069d9e4eb1e66efd87349caa552 07-Nov-2011 Douglas Gregor <dgregor@apple.com> When we notice that a member function is defined with "= delete" or "=
default", make a note of which is used when creating the
initial declaration. Previously, we would wait until later to handle
default/delete as a definition, but this is too late: when adding the
declaration, we already treated the declaration as "user-provided"
when in fact it was merely "user-declared".

Fixes PR10861 and PR10442, along with a bunch of FIXMEs.


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
22216eb4fb0936d2488fc03abd285d135c36ff01 25-Oct-2011 David Blaikie <dblaikie@gmail.com> Fix cases where the optional nested-name-specifier erroneously preceeded a decltype-specification when specifying a base type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
09048df0b3f472091b2204e531d6b6019244884b 25-Oct-2011 David Blaikie <dblaikie@gmail.com> Support the use of decltype for specifying base types. Fixes PR11216.


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

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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
b57791e5b40afa6691063c83d0e95c416fb19fde 21-Oct-2011 Douglas Gregor <dgregor@apple.com> Treat the Microsoft/Borland keyword "__except" as a context-sensitive
keyword, because both libstdc++ and libc++ use "__except" as an
identifier. Fixes <rdar://problem/10322555>.


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



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

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

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

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

Thanks to Jeffrey Yasskin for the thorough review!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
a891a32d3762ee641a29c091d286f2a7432671a5 30-Sep-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Fix a bug in the token caching for inline constructors in C++11, and improve error recovery in both dialects. This should fix the GCC test suite failures as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
3fedbe1f71c18fba01d39109d606f421a0103a2a 30-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Some fixes for MS-style asm parsing: specifically, add some error checking, and handle asm comments using semicolons correctly. (The comments are actually surprisingly tricky.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
3497fdfdb742f55d7b7ec8e22779fb08962b8441 29-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for parsing an attribute-specifier-seq containing multiple
attribute-specifiers

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
d6471f7c1921c7802804ce3ff6fe9768310f72b9 26-Sep-2011 David Blaikie <dblaikie@gmail.com> Rename Diagnostic to DiagnosticsEngine as per issue 5397


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
6df6548e44a61c444bd85dccd0398cba047c79b1 24-Sep-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Correctly parse braced member initializers (even in delayed parsing) and correctly pass
the information on to Sema. There's still an incorrectness in the way template instantiation
works now, but that is due to a far larger underlying representational problem.
Also add a test case for various list initialization cases of scalars, which test this
commit as well as the previous one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
950be71c745409e373ae8a834490f9026c8ac222 19-Sep-2011 Richard Trieu <rtrieu@google.com> Changes to the name lookup have caused a regression in the digraph fix-it hint.
For instance:

template <class T> void E() {};
class F {};

void test() {
::E<::F>();
E<::F>();
}

Gives the following error messages:

error: found '<::' after a template name which forms the
digraph '<:' (aka '[') and a ':', did you mean '< ::'?
::E<::F>();
^~~
< ::
error: expected expression
E<::F>();
^
error: expected ']'
note: to match this '['
E<::F>();

This patch adds the digraph fix-it check right before the name lookup,
moves the shared checking code to a new function, and adds new
tests to catch future regressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
90ab75b5ad328d2b155ec83fd4e80cd0f7af5729 09-Sep-2011 Richard Trieu <rtrieu@google.com> Changed references of BaseTy, MemInitTy, CXXScopeTy, TemplateParamsTy to CXXBaseSpecifier, CXXCtorInitializer, NestedNameSpecifier, TemplateParameterList and removed their typedefs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
b2fc69097d15f6374b9e5e6101f33960c34acbed 09-Sep-2011 Richard Trieu <rtrieu@google.com> Change references to StmtTy to Stmt and removed typedefs of StmtTy. Also removed typedef of AttrTy since it is not used.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f81e5a9e3f3ff80c56e4afb4fe6311a8735f36e8 09-Sep-2011 Richard Trieu <rtrieu@google.com> Change all references of type ExprTy to Expr and get rid of the typedefs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
eff98fc3561f6b717f6348f04b3f4fe03e934466 08-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread Safety: Patch to implement delayed parsing of attributes within a
class scope.

This patch was also written by DeLesley Hutchins.

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
140ab234c23f392d5422691c5de1ee3c15026def 31-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c - This patch buffers method implementations
and does the Sema on their body after the entire
class/category @implementation is seen. This change allows messaging
of forward private methods, as well as, access to
synthesized ivars of properties with foward synthesize
declarations; among others. In effect, this patch removes
several restrictions placed on objective-c due to in-place
semantics processing of methods.
This is part of // rdar://8843851.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
10af87932fe4bffad539b24d512a33a1803daeae 29-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Minor clean up of objc's decl context stuff.
No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
95ed7784a335aca53b0c6e952cf31a4cfb633360 27-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Treat top-level objective-c declarations
, such as list of forward @class decls, in a DeclGroup
node. Deal with its consequence throught clang. This
is in preparation for more Sema work ahead. // rdar://8843851.
Feel free to reverse if it breaks something important
and I am unavailable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
6aa52ec6b969faabf3764baf79d89810b8249a7e 27-Aug-2011 Douglas Gregor <dgregor@apple.com> Introduce support for a simple module import declaration, which
loads the named module. The syntax itself is intentionally hideous and
will be replaced at some later point with something more
palatable. For now, we're focusing on the semantics:
- Module imports are handled first by the preprocessor (to get macro
definitions) and then the same tokens are also handled by the parser
(to get declarations). If both happen (as in normal compilation),
the second one is redundant, because we currently have no way to
hide macros or declarations when loading a module. Chris gets credit
for this mad-but-workable scheme.
- The Preprocessor now holds on to a reference to a module loader,
which is responsible for loading named modules. CompilerInstance is
the only important module loader: it now knows how to create and
wire up an AST reader on demand to actually perform the module load.
- We search for modules in the include path, using the module name
with the suffix ".pcm" (precompiled module) for the file name. This
is a temporary hack; we hope to improve the situation in the
future.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f09530f88ece49993f1b72271b0417574e897956 25-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Reverse r138567 until a buildbot failure is investigated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
d8e987bee9d39f9131e9be319483265fd894c108 25-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objc -arse: Use DeclGroup for forward class declarations;
as in @class foo, bar. More cleanup to follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
2f64cfe19e8bf6b6ba1660e38da8c421440457fe 22-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objc refactoring - minor clean up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
9735c5e60027b26a809df19677ff16a4d13f1321 22-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objc - Simplify switing objc decl context by using
a context switching object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
a28948f34817476d02412fa204cae038e228c827 22-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Restore patch I reversed in r138040. Known buildbot
failures are resolved.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
e6f07f538fd0eddd6c087fcc01d4e4ff19129c71 19-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Revers r138040. Need to look at a few buildbot failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
3dbf2f5f00cfc8b25318c119c0d39f4a49d15ebe 19-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Bring objective-c handling of decl context
to modernity. Instead of passing down individual
context objects from parser to sema, establish decl
context in parser and have sema access current context
as needed. I still need to take of Doug's comment for
minor cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
8cc488fefb2fb04bc8d5398da29f0182f97934cf 20-Jul-2011 Chris Lattner <sabre@nondot.org> add raw_ostream and Twine to LLVM.h, eliminating a ton of llvm:: qualifications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
686775deca8b8685eb90801495880e3abdd844c2 20-Jul-2011 Chris Lattner <sabre@nondot.org> now that we have a centralized place to do so, add some using declarations for
some common llvm types: stringref and smallvector. This cleans up the codebase
quite a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
bca01b46850f867b2f4137f25c882022b58f8471 07-Jul-2011 Douglas Gregor <dgregor@apple.com> Properly implement the scope restriction on the NRVO for
throw-expressions, such that we don't consider the NRVO when the
non-volatile automatic object comes from outside the innermost try
scope (C++0x [class.copymove]p13). In C++98/03, our ASTs were
incorrect but it didn't matter because IR generation doesn't actually
apply the NRVO here. In C++0x, however, we were moving from an object
when in fact we should have copied from it. Fixes PR10142 /
<rdar://problem/9714312>.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
c261c76812a256c98cf3309c92f77e7ce1e8848b 05-Jul-2011 Douglas Gregor <dgregor@apple.com> Some documentation fixes for the parser, from John Freeman

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
0a85183be6930571f3af8e5a976d24c3f95e5b25 02-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [ARC] When casting from a pointer to an objective-c object with known ownership, if the
cast type has no ownership specified, implicitly "transfer" the ownership of the cast'ed type
to the cast type:

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
c89edf5aaa08683f4afcf61a7a1d183c08b76498 01-Jul-2011 Richard Smith <richard-llvm@metafoo.co.uk> Fix AST representations of alias-declarations which define tag types. Inside classes, the tag types need to have an associated access specifier, and inside function definitions, they need to be included in the declarations of the DeclStmt. These issues manifested as assertions during template instantiation, and also in a WIP constexpr patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
f85e193739c953358c865005855253af4f68a497 16-Jun-2011 John McCall <rjmccall@apple.com> Automatic Reference Counting.

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

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



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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f858bd817e8d6eac58ae496fa96a2f508fbb286f 26-May-2011 Richard Trieu <rtrieu@google.com> Add a fix-it and better error recovery for improperly nested namespaces. This will give a better error message for cases such as "namespace foo::bar::baz {}" and a suggested fix-it of "namespace foo { namespace bar { namespace baz {} } }"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
563a645de82231a55e221fe655b7188bf8369662 25-May-2011 Francois Pichet <pichet2000@gmail.com> Add support for Microsoft __if_exists, __if_not_exists extension at class scope.

Example:

typedef int TYPE;
class C {
__if_exists(TYPE) {
TYPE a;
}
__if_not_exists(TYPE) {
this will never be parsed.
}
};


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
e4246a633b13197634225971b25df0cbdcec0c5d 12-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Properly parse the 'default' and 'delete' keywords.

They are actually grammatically considered definitions and parsed
accordingly.

This fixes the outstanding bugs regarding defaulting functions after
their declarations.

We now really nicely diagnose the following construct (try it!)

int foo() = delete, bar;

Still todo: Defaulted functions other than default constructors
Test cases (including for the above construct)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
6a24747beed797b2f1184c66ca45beb4db20eb08 11-May-2011 Francois Pichet <pichet2000@gmail.com> In Microsoft mode, allow pure specifier (=0) on inline functions declared at class scope.
This removes 2 errors when parsing MFC code with clang

Example:
class A {
virtual void f() = 0 { }
}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131175 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f986038beed360c031de8654cfba43a5d3184605 07-May-2011 Francois Pichet <pichet2000@gmail.com> Add support for _if_exists and __if_not_exists at namespace/global scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
1e862693c63067ae467b0b3884c44f753cd6e821 06-May-2011 Francois Pichet <pichet2000@gmail.com> Add support for Microsoft __if_exists and __if_not_exists construct inside function definition.
Allow to include or exclude code depending on if a symbol exists or not. Just like a #ifdef but for C/C++ symbols.

More doc: http://msdn.microsoft.com/en-us/library/x7wy9xh3(v=VS.100).aspx

Support at class and namespace scopes will be added later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
28bbe4b8acc338476fe0825769b41fb32b423c72 28-Apr-2011 John Wiegley <johnw@boostpro.com> Parsing/AST support for Structured Exception Handling

Patch authored by Sohail Somani.

Provide parsing and AST support for Windows structured exception handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
21ff2e516b0e0bc8c1dbf965cb3d44bac3c64330 28-Apr-2011 John Wiegley <johnw@boostpro.com> Implementation of Embarcadero array type traits

Patch authored by John Wiegley.

These are array type traits used for parsing code that employs certain
features of the Embarcadero C++ compiler: __array_rank(T) and
__array_extent(T, Dim).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
5ecdd78408a1c6f4be506d94f776642570d27336 27-Apr-2011 Douglas Gregor <dgregor@apple.com> Introduce a new parser annotation token for primary expressions. When
ClassifyName() builds a primary expression, generate one of these
annotation tokens rather than jumping into the parser.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
62c9258f4a71569a66d805fc7776526a2c76b34e 25-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Recognize gcc's ms_struct pragma (and ignore for now).
This is wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
552622067dc45013d240f73952fece703f5e63bd 25-Apr-2011 John Wiegley <johnw@boostpro.com> t/clang/expr-traits

Patch authored by David Abrahams.

These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for
parsing code that employs certain features of the Embarcadero C++ compiler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
312eadb832cab4497a069409954500d8192b8f0d 24-Apr-2011 Douglas Gregor <dgregor@apple.com> Implement a new identifier-classification scheme where Sema
performs name lookup for an identifier and resolves it to a
type/expression/template/etc. in the same step. This scheme is
intended to improve both performance (by reducing the number of
redundant name lookups for a given identifier token) and error
recovery (by giving Sema a chance to correct type names before the
parser has decided that the identifier isn't a type name). For
example, this allows us to properly typo-correct type names at the
beginning of a statement:

t.c:6:3: error: use of undeclared identifier 'integer'; did you mean
'Integer'?
integer *i = 0;
^~~~~~~
Integer
t.c:1:13: note: 'Integer' declared here
typedef int Integer;
^


Previously, we wouldn't give a Fix-It because the typo correction
occurred after the parser had checked whether "integer" was a type
name (via Sema::getTypeName(), which isn't allowed to typo-correct)
and therefore decided to parse "integer * i = 0" as an expression. By
typo-correcting earlier, we typo-correct to the type name Integer and
parse this as a declaration.

Moreover, in this context, we can also typo-correct identifiers to
keywords, e.g.,

t.c:7:3: error: use of undeclared identifier 'vid'; did you mean
'void'?
vid *p = i;
^~~
void

and recover appropriately.

Note that this is very much a work-in-progress. The new
Sema::ClassifyName is only used for expression-or-declaration
disambiguation in C at the statement level. The next steps will be to
make this work for the same disambiguation in C++ (where
functional-style casts make some trouble), then push it
further into the parser to eliminate more redundant name lookups.

Fixes <rdar://problem/7963833> for C and starts us down the path of
<rdar://problem/8172000>.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
c69a505cfa318d571ce8a0cd038c8d958585a735 23-Apr-2011 Jay Foad <jay.foad@gmail.com> Remove unused STL header includes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
4a47e8d35dc1778ef7e428d9edd7676be67e725f 23-Apr-2011 Francois Pichet <pichet2000@gmail.com> Remove unnecessary const away cast in LateTemplateParserCallback.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
8387e2a41eef6fa17fb140a18c29b6eee9dd2b8a 23-Apr-2011 Francois Pichet <pichet2000@gmail.com> Add -fdelayed-template-parsing option. Using this option all templated function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup.

Using this flag is necessary for compatibility with Microsoft template code.
This also provides some parsing speed improvement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
bb9b80c308d7d3f758886243c7145404a50c66cf 21-Apr-2011 Richard Trieu <rtrieu@google.com> Add a fixit suggest for missing case keywords inside a switch scope. For instance, in the following code, 'case ' will be suggested before the '1:'

switch (x) {
1: return 0;
default: return 1;
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
fc8f0e14ad142ed811e90fbd9a30e419e301c717 15-Apr-2011 Chris Lattner <sabre@nondot.org> fix a bunch of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f111d935722ed488144600cea5ed03a6b5069e8f 15-Apr-2011 Peter Collingbourne <peter@pcc.me.uk> C1X: implement generic selections

As an extension, generic selection support has been added for all
supported languages. The syntax is the same as for C1X.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
ad762fcdc16b9e4705b12b09d92b8c026212b906 15-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add support for C++0x's range-based for loops, as specified by the C++11 draft standard (N3291).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
4147d307086cf024a40a080e2bf379e9725f6f41 27-Mar-2011 Francois Pichet <pichet2000@gmail.com> Improve recovery (error + fix-it) when parsing type dependent template name without the "template" keyword.

For example:
typename C1<T>:: /*template*/ Iterator<0> pos;

Also the error is downgraded to an ExtWarn in Microsoft mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128387 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
8a29ba0d66bce99014651f1e3351aef6c3361d3f 25-Mar-2011 Anders Carlsson <andersca@mac.com> Remove the last of ClassVirtSpecifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
c05a94b7accd4035bf5d5897c434c445b22da855 24-Mar-2011 John McCall <rjmccall@apple.com> Call out ObjC parameter types as a different kind of declarator context
from a normal type-spec, just for completeness.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
0a0d2b179085a52c10402feebeb6db8b4d96a140 23-Mar-2011 Douglas Gregor <dgregor@apple.com> Implement a new 'availability' attribute, that allows one to specify
which versions of an OS provide a certain facility. For example,

void foo()
__attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6)));

says that the function "foo" was introduced in 10.2, deprecated in
10.4, and completely obsoleted in 10.6. This attribute ties in with
the deployment targets (e.g., -mmacosx-version-min=10.1 specifies that
we want to deploy back to Mac OS X 10.1). There are several concrete
behaviors that this attribute enables, as illustrated with the
function foo() above:

- If we choose a deployment target >= Mac OS X 10.4, uses of "foo"
will result in a deprecation warning, as if we had placed
attribute((deprecated)) on it (but with a better diagnostic)
- If we choose a deployment target >= Mac OS X 10.6, uses of "foo"
will result in an "unavailable" warning (in C)/error (in C++), as
if we had placed attribute((unavailable)) on it
- If we choose a deployment target prior to 10.2, foo() is
weak-imported (if it is a kind of entity that can be weak
imported), as if we had placed the weak_import attribute on it.

Naturally, there can be multiple availability attributes on a
declaration, for different platforms; only the current platform
matters when checking availability attributes.

The only platforms this attribute currently works for are "ios" and
"macosx", since we already have -mxxxx-version-min flags for them and we
have experience there with macro tricks translating down to the
deprecated/unavailable/weak_import attributes. The end goal is to open
this up to other platforms, and even extension to other "platforms"
that are really libraries (say, through a #pragma clang
define_system), but that hasn't yet been designed and we may want to
shake out more issues with this narrower problem first.

Addresses <rdar://problem/6690412>.

As a drive-by bug-fix, if an entity is both deprecated and
unavailable, we only emit the "unavailable" diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
614f96a7cf94805c2d336639300b62dc2f54e9e0 22-Mar-2011 Ted Kremenek <kremenek@apple.com> Migrate 'PrettySTackTraceParserEntry' object out of Parser, and have it constructed within ParseAST. This avoids double crashes
during crash recovery.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
c9977d09a2de7f7d2245973413d4caf86c736640 16-Mar-2011 Douglas Gregor <dgregor@apple.com> Make sure that we always pop a function's scope *before* we call
ActOnFinishFunctionBody/ActOnBlockStmtExpr. This way, we ensure that
we diagnose undefined labels before the jump-scope checker gets run,
since the jump-scope checker requires (as its invariant) that all of
the GotoStmts be wired up correctly.

Fixes PR9495.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
90ba78c64d0c24cfbc1bf88728db9775d44d7f9f 12-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> Place duplicate argument declaration in in
method prototypes under the -Wduplicate-method-arg and
turn it off by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127552 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f4e3cfbe8abd124be6341ef5d714819b4fbd9082 11-Mar-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for the OpenCL vec_step operator, by generalising and
extending the existing support for sizeof and alignof. Original
patch by Guy Benyei.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
b77cab97f17f946744c920629ca17271308d8ebf 08-Mar-2011 Douglas Gregor <dgregor@apple.com> Clarify the context in which an Objective-C type name is being parsed
by using an enumeration rather than a boolean value. No functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
059101f922de6eb765601459925f4c8914420b23 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source-location information into dependent
template specialization types. This also required some parser tweaks,
since we were losing track of the nested-name-specifier's source
location information in several places in the parser. Other notable
changes this required:

- Sema::ActOnTagTemplateIdType now type-checks and forms the
appropriate type nodes (+ source-location information) for an
elaborated-type-specifier ending in a template-id. Previously, we
used a combination of ActOnTemplateIdType and
ActOnTagTemplateIdType that resulted in an ElaboratedType wrapped
around a DependentTemplateSpecializationType, which duplicated the
keyword ("class", "struct", etc.) and nested-name-specifier
storage.

- Sema::ActOnTemplateIdType now gets a nested-name-specifier, which
it places into the returned type-source location information.

- Sema::ActOnDependentTag now creates types with source-location
information.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
eee1d5434ebfa955ffc3c493aecd68bb7b3f4838 14-Feb-2011 John McCall <rjmccall@apple.com> When parsing an out-of-line member function declaration, we must delay
access-control diagnostics which arise from the portion of the declarator
following the scope specifier, just in case access is granted by
friending the individual method. This can also happen with in-line
member function declarations of class templates due to templated-scope
friend declarations.

We were really playing fast-and-loose before with this sort of thing,
and it turned out to work because *most* friend functions are in file
scope. Making us delay regardless of context exposed several bugs with
how we were manipulating delay. I ended up needing a concept of a
context that's independent of the declarations in which it appears,
and then I actually had to make some things save contexts correctly,
but delay should be much cleaner now.

I also encapsulated all the delayed-diagnostics machinery in a single
subobject of Sema; this is a pattern we might want to consider rolling
out to other components of Sema.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f315fa81eef1977b3457fd7a7d4639e060fe7278 14-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> OpenCL: add support for __kernel, kernel keywords and EXTENSION,
FP_CONTRACT pragmas. Patch originally by ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
321b8179afaf803dcc56b2a19f7b0891a03c92c8 14-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Move support for "#pragma STDC FP_CONTRACT" to Parser; add Sema actions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
4867347e82648d3baf09524b98b09c297a5a198f 28-Jan-2011 Nico Weber <nicolasweber@gmx.de> PR9037: Allow override, final, and new as an extension on inline members.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
cc54d594d4f6509c0e3a8e349e481d9b5d899df6 22-Jan-2011 Anders Carlsson <andersca@mac.com> Parse class-virt-specifier-seqs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
7eeb4ec11043d4860361348f2b19299d957d47a9 20-Jan-2011 Anders Carlsson <andersca@mac.com> Lazily initialize the 'final' and 'override' contextual keywords as suggested by Doug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123876 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
b918d0f5d8f147e1e26c34e6cf42a79af2d2ec41 17-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Convert "#pragma unused(...)" into tokens for the parser.
This allows us to cache a "#pragma unused" that occurs inside an inline C++ member function.
Fixes rdar://8829590&8770988.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
b971dbdb65149a7cf0c046380186d0204e5b411e 17-Jan-2011 Anders Carlsson <andersca@mac.com> Change ParseOptionalCXX0XVirtSpecifierSeq to take a VirtSpecifiers struct.

Enforce C++[class.mem]p8:
A virt-specifier-seq shall contain at most one of each virt-specifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
1f3b6fdabbb10779a473d6315154d7325ce20aea 17-Jan-2011 Anders Carlsson <andersca@mac.com> Begin work on supporting "N3206: Override control: Eliminating Attributes", from

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm

This lands support for parsing virt-specifier-seq after member functions, including the
contextual keywords 'final', and 'override'. The keywords are not yet used for anything.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
cbb67480094b3bcb5b715acd827cbad55e2a204c 08-Jan-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Renamed CXXBaseOrMemberInitializer to CXXCtorInitializer. This is both shorter,
more accurate, and makes it make sense for it to hold a delegating constructor
call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
b162054ba8f5b64fe87fbc4837933ab23eebd52b 04-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename MaybeSkipFunctionBodyForCodeCompletion -> trySkippingFunctionBodyForCodeCompletion and check isCodeCompletionEnabled() before doing the call.
Suggestions by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
1b21391b3b1b7dd829c35f9b69199ed2a67da25a 04-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix 80 column violation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
0fe5397b26695926a835fa99eceb7fc879b307af 03-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> When in code-completion, skip obj-c method bodies for speed up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
3437f1f1294499d4ef306c1089fcb3e29ec2aa68 03-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Speed up code-completion by skipping function bodies.

When we are in code-completion mode, skip parsing of all function bodies except the one where the
code-completion point resides.

For big .cpp files like 'SemaExpr.cpp' the improvement makes a huge difference, in some cases cutting down
code-completion time -62% !

We don't get diagnostics for the bodies though, so modify the code-completion tests that check for errors.

See rdar://8814203.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
bdb2d5056fd675c27307b34efd371bbba6839e92 21-Dec-2010 Douglas Gregor <dgregor@apple.com> Fix a major inconsistency in the representation of Objective-C
classes, categories, protocols, and class extensions, where the
methods and properties of these entities would be inserted into the
DeclContext in an ordering that doesn't necessarily reflect source
order. The culprits were Sema::ActOnMethodDeclaration(), which did not
perform the insertion of the just-created method declaration into
the DeclContext for these Objective-C entities, and
Sema::ActOnAtEnd(), which inserted all method declarations at the
*end* of the DeclContext.

With this fix in hand, clean up the code-completion actions for
property setters/getters that worked around this brokenness in the AST.

Fixes <rdar://problem/8062781>, where this problem manifested as poor
token-annotation information, but this would have struck again in many
other places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
6ad6f2848d7652ab2991286eb48be440d3493b28 07-Dec-2010 Francois Pichet <pichet2000@gmail.com> Type traits intrinsic implementation: __is_base_of(T, U)
New AST node introduced: BinaryTypeTraitExpr; to be reused for more intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
a44724d0d6d03568ec9acadc0781d612163008e1 02-Dec-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed source range for MS asm statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
44aa1f397855f130e88e62ffc1029f7f83bb5d2e 20-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r119838 "Don't warn for empty 'if' body if there is a macro that expands to nothing"
and use a better and more general approach, where NullStmt has a flag to indicate whether it was preceded by an empty macro.

Thanks to Abramo Bagnara for the hint!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
a25b6a4b43e8b9611f7506e5fe1b448833b10a46 19-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't warn for empty 'if' body if there is a macro that expands to nothing, e.g:

if (condition)
CALL(0); // empty macro but don't warn for empty body.

Fixes rdar://8436021.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
d54eb4410330383f48d3cc22b2ad8d23f120836b 12-Oct-2010 Douglas Gregor <dgregor@apple.com> Parse default arguments within member functions in source order, from
Manuel Klimek! Fixes PR7715.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116311 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
c5be7b0fc804d8e6f87298ec03c94d8cccd74f29 28-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> vla expressions used in __typeof__ must be evaluated.
Fixes rdar://8476159.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
0fbda68b50ce17d7ad36ef7a5ed77518a5cd272e 15-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement bracket insertion for Objective-C instance message sends as
part of parser recovery. For example, given:

a method1:arg];

we detect after parsing the expression "a" that we have the start of a
message send expression. We pretend we've seen a '[' prior to the a,
then parse the remainder as a message send. We'll then give a
diagnostic+fix-it such as:

fixit-objc-message.m:17:3: error: missing '[' at start of message
send expression
a method1:arg];
^
[

The algorithm here is very simple, and always assumes that the open
bracket goes at the beginning of the message send. It also only works
for non-super instance message sends at this time.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
01b7c3028da5bbcb9f8e52ba67e4613070de0e60 08-Sep-2010 Francois Pichet <pichet2000@gmail.com> Microsoft's __uuidof operator implementation part 1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
9ba23b4ceacd77cd264501690a7a9e94184ef71b 07-Sep-2010 Douglas Gregor <dgregor@apple.com> Improve recovery when there is a stray ']' or ')' before the ';' at
the end of a statement. Fixes <rdar://problem/6896493>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
d078e641450bbc5a20df8d3b54f87b27e398acb3 28-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Parser support for inline namespaces

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
9c72c6088d591ace8503b842d39448c2040f3033 27-Aug-2010 John McCall <rjmccall@apple.com> Propagate whether an id-expression is the immediate argument of
an '&' expression from the second caller of ActOnIdExpression.

Teach template argument deduction that an overloaded id-expression
doesn't give a valid type for deduction purposes to a non-static
member function unless the expression has the correct syntactic
form.

Teach ActOnIdExpression that it shouldn't try to create implicit
member expressions for '&function', because this isn't a
permitted form of use for member functions.

Teach CheckAddressOfOperand to diagnose these more carefully.
Some of these cases aren't reachable right now because earlier
diagnostics interrupt them.




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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
55817afdf9d453a443262a733f6caf6692dca118 25-Aug-2010 Douglas Gregor <dgregor@apple.com> Introduce a preprocessor code-completion hook for contexts where we
expect "natural" language and should not provide any completions,
e.g., comments, string literals, #error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f29c5233085a5af795c3c01b94d319e5b3235d56 25-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement code completion for preprocessor expressions and in macro
arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
1fbb447e9d43c2c676e94081fbfee7eb6cbe933b 24-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement preprocessor code completion where a macro name is expected,
e.g., after #ifdef/#ifndef or #undef, or inside a defined <macroname>
expression in a preprocessor conditional.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111954 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9 24-Aug-2010 Douglas Gregor <dgregor@apple.com> Introduce basic code-completion support for preprocessor directives,
e.g., after a "#" we'll suggest #if, #ifdef, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
09a63c97b95eb4dc6fd6b2323929e8cf12af03ff 24-Aug-2010 Douglas Gregor <dgregor@apple.com> Parse all kinds of declarations as part of a linkage-specification,
from Francois Pichet! Fixes PR7754.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
60d7b3a319d84d688752be3870615ac0f111fb16 24-Aug-2010 John McCall <rjmccall@apple.com> OwningExprResult -> ExprResult. This patch brought to you by
M-x query-replace-regexp
\(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result



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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
d32b0225e29fcafb2b2b2a4b1c51dcb1518af9c6 24-Aug-2010 Douglas Gregor <dgregor@apple.com> Provide code completion results for the context-sensitive Objective-C
keywords "in", "out", "inout", "byref", "bycopy", and "oneway".


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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
2b5289b6fd7e3d9899868410a498c081c9595662 23-Aug-2010 John McCall <rjmccall@apple.com> Push DeclGroupRefs and TemplateNames in an opaque but type-safe way
through the parser.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
1f58816e6589ef15d1509c6c99bb8fabf2a4cda9 23-Aug-2010 John McCall <rjmccall@apple.com> Kill off Parser::TemplateParameterList to avoid misparses.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
ca0408fb49c1370430672acf2d770b7151cf71de 23-Aug-2010 John McCall <rjmccall@apple.com> Sundry incremental steps towards killing off Action.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
d226f65006733ed7f709c3174f22ce33391cb58f 21-Aug-2010 John McCall <rjmccall@apple.com> DeclPtrTy -> Decl *



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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
aa8b0d19244a6e7e8e5798fcc6aef003c274d3e0 05-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Implement #pragma GCC visibility.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
cbb98edd530787c2ac019e437e7c599df8004ba7 31-Jul-2010 Daniel Dunbar <daniel@zuster.org> Parser: Add support for #pragma align, which is just another spelling of #pragma
options align.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
87c300738174924453648c3b2d6f366c8284fac4 26-Jul-2010 Douglas Gregor <dgregor@apple.com> Eliminate the "minimal" and printing parser actions, which only ever
worked for C anyway. Also kills the -cc1 options -parse-noop and
-parse-print-callbacks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
3fe104154dd2e8ffb351142d74f308938b5c99bf 22-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> atch for implementation of objective-c's -Wselector
warning flag in clang. Little more to do
for a PCH issue. Radar 6507158.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
c9068d7dd94d439cec66c421115d15303e481025 16-Jul-2010 John McCall <rjmccall@apple.com> Treat template parameters as part of the declaration-specifiers for the
purpose of access control. Fixes PR7644.

I can't actually find anything directly justifying this, but it seems obvious.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
1b730e847ded503f2e615154035c083c4f94a067 31-May-2010 Douglas Gregor <dgregor@apple.com> When we see the a '[' in a postfix expression in Objective-C, perform
a simple, quick check to determine whether the expression starting
with '[' can only be an Objective-C message send. If so, don't parse
it as an array subscript expression. This improves recovery for, e.g.,

[a method1]
[a method2]

so that we now produce

t.m:10:13: error: expected ';' after expression
[a method]
^

instead of some mess about expecting ']'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
861800c676004eabed5927f0552620d06c80a40a 27-May-2010 Daniel Dunbar <daniel@zuster.org> Parse: Add support for '#pragma options align'.

Also, fix a source location bug with the rparen in #pragma pack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
d5ab9b0a0ae24f7d0f49f6f10fd1b247e64b3306 22-May-2010 Douglas Gregor <dgregor@apple.com> Improve recovery when we see a dependent template name that is missing
the required "template" keyword, using the same heuristics we do for
dependent template names in member access expressions, e.g.,

test/SemaTemplate/dependent-template-recover.cpp:11:8: error: use 'template'
keyword to treat 'getAs' as a dependent template name
T::getAs<U>();
^
template

Fixes PR5404.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104409 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
1fd6d44d7ca97631497551bbf98866263143d706 22-May-2010 Douglas Gregor <dgregor@apple.com> Improve parser recovery when we encounter a dependent template name
that is missing the 'template' keyword, e.g.,

t->getAs<T>()

where getAs is a member of an unknown specialization. C++ requires
that we treat "getAs" as a value, but that would fail to parse since T
is the name of a type. We would then fail at the '>', since a type
cannot be followed by a '>'.

This is a very common error for C++ programmers to make, especially
since GCC occasionally allows it when it shouldn't (as does Visual
C++). So, when we are in this case, we use tentative parsing to see if
the tokens starting at "<" can only be parsed as a template argument
list. If so, we produce a diagnostic with a fix-it that states that
the 'template' keyword is needed:

test/SemaTemplate/dependent-template-recover.cpp:5:8: error: 'template' keyword
is required to treat 'getAs' as a dependent template name
t->getAs<T>();
^
template

This is just a start of this patch; I'd like to apply the same
approach to everywhere that a template-id with dependent template name
can be parsed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
586596fd7f7a336a2847b300c80614dcf39ab6d5 06-May-2010 Douglas Gregor <dgregor@apple.com> Rework our handling of temporary objects within the conditions of
if/switch/while/do/for statements. Previously, we would end up either:

(1) Forgetting to destroy temporaries created in the condition (!),
(2) Destroying the temporaries created in the condition *before*
converting the condition to a boolean value (or, in the case of a
switch statement, to an integral or enumeral value), or
(3) In a for statement, destroying the condition's temporaries at
the end of the increment expression (!).

We now destroy temporaries in conditions at the right times. This
required some tweaking of the Parse/Sema interaction, since the parser
was building full expressions too early in many places.

Fixes PR7067.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
0278e123b4606ea15dbfa717e9c5a76a5ef2bc7d 05-May-2010 Douglas Gregor <dgregor@apple.com> Support for 'template' as a disambiguator (PR7030)

ParseOptionalCXXScopeSpecifier() only annotates the subset of
template-ids which are not subject to lexical ambiguity. Add support
for the more general case in ParseUnqualifiedId() to handle cases
such as A::template B().

Also improve some diagnostic locations.

Fixes PR7030, from Alp Toker!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
6aa14d832704ae176c92d4e0f22dfb3f3d83a70a 22-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement parsing for message sends in Objective-C++. Message sends in
Objective-C++ have a more complex grammar than in Objective-C
(surprise!), because

(1) The receiver of an instance message can be a qualified name such
as ::I or identity<I>::type.
(2) Expressions in C++ can start with a type.

The receiver grammar isn't actually ambiguous; it just takes a bit of
work to parse past the type before deciding whether we have a type or
expression. We do this in two places within the grammar: once for
message sends and once when we're determining whether a []'d clause in
an initializer list is a message send or a C99 designated initializer.

This implementation of Objective-C++ message sends contains one known
extension beyond GCC's implementation, which is to permit a
typename-specifier as the receiver type for a class message, e.g.,

[typename compute_receiver_type<T>::type method];

Note that the same effect can be achieved in GCC by way of a typedef,
e.g.,

typedef typename computed_receiver_type<T>::type Computed;
[Computed method];

so this is merely a convenience.

Note also that message sends still cannot involve dependent types or
values.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
2725ca8eb3354975ca77ed4b88ede7b60b216b9a 21-Apr-2010 Douglas Gregor <dgregor@apple.com> Rework the Parser-Sema interaction for Objective-C message
sends. Major changes include:

- Expanded the interface from two actions (ActOnInstanceMessage,
ActOnClassMessage), where ActOnClassMessage also handled sends to
"super" by checking whether the identifier was "super", to three
actions (ActOnInstanceMessage, ActOnClassMessage,
ActOnSuperMessage). Code completion has the same changes.
- The parser now resolves the type to which we are sending a class
message, so ActOnClassMessage now accepts a TypeTy* (rather than
an IdentifierInfo *). This opens the door to more interesting
types (for Objective-C++ support).
- Split ActOnInstanceMessage and ActOnClassMessage into parser
action functions (with their original names) and semantic
functions (BuildInstanceMessage and BuildClassMessage,
respectively). At present, this split is onyl used by
ActOnSuperMessage, which decides which kind of super message it
has and forwards to the appropriate Build*Message. In the future,
Build*Message will be used by template instantiation.
- Use getObjCMessageKind() within the disambiguation of Objective-C
message sends vs. array designators.

Two notes about substandard bits in this patch:
- There is some redundancy in the code in ParseObjCMessageExpr and
ParseInitializerWithPotentialDesignator; this will be addressed
shortly by centralizing the mapping from identifiers to type names
for the message receiver.
- There is some #if 0'd code that won't likely ever be used---it
handles the use of 'super' in methods whose class does not have a
superclass---but could be used to model GCC's behavior more
closely. This code will die in my next check-in, but I want it in
Subversion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
eb483eb3ee80300f15d6d13573d82493c2194461 11-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6811 by not parsing 'super' as a magic expression in
LookupInObjCMethod. Doing so allows all sorts of invalid code
to slip through to codegen. This patch does not change the
AST representation of super, though that would now be a natural
thing to do since it can only be in the receiver position and
in the base of a ObjCPropertyRefExpr.

There are still several ugly areas handling super in the parser,
but this is definitely a step in the right direction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
c6fbbedb3e90ff2f04828c36fd839e01468679f5 19-Mar-2010 Douglas Gregor <dgregor@apple.com> Remove the capture, serialization, and deserialization of comment
ranges as part of the ASTContext. This code is not and was never used,
but contributes ~250k to the size of the Cocoa.h precompiled
header.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
d4dca08d6b7ed2e3e3718caa6fd735960b135e9a 24-Feb-2010 Douglas Gregor <dgregor@apple.com> Rework parsing of pseudo-destructor expressions and explicit
destructor calls, e.g.,

p->T::~T

We now detect when the member access that we've parsed, e.g.,

p-> or x.

may be a pseudo-destructor expression, either because the type of p or
x is a scalar or because it is dependent (and, therefore, may become a
scalar at template instantiation time).

We then parse the pseudo-destructor grammar specifically:

::[opt] nested-name-specifier[opt] type-name :: ∼ type-name

and hand those results to a new action, ActOnPseudoDestructorExpr,
which will cope with both dependent member accesses of destructors and
with pseudo-destructor expressions.

This commit affects the parsing of pseudo-destructors, only; the
semantic actions still go through the semantic actions for member
access expressions. That will change soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
83c481ade785a919ba21a33f9a8b1b21c1212fb3 23-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Early support for declaring ivars in class extensions. wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
b10cd04880672103660e5844e51ee91af7361a20 21-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement support for parsing pseudo-destructor expression with a nested-name-specifier, e.g.,

typedef int Int;
int *p;
p->Int::~Int();

This weakens the invariant that the only types in nested-name-specifiers are tag types (restricted to class types in C++98/03). However, we weaken this invariant as little as possible, accepting arbitrary types in nested-name-specifiers only when we're in a member access expression that looks like a pseudo-destructor expression.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
124b878dba5007df0a268ea128a6ad8dc5dd2c5e 16-Feb-2010 Douglas Gregor <dgregor@apple.com> Improve parsing and instantiation of destructor names, so that we can
now cope with the destruction of types named as dependent templates,
e.g.,

y->template Y<T>::~Y()

Nominally, we implement C++0x [basic.lookup.qual]p6. However, we don't
follow the letter of the standard here because that would fail to
parse

template<typename T, typename U>
X0<T, U>::~X0() { }

properly. The problem is captured in core issue 339, which gives some
(but not enough!) guidance. I expect to revisit this code when the
resolution of 339 is clear, and/or we start capturing better source
information for DeclarationNames.

Fixes PR6152.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
ff93dbd887e40588ed55d135037bb9287488b285 30-Jan-2010 Anders Carlsson <andersca@mac.com> Use IdentifierInfo * instead of std::string for the AsmStmt names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
ad2b804faf29042e6c4e331d0987f103f1e2fd31 19-Jan-2010 John McCall <rjmccall@apple.com> Move AccessSpecifier into the new Specifiers.h; fixes the layering violations
inherent in, well, pretty much every use of AccessSpecifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
782f2f52b78d8ca785110398a7f7b56b830b9ac7 07-Jan-2010 Ted Kremenek <kremenek@apple.com> Change ObjCContainerDecl to contain the entire range for the '@end'
piece of the declaration. The '@' and the 'end' are separate tokens,
and require two SourceLocations to accurately track.

This change was motivated because ObjCContainerDecl::getSourceRange()
would previously not return the entire range of the declaration (the
'end' would be left off).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
7a1dc562d4ad59237ed9fe7e8cef56f9eaa7a26c 19-Dec-2009 John McCall <rjmccall@apple.com> Refactor to remove more dependencies on PreDeclaratorDC. I seem to have made
the redeclaration problems in the [temp.explicit]p3 testcase worse, but I can
live with that; they'll need to be fixed more holistically anyhow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
de138eb4e63f58bcfdea6d3834e07f4cd25ca857 10-Dec-2009 Chris Lattner <sabre@nondot.org> Second half of r91023, saving files is good.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91024 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
08d92ecf6e5b1fd23177a08c2312b58d63d863db 10-Dec-2009 Chris Lattner <sabre@nondot.org> refactor the 'ColonIsSacred' argument to ParseOptionalCXXScopeSpecifier
to be a bool in Parser that is twiddled by the ColonProtectionRAIIObject
class. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
3acd9aaa4ddd14afecb4f1c02ca6f585a6d51849 09-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a bogus error when declaring an extern "C" array.
(fixes radar 7457109).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
46646491834cd8faabb22482dfe93b24ce28a6c1 07-Dec-2009 Chris Lattner <sabre@nondot.org> reapply my patch for PR4451, which improves diagnostics for :: vs : confusion.
This time with a fix to bail out when in a dependent context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
1ade4ca0aa9331c2388cca9becad1357a154ae34 06-Dec-2009 Chris Lattner <sabre@nondot.org> revert my previous patch, it is breaking something and I don't have time
to fix it ATM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
a564b17dcc7daf298ffa72cde94630343bf9c31a 06-Dec-2009 Chris Lattner <sabre@nondot.org> implement PR4451, improving error recovery for a mistaken : where a :: was
intended. On the first testcase in the bug, we now produce:

cxx-decl.cpp:12:2: error: unexpected ':' in nested name specifier
y:a a2;
^
::

instead of:

t.cc:8:1: error: C++ requires a type specifier for all declarations
x:a a2;
^
t.cc:8:2: error: invalid token after top level declarator
x:a a2;
^
;
t.cc:9:11: error: use of undeclared identifier 'a2'
x::a a3 = a2;
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
d0014540005f2a5ab837365db6bd40f479406758 03-Dec-2009 John McCall <rjmccall@apple.com> Lift the ObjCPropertyCallback out of local scope to unbreak VS2005 builds.
Make it an inner class of Parser to assuage access control.
No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f88f7ab5adaa11d050270ffee6aa871e855f83b8 25-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Some fancy footwork to move the decision on how
to build casted expression-list AST to Sema.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
99e9b4d172f6877e6ba5ebe75bb8238721f5e01c 25-Nov-2009 Douglas Gregor <dgregor@apple.com> Eliminate CXXConditionDeclExpr with extreme prejudice.

All statements that involve conditions can now hold on to a separate
condition declaration (a VarDecl), and will use a DeclRefExpr
referring to that VarDecl for the condition expression. ForStmts now
have such a VarDecl (I'd missed those in previous commits).

Also, since this change reworks the Action interface for
if/while/switch/for, use FullExprArg for the full expressions in those
expressions, to ensure that we're emitting

Note that we are (still) not generating the right cleanups for
condition variables in for statements. That will be a follow-on
commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
98440b4ac17dc5f85ea3db683c1c1785449c17e1 21-Nov-2009 Douglas Gregor <dgregor@apple.com> Implement C++ [temp.param]p2 correctly, looking ahead when we see a
"typename" parameter to distinguish between non-type and type template
parameters. Fixes the actual bug in PR5559.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
4ad9685b3e2d5e2923c9cda7baaf7973ef0b1c62 19-Nov-2009 Douglas Gregor <dgregor@apple.com> Objective-C code completion within properties after "setter = " or
"getter = ", to provide suitable method names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
1ac7104947020a60430ba6f519cd5869af77046f 17-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a typo, reported by Doug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
63e963cdffca9530f920dbab58b9b4eecb2a582c 16-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Handle case of missing '@end' in implementation context
gracefully, on par with gcc, by: Issuing a warning,
doing final sematinc check of its definitions and generating
its meta-data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
444be7366d0a1e172c0290a1ea54c1cb16b5947c 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Wherein the TargetInfo argument to Preprocessor is made 'const' and propogated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
788cd06cf8e868a67158aafec5de3a1f408d14f3 11-Nov-2009 Douglas Gregor <dgregor@apple.com> Introduce a new representation for template template
parameters. Rather than storing them as either declarations (for the
non-dependent case) or expressions (for the dependent case), we now
(always) store them as TemplateNames.

The primary change here is to add a new kind of TemplateArgument,
which stores a TemplateName. However, making that change ripples to
every switch on a TemplateArgument's kind, also affecting
TemplateArgumentLocInfo/TemplateArgumentLoc, default template
arguments for template template parameters, type-checking of template
template arguments, etc.

This change is light on testing. It should fix several pre-existing
problems with template template parameters, such as:
- the inability to use dependent template names as template template
arguments
- template template parameter default arguments cannot be
instantiation

However, there are enough pieces missing that more implementation is
required before we can adequately test template template parameters.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86777 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f7f3d0db754db0500b56d49ac19f795f13965912 11-Nov-2009 John McCall <rjmccall@apple.com> Create a new Scope when parsing a declaration with a C++ scope specifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86764 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
1cf7f0adb4a9cbb9cc971a46af5eca9fcb6c566e 04-Nov-2009 Douglas Gregor <dgregor@apple.com> Eliminate the "old" ways of parsing operator-function-ids and
conversion-function-ids; all clients have moved on to
ParseUnqualifiedId.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
ca1bdd7c269a2390d43c040a60511edd017ee130 04-Nov-2009 Douglas Gregor <dgregor@apple.com> Implement support for parsing dependent template-ids that refer to
overloaded operators, e.g.,

p->template operator+<T>()




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
6c94a6d77f456f23ecd4c2061e6413786b5e6571 03-Nov-2009 John McCall <rjmccall@apple.com> Silence a warning by giving Parser::FieldCallback a virtual destructor, and
anchor the vtable to Parser.cpp for good measure.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
02a24ee67c0a91bdb0db8a651d5748595652e670 03-Nov-2009 Douglas Gregor <dgregor@apple.com> Use ParseUnqualifiedId when parsing id-expressions. This eliminates
yet another copy of the unqualified-id parsing code.

Also, use UnqualifiedId to simplify the Action interface for building
id-expressions. ActOnIdentifierExpr, ActOnCXXOperatorFunctionIdExpr,
ActOnCXXConversionFunctionExpr, and ActOnTemplateIdExpr have all been
removed in favor of the new ActOnIdExpression action.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
c78c06d81f9838aea4198e4965cc1b26bb0bf838 30-Oct-2009 Douglas Gregor <dgregor@apple.com> Improved fix for PR3844, which recovers better for class template
partial specializations and explicit instantiations of non-templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
7dfd0fb08300b60a9657748bda7d8b3ceb07babe 25-Sep-2009 Douglas Gregor <dgregor@apple.com> When entering the scope of a declarator, make sure that the scope is
complete (or, possibly causing template instantiation).

Test this via some explicit specializations of member functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
9c6a0e92dbf89897eae6106b24bfd017f269bfd0 22-Sep-2009 Douglas Gregor <dgregor@apple.com> Implement code completion within a function call, triggered after the
opening parentheses and after each comma. We gather the set of visible
overloaded functions, perform "partial" overloading based on the set
of arguments that we have thus far, and return the still-viable
results sorted by the likelihood that they will be the best candidate.

Most of the changes in this patch are a refactoring of the overloading
routines for a function call, since we needed to separate out the
notion of building an overload set (common to code-completion and
normal semantic analysis) and then what to do with that overload
set. As part of this change, I've pushed explicit template arguments
into a few more subroutines.

There is still much more work to do in this area. Function templates
won't be handled well (unless we happen to deduce all of the template
arguments before we hit the completion point), nor will overloaded
function-call operators or calls to member functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
45f965581935791a018df829a14dff53c1dd8f47 04-Sep-2009 Douglas Gregor <dgregor@apple.com> Parse extern templates, pass that information all the way to Sema,
then drop it on the floor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
595adc1795cc2c079ef5876100e01acd10a0504a 29-Aug-2009 Anders Carlsson <andersca@mac.com> Set the access specifier for using decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80435 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
c3058338075a2132e057f1249a13b55a81fe021c 25-Aug-2009 Douglas Gregor <dgregor@apple.com> Keep track of the template parameter depth properly when we have
member templates declared inside other templates. This allows us to
match out-of-line definitions of member function templates within
class templates to the declarations within the class template. We
still can't handle out-of-line definitions for member class templates,
however.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
d83d04041f64a2c89123d227fa8003b482391279 22-Aug-2009 Douglas Gregor <dgregor@apple.com> Implement delayed parsing for member function templates. Fixes PR4608.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
37b372b76a3fafe77186d7e6079e5642e2017478 21-Aug-2009 Douglas Gregor <dgregor@apple.com> Initial support for parsing and representation of member function templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
2ef13e5abef0570a9f567b4671367275c05d4d34 11-Aug-2009 Nate Begeman <natebegeman@mac.com> Take 2 on AltiVec-style vector initializers.

Fixes PR4704 problems

Addresses Eli's patch feedback re: ugly cast code

Updates all postfix operators to remove ParenListExprs. While this is awful,
no better solution (say, in the parser) is obvious to me. Better solutions
welcome.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
1df5109f475bcbc528eb1fb9fdb179dcadbb33a6 10-Aug-2009 Daniel Dunbar <daniel@zuster.org> Revert r78535, it is causing a number of failures to build projects.

--- Reverse-merging r78535 into '.':
D test/Sema/altivec-init.c
U include/clang/Basic/DiagnosticSemaKinds.td
U include/clang/AST/Expr.h
U include/clang/AST/StmtNodes.def
U include/clang/Parse/Parser.h
U include/clang/Parse/Action.h
U tools/clang-cc/clang-cc.cpp
U lib/Frontend/PrintParserCallbacks.cpp
U lib/CodeGen/CGExprScalar.cpp
U lib/Sema/SemaInit.cpp
U lib/Sema/Sema.h
U lib/Sema/SemaExpr.cpp
U lib/Sema/SemaTemplateInstantiateExpr.cpp
U lib/AST/StmtProfile.cpp
U lib/AST/Expr.cpp
U lib/AST/StmtPrinter.cpp
U lib/Parse/ParseExpr.cpp
U lib/Parse/ParseExprCXX.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
25b4fdb9d63095448e6cbc97b8865b36b0c8cbb6 09-Aug-2009 Nate Begeman <natebegeman@mac.com> AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);

In addition to being defined by the AltiVec PIM, this is also the vector
initializer syntax used by OpenCL, so that vector literals are compatible
with macro arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
d33133cdc1af466f9c276249b2621be03867888b 22-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Fix the parsing of default arguments for inline member function
definitions.

I'm not very familiar with this code, so please review.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
3fdbed594f4cb238fe37cad2ec3fefa3b6f67125 21-Jul-2009 Douglas Gregor <dgregor@apple.com> Make Sema::ActOnCXXEnterDeclaratorScope robust against failures to compute
the declaration context, as occurs with out-of-line class template member
definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
2bcb3439b50c7f227a21d7118a2a76904ec60331 21-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add an assert for safety check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76539 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f37006bc8a9d398d40d6ce329f023ed1a92fe484 21-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix a crash that occurs in this C++ case:

struct foo {
static bool value;
};
bool (foo::value); // crash because of parens

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
2e22253e03e175144aeb9d13350a12fd83f858be 02-Jul-2009 Douglas Gregor <dgregor@apple.com> Add support for retrieving the Doxygen comment associated with a given
declaration in the AST.

The new ASTContext::getCommentForDecl function searches for a comment
that is attached to the given declaration, and returns that comment,
which may be composed of several comment blocks.

Comments are always available in an AST. However, to avoid harming
performance, we don't actually parse the comments. Rather, we keep the
source ranges of all of the comments within a large, sorted vector,
then lazily extract comments via a binary search in that vector only
when needed (which never occurs in a "normal" compile).

Comments are written to a precompiled header/AST file as a blob of
source ranges. That blob is only lazily loaded when one requests a
comment for a declaration (this never occurs in a "normal" compile).

The indexer testbed now supports comment extraction. When the
-point-at location points to a declaration with a Doxygen-style
comment, the indexer testbed prints the associated comment
block(s). See test/Index/comments.c for an example.

Some notes:
- We don't actually attempt to parse the comment blocks themselves,
beyond identifying them as Doxygen comment blocks to associate them
with a declaration.
- We won't find comment blocks that aren't adjacent to the
declaration, because we start our search based on the location of
the declaration.
- We don't go through the necessary hops to find, for example,
whether some redeclaration of a declaration has comments when our
current declaration does not. Similarly, we don't attempt to
associate a \param Foo marker in a function body comment with the
parameter named Foo (although that is certainly possible).
- Verification of my "no performance impact" claims is still "to be
done".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
c8e27cc402043ec86c1698c09e4ee9e415b16207 26-Jun-2009 Chris Lattner <sabre@nondot.org> fix PR4452, a crash on invalid. The error recovery is still terrible in this case
but at least we don't crash :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
52591bf224b2c43e2b00e265bb8599a620081925 24-Jun-2009 Douglas Gregor <dgregor@apple.com> Make sure that the template parameter lists get from the parser down to ActOnFunctionDeclarator for function template definitions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
ac7610dad6653bad02dd42de198ca358b6fb1f1d 22-Jun-2009 Douglas Gregor <dgregor@apple.com> Rework the way we track which declarations are "used" during
compilation, and (hopefully) introduce RAII objects for changing the
"potentially evaluated" state at all of the necessary places within
Sema and Parser. Other changes:

- Set the unevaluated/potentially-evaluated context appropriately
during template instantiation.
- We now recognize three different states while parsing or
instantiating expressions: unevaluated, potentially evaluated, and
potentially potentially evaluated (for C++'s typeid).
- When we're in a potentially potentially-evaluated context, queue
up MarkDeclarationReferenced calls in a stack. For C++ typeid
expressions that are potentially evaluated, we will play back
these MarkDeclarationReferenced calls when we exit the
corresponding potentially potentially-evaluated context.
- Non-type template arguments are now parsed as constant
expressions, so they are not potentially-evaluated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
989135901c750af61ef012b6b0a0368be415bc46 13-Jun-2009 Chris Lattner <sabre@nondot.org> add the location of the ')' in a do/while statement to DoStmt.
This fixes a source range problem reported by Olaf Krzikalla.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
9991479ad5dde617168cc1e4b18425cdbbfd9fa9 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add parser support for #pragma weak.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
6569d68745c8213709740337d2be52b031384f58 28-May-2009 Douglas Gregor <dgregor@apple.com> Reimplement much of the way that we track nested classes in the
parser. Rather than placing all of the delayed member function
declarations and inline definitions into a single bucket corresponding
to the top-level class, we instead mirror the nesting structure of the
nested classes and place the delayed member functions into their
appropriate place. Then, when we actually parse the delayed member
function declarations, set up the scope stack the same way as it was
when we originally saw the declaration, so that we can find, e.g.,
template parameters that are in scope.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
d974a7b72eb84cdc735b189bcea56fd37e13ebf6 22-May-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Factor the compound literal parsing out from ParseParenExpression and into a new ParseCompoundLiteralExpression.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
0350ca519405051e8d45d12ee7d09569a6a9c4c9 22-May-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Modification to ParseParenExpression.
Now it parses the cast expression unless 'stopIfCastExpr' is true.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
21e7ad24099965acfa801e4abdd91e3d94106428 22-May-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove ParseSimpleParenExpression.
Embed its functionality into it's only user, ParseCXXCasts.
CXXCasts now get the "actual" expression directly, they no longer always receive a ParenExpr. This is better since the
parentheses are always part of the C++ casts syntax.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
a99fad8ff134273fe85f2970c7d89133d1218900 17-May-2009 Anders Carlsson <andersca@mac.com> Add the FullExprArg wrapper and use it for if statement conditions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
3f5b61c394f4f205bcb4d316eb2a7a0a68b8af86 14-May-2009 Douglas Gregor <dgregor@apple.com> Implement explicit instantiations of member classes of class templates, e.g.,

template<typename T>
struct X {
struct Inner;
};

template struct X<int>::Inner;

This change is larger than it looks because it also fixes some
a problem with nested-name-specifiers and tags. We weren't requiring
the DeclContext associated with the scope specifier of a tag to be
complete. Therefore, when looking for something like "struct
X<int>::Inner", we weren't instantiating X<int>.

This, naturally, uncovered a problem with member pointers, where we
were requiring the left-hand side of a member pointer access
expression (e.g., x->*) to be a complete type. However, this is wrong:
the semantics of this expression does not require a complete type (EDG
agrees).

Stuart vouched for me. Blame him.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
709131972f67190edd310ef72bd5e8c9a7764823 12-May-2009 Douglas Gregor <dgregor@apple.com> Parser::ParseDeclarationOrFunctionDefinition no longer needs to accept
template parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
d3a413d3b8eb39bcee5944bc545d9997c1abe492 26-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement function-try-blocks. However, there's a very subtle bug that I can't track down.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
2fc5c2428ecb450a3256c8316b93b8655cb76a0f 11-Apr-2009 Chris Lattner <sabre@nondot.org> rename Parser::ParseObjCSelector -> Parser::ParseObjCSelectorPiece,
since it only parses one identifier out of the selector, not the
whole thing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
7532dc66648cfe7432c9fe66dec5225f0ab301c6 31-Mar-2009 Douglas Gregor <dgregor@apple.com> Improve the representation of template names in the AST. This
representation handles the various ways in which one can name a
template, including unqualified references ("vector"), qualified
references ("std::vector"), and dependent template names
("MetaFun::template apply").

One immediate effect of this change is that the representation of
nested-name-specifiers in type names for class template
specializations (e.g., std::vector<int>) is more accurate. Rather than
representing std::vector<int> as

std::(vector<int>)

we represent it as

(std::vector)<int>

which more closely follows the C++ grammar.

Additionally, templates are no longer represented as declarations
(DeclPtrTy) in Parse-Sema interactions. Instead, I've introduced a new
OpaquePtr type (TemplateTy) that holds the representation of a
TemplateName. This will simplify the handling of dependent
template-names, once we get there.






git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
03bd5a1e9a54b62b10ae8aeb6eb5245e2031d98b 28-Mar-2009 Anders Carlsson <andersca@mac.com> Parse the location of the 'namespace' token to ActOnNamespaceAliasDef. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
f67606ae2febe3bb0718f05040c6c4bc2c2c3276 28-Mar-2009 Anders Carlsson <andersca@mac.com> Parse namespace aliases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
5aeccdbb4bdc94e48c04cacc59fa812af32109b2 26-Mar-2009 Anders Carlsson <andersca@mac.com> Handle parsing of templates in member declarations. Pass the AccessSpecifier all the way down to ActOnClassTemplate.

Doug, Sebastian: Plz review! :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
4726d03ab3abce41911c31d1354a18f1258cae4d 23-Mar-2009 Ted Kremenek <kremenek@apple.com> Implement '#pragma unused'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67569 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
5908a9293b88a3da57ae59b522275d05e1ab11e0 21-Mar-2009 Douglas Gregor <dgregor@apple.com> InitListDesignations hasn't been used (ever). Eliminate it, and
simplify the parsing and action interface for designated
initializers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
0102c30896c83f70cf6b6519fd5c674cb981c0b5 05-Mar-2009 Chris Lattner <sabre@nondot.org> When the parser is live, print out the location and spelling of its current token.
For example:

Stack dump:
0. Program arguments: clang t.cpp
1. t.cpp:4:8: current parser token: ';'
2. t.cpp:3:1: parsing struct/union/class body 'x'
Abort

It is weird that the parser is always "underneath" any parse context
actions, but the parser is created first.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
40e9bc84a2ab49fc33c2b1a95c6674ab2b820e9e 05-Mar-2009 Chris Lattner <sabre@nondot.org> Simplify the interface to ParseFunctionStatementBody to not take
locations that are the current tok loc. Note that inline C++ methods
have a big fixme that could cause a crash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
4b2d3f7bcc4df31157df443af1b80bcaa9b58bba 26-Feb-2009 Douglas Gregor <dgregor@apple.com> Introduce code modification hints into the diagnostics system. When we
know how to recover from an error, we can attach a hint to the
diagnostic that states how to modify the code, which can be one of:

- Insert some new code (a text string) at a particular source
location
- Remove the code within a given range
- Replace the code within a given range with some new code (a text
string)

Right now, we use these hints to annotate diagnostic information. For
example, if one uses the '>>' in a template argument in C++98, as in
this code:

template<int I> class B { };
B<1000 >> 2> *b1;

we'll warn that the behavior will change in C++0x. The fix is to
insert parenthese, so we use code insertion annotations to illustrate
where the parentheses go:

test.cpp:10:10: warning: use of right-shift operator ('>>') in template
argument will require parentheses in C++0x
B<1000 >> 2> *b1;
^
( )


Use of these annotations is partially implemented for HTML
diagnostics, but it's not (yet) producing valid HTML, which may be
related to PR2386, so it has been #if 0'd out.

In this future, we could consider hooking this mechanism up to the
rewriter to actually try to fix these problems during compilation (or,
after a compilation whose only errors have fixes). For now, however, I
suggest that we use these code modification hints whenever we can, so
that we get better diagnostics now and will have better coverage when
we find better ways to use this information.

This also fixes PR3410 by placing the complaint about missing tokens
just after the previous token (rather than at the location of the next
token).




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
c15cb38a4ff717097b32532fbf761c71b1376a02 10-Feb-2009 Douglas Gregor <dgregor@apple.com> Rudimentary checking of template arguments against their corresponding
template parameters when performing semantic analysis of a template-id
naming a class template specialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f02da89d7bddc319be52605d36442518647116b4 09-Feb-2009 Douglas Gregor <dgregor@apple.com> Implement Sebastian's idea for simplifying our handling of the greater-than operator/delimiter. Also, clean up after ourselves following a failed parse of a template-argument-list

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
5908e9f25bc9a334c99c095e0b1e6a515445be2d 09-Feb-2009 Douglas Gregor <dgregor@apple.com> Eliminate TemplateArg so that we only have a single kind of
representation for template arguments. Also simplifies the interface
for ActOnClassTemplateSpecialization and eliminates some annoying
allocations of TemplateArgs.

My attempt at smart pointers for template arguments lists is
relatively lame. We can improve it once we're sure that we have the
right representation for template arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64154 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
98eb8a7a702b95183ed015706b1f1c66f5cb27a4 04-Feb-2009 Mike Stump <mrs@apple.com> Add support for blocks with explicit return types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
ebc07d57be9e0722b4b9c66625e1fca43dcc2ee0 03-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Allow taking the address of data members, resulting in a member pointer.
Pointers to functions don't work yet, and pointers to overloaded functions even less. Also, far too much illegal code is accepted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63655 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
1100258c19dd8967ba078c0bc81fc06cea9d033f 03-Feb-2009 Chris Lattner <sabre@nondot.org> add #include to make more self-contained.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
adf077f46ba5cddcd801a647a5e9a3eb97060df4 27-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR3418: make sure to handle the RHS of expressions starting with
__extension__. This sort of construct shows up in the gcc source code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
47246be8ac5b0ddde6c402b8fc6946b6135487b5 26-Jan-2009 Chris Lattner <sabre@nondot.org> This change refactors some of the low-level lexer interfaces a bit.
Token now has a class of kinds for "literals", which include
numeric constants, strings, etc. These tokens can optionally have
a pointer to the start of the token in the lexer buffer. This
makes it faster to get spelling and do other gymnastics, because we
don't have to go through source locations.

This change is performance neutral, but will make other changes
more feasible down the road.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
64b45f7e0d3167f040841ac2920aead7f080730d 05-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> PODness and Type Traits

Make C++ classes track the POD property (C++ [class]p4)
Track the existence of a copy assignment operator.
Implicitly declare the copy assignment operator if none is provided.
Implement most of the parsing job for the G++ type traits extension.
Fully implement the low-hanging fruit of the type traits:
__is_pod: Whether a type is a POD.
__is_class: Whether a type is a (non-union) class.
__is_union: Whether a type is a union.
__is_enum: Whether a type is an enum.
__is_polymorphic: Whether a type is polymorphic (C++ [class.virtual]p1).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
5b4547318bb179fc76f984f0eeaaf615927e795c 05-Jan-2009 Chris Lattner <sabre@nondot.org> remove optimization to avoid looking ahead for cases like ::foo. This
isn't worth the complexity and the code already does a ton of lookahead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
a7bc7c880f86bc180684ef032d06df51bcae7a23 05-Jan-2009 Chris Lattner <sabre@nondot.org> my previous patch caused sema to drop the global qualifier, make
sure to pass it down. This makes the code a bit gross, I will clean
it up in subsequent commits.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
59232d35f5820e334b6c8b007ae8006f4390055d 04-Jan-2009 Chris Lattner <sabre@nondot.org> eliminate lookahead when parsing ::new / ::delete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
a0fd8652f3302d0f39ed9849b521ee5b76597b0a 21-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Parser support for C++ try-catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
a60528cdac7deee3991c2b48af4df4f315e49e9d 21-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a few Stmt actions to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61309 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
85b5a45803784a5465f69baf6f8d6e1eacaa5af5 18-Dec-2008 Chris Lattner <sabre@nondot.org> rename argument


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61199 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
0a59acb9ae36077ce46fb2807956c5e84f0f6837 16-Dec-2008 Douglas Gregor <dgregor@apple.com> Make name lookup when we're inside a declarator's scope, such as ClassName::func, work with the new unqualified name lookup code. Test it with default arguments in out-of-line member definitions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
1d922960e083906a586609ac6978678147250177 13-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert remaining expression parsers to smart pointers. Now on to the Action connection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
ff871fb8f9c5906a4dee78afd81f60c3837e16cb 12-Dec-2008 Chris Lattner <sabre@nondot.org> use smarter error recovery for do/while.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
15ff1110c96a26c9315142d407c1f29d86a5ad1f 12-Dec-2008 Chris Lattner <sabre@nondot.org> apply the new error recovery smarts we have for if's to while's and switch's.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
d8c4e15138e69a51754cc259c8a592cc47950c8e 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert some more expression parsers to use smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
43bc2a0973ffe404fabba6f8280cd6bad2c69fcb 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert the remaining statement parsers to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
9a920342707e384473b464528d2fd286e8c70353 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert some more statement parsers to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
61364dddc33383e62cfe3b841dbc0f471280d95b 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a number of statement parsers to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
44802cc435d5122701e4f1a9354381cff4b171c0 26-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add some comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60119 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
3cbfe2c4159e0a219ae660d50625c013aa4afbd0 22-Nov-2008 Chris Lattner <sabre@nondot.org> Split the DiagnosticInfo class into two disjoint classes:
one for building up the diagnostic that is in flight (DiagnosticBuilder)
and one for pulling structured information out of the diagnostic when
formatting and presenting it.

There is no functionality change with this patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
5cb93b8bf009c4b0ae09b71ba85f54b2a7ea8022 19-Nov-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6150376> [sema] crash on invalid message send.

The core fix in Sema::ActOnClassMessage(). All the other changes have to do with passing down the SourceLocation for the receiver (to properly position the cursor when producing an error diagnostic).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
981aeb64be244097a41098c437a989cf0a6f99b6 14-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove Parser::isTokenUnqualifiedId, it's not getting used anywhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
c42e1183846228a7fa5143ad76507d6d60f5c6f3 11-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implement C++ 'typeid' parsing and sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
3f08d181f620e6bf4971c436fc9878f98a02bbe3 10-Nov-2008 Douglas Gregor <dgregor@apple.com> Improve parser error recovery after a constructor initializer

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
751810234ffb45327f23c5f9fda0b944e480bd2b 08-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Silence a GCC member initialization order warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
7ad8390f7992ab7f19b1460c5f0b9d96f165c4e9 05-Nov-2008 Douglas Gregor <dgregor@apple.com> Initial implementation of parsing, semantic analysis, and AST-building
for constructor initializations, e.g.,

class A { };
class B : public A {
int m;
public:
B() : A(), m(17) { };
};





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58749 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
0eec2b58678f71af6b5fcf4c439290c0d640546b 26-Oct-2008 Chris Lattner <sabre@nondot.org> inline the decision logic that chooses between an assign expr and brace
initializer, avoiding an extra level of calls for silly things like
'int x = 4'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
eccc53a0a0ed1abc7bb4c04ed9566ce0c5c63140 26-Oct-2008 Chris Lattner <sabre@nondot.org> This patch continues parser-level implementation of designators:

1. It introduces new parser level abstractions for designators
that are used to communicate between parser and sema.
2. This fixes a FIXME where "identifier ':'" was considered to be
a designator even if it wasn't the first in a designator list.
3. In the "identifier ':'" case, it actually builds the designator
representation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f8268ae3196002bbab6adb830302e79b0f368f13 22-Oct-2008 Douglas Gregor <dgregor@apple.com> Add representation of base classes in the AST, and verify that we
don't have duplicated direct base classes.

Seriliazation of base class specifiers is not yet implemented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
5fd80fada1eeecd279af8333a7f58b86d8df8016 20-Oct-2008 Chris Lattner <sabre@nondot.org> eliminate ObjCPropertyAttrs an corresponding enums, just use
strcmp when needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
cd9f4b31c4fe5b77b5519cc17b4583fab912bad1 20-Oct-2008 Chris Lattner <sabre@nondot.org> More property attribute recovery improvements. Instead of this:

crash.m:8:12: error: type name requires a specifier or qualifier
@property (readonlyx, getter=isAwesome) int _awesome;
^
crash.m:8:29: error: expected ';' at end of declaration list
@property (readonlyx, getter=isAwesome) int _awesome;
^
crash.m:8:39: error: expected identifier or '('
@property (readonlyx, getter=isAwesome) int _awesome;
^

we now get:

crash.m:8:12: error: unknown property attribute 'readonlyx'
@property (readonlyx, getter=isAwesome) int _awesome;
^

Also, we can eliminate isObjCPropertyAttribute now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57811 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
b47e38683f288cd4a73098091d629df417377a6b 05-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move the TentativeParsingResult enum closer to where it gets used.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
bbc70c019f7b7f9a256ee29dab5287ecc82c6553 05-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Disambiguate between a declaration or an expression, in the 'for-init-statement' part of a 'for' statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
fcdd8fe26de3eee44927600bf1853e21bd90dd84 04-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add Parser support for #pragma pack
- Uses Action::ActOnPragmaPack
- Test case is XFAIL pending verifier fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
246e70f69cb8aeb67225c54690f1c6b25abd5a86 26-Sep-2008 Daniel Dunbar <daniel@zuster.org> Parser support for prefix __attribute__ on @protocol.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
d6ecc5cf945ccdf2b931137e364a69cde59ab18b 17-Sep-2008 Zhongxing Xu <xuzhongxing@gmail.com> Fix comment typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
71b914b999d9c4b6df11068fc5a3291ac4770492 09-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement parser support for the 'condition' part of C++ selection-statements and iteration-statements (if/switch/while/for).
Add new 'ActOnCXXConditionDeclarationExpr' action, called when the 'condition' is a declaration instead of an expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
296e8d5fdcf9946f51e866adc8d281379e51efe9 28-Aug-2008 Steve Naroff <snaroff@apple.com> Add parser/action support for block literal expressions.
Parser support for blocks is almost complete...just need to add support for the __block() storage class qualifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
a88b509d233d3f42382130c159c05cafa006b3e0 24-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Pass SourceRanges by reference to the various Diag methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
897e7a38c73a28731f8cdbaa4385ca15ab65820c 24-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add a Parser::Diag overload that can receive a custom string along with a SourceRange.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
5ffb14b7e88e587cd2f78dcc3a966a64108920f0 23-Aug-2008 Chris Lattner <sabre@nondot.org> we already have a handle on the 'in' keyword, don't bother getting two.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
06f548596beef4c0a227a45cba996497f99566c0 23-Aug-2008 Chris Lattner <sabre@nondot.org> minor cleanup, remove finalize method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
987a14bf5883ef6e5d07f1c83eb6d41a8212a78c 22-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add support for C++'s "type-specifier ( expression-list )" expression:

-The Parser calls a new "ActOnCXXTypeConstructExpr" action.
-Sema, depending on the type and expressions number:
-If the type is a class, it will treat it as a class constructor. [TODO]
-If there's only one expression (i.e. "int(0.5)" ), creates a new "CXXFunctionalCastExpr" Expr node
-If there are no expressions (i.e "int()" ), creates a new "CXXZeroInitValueExpr" Expr node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
0cd5b429fad6833dda23f0aced14a10907ac5539 16-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Put (argument)-expression-list parsing in a separate function so that it can be re-used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
662e8b5647adbb1bc9eeceece7b64600cfa87471 15-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change Parser & Sema to use interned "super" for comparions.
- Added as private members for each because it is not clear where to
put the common definition. Perhaps the IdentifierInfos all of these
"pseudo-keywords" should be collected into one place (this would
KnownFunctionIDs and Objective-C property IDs, for example).

Remove Token::isNamedIdentifier.
- There isn't a good reason to use strcmp when we have interned
strings, and there isn't a good reason to encourage clients to do
so.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
03db1b31dd926409b7defc1c90b66549464652c0 10-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow the preprocessor to cache the lexed tokens, so that we can do efficient lookahead and backtracking.

1) New public methods added:
-EnableBacktrackAtThisPos
-DisableBacktrack
-Backtrack
-isBacktrackEnabled

2) LookAhead() implementation is replaced with a more efficient one.
3) LookNext() is removed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
4fef81d718ca1b91ce2adef52db91a35f86e9bbd 05-Aug-2008 Chris Lattner <sabre@nondot.org> Fix rdar://6124613 a crash on invalid code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
06036d3709955a53297b4cbe14e20db88f321470 26-Jul-2008 Chris Lattner <sabre@nondot.org> Pull protocol resolution of out ActOnStartClassInterface, this is also the
last client of the old ParseObjCProtocolReferences, so it also removes it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
844cef32e4359c3e651e4eb84beca0c3e8a727d5 26-Jul-2008 Chris Lattner <sabre@nondot.org> add a new diag helper that takes a range.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
b9f930d7bdb911be8420e044876221bf8a39f45f 12-Jul-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use of NextToken() makes ParseIdentifierStatement unnecessary.
Simplify the parser by removing Parser::ParseIdentifierStatement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f7da726f09a6b7c5b9f5308e9690cb015398e671 10-Jul-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Simplify the parser a bit by looking at the next token without consuming it (by Preprocessor::LookNext):

-Remove ParseExpressionWithLeadingIdentifier and ParseAssignmentExprWithLeadingIdentifier.
-Separate ParseLabeledStatement from ParseIdentifierStatement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53376 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
4cc18a4d5222e04bd568b1e3e4d86127dbbcdf3f 25-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add parsing support for C++ classes.

Note that Parser::ParseCXXMemberSpecification is temporarily disabled until the Sema support is in place.
Once ParseCXXMemberSpecification is enabled, the Parser/cxx-class.cpp test will pass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
b93fb495660665c17c7f43172ae155d6a8c32ce8 02-Jun-2008 Chris Lattner <sabre@nondot.org> handle the full assignment-expression grammar when using an
objc message send in an initializer expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
1de1e74541c25c1a7b721f1c3991ea34c8403420 15-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> New AST representation for each objc2's property declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
1b7f89846f10681ce3cbe89ef5d60691d55bd918 14-Apr-2008 Douglas Gregor <dgregor@apple.com> Make Parser::getAccessSpecifierIfPresent const, since it does not modify the state

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
97d0205d16fef2a783e785459b5f30f6a9dfbcb9 10-Apr-2008 Eric Christopher <echristo@apple.com> Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
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/include/clang/Parse/Parser.h
6b884508c3bc97cc9df9516adb92fbf88dd0a2e4 10-Mar-2008 Chris Lattner <sabre@nondot.org> implement simple support for arbitrary token lookahead. Change the
objc @try parser to use it, fixing a FIXME. Update the
objc-try-catch-1.m file to pass now that we get more reasonable
errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
50dd289f45738ed22b7583d52ed2525b927042ff 26-Feb-2008 Chris Lattner <sabre@nondot.org> add parsing, ast building and pretty printing support for C++ throw expressions.
Patch by Mike Stump!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47582 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
c81c8144a661a49d7b9dae8d2080dee2e43186ec 25-Feb-2008 Chris Lattner <sabre@nondot.org> convert tabs to spaces, patch by Mike Stump!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
5f8aa696619e32bf307232841fedb704ba733b4d 12-Feb-2008 Steve Naroff <snaroff@apple.com> Several cleanups surrounding Parser::ParseAsmStatement() and Parser::FuzzyParseMicrosoftAsmStatement().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
705b5b532939740344d9a65cffc82f798d9332e6 11-Feb-2008 Steve Naroff <snaroff@apple.com> Move Microsoft __declspec hack from the parser to the preprocessor. Since we have no plans to actually implement this construct, it is cleaner to limit the change to the preprocessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
8bd36fcb4427519f41197d88b9121e2bbe9e3fc3 09-Feb-2008 Anders Carlsson <andersca@mac.com> Behave correctly if a constraint expression is invalid.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
dfab6cb59a703f2ce4d58371652ce879f4c85a09 08-Feb-2008 Anders Carlsson <andersca@mac.com> Put back the top-level asm code; all tests pass now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
3f9424f3206b834b5dd0e7c403348651ab6fafbb 08-Feb-2008 Anders Carlsson <andersca@mac.com> Back out 46855 for now, it causes test failures on Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
61900f0ef4fc705e62609939f30a375a9576e43d 07-Feb-2008 Anders Carlsson <andersca@mac.com> Handle top-level asm declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
d62701bc5321049353017e9abf1963edd57646aa 07-Feb-2008 Steve Naroff <snaroff@apple.com> Implement -fms-extensions. This allows us to fuzzy parse non-standard MS constructs used in "windows.h".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
64515f31850024a263e8f55f81e9ea4b39925cfa 05-Feb-2008 Steve Naroff <snaroff@apple.com> Fix Parser::ParseObjCTryStmt() to allow for trailing @-keyword statements/expressions.

This bug fix is the result of not having 2-token lookahead to recognize specific @-keywords.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
c385c90c68dfa376650e2facfbb444b2ec9bd110 29-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Bunch of type defs, etc. for @synchronized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
14dd98a7952c9559e0d17fff8272bf3be67135af 25-Jan-2008 Chris Lattner <sabre@nondot.org> Factor a complex predicate out to a helper method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
699b66138ac307a32e238463e0eff513ff17d337 25-Jan-2008 Chris Lattner <sabre@nondot.org> split the second half of ParseObjCMessageExpression into a new
ParseObjCMessageExpressionBody method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
c6fdc34ac0183bfa03d65f317c78b7bdac52897e 12-Jan-2008 Chris Lattner <sabre@nondot.org> Add first pieces of support for parsing and representing
extern "C" in C++ mode. Patch by Mike Stump!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
a526c5c67e5a0473c340903ee542ce570119665f 07-Jan-2008 Ted Kremenek <kremenek@apple.com> Substituted all instances of the string "Objc" for "ObjC". This fixes
some naming inconsistencies in the names of classes pertaining to Objective-C
support in clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
335a2d4122e41343fe11a775889b8bec5b14be60 05-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Minor changes as suggested by Chris L.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
0196cab54007ff072ec2642da8911c6b7e8d3fb5 02-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> New declarations/defs for Objc2's foreach-statement. This is work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45511 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
0bc735ffcfb223c0186419547abaa5c84482663e 29-Dec-2007 Chris Lattner <sabre@nondot.org> Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
89307ffaf8acf4d6fdffd72b607ca4fbcfdffc9d 30-Nov-2007 Steve Naroff <snaroff@apple.com> Yesterday, I simplified how we stream top-level decls.

After a discussion with Ted, we both came to the conclusion that adding a "HandleTopLevelDeclaration" hook to ASConsumer is far more elegant. The default implementation of HandleTopLevelDeclaration will be responsible for iterating over the ScopedDecl (which has a chain of the decls:-).

TODO: Once Ted adds HandleTopLevelDeclaration, make sure TagDecls are chainged appropriately...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
1f6443255894429fba384de0d5b6389ef578a5e9 28-Nov-2007 Steve Naroff <snaroff@apple.com> Several fixes/simplifications surrounding how we stream top-level decl AST's.

The following code...

typedef struct cssm_data {} CSSM_DATA, *CSSM_DATA_PTR;

struct Y { int A; };

struct X { int A; } D;

struct X E, F;

...now produces the following output...

> ../../Debug/bin/clang xx.c -ast-print
Read top-level tag decl: 'cssm_data'
typedef struct cssm_data CSSM_DATA;
typedef struct cssm_data *CSSM_DATA_PTR;
Read top-level tag decl: 'Y'
Read top-level tag decl: 'X'
Read top-level variable decl: 'D'
Read top-level variable decl: 'E'
Read top-level variable decl: 'F'

...which is much more accurate than the previous -ast-print output...

typedef struct cssm_data CSSM_DATA;
typedef struct cssm_data CSSM_DATA;
Read top-level variable decl: 'D'
Read top-level variable decl: 'E'
Read top-level variable decl: 'E'




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44421 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
b235fc2cf37621c7fc6511bb2b8788c95f9fb9fc 22-Nov-2007 Anders Carlsson <andersca@mac.com> Store output and input operands as well as clobber information in the AsmStmt. Ted, could you please review the serialization/deserialization code?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
6a0ef4b83c91a6d6d5acb4ed5577c4659fe022a3 20-Nov-2007 Anders Carlsson <andersca@mac.com> Store inline asm code in the AST.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
71c0a951d08dc7a2a057df8c15f22b36f6aa47c7 14-Nov-2007 Steve Naroff <snaroff@apple.com> Rewrite method definition bodies. Also renamed a method to distinguish between method declarations and definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44080 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
409be835b68344e0de56f99ef9a1e12760bc69ee 11-Nov-2007 Steve Naroff <snaroff@apple.com> Replace 3 method definition functions (ObjcParseMethodDefinition, ParseObjCInstanceMethodDefinition, ParseObjCClassMethodDefinition) with 1 method definition function (ParseObjCMethodDefinition).

Less code/confusion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
0416fb9f379b49abb3eb0c1cb2ca75107e5a71d1 11-Nov-2007 Steve Naroff <snaroff@apple.com> This is the last 5% of the solution to teaching Sema::ActOnInstanceMessage() about private methods (r43989).

While the diff is large, the idea is very simple. When we parse method definitions (in an @implementation), we need to add them incrementally (rather than wait until the @end).

Other details...

- Renamed Sema::ActOnAddMethodsToObjcDecl() to Sema::ActOnAtEnd(). The methods are now optional arguments.
- Removed Parser::AllImplMethods (a nice cleanup).
- Added location info to ObjcImplementationDecl (since we will need it very soon:-)
- Modified message.m test to no longer allow the bogus diagnostic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
60fbca0b027ff5a6579f16cb6e3abab826e0d967 10-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Represent method definitions as separate AST nodes. Pretty print will come next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
360300ca2ee298d585d29baf006519507d968812 09-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Some code clean up in the form of name changes for functions which
process method definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
1f7b6f88f18d7f6b10265acec5d41c4ed1897487 09-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Added class context to method declarations. Provide "interface *" type
to 'self' method of instance methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
306d68f5ef2eab86e0e86ebadd5a6eee1f752c0b 09-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> First patch toward rewriting of method definitions. This is work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f9ed3157c93495474003a5ec360039030fd42e9c 08-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Refactored parsing of main function body for reuse by objective-c methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
39f8f159c488a900e5958d5aab3e467af9ec8a2b 07-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> AST for objective-c's @throw statement and its pretty-printing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
82a5fe3d1cf204b672cdab24d72275b6ad2c3527 06-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Patch for objc2's property ASTs, as well as pretty-priting the ASTs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
beaf299a2701c5559a4e5d76b0c40f805afb8e6a 03-Nov-2007 Steve Naroff <snaroff@apple.com> Implement rewrite rules for ObjC string constants.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
b210bd0404f84b99259c9987d347a44d3c202238 01-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Bunch of class declarations for objective-c's @try-catch statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f1de0ca05e2df6f23bd559028693a12d1ebdaaf6 01-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> 1) More additions for objective-c's qualifier type.
2) Fixed a test failure (which should have failed all along!).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
19d74e1494fe399f0e2a94e9419c095f8214851b 31-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> More infrastructure to recognize objective-c's type qualifiers (in,inout, etc.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f908a87299d278164540f90b5b6e6cab7b14fb41 30-Oct-2007 Steve Naroff <snaroff@apple.com> More support for rewriting ObjC intefaces. Still some edge cases to handle...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
60fcceeedbfc8b4a99cb942e2bc5aeb9e2f92a1f 29-Oct-2007 Steve Naroff <snaroff@apple.com> This commit contains lot's of small tweaks to how we pass around and store SourceLocation's for interfaces/protocols/categories/implementations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
bef1185418705e16012b3dd50cd7c260c8d6b79c 26-Oct-2007 Steve Naroff <snaroff@apple.com> Start rewriting ObjC interfaces. As a start, we comment out all the methods. This involved refining how the parser/AST passes/manages SourceLocations for ObjcMethodDecl's.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
2a35fa9b5e0f9d9429c04adb2e1249b6fd425e7a 17-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Fix location processing of @selector: the range should include the @ sign.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
674af9541256dc3ef803e3723027a8b028f1f7a2 17-Oct-2007 Chris Lattner <sabre@nondot.org> Fix location processing of @encode: the range should include the @ sign.
@selector probably gets this wrong also.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
a0818e3cd7d59d05e6da41015033b5574c3d7893 16-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to parse @selector expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
a642beb9f143130588dcf622f5f7020832b22707 15-Oct-2007 Steve Naroff <snaroff@apple.com> Fix a parser bug with message expressions - need to call ParsePostfixExpressionSuffix().

Now were correctly allow the following...

i = [str rangeOfString:@"]"].length;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
4b6c9051c6522894978c9ba6a819a659d102db36 11-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to create protocol conforming class types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
29238a0bf7cbf5b396efb451a0adb5fe4aa037ca 05-Oct-2007 Steve Naroff <snaroff@apple.com> Layering refinements for selectors (suggested by Chris). Specifics...

- Add SelectorTable, which enables us to remove MultiKeywordSelector from the public header.
- Remove FoldingSet from IdentifierInfo.h and Preprocessor.h.
- Remove Parser::ObjcGetUnarySelector and Parser::ObjcGetKeywordSelector, they are subsumed by SelectorTable.
- Add MultiKeywordSelector to IdentifierInfo.cpp.
- Move a bunch of selector related methods from ParseObjC.cpp to IdentifierInfo.cpp.
- Added some comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
b384d329e0b727d4f2effa28fbb9aba2ac420e7b 04-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> this patch accomodates clattner's comments on expression processing in @try-statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
bcfb06ac6da1aa3c74ac1ef7a49c2807522366e7 29-Sep-2007 Steve Naroff <snaroff@apple.com> Yesterday I discovered that 78% of all selectors in "Cocoa.h" take 0/1 argument.

This motivated implementing a devious clattner inspired solution:-)

This approach uses a small value "Selector" class to point to an IdentifierInfo for the 0/1 case. For multi-keyword selectors, we instantiate a MultiKeywordSelector object (previously known as SelectorInfo). Now, the incremental cost for selectors is only 24,800 for Cocoa.h! This saves 156,592 bytes, or 86%!! The size reduction is also the result of getting rid of the AST slot, which was not strictly necessary (we will associate a selector with it's method using another table...most likely in Sema).

This change was critical to make now, before we have too many clients.

I still need to add some comments to the Selector class...will likely add later today/tomorrow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
d0b015461a819913efa1161c56a8b897d7e8cdb2 27-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch for method implementation. It populates ObjcImplementationDecl object with method implementation declarations .
It checks and warns on those methods declared in class interface and not implemented.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
397fcc117e5631db53879fbfcca66966088f3f07 19-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to parse objective-c's @try-statement and @throw-statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
00933591a2795d09dd1acff12a2d21bce7cb12c5 18-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Uses more description name for method implementation kind argument.
Moves such argument as the last argument and uses defaul value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
146fbb0c8b81cb62c8bf0e9a10ce8bc8403132c8 18-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to remove ObjcProtoMethodDecl and use ObjcMethodDecl
instead for @protocol method decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42070 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
25e077d59a8e8e43b65882b69610a3d5e2aaf53c 17-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to add objective-c's @protocl type declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
e3a2ca7e30601cdd31c77a830f4cc487851e8096 10-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Early patch to collect objective-c methods inserts them in
class object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
3536b443bc50d58a79f14fca9b6842541a434854 06-Sep-2007 Steve Naroff <snaroff@apple.com> The goal of this commit is to get just enough Sema support to recognize Objective-C classes
as types. That said, the AST nodes ObjcInterfaceDecl, ObjcInterfaceType, and ObjcClassDecl are *very*
preliminary.

The good news is we no longer need -parse-noop (aka MinimalActions) to parse cocoa.m.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f28b264437053fb0deacc9ba02b18a0966f7290a 06-Sep-2007 Steve Naroff <snaroff@apple.com> Start implementing Actions interface for ObjC classes, instance variables, and methods.

Lot's of small changes to the parser.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
0ccb27ded12fd03eb6818a880f50901bb70254fe 05-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> 1. Fix parsing of method prototype involving c-style argument declarations.
2. Fixes all allowable key-words used as selectors.
3. Template to do the messaging parse.
4. A test case for all allowable selector names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
e992af01d14e2e31037562c123af0a71ae1ed374 04-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to parse objective-c's @compatibility_alias directive.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
ac00b7f4a933e60e2f0afd83092339160adc140c 01-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to parse @implementation prologue, method definitions,
objc2's @synthesize and @dynamic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
98414c1b7d1944a57156d52e29bd41c005de09ac 31-Aug-2007 Chris Lattner <sabre@nondot.org> Fix a bug/missing-feature Ted noticed: the 'unused' warning should not
warn about the last stmt in a stmtexpr, f.e. there should be no warning for:

int maxval_stmt_expr(int x, int y) {
return ({int _a = x, _b = y; _a > _b ? _a : _b; });
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41655 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
d0f97d1716a138a8d9e0df8e5af77334663723d8 31-Aug-2007 Fariborz Jahanian <fjahanian@apple.com> Author: F. Jahanian
Log:
Implement parsing of objective-c's new @property declaration.

Modified:
include/clang/Basic/DiagnosticKinds.def
include/clang/Parse/Parser.h
Parse/ParseObjc.cpp
Parse/Parser.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
34870da70fa42b0391b79627ebd0cfc6eb22213b 30-Aug-2007 Chris Lattner <sabre@nondot.org> cleanup context-sensitive objc keyword recognition. Patch by Fariborz Jahanian.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
4e6526b2de501f2bbc261fd8017c92c75bd8d8f7 28-Aug-2007 Steve Naroff <snaroff@apple.com> Tweak declaration...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
8f08cb7d0b97786b17ef05e05caa55aad4d6bd39 25-Aug-2007 Chris Lattner <sabre@nondot.org> refactor enough of the top-level parsing logic to parse and
ignore 'namespace foo {}'



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41400 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
29b2cb1ff1a3dd78edd38e2f43ee7041d3e4ec3c 23-Aug-2007 Anders Carlsson <andersca@mac.com> Parse ObjC @protocol expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
4fa7afd07421e7276d1717e4fdf43a5fdd65a622 23-Aug-2007 Steve Naroff <snaroff@apple.com> With this commit, we now successfully parse "Cocoa.h"!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41303 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
7ef58fdbefddf693910e6403a71b3d367444c897 23-Aug-2007 Steve Naroff <snaroff@apple.com> Add support for parsing protocols.

Now we can parse quite a bit of "Foundation.h" (a couple bugs remain).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
294494e1cce92043562b4680c613df7fd028c02e 22-Aug-2007 Steve Naroff <snaroff@apple.com> Add support for parsing method prototypes (and other stuff required by @interface).

Still need to finish Parser::ParseObjCMethodDecl(). Before I do, I need to do a minor
refactoring of ParseDeclarationOrFunctionDefinition(), to disallow function definitions.
At the moment, @inteface allows function defs (which is incorrect).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
f9bcf01f82dfd2688f81e57bcc6300c9b13c51a6 22-Aug-2007 Anders Carlsson <andersca@mac.com> Parse @encode expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
ddbff78fb719a645b04bd27099fa6ec8c4693b3c 21-Aug-2007 Steve Naroff <snaroff@apple.com> Implement parsing for objc instance variables.

Next step, method...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
5508518a2702b00be3b15a26d772bde968972f54 21-Aug-2007 Anders Carlsson <andersca@mac.com> Implement parsing and code generation of Objective-C string literals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
28a7ca80da5dd2d0fca75d9a3b7a5f4851712592 21-Aug-2007 Steve Naroff <snaroff@apple.com> Added Parser::ParseStructDeclaration() as a result of refactoring Parser::ParseStructUnionBody().

Motivation: Objective-C can now share this rule. It also makes Parser::ParseStructUnionBody()
a bit smaller/cleaner..



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
dac269b65eed82182fc3e96566dedd6562dfe11e 20-Aug-2007 Steve Naroff <snaroff@apple.com> Start parsing ObjC classes/categories!

Next step, refactor Parser::ParseStructUnionBody() so that struct declarations can
be shared with Objective-C (for declaring instance variables).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
d1861fd633d5096a00777c918eb8575ea7162fe7 31-Jul-2007 Steve Naroff <snaroff@apple.com> Add parsing and AST support for GNU "typeof".
Many small changes to lot's of files.
Still some FIXME's, however the basic support is in place.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
82c7e6d8215567935d3d52741ccca9876a8ea461 25-Jul-2007 Steve Naroff <snaroff@apple.com> - Fix commit in Parser.h (patch by Kevin Andre).
- Add comment and minor cleanup to yesterday's fix to ParseCallExpr().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
d217773f106856a11879ec79dc468efefaf2ee75 20-Jul-2007 Chris Lattner <sabre@nondot.org> At one point there were going to be lexer and parser tokens.
Since that point is now long gone, we should rename LexerToken to
Token, as it is the only kind of token we have.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
9e344c65b1e8b83e1d3ada507cf653526ff2c005 15-Jul-2007 Chris Lattner <sabre@nondot.org> Make parser scope cache be a member of the parser instead of a global,
which makes it multithread clean.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h
5f016e2cb5d11daeb237544de1c5d59f20fe1a6e 11-Jul-2007 Reid Spencer <rspencer@reidspencer.com> Stage two of getting CFE top correct.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Parse/Parser.h