Index: include/clang/Basic/Attr.td =================================================================== --- include/clang/Basic/Attr.td +++ include/clang/Basic/Attr.td @@ -382,7 +382,7 @@ let Spellings = [GCC<"alias">]; let Args = [StringArgument<"Aliasee">]; let Subjects = SubjectList<[Function, GlobalVar], ErrorDiag, - "ExpectedFunctionGlobalVarMethodOrProperty">; + "ExpectedFunctionOrGlobalVar">; let Documentation = [Undocumented]; } @@ -1746,7 +1746,7 @@ GCC<"no_sanitize_thread">, GNU<"no_sanitize_memory">]; let Subjects = SubjectList<[Function, GlobalVar], ErrorDiag, - "ExpectedFunctionGlobalVarMethodOrProperty">; + "ExpectedFunctionOrGlobalVar">; let Documentation = [NoSanitizeAddressDocs, NoSanitizeThreadDocs, NoSanitizeMemoryDocs]; let ASTNode = 0; Index: include/clang/Basic/DiagnosticSemaKinds.td =================================================================== --- include/clang/Basic/DiagnosticSemaKinds.td +++ include/clang/Basic/DiagnosticSemaKinds.td @@ -2597,6 +2597,7 @@ "functions" "|unions" "|variables and functions" + "|functions and global variables" "|functions, variables, and Objective-C interfaces" "|functions and methods" "|parameters" @@ -2627,7 +2628,7 @@ "|functions, variables, classes, and Objective-C interfaces" "|Objective-C protocols" "|variables with static or thread storage duration" - "|functions and global variables" + "|functions, methods, properties, and global variables" "|structs, unions, and typedefs" "|structs and typedefs" "|interface or protocol declarations" Index: include/clang/Sema/AttributeList.h =================================================================== --- include/clang/Sema/AttributeList.h +++ include/clang/Sema/AttributeList.h @@ -885,6 +885,7 @@ ExpectedFunction, ExpectedUnion, ExpectedVariableOrFunction, + ExpectedFunctionOrGlobalVar, ExpectedFunctionVariableOrObjCInterface, ExpectedFunctionOrMethod, ExpectedParameter,