Author: aaronballman Date: Fri Dec 1 07:54:29 2017 New Revision: 319549 URL: http://llvm.org/viewvc/llvm-project?rev=319549&view=rev Log: 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.
Modified: cfe/trunk/include/clang/Basic/Attr.td cfe/trunk/test/Sema/attr-nodebug.c Modified: cfe/trunk/include/clang/Basic/Attr.td URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=319549&r1=319548&r2=319549&view=diff ============================================================================== --- cfe/trunk/include/clang/Basic/Attr.td (original) +++ cfe/trunk/include/clang/Basic/Attr.td Fri Dec 1 07:54:29 2017 @@ -87,7 +87,7 @@ def NormalVar : SubsetSubject<Var, "local variables">; def NonParmVar : SubsetSubject<Var, [{S->getKind() != Decl::ParmVar}], - "variables and functions">; + "variables">; def NonBitField : SubsetSubject<Field, [{!S->isBitField()}], "non-bit-field non-static data members">; Modified: cfe/trunk/test/Sema/attr-nodebug.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-nodebug.c?rev=319549&r1=319548&r2=319549&view=diff ============================================================================== --- cfe/trunk/test/Sema/attr-nodebug.c (original) +++ cfe/trunk/test/Sema/attr-nodebug.c Fri Dec 1 07:54:29 2017 @@ -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)); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits