1a343e26c76bb09d95b12c3693b19718f4811005 |
|
13-Sep-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Unify handling of string literal arguments for attributes and add fixits. 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))); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
4b0824229b96d024a96f3c7dd75ab70652c05c5b |
|
18-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
If a comma operator is followed by a token which unambiguously indicates the 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
c9f351700721150a985f21844fbfec55b04e861d |
|
25-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Extend the "expected ';' after struct" logic to also apply to enums, and to struct and enum forward-declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
85b29a4c862bb9f41d9739e5dab6436fe6d44ff8 |
|
17-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Reject continue/break statements within members of local functions nested within 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
58196dc06ee27cd4150ef483123e1e3b2c772821 |
|
01-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Revert most of r145372 for now. Lookahead beyond the ';' in a function 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
874d253668f9ed183ca409cdff9d424925ee7800 |
|
29-Nov-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR10101: Recover better from a common copy-paste error: if a function 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 '{'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
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/FixIt/fixit.c
|
2315318436b3e94d54c220c3b8986e8002394a43 |
|
06-Sep-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR10867: Work around a bug in lit. Multiple RUN: lines are joined with &&, so: 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139132 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
d5612a235fdd5df145c485c6ac489fcfbf7120d3 |
|
28-Jul-2011 |
Anna Zaks <ganna@apple.com> |
Add a fixit for removal of unused label. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136389 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
b5303aa20e4eb26d53edde710f4a042650bea24d |
|
24-Jun-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Allow the fixit for missing ':' in the ?: ternary operator if it is pointing at the start of a macro instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
b8a9d3b8016c0b8cc58e8523de0f4766cf3fa6bf |
|
21-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fixit suggestion for adding missing tag name should have a space after the tag name. Fixes rdar://9295072 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129917 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
751f6922376dfe9432795b65a3649179e4ef5cf5 |
|
07-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve recovery when a comma is missing between enumerators in an enumeration definition. Fixes <rdar://problem/7159693>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
ae2fb144fef905a860a49e8066fb28521447f7c9 |
|
23-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When complaining about a duplicate declspec, provide a Fix-It that removes the copy. Patch from Eelis van der Weegen, tweaked/updated by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
ba5f6eced29937e4e4851a2c0980744768413d66 |
|
24-Apr-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Teach clang -fixit to modify files in-place, or -fixit=suffix to create new files with the additional suffix in the middle. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
e5deae9555f097e8418583d8265ec6f333f48210 |
|
20-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
fix the ?: fixit that ted added to recover properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
987aa87cf47811c44ac93afd1913c33f2829ed92 |
|
13-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Add fixit hint for missing ':' in ternary expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
03a4bee558b63ead66e942c6b26381df9a8b1754 |
|
09-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Remove fixit for string literal comparison. Telling the user to use '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'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
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/FixIt/fixit.c
|
d8aefab741a788ba308468df0c66c9dafb4c8530 |
|
17-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
Drop unnecessary #include. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89154 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
266cc531d12873f8baa80ffd4011a1cb76c090fa |
|
14-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
Improve test to make sure -fixit is really working. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
73dd7686d68fec7b5d7faa6d230be23ccfd9c41f |
|
14-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
Update FixIt tests to make it more obvious they use a separate mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88758 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
a86b832906d04e9867b792128ad19af39f7cc06b |
|
06-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Fixed the Fix-It hints for comparison against a string literal. Thanks, Chris! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68454 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|
dd6f4abe816a529cfc8c0487f9a13f3b88f0aae8 |
|
02-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Move the fix-it tests into their own subdirectory git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/fixit.c
|