diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-09-13 15:35:43 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-09-13 15:35:43 +0000 |
| commit | 6ee1562cfcacd68f98c8c8e02bc30050f5ca992b (patch) | |
| tree | b1270b4716a34d2a2d917617982d1761299bf7a5 /clang/test/SemaObjC/format-strings-system.h | |
| parent | 34bdbbdf97ca3a8fdfc53850a4b065951d7fa2ca (diff) | |
| download | bcm5719-llvm-6ee1562cfcacd68f98c8c8e02bc30050f5ca992b.tar.gz bcm5719-llvm-6ee1562cfcacd68f98c8c8e02bc30050f5ca992b.zip | |
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)));
^
llvm-svn: 190699
Diffstat (limited to 'clang/test/SemaObjC/format-strings-system.h')
0 files changed, 0 insertions, 0 deletions

