From: Aaron Ballman Date: Fri, 1 Dec 2017 15:54:29 +0000 (+0000) Subject: Remove duplicate, nonsense information from an attribute diagnostic. The NonParmVar... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ef106e574db9223605a913331092590edaacc829;p=clang Remove duplicate, nonsense information from an attribute diagnostic. The NonParmVar subject does not need to mention functions, and the resulting diagnostic definitely does not need to mention functions twice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319549 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td index 8182ada859..a13052a3b8 100644 --- a/include/clang/Basic/Attr.td +++ b/include/clang/Basic/Attr.td @@ -87,7 +87,7 @@ def NormalVar : SubsetSubject; def NonParmVar : SubsetSubjectgetKind() != Decl::ParmVar}], - "variables and functions">; + "variables">; def NonBitField : SubsetSubjectisBitField()}], "non-bit-field non-static data members">; diff --git a/test/Sema/attr-nodebug.c b/test/Sema/attr-nodebug.c index 64383e0f83..355778411d 100644 --- a/test/Sema/attr-nodebug.c +++ b/test/Sema/attr-nodebug.c @@ -2,7 +2,7 @@ int a __attribute__((nodebug)); -void b(int p __attribute__((nodebug))) { // expected-warning {{'nodebug' attribute only applies to functions, function pointers, Objective-C methods, and variables and functions}} +void b(int p __attribute__((nodebug))) { // expected-warning {{'nodebug' attribute only applies to functions, function pointers, Objective-C methods, and variables}} int b __attribute__((nodebug)); }