| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
This diff removes temporary file t2 in fixit.c and updates the test command accordingly.
NFC.
Test plan:
make check-all
Differential revision: https://reviews.llvm.org/D34066
llvm-svn: 305124
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a couple of latent crashes for invalid attributes and also adds a
fixit hint to turn identifiers into string literals if one was expected. It then
proceeds recovery as if the identifier was a literal. Diagnostic locations are
also changed to point at the literal instead of the attribute if the error
concerns the argument. PR17175.
For example:
hidden.c:1:40: error: 'visibility' attribute requires a string
extern int x __attribute__((visibility(hidden)));
^
" "
hidden.c:2:29: error: visibility does not match previous declaration
extern int x __attribute__((visibility("default")));
^
hidden.c:1:29: note: previous attribute is here
extern int x __attribute__((visibility(hidden)));
^
llvm-svn: 190699
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
struct and enum forward-declarations.
llvm-svn: 159164
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
loop and switch statements, by teaching Scope that a function scope never has
a continue/break parent for the purposes of control flow. Remove the hack in
block and lambda expressions which worked around this by pretending that such
expressions were continue/break scopes.
Remove Scope::ControlParent, since it's unused.
In passing, teach default statements to recover properly from a missing ';', and
add a fixit for same to both default and case labels (the latter already
recovered correctly).
llvm-svn: 150776
|
|
|
|
|
|
|
|
|
| |
declaration tickles a bug in the way we handle visibility pragmas.
The improvement to error recovery for template function definitions declared
with the 'typedef' specifier in r145372 is unrelated and not reverted here.
llvm-svn: 145541
|
|
|
|
|
|
|
|
| |
declaration at namespace scope is followed by a semicolon and an open-brace
(or in C++, a 'try', ':' or '='), then the error is probably a function
definition with a spurious ';', rather than a mysterious '{'.
llvm-svn: 145372
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 142544
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RUN: foo
RUN: bar || true
is equivalent to:
RUN: foo && bar || true
which is equivalent to:
RUN: (foo && bar) || true
This resulted in several of the fixit tests not really testing anything.
llvm-svn: 139132
|
|
|
|
| |
llvm-svn: 136389
|
|
|
|
|
|
| |
at the start of a macro instantiation.
llvm-svn: 133801
|
|
|
|
|
|
| |
tag name. Fixes rdar://9295072
llvm-svn: 129917
|
|
|
|
|
|
| |
enumeration definition. Fixes <rdar://problem/7159693>.
llvm-svn: 113201
|
|
|
|
|
|
|
| |
removes the copy. Patch from Eelis van der Weegen, tweaked/updated by
me.
llvm-svn: 111807
|
|
|
|
|
|
| |
files with the additional suffix in the middle.
llvm-svn: 102230
|
|
|
|
| |
llvm-svn: 101943
|
|
|
|
| |
llvm-svn: 101073
|
|
|
|
|
|
|
|
|
| |
'strcmp' is bad, and
we don't have enough information to tell them how to use 'strncmp'. Instead, change the
diagnostic to indicate they should use 'strncmp'.
llvm-svn: 100890
|
|
|
|
|
|
|
|
|
| |
- 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).
llvm-svn: 91446
|
|
|
|
| |
llvm-svn: 89154
|
|
|
|
| |
llvm-svn: 88801
|
|
|
|
| |
llvm-svn: 88758
|
|
|
|
| |
llvm-svn: 68454
|
|
llvm-svn: 68325
|