(re)implement PR6542, accepting and discarding the __gcc_tdiag__
format attribute specifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99213 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index 73a34f8..5a7a3c3 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -1115,6 +1115,7 @@
   NSStringFormat,
   StrftimeFormat,
   SupportedFormat,
+  IgnoredFormat,
   InvalidFormat
 };
 
@@ -1136,6 +1137,9 @@
       Format == "zcmn_err")
     return SupportedFormat;
 
+  if (Format == "gcc_tdiag")
+    return IgnoredFormat;
+  
   return InvalidFormat;
 }
 
@@ -1171,6 +1175,10 @@
 
   // 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();