| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 167481
|
|
|
|
| |
llvm-svn: 167379
|
|
|
|
| |
llvm-svn: 167369
|
|
|
|
| |
llvm-svn: 167320
|
|
|
|
|
|
|
| |
')', if found. Don't crash.
Fixes PR11852.
llvm-svn: 167268
|
|
|
|
|
|
| |
Patch from Brian Brooks <brooks.brian@gmail.com>!
llvm-svn: 166893
|
|
|
|
|
|
| |
(so that it can have additional options set when trying to debug issues causing regressions).
llvm-svn: 166681
|
|
|
|
|
|
| |
this, for better error recovery.
llvm-svn: 166645
|
|
|
|
| |
llvm-svn: 166619
|
|
|
|
|
|
| |
the suggestions.
llvm-svn: 166400
|
|
|
|
|
|
|
| |
declarations and statements. Emit an error if the FP_CONTRACT is used
later in a compound statement.
llvm-svn: 166383
|
|
|
|
|
|
| |
literal-operator-id.
llvm-svn: 166373
|
|
|
|
|
|
| |
VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive.
llvm-svn: 166280
|
|
|
|
| |
llvm-svn: 166152
|
|
|
|
| |
llvm-svn: 165810
|
|
|
|
|
|
|
|
| |
- 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.
llvm-svn: 165082
|
|
|
|
|
|
|
|
|
|
|
| |
-Allow Sema to do more processing on the initial Expr before checking it.
-Remove the special conditions in HandleExpr()
-Move the code so that only one call site is needed.
-Removed the function from Sema and only call it locally.
-Warn on potentially evaluated reference variables, not just casts to r-values.
-Update tests.
llvm-svn: 164951
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 164085
|
|
|
|
| |
llvm-svn: 163826
|
|
|
|
|
|
| |
don't trample over the caller's LookupResult in the case where the check fails.
llvm-svn: 163281
|
|
|
|
| |
llvm-svn: 163149
|
|
|
|
|
|
| |
Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review.
llvm-svn: 163083
|
|
|
|
| |
llvm-svn: 163032
|
|
|
|
|
|
| |
instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins.
llvm-svn: 163013
|
|
|
|
|
|
|
|
|
| |
(__builtin_* etc.) so that it isn't possible to take their address.
Specifically, introduce a new type to represent a reference to a builtin
function, and a new cast kind to convert it to a function pointer in the
operand of a call. Fixes PR13195.
llvm-svn: 162962
|
|
|
|
|
|
|
| |
be filled in; they won't if the lambda's declarator has an invalid type. Instead
take the parameters from the declarator directly.
llvm-svn: 162904
|
|
|
|
|
|
| |
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.
llvm-svn: 162793
|
|
|
|
|
|
|
|
|
| |
CodeGen option to a LangOpt option. In turn, hoist the guard into the parser
so that we avoid the new (and fairly unstable) Sema/AST/CodeGen logic. This
should restore the behavior of clang to that prior to r158325.
<rdar://problem/12163681>
llvm-svn: 162602
|
|
|
|
|
|
|
| |
statement starts with an identifier for which name lookup will fail either way,
look at later tokens to disambiguate in order to improve error recovery.
llvm-svn: 162464
|
|
|
|
| |
llvm-svn: 162212
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 162159
|
|
|
|
|
|
|
|
|
|
|
|
| |
statement. For example,
if (x)
__asm out dx, ax __asm out dx, ax
results in a single inline asm statement (i.e., both "out dx, ax" statements are
predicated on if(x)).
llvm-svn: 161986
|
|
|
|
| |
llvm-svn: 161890
|
|
|
|
|
|
| |
standard reference and add a test.
llvm-svn: 161604
|
|
|
|
|
|
| |
just to account for us emitting notes more consistently.
llvm-svn: 161528
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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'.
llvm-svn: 160998
|
|
|
|
|
|
| |
is missing in method prototype. // rdar://11939584
llvm-svn: 160789
|
|
|
|
|
|
| |
unless they appear in a decl-specifier-seq.
llvm-svn: 160688
|
|
|
|
|
|
| |
has a trailing return type.
llvm-svn: 160646
|
|
|
|
|
|
|
|
| |
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: 160542
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
llvm-svn: 159941
|
|
|
|
|
|
| |
';'.
llvm-svn: 159549
|
|
|
|
|
|
|
| |
This behaves like the existing GNU __alignof and C++11 alignof keywords;
most of the patch is simply adding the third token spelling to various places.
llvm-svn: 159494
|
|
|
|
|
|
| |
parsing. Fixes <rdar://problem/11700604>.
llvm-svn: 159380
|
|
|
|
|
|
| |
struct and enum forward-declarations.
llvm-svn: 159164
|
|
|
|
| |
llvm-svn: 159089
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
not a pointer to a fast-enumerable object. // rdar://11488666
llvm-svn: 158998
|
|
|
|
|
|
|
| |
error was asserting on anything that included Windows.h. MS-style inline asm is
still dropped, but at least now we're not completely silent about it.
llvm-svn: 158833
|