diff options
author | Duncan Sands <baldrick@free.fr> | 2010-03-23 14:44:19 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-03-23 14:44:19 +0000 |
commit | bc52595e01323ca22d65c68aafd53a1acb8c1fb6 (patch) | |
tree | 37cbc5a6ab2fa2bc378724d337f6124580232d38 | |
parent | 8e18c1b840882d26039503629d7e4ad4822f3bda (diff) |
Ignore a more comprehensive set of gcc-special format attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99277 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 3 | ||||
-rw-r--r-- | test/Sema/attr-format.c | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 5a7a3c31fe..a81ad768b8 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -1137,7 +1137,8 @@ static FormatAttrKind getFormatAttrKind(llvm::StringRef Format) { Format == "zcmn_err") return SupportedFormat; - if (Format == "gcc_tdiag") + if (Format == "gcc_diag" || Format == "gcc_cdiag" || + Format == "gcc_cxxdiag" || Format == "gcc_tdiag") return IgnoredFormat; return InvalidFormat; diff --git a/test/Sema/attr-format.c b/test/Sema/attr-format.c index 34102c6603..0fadf98f97 100644 --- a/test/Sema/attr-format.c +++ b/test/Sema/attr-format.c @@ -71,4 +71,10 @@ foo2(const char *fmt, va_list va) { // PR6542 extern void gcc_format (const char *, ...) + __attribute__ ((__format__(__gcc_diag__, 1, 2))); +extern void gcc_cformat (const char *, ...) + __attribute__ ((__format__(__gcc_cdiag__, 1, 2))); +extern void gcc_cxxformat (const char *, ...) + __attribute__ ((__format__(__gcc_cxxdiag__, 1, 2))); +extern void gcc_tformat (const char *, ...) __attribute__ ((__format__(__gcc_tdiag__, 1, 2))); |