summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-09-13 15:35:43 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-09-13 15:35:43 +0000
commit1a343e26c76bb09d95b12c3693b19718f4811005 (patch)
tree4999daeea116219373a0cffb99708f40800afb19 /lib/CodeGen/CodeGenFunction.cpp
parent2b33b7e978f5e47b6f0a1f264b77eb110966edf0 (diff)
downloadclang-1a343e26c76bb09d95b12c3693b19718f4811005.tar.gz
clang-1a343e26c76bb09d95b12c3693b19718f4811005.tar.bz2
clang-1a343e26c76bb09d95b12c3693b19718f4811005.tar.xz
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
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions