diff options
author | Kaelyn Uhrain <rikka@google.com> | 2012-11-13 00:18:47 +0000 |
---|---|---|
committer | Kaelyn Uhrain <rikka@google.com> | 2012-11-13 00:18:47 +0000 |
commit | d449c792d98f58277e02c0ddc8330cd9de5f82f5 (patch) | |
tree | 38b99b2dd36c23440247f72a8c88c0e1d6a82519 | |
parent | bae930d4c69a624881e66f1628ee615e149362f7 (diff) |
A couple of small fixes to r167783
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167791 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Basic/Attr.td | 2 | ||||
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 2 | ||||
-rw-r--r-- | test/SemaCXX/warn-unused-result.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td index 72f02a8c8c..5593c60e0b 100644 --- a/include/clang/Basic/Attr.td +++ b/include/clang/Basic/Attr.td @@ -699,7 +699,7 @@ def VecReturn : InheritableAttr { } 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 { diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 70bc019a74..77413b0ef5 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -2449,7 +2449,7 @@ static void handleWarnUnusedResult(Sema &S, Decl *D, const AttributeList &Attr) 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; } diff --git a/test/SemaCXX/warn-unused-result.cpp b/test/SemaCXX/warn-unused-result.cpp index 459e5ae9cb..5ce0f98bc4 100644 --- a/test/SemaCXX/warn-unused-result.cpp +++ b/test/SemaCXX/warn-unused-result.cpp @@ -44,7 +44,7 @@ void bah() { } namespace warn_unused_CXX11 { -struct [[warn_unused_result]] Status { +struct [[clang::warn_unused_result]] Status { bool ok() const; }; Status DoSomething(); |