diff options
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 73a34f8107e..5a7a3c31fe8 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -1115,6 +1115,7 @@ enum FormatAttrKind {    NSStringFormat,    StrftimeFormat,    SupportedFormat, +  IgnoredFormat,    InvalidFormat  }; @@ -1136,6 +1137,9 @@ static FormatAttrKind getFormatAttrKind(llvm::StringRef Format) {        Format == "zcmn_err")      return SupportedFormat; +  if (Format == "gcc_tdiag") +    return IgnoredFormat; +      return InvalidFormat;  } @@ -1171,6 +1175,10 @@ static void HandleFormatAttr(Decl *d, const AttributeList &Attr, Sema &S) {    // Check for supported formats.    FormatAttrKind Kind = getFormatAttrKind(Format); +   +  if (Kind == IgnoredFormat) +    return; +      if (Kind == InvalidFormat) {      S.Diag(Attr.getLoc(), diag::warn_attribute_type_not_supported)        << "format" << Attr.getParameterName()->getName(); | 

