| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
attribute diagnostics.
llvm-svn: 198326
|
|
|
|
|
|
|
|
|
|
| |
Previously any error in enum definition body stopped parsing it. With this
change parser tries to recover from errors.
The patch fixes PR10982.
Differential Revision: http://llvm-reviews.chandlerc.com/D2018
llvm-svn: 198259
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'deprecated'.
Fixes <rdar://problem/15584219> and <rdar://problem/12241361>.
This change looks large, but all it does is reuse and consolidate
the delayed diagnostic logic for deprecation warnings with unavailability
warnings. By doing so, it showed various inconsistencies between the
diagnostics, which were close, but not consistent. It also revealed
some missing "note:"'s in the deprecated diagnostics that were showing
up in the unavailable diagnostics, etc.
This change also changes the wording of the core deprecation diagnostics.
Instead of saying "function has been explicitly marked deprecated"
we now saw "'X' has been been explicitly marked deprecated". It
turns out providing a bit more context is useful, and often we
got the actual term wrong or it was not very precise
(e.g., "function" instead of "destructor"). By just saying the name
of the thing that is deprecated/deleted/unavailable we define
this issue away. This diagnostic can likely be further wordsmithed
to be shorter.
llvm-svn: 197627
|
|
|
|
|
|
|
|
|
|
| |
This patch was submitted to the list for review and didn't receive a LGTM.
(In fact one explicit objection and one query were raised.)
This reverts commit r197295.
llvm-svn: 197299
|
|
|
|
|
|
| |
Differential Revision: http://llvm-reviews.chandlerc.com/D2392
llvm-svn: 197295
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, a line like
// expected-error-re {{foo}}
treats the entirety of foo as a regex. This is inconvenient when matching type
names containing regex characters. For example, to match
"void *(class test8::A::*)(void)" inside such a regex, one would have to type
"void \*\(class test8::A::\*\)\(void\)".
This patch changes the semantics of expected-error-re to only treat the parts
of the directive wrapped in double curly braces as regexes. This avoids the
escaping problem and leads to nicer patterns for those cases; see e.g. the
change to test/Sema/format-strings-scanf.c.
(The balanced search for closing }} of a directive also makes us handle the
full directive in test\SemaCXX\constexpr-printing.cpp:41 and :53.)
Differential Revision: http://llvm-reviews.chandlerc.com/D2388
llvm-svn: 197092
|
|
|
|
|
|
|
|
|
|
|
| |
When parsing invalid top-level asm statements, we were ignoring the
return code of the SkipUntil we used for recovery. This led to crashes
when we hit the end of file and tried to continue parsing anyway.
This fixes the crash and adds a couple of tests for parsing related
problems.
llvm-svn: 196961
|
|
|
|
| |
llvm-svn: 196757
|
|
|
|
|
|
| |
LLVM r196044 should make it pass.
llvm-svn: 196734
|
|
|
|
| |
llvm-svn: 196510
|
|
|
|
|
|
|
| |
This patch tries to avoid unrelated changes other than fixing a few
hyphen-related ambiguities in nearby lines.
llvm-svn: 196466
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We would skip until the next comma, hoping good things whould lie there,
however this would fail when we have such things as this:
struct A {};
template <typename>
struct D;
template <>
struct D<C> : B, A::D;
Once this happens, we would believe that D with a nested namespace
specifier of A was a variable that was being declared. We would go on
to complain that there was an extraneous 'template <>' on their variable
declaration.
Crashes would happen when 'A' gets defined as 'enum class A {}' as
various asserts would fire.
Instead, we should skip up until the semicolon if we see that we are in
the middle of a definition and the current token is a ':'
This fixes PR17084.
llvm-svn: 196453
|
|
|
|
|
|
|
|
| |
which specifies couple of (optional) method selectors
for bridging a CFobject to or from an ObjectiveC
object. This is wip. // rdsr://15499111
llvm-svn: 196408
|
|
|
|
|
|
| |
In delayed template parsing mode, adjust the template depth counter for each template parameter list associated with an out of line member template specialization.
llvm-svn: 196351
|
|
|
|
|
|
|
|
| |
gcc treats [[gnu:const]], [[gnu::__const]], and [[gnu:__const__]] as all being
equivalent. Add an additional test case to ensure that we do not miss the last
case.
llvm-svn: 195982
|
|
|
|
|
|
| |
test cases to be updated because the original diagnostic was about applying to methods as well as functions, but the semantic checking disallowed methods.
llvm-svn: 195862
|
|
|
|
|
|
| |
the semantic checking consistent with what the attribute specifies in Attr.td. Also adds a test case.
llvm-svn: 195579
|
|
|
|
|
|
|
| |
case where the type in the following declaration is specified as a template-id,
and refactor for clarity.
llvm-svn: 195280
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 195163
|
|
|
|
| |
llvm-svn: 194872
|
|
|
|
| |
llvm-svn: 194850
|
|
|
|
| |
llvm-svn: 194849
|
|
|
|
|
|
|
|
|
| |
This patch fixes PR8264. Duplicate qualifiers already are diagnozed,
now the same diagnostics is issued for duplicate function specifiers.
Differential Revision: http://llvm-reviews.chandlerc.com/D2025
llvm-svn: 194559
|
|
|
|
|
|
|
| |
definition. If we see something that looks like a namespace definition inside a
class, that strongly indicates that a close brace was missing somewhere.
llvm-svn: 194319
|
|
|
|
| |
llvm-svn: 194291
|
|
|
|
| |
llvm-svn: 194281
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 193731
|
|
|
|
|
|
| |
[[gnu::no_address_safety_analysis]].
llvm-svn: 193583
|
|
|
|
|
|
| |
the difference.
llvm-svn: 193582
|
|
|
|
|
|
| |
statement (after a case label, if, etc). Patch by Olivier Goffart!
llvm-svn: 193545
|
|
|
|
|
|
| |
and we know where they go.
llvm-svn: 193297
|
|
|
|
|
|
|
|
|
|
|
|
| |
which we don't think can't have one, only allow it in the tiny number of
attributes which opts into this weird parse rule.
I've manually checked that the handlers for all these attributes can in fact
cope with an identifier as the argument. This is still somewhat terrible; we
should move more fully towards picking the parsing rules based on the
attribute, and make the Parse -> Sema interface more type-safe.
llvm-svn: 193295
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit r191484 treated constexpr function templates as normal function
templates with respect to delaying their parsing. However, this is
unnecessarily restrictive because there is no compatibility concern with
constexpr, MSVC doesn't support it.
Instead, simply disable delayed template parsing for constexpr function
templates. This largely reverts the changes made in r191484 but keeps
it's unit test.
This fixes PR17661.
llvm-svn: 193274
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 193174
|
|
|
|
|
|
|
|
| |
This is a fix to PR17649, caused by fix in r193073. QT uses 'break' statement
to implement their 'foreach' macro. To enable build of QT, this fix reenables
break but only in 'for' statement specifier and only in the third expression.
llvm-svn: 193170
|
|
|
|
|
|
|
|
| |
Microsoft inline asm crashes on the hexagon bot for unknown reasons.
This reverts commit r193124.
llvm-svn: 193128
|
|
|
|
| |
llvm-svn: 193124
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
llvm-svn: 193073
|
|
|
|
|
|
|
|
|
|
|
| |
Now that CorrectTypo knows how to correctly search classes for typo
correction candidates, there is no good reason to only replace an
existing CXXScopeSpecifier if it refers to a namespace. While the actual
enablement was a matter of changing a single comparison, the fallout
from enabling the functionality required a lot more code changes
(including my two previous commits).
llvm-svn: 193020
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r177003 applied the late parsed template technique to friend functions
but omitted the corresponding check for redefinitions.
This patch adds the same check already in use for templates to the
new code path in order to diagnose and reject invalid redefinitions
that were being silently accepted.
Fixes PR17324.
Reviewed by Richard Smith.
llvm-svn: 192948
|
|
|
|
|
|
| |
a patch by Michael Han.
llvm-svn: 192666
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 192644
|
|
|
|
|
|
| |
an accidentally-included name for the declarator.
llvm-svn: 192559
|
|
|
|
|
|
|
|
| |
-> in it.
Use the existing convenience function.
llvm-svn: 192347
|
|
|
|
|
|
|
|
|
|
| |
An invalid decltype expression like 'decltype int' gives:
error: expected '(' after 'decltype'
This makes it so 'sizeof int' gives a similar one:
error: expected parentheses around type name in sizeof expression
llvm-svn: 192258
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSVC and clang with -fms-extensions allow pure virtual methods to be
defined inline after the "= 0" tokens. Clang warns on these because it
is not standard, but incorrectly warns on out-of-line definitions, which
are standard.
With this change, clang will only warn on inline definitions of pure
virtual methods.
Fixes some self-host warnings on out-of-line definitions of pure virtual
destructors.
llvm-svn: 192244
|
|
|
|
| |
llvm-svn: 192208
|
|
|
|
|
|
| |
This fixes PR16992 - Fixit missing when "sizeof type" found.
llvm-svn: 192200
|
|
|
|
| |
llvm-svn: 191609
|
|
|
|
|
|
| |
and capturing a variable declaration, and complete the implementation of them.
llvm-svn: 191605
|