History log of /external/clang/test/Parser/cxx-decl.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/test/Parser/cxx-decl.cpp
f0cc19f43d5e05dbd22d00faca8c093b7005be3f 19-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195163:
------------------------------------------------------------------------
r195163 | rsmith | 2013-11-19 14:47:36 -0800 (Tue, 19 Nov 2013) | 5 lines

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

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


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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/cxx-decl.cpp
fbac5c11d4ecd39f083a8d7247ddcb5a0a49c667 10-Oct-2013 Benjamin Kramer <benny.kra@googlemail.com> Parser: Avoid a crash-on-invalid when trying to diagnose function calls with -> in it.

Use the existing convenience function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/cxx-decl.cpp
ff989a8b1d3cf52131c179fceea656d7977e5b3c 22-Sep-2013 David Majnemer <david.majnemer@gmail.com> Parse: Don't crash during parsing if we lack a simple-type-specifier

Summary:
Parsing cast expressions during error recovery can put us in a bad
state. Check to see if the token for a simple-type-specifier makes
sense before further parsing.

Fixes PR17255.

Reviewers: rsmith, doug.gregor, CornedBee, eli.friedman

CC: cfe-commits

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

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


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

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


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/cxx-decl.cpp
8338a9d28c4a9d06b19b1c5df51e70182914e2df 29-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR15017: A '>' can appear after a type-specifier in a template-argument-list.
It turns out that there's no correctness bug here (because we can't have a type
definition in this location), but there was a diagnostic bug.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/cxx-decl.cpp
ba65f505b7cc2551571b299d05d767e0a892aaae 19-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Fix five more cases of tokens which can legally follow a type specifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/cxx-decl.cpp
55fc3a767b9945bd1f311f2339dcaa8761da5661 18-Jan-2013 Nico Weber <nicolasweber@gmx.de> Fix parsing of class specifiers before '\n' 'operator'.

r159549 / r159164 regressed clang to reject

struct s {};
struct s
operator++(struct s a)
{ return a; }

This fixes the regression. Richard, pleas check if this looks right.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/cxx-decl.cpp
6f9a445760992a6fbff2c0b08becf35ae9eafa71 15-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR9903: Recover from a member functon declared with the 'typedef' specifier by
dropping the specifier, just like we do for non-member functions and function
templates declared 'typedef'. Patch by Brian Brooks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/cxx-decl.cpp
c828620a03b20835a376f6f456a72e44599f4f87 28-Aug-2012 Aaron Ballman <aaron@aaronballman.com> Splitting the duplicated decl spec extension warning into two: one is an ExtWarn and the other a vanilla warning. This addresses PR13705, where const char const * wouldn't warn unless -pedantic was specified under the right conditions.

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

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


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


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


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


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

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


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/cxx-decl.cpp
e6563256a4b3b9fee70ce3335d28406607c1faaf 13-Jun-2010 Chris Lattner <sabre@nondot.org> Allow an asm label specifier on C++ methods, like GCC does.
Patch by David Majnemer!


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


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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/cxx-decl.cpp
ae50d501f463d7032320ec31840f60ae68df3a55 02-Feb-2010 Chris Lattner <sabre@nondot.org> improve diagnostics for C++ struct ; issues. Before:

t.cc:4:3: error: expected ';' at end of declaration list
int y;
^
t.cc:6:1: error: expected ';' at end of declaration list
};
^

After:

t.cc:3:8: error: expected ';' at end of declaration list
int x
^
;
t.cc:5:8: error: expected ';' at end of declaration list
int z
^
;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/cxx-decl.cpp
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/cxx-decl.cpp
932dff777d58a23e3a26967a61bb52697c542fd4 10-Dec-2009 Chris Lattner <sabre@nondot.org> If we enter parens, colons can become un-sacred, allowing us to emit
a better diagnostic in the second example.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/cxx-decl.cpp
a69d0ed3ab66e96393586664a103e9482ec59e6f 10-Dec-2009 Chris Lattner <sabre@nondot.org> fix a more evil case of : / :: confusion arising in ?:.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/cxx-decl.cpp
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/test/Parser/cxx-decl.cpp
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/test/Parser/cxx-decl.cpp
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/test/Parser/cxx-decl.cpp
8129edbb576c297df8631c3db4ac1339f4a9e8ad 13-Apr-2009 Chris Lattner <sabre@nondot.org> Fix some C++ error recovery problems in init declarator parsing
that I noticed working on other things.

Instead of emitting:

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

We now only emit:

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


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

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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/cxx-decl.cpp