| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Patch by Andy Gibbs!
llvm-svn: 164590
|
|
|
|
| |
llvm-svn: 163826
|
|
|
|
| |
llvm-svn: 163032
|
|
|
|
|
|
| |
instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins.
llvm-svn: 163013
|
|
|
|
| |
llvm-svn: 162506
|
|
|
|
|
|
|
|
| |
MutableArrayRef.
This required changing all get() calls to data() and using the simpler constructors.
llvm-svn: 162501
|
|
|
|
|
|
| |
SmallVector.
llvm-svn: 162492
|
|
|
|
|
|
|
| |
These were nops for quite a while and only lead to confusion. ASTMultiPtr
now behaves like a proper dumb array reference.
llvm-svn: 162475
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 160618
|
|
|
|
|
|
| |
';'.
llvm-svn: 159549
|
|
|
|
|
|
| |
struct and enum forward-declarations.
llvm-svn: 159164
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 159072
|
|
|
|
| |
llvm-svn: 159046
|
|
|
|
|
|
|
| |
caused a crash in an obscure case. On the plus side, it caused me to catch
another bug by inspection.
llvm-svn: 158767
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 158749
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note that this is mostly a structural patch that handles the change from the old
spelling style to the new one. One consequence of this is that all AT_foo_bar
enum values have changed to not be based off of the first spelling, but rather
off of the class name, so they are now AT_FooBar and the like (a straw poll on
IRC showed support for this). Apologies for code churn.
Most attributes have GNU spellings as a temporary solution until everything else
is sorted out (such as a Keyword spelling, which I intend to add if someone else
doesn't beat me to it). This is definitely a WIP.
I've also killed BaseCheckAttr since it was unused, and I had to go through
every attribute anyway.
llvm-svn: 158700
|
|
|
|
|
|
|
|
| |
Now, as long as the 'Namespaces' variable is correct inside Attr.td, the
generated code will correctly admit a C++11 attribute only when it has the
appropriate namespace(s).
llvm-svn: 158661
|
|
|
|
|
|
|
| |
initialization, and use that information to produce the right kind of
initialization during template instantiation.
llvm-svn: 158288
|
|
|
|
|
|
|
|
|
| |
on the RecordDecl. Persist the MS portability type attributes and
ignore them in Sema rather than the parser.
Patch by João Matos!
llvm-svn: 157288
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 156934
|
|
|
|
|
|
| |
or template-id which can't be parsed.
llvm-svn: 156468
|
|
|
|
|
|
|
|
|
|
| |
so that we actually accumulate all the delayed diagnostics. Do
this so that we can restore those diagnostics to good standing
if it turns out that we were wrong to suppress, e.g. if the
tag specifier is actually an elaborated type specifier and not
a declaration.
llvm-svn: 156291
|
|
|
|
|
|
|
|
|
|
|
|
| |
cases in switch statements. Also add a [[clang::fallthrough]] attribute, which
can be used to suppress the warning in the case of intentional fallthrough.
Patch by Alexander Kornienko!
The handling of C++11 attribute namespaces in this patch is temporary, and will
be replaced with a cleaner mechanism in a subsequent patch.
llvm-svn: 156086
|
|
|
|
|
|
|
| |
refactorings in that revision, and some of the subsequent bugfixes, which
seem to be relevant even without delayed exception specification parsing.
llvm-svn: 156031
|
|
|
|
|
|
|
| |
victim. Don't crash if we have a delay-parsed exception specification for a
class member which is invalid in a way which precludes building a FunctionDecl.
llvm-svn: 155788
|
|
|
|
|
|
|
|
| |
uninitialized memory if the input wasn't 0-terminated.
Found by valgrind.
llvm-svn: 155323
|
|
|
|
|
|
|
| |
exception specifications in C++11 until after we've parsed the exception
specifications for nested classes.
llvm-svn: 155293
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 154844
|
|
|
|
|
|
|
|
|
|
| |
* 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.
llvm-svn: 154381
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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 '[]'.
llvm-svn: 154369
|
|
|
|
|
|
|
| |
class template's definition, and for explicit specializations of such enum
members.
llvm-svn: 153304
|
|
|
|
| |
llvm-svn: 152559
|
|
|
|
|
|
|
|
| |
being defined here: [] () -> struct S {} does not define struct S.
In passing, implement DR1318 (syntactic disambiguation of 'final').
llvm-svn: 152551
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 152549
|
|
|
|
|
|
|
|
|
|
| |
(Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
llvm-svn: 152536
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 152098
|
|
|
|
|
|
|
| |
string literal, and adjust the diagnostic code to match. This also causes us
to escape any control characters in the message.
llvm-svn: 152069
|
|
|
|
|
|
|
| |
GNU attributes to a better extent, by allowing them in more
places on a declator.
llvm-svn: 151945
|
|
|
|
|
|
| |
decltype expression.
llvm-svn: 151515
|
|
|
|
|
|
| |
__keywords or none of them.
llvm-svn: 151401
|
|
|
|
| |
llvm-svn: 151377
|
|
|
|
|
|
|
|
| |
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.)
llvm-svn: 151307
|
|
|
|
|
|
| |
direct member initializers.
llvm-svn: 151155
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function call (or a comma expression with a function call on its right-hand
side), possibly parenthesized, then the return type is not required to be
complete and a temporary is not bound. Other subexpressions inside a decltype
expression do not get this treatment.
This is implemented by deferring the relevant checks for all calls immediately
within a decltype expression, then, when the expression is fully-parsed,
checking the relevant constraints and stripping off any top-level temporary
binding.
Deferring the completion of the return type exposed a bug in overload
resolution where completion of the argument types was not attempted, which
is also fixed by this change.
llvm-svn: 151117
|
|
|
|
|
|
| |
initializers of data members (both static and non-static).
llvm-svn: 151017
|
|
|
|
|
|
| |
Signed off by Richard Smith.
llvm-svn: 150464
|
|
|
|
|
|
| |
process removed some naming ambiguities.
llvm-svn: 149870
|
|
|
|
|
|
|
| |
(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)
llvm-svn: 149799
|
|
|
|
|
|
|
|
| |
include.
Fix all the transitive include users.
llvm-svn: 149783
|
|
|
|
| |
llvm-svn: 149127
|