[cfe-commits] r167791 - in /cfe/trunk: include/clang/Basic/Attr.td lib/Sema/SemaDeclAttr.cpp test/SemaCXX/warn-unused-result.cpp

Kaelyn Uhrain rikka at google.com
Mon Nov 12 16:18:47 PST 2012


Author: rikka
Date: Mon Nov 12 18:18:47 2012
New Revision: 167791

URL: http://llvm.org/viewvc/llvm-project?rev=167791&view=rev
Log:
A couple of small fixes to r167783

Modified:
    cfe/trunk/include/clang/Basic/Attr.td
    cfe/trunk/lib/Sema/SemaDeclAttr.cpp
    cfe/trunk/test/SemaCXX/warn-unused-result.cpp

Modified: cfe/trunk/include/clang/Basic/Attr.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=167791&r1=167790&r2=167791&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Attr.td (original)
+++ cfe/trunk/include/clang/Basic/Attr.td Mon Nov 12 18:18:47 2012
@@ -699,7 +699,7 @@
 }
 
 def WarnUnusedResult : InheritableAttr {
-  let Spellings = [GNU<"warn_unused_result">, CXX11<"","warn_unused_result">];
+  let Spellings = [GNU<"warn_unused_result">, CXX11<"clang","warn_unused_result">];
 }
 
 def Weak : InheritableAttr {

Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=167791&r1=167790&r2=167791&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Mon Nov 12 18:18:47 2012
@@ -2449,7 +2449,7 @@
 
   if (!isFunction(D) && !isa<ObjCMethodDecl>(D) && !isa<CXXRecordDecl>(D)) {
     S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
-      << Attr.getName() << ExpectedFunctionOrMethod;
+      << Attr.getName() << ExpectedFunctionMethodOrClass;
     return;
   }
 

Modified: cfe/trunk/test/SemaCXX/warn-unused-result.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/warn-unused-result.cpp?rev=167791&r1=167790&r2=167791&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/warn-unused-result.cpp (original)
+++ cfe/trunk/test/SemaCXX/warn-unused-result.cpp Mon Nov 12 18:18:47 2012
@@ -44,7 +44,7 @@
 }
 
 namespace warn_unused_CXX11 {
-struct [[warn_unused_result]] Status {
+struct [[clang::warn_unused_result]] Status {
   bool ok() const;
 };
 Status DoSomething();





More information about the cfe-commits mailing list