r341437 - Allow all supportable non-type attributes to be used with #pragma clang attribute.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 4 17:28:57 PDT 2018


Author: rsmith
Date: Tue Sep  4 17:28:57 2018
New Revision: 341437

URL: http://llvm.org/viewvc/llvm-project?rev=341437&view=rev
Log:
Allow all supportable non-type attributes to be used with #pragma clang attribute.

Summary:
We previously disallowed use of undocumented attributes with #pragma clang
attribute, but the justification for doing so was weak and it prevented many
reasonable use cases.

Reviewers: aaron.ballman, arphaman

Subscribers: cfe-commits, rnk, benlangmuir, dexonsmith, erik.pilkington

Differential Revision: https://reviews.llvm.org/D51507

Modified:
    cfe/trunk/include/clang/Basic/Attr.td
    cfe/trunk/test/Misc/pragma-attribute-supported-attributes-list.test
    cfe/trunk/test/Parser/pragma-attribute.cpp

Modified: cfe/trunk/include/clang/Basic/Attr.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=341437&r1=341436&r2=341437&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Attr.td (original)
+++ cfe/trunk/include/clang/Basic/Attr.td Tue Sep  4 17:28:57 2018
@@ -545,7 +545,6 @@ class IgnoredAttr : Attr {
   let ASTNode = 0;
   let SemaHandler = 0;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 //
@@ -564,7 +563,6 @@ def AddressSpace : TypeAttr {
   let Spellings = [Clang<"address_space">];
   let Args = [IntArgument<"AddressSpace">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Alias : Attr {
@@ -572,7 +570,6 @@ def Alias : Attr {
   let Args = [StringArgument<"Aliasee">];
   let Subjects = SubjectList<[Function, GlobalVar], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Aligned : InheritableAttr {
@@ -585,7 +582,6 @@ def Aligned : InheritableAttr {
                                           Keyword<"_Alignas">]>,
                    Accessor<"isDeclspec",[Declspec<"align">]>];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def AlignValue : Attr {
@@ -613,14 +609,12 @@ def AlignMac68k : InheritableAttr {
   let Spellings = [];
   let SemaHandler = 0;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def AlwaysInline : InheritableAttr {
   let Spellings = [GCC<"always_inline">, Keyword<"__forceinline">];
   let Subjects = SubjectList<[Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Artificial : InheritableAttr {
@@ -665,8 +659,8 @@ def AnalyzerNoReturn : InheritableAttr {
   // vendor namespace, or should it use a vendor namespace specific to the
   // analyzer?
   let Spellings = [GNU<"analyzer_noreturn">];
+  // TODO: Add subject list.
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Annotate : InheritableParamAttr {
@@ -709,7 +703,6 @@ def AsmLabel : InheritableAttr {
   let Args = [StringArgument<"Label">];
   let SemaHandler = 0;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Availability : InheritableAttr {
@@ -776,7 +769,6 @@ def Blocks : InheritableAttr {
   let Spellings = [Clang<"blocks">];
   let Args = [EnumArgument<"Type", "BlockType", ["byref"], ["ByRef"]>];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Bounded : IgnoredAttr {
@@ -795,7 +787,6 @@ def CDecl : DeclOrTypeAttr {
   let Spellings = [GCC<"cdecl">, Keyword<"__cdecl">, Keyword<"_cdecl">];
 //  let Subjects = [Function, ObjCMethod];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 // cf_audited_transfer indicates that the given function has been
@@ -806,7 +797,6 @@ def CFAuditedTransfer : InheritableAttr
   let Spellings = [Clang<"cf_audited_transfer">];
   let Subjects = SubjectList<[Function], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 // cf_unknown_transfer is an explicit opt-out of cf_audited_transfer.
@@ -816,28 +806,24 @@ def CFUnknownTransfer : InheritableAttr
   let Spellings = [Clang<"cf_unknown_transfer">];
   let Subjects = SubjectList<[Function], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def CFReturnsRetained : InheritableAttr {
   let Spellings = [Clang<"cf_returns_retained">];
 //  let Subjects = SubjectList<[ObjCMethod, ObjCProperty, Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def CFReturnsNotRetained : InheritableAttr {
   let Spellings = [Clang<"cf_returns_not_retained">];
 //  let Subjects = SubjectList<[ObjCMethod, ObjCProperty, Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def CFConsumed : InheritableParamAttr {
   let Spellings = [Clang<"cf_consumed">];
   let Subjects = SubjectList<[ParmVar]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Cleanup : InheritableAttr {
@@ -845,27 +831,23 @@ def Cleanup : InheritableAttr {
   let Args = [FunctionArgument<"FunctionDecl">];
   let Subjects = SubjectList<[LocalVar]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Cold : InheritableAttr {
   let Spellings = [GCC<"cold">];
   let Subjects = SubjectList<[Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Common : InheritableAttr {
   let Spellings = [GCC<"common">];
   let Subjects = SubjectList<[Var]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Const : InheritableAttr {
   let Spellings = [GCC<"const">, GCC<"__const">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Constructor : InheritableAttr {
@@ -873,7 +855,6 @@ def Constructor : InheritableAttr {
   let Args = [DefaultIntArgument<"Priority", 65535>];
   let Subjects = SubjectList<[Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def CPUSpecific : InheritableAttr {
@@ -904,7 +885,6 @@ def CUDAConstant : InheritableAttr {
   let Subjects = SubjectList<[Var]>;
   let LangOpts = [CUDA];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def CUDACudartBuiltin : IgnoredAttr {
@@ -917,7 +897,6 @@ def CUDADevice : InheritableAttr {
   let Subjects = SubjectList<[Function, Var]>;
   let LangOpts = [CUDA];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def CUDADeviceBuiltin : IgnoredAttr {
@@ -942,7 +921,6 @@ def CUDAGlobal : InheritableAttr {
   let Subjects = SubjectList<[Function]>;
   let LangOpts = [CUDA];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def CUDAHost : InheritableAttr {
@@ -950,7 +928,6 @@ def CUDAHost : InheritableAttr {
   let Subjects = SubjectList<[Function]>;
   let LangOpts = [CUDA];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def CUDAInvalidTarget : InheritableAttr {
@@ -958,7 +935,6 @@ def CUDAInvalidTarget : InheritableAttr
   let Subjects = SubjectList<[Function]>;
   let LangOpts = [CUDA];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def CUDALaunchBounds : InheritableAttr {
@@ -970,7 +946,6 @@ def CUDALaunchBounds : InheritableAttr {
   // of the compiler. However, this node needs to exist in the AST because
   // non-LLVM backends may be relying on the attribute's presence.
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def CUDAShared : InheritableAttr {
@@ -978,7 +953,6 @@ def CUDAShared : InheritableAttr {
   let Subjects = SubjectList<[Var]>;
   let LangOpts = [CUDA];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def C11NoReturn : InheritableAttr {
@@ -1000,7 +974,6 @@ def OpenCLKernel : InheritableAttr {
   let Spellings = [Keyword<"__kernel">, Keyword<"kernel">];
   let Subjects = SubjectList<[Function], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def OpenCLUnrollHint : InheritableAttr {
@@ -1088,7 +1061,6 @@ def Destructor : InheritableAttr {
   let Args = [DefaultIntArgument<"Priority", 65535>];
   let Subjects = SubjectList<[Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def EmptyBases : InheritableAttr, TargetSpecificAttr<TargetMicrosoftCXXABI> {
@@ -1120,10 +1092,13 @@ def EnableIf : InheritableAttr {
 def ExtVectorType : Attr {
   // This is an OpenCL-related attribute and does not receive a [[]] spelling.
   let Spellings = [GNU<"ext_vector_type">];
+  // FIXME: This subject list is wrong; this is a type attribute.
   let Subjects = SubjectList<[TypedefName], ErrorDiag>;
   let Args = [ExprArgument<"NumElements">];
   let ASTNode = 0;
   let Documentation = [Undocumented];
+  // This is a type attribute with an incorrect subject list, so should not be
+  // permitted by #pragma clang attribute.
   let PragmaAttributeSupport = 0;
 }
 
@@ -1151,14 +1126,12 @@ def Final : InheritableAttr {
   let Accessors = [Accessor<"isSpelledAsSealed", [Keyword<"sealed">]>];
   let SemaHandler = 0;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def MinSize : InheritableAttr {
   let Spellings = [Clang<"minsize">];
   let Subjects = SubjectList<[Function, ObjCMethod], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def FlagEnum : InheritableAttr {
@@ -1194,7 +1167,6 @@ def FormatArg : InheritableAttr {
   let Args = [ParamIdxArgument<"FormatIdx">];
   let Subjects = SubjectList<[ObjCMethod, HasFunctionProto]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def GNUInline : InheritableAttr {
@@ -1209,7 +1181,6 @@ def Hot : InheritableAttr {
   // An AST node is created for this attribute, but not actually used beyond
   // semantic checking for mutual exclusion with the Cold attribute.
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def IBAction : InheritableAttr {
@@ -1219,14 +1190,12 @@ def IBAction : InheritableAttr {
   // of the compiler. However, this node needs to exist in the AST because
   // external tools rely on it.
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def IBOutlet : InheritableAttr {
   let Spellings = [Clang<"iboutlet">];
 //  let Subjects = [ObjCIvar, ObjCProperty];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def IBOutletCollection : InheritableAttr {
@@ -1234,7 +1203,6 @@ def IBOutletCollection : InheritableAttr
   let Args = [TypeArgument<"Interface", 1>];
 //  let Subjects = [ObjCIvar, ObjCProperty];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def IFunc : Attr, TargetSpecificAttr<TargetELF> {
@@ -1248,7 +1216,6 @@ def Restrict : InheritableAttr {
   let Spellings = [Declspec<"restrict">, GCC<"malloc">];
   let Subjects = SubjectList<[Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def LayoutVersion : InheritableAttr, TargetSpecificAttr<TargetMicrosoftCXXABI> {
@@ -1280,14 +1247,12 @@ def MaxFieldAlignment : InheritableAttr
   let Args = [UnsignedArgument<"Alignment">];
   let SemaHandler = 0;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def MayAlias : InheritableAttr {
   // FIXME: this is a type attribute in GCC, but a declaration attribute here.
   let Spellings = [GCC<"may_alias">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def MSABI : DeclOrTypeAttr {
@@ -1304,14 +1269,12 @@ def MSP430Interrupt : InheritableAttr, T
   let ParseKind = "Interrupt";
   let HasCustomParsing = 1;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Mips16 : InheritableAttr, TargetSpecificAttr<TargetMips32> {
   let Spellings = [GCC<"mips16">];
   let Subjects = SubjectList<[Function], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def MipsInterrupt : InheritableAttr, TargetSpecificAttr<TargetMips32> {
@@ -1353,6 +1316,8 @@ def Mode : Attr {
   let Subjects = SubjectList<[Var, Enum, TypedefName, Field], ErrorDiag>;
   let Args = [IdentifierArgument<"Mode">];
   let Documentation = [Undocumented];
+  // This is notionally a type attribute, which #pragma clang attribute
+  // generally does not support.
   let PragmaAttributeSupport = 0;
 }
 
@@ -1360,14 +1325,12 @@ def Naked : InheritableAttr {
   let Spellings = [GCC<"naked">, Declspec<"naked">];
   let Subjects = SubjectList<[Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def NeonPolyVectorType : TypeAttr {
   let Spellings = [Clang<"neon_polyvector_type">];
   let Args = [IntArgument<"NumElements">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
   // Represented as VectorType instead.
   let ASTNode = 0;
 }
@@ -1376,7 +1339,6 @@ def NeonVectorType : TypeAttr {
   let Spellings = [Clang<"neon_vector_type">];
   let Args = [IntArgument<"NumElements">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
   // Represented as VectorType instead.
   let ASTNode = 0;
 }
@@ -1385,7 +1347,6 @@ def ReturnsTwice : InheritableAttr {
   let Spellings = [GCC<"returns_twice">];
   let Subjects = SubjectList<[Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def DisableTailCalls : InheritableAttr {
@@ -1404,7 +1365,6 @@ def NoCommon : InheritableAttr {
   let Spellings = [GCC<"nocommon">];
   let Subjects = SubjectList<[Var]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def NoDebug : InheritableAttr {
@@ -1429,14 +1389,12 @@ def NoInline : InheritableAttr {
   let Spellings = [GCC<"noinline">, Declspec<"noinline">];
   let Subjects = SubjectList<[Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def NoMips16 : InheritableAttr, TargetSpecificAttr<TargetMips32> {
   let Spellings = [GCC<"nomips16">];
   let Subjects = SubjectList<[Function], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def NoMicroMips : InheritableAttr, TargetSpecificAttr<TargetMips32> {
@@ -1563,13 +1521,11 @@ def TypeNullUnspecified : TypeAttr {
 def ObjCInertUnsafeUnretained : TypeAttr {
   let Spellings = [Keyword<"__unsafe_unretained">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def ObjCKindOf : TypeAttr {
   let Spellings = [Keyword<"__kindof">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def NoEscape : Attr {
@@ -1596,14 +1552,12 @@ def NoReturn : InheritableAttr {
   let Spellings = [GCC<"noreturn">, Declspec<"noreturn">];
   // FIXME: Does GCC allow this on the function instead?
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def NoInstrumentFunction : InheritableAttr {
   let Spellings = [GCC<"no_instrument_function">];
   let Subjects = SubjectList<[Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def NotTailCalled : InheritableAttr {
@@ -1637,7 +1591,6 @@ def ObjCBridge : InheritableAttr {
   let Subjects = SubjectList<[Record, TypedefName], ErrorDiag>;
   let Args = [IdentifierArgument<"BridgedType">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def ObjCBridgeMutable : InheritableAttr {
@@ -1645,7 +1598,6 @@ def ObjCBridgeMutable : InheritableAttr
   let Subjects = SubjectList<[Record], ErrorDiag>;
   let Args = [IdentifierArgument<"BridgedType">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def ObjCBridgeRelated : InheritableAttr {
@@ -1656,49 +1608,42 @@ def ObjCBridgeRelated : InheritableAttr
           IdentifierArgument<"InstanceMethod">];
   let HasCustomParsing = 1;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def NSReturnsRetained : DeclOrTypeAttr {
   let Spellings = [Clang<"ns_returns_retained">];
 //  let Subjects = SubjectList<[ObjCMethod, ObjCProperty, Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def NSReturnsNotRetained : InheritableAttr {
   let Spellings = [Clang<"ns_returns_not_retained">];
 //  let Subjects = SubjectList<[ObjCMethod, ObjCProperty, Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def NSReturnsAutoreleased : InheritableAttr {
   let Spellings = [Clang<"ns_returns_autoreleased">];
 //  let Subjects = SubjectList<[ObjCMethod, ObjCProperty, Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def NSConsumesSelf : InheritableAttr {
   let Spellings = [Clang<"ns_consumes_self">];
   let Subjects = SubjectList<[ObjCMethod]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def NSConsumed : InheritableParamAttr {
   let Spellings = [Clang<"ns_consumed">];
   let Subjects = SubjectList<[ParmVar]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def ObjCException : InheritableAttr {
   let Spellings = [Clang<"objc_exception">];
   let Subjects = SubjectList<[ObjCInterface], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def ObjCMethodFamily : InheritableAttr {
@@ -1714,27 +1659,23 @@ def ObjCMethodFamily : InheritableAttr {
 def ObjCNSObject : InheritableAttr {
   let Spellings = [Clang<"NSObject">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def ObjCIndependentClass : InheritableAttr {
   let Spellings = [Clang<"objc_independent_class">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def ObjCPreciseLifetime : InheritableAttr {
   let Spellings = [Clang<"objc_precise_lifetime">];
   let Subjects = SubjectList<[Var], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def ObjCReturnsInnerPointer : InheritableAttr {
   let Spellings = [Clang<"objc_returns_inner_pointer">];
   let Subjects = SubjectList<[ObjCMethod, ObjCProperty], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def ObjCRequiresSuper : InheritableAttr {
@@ -1747,7 +1688,6 @@ def ObjCRootClass : InheritableAttr {
   let Spellings = [Clang<"objc_root_class">];
   let Subjects = SubjectList<[ObjCInterface], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def ObjCSubclassingRestricted : InheritableAttr {
@@ -1760,14 +1700,12 @@ def ObjCExplicitProtocolImpl : Inheritab
   let Spellings = [Clang<"objc_protocol_requires_explicit_implementation">];
   let Subjects = SubjectList<[ObjCProtocol], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def ObjCDesignatedInitializer : Attr {
   let Spellings = [Clang<"objc_designated_initializer">];
   let Subjects = SubjectList<[ObjCInterfaceDeclInitMethod], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def ObjCRuntimeName : Attr {
@@ -1805,7 +1743,6 @@ def Override : InheritableAttr {
   let Spellings = [Keyword<"override">];
   let SemaHandler = 0;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Ownership : InheritableAttr {
@@ -1826,21 +1763,18 @@ def Ownership : InheritableAttr {
               VariadicParamIdxArgument<"Args">];
   let Subjects = SubjectList<[HasFunctionProto]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Packed : InheritableAttr {
   let Spellings = [GCC<"packed">];
 //  let Subjects = [Tag, Field];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def IntelOclBicc : DeclOrTypeAttr {
   let Spellings = [Clang<"intel_ocl_bicc", 0>];
 //  let Subjects = [Function, ObjCMethod];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Pcs : DeclOrTypeAttr {
@@ -1855,7 +1789,6 @@ def Pcs : DeclOrTypeAttr {
 def Pure : InheritableAttr {
   let Spellings = [GCC<"pure">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Regparm : TypeAttr {
@@ -1873,7 +1806,6 @@ def ReqdWorkGroupSize : InheritableAttr
               UnsignedArgument<"ZDim">];
   let Subjects = SubjectList<[Function], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def RequireConstantInit : InheritableAttr {
@@ -1893,7 +1825,6 @@ def WorkGroupSizeHint :  InheritableAttr
               UnsignedArgument<"ZDim">];
   let Subjects = SubjectList<[Function], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def InitPriority : InheritableAttr {
@@ -1901,7 +1832,6 @@ def InitPriority : InheritableAttr {
   let Args = [UnsignedArgument<"Priority">];
   let Subjects = SubjectList<[Var], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Section : InheritableAttr {
@@ -1925,7 +1855,6 @@ def PragmaClangBSSSection : InheritableA
   let Args = [StringArgument<"Name">];
   let Subjects = SubjectList<[GlobalVar], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def PragmaClangDataSection : InheritableAttr {
@@ -1934,7 +1863,6 @@ def PragmaClangDataSection : Inheritable
   let Args = [StringArgument<"Name">];
   let Subjects = SubjectList<[GlobalVar], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def PragmaClangRodataSection : InheritableAttr {
@@ -1943,7 +1871,6 @@ def PragmaClangRodataSection : Inheritab
   let Args = [StringArgument<"Name">];
   let Subjects = SubjectList<[GlobalVar], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def PragmaClangTextSection : InheritableAttr {
@@ -1952,7 +1879,6 @@ def PragmaClangTextSection : Inheritable
   let Args = [StringArgument<"Name">];
   let Subjects = SubjectList<[Function], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Sentinel : InheritableAttr {
@@ -1961,7 +1887,6 @@ def Sentinel : InheritableAttr {
               DefaultIntArgument<"NullPos", 0>];
 //  let Subjects = SubjectList<[Function, ObjCMethod, Block, Var]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def StdCall : DeclOrTypeAttr {
@@ -2001,7 +1926,6 @@ def SysVABI : DeclOrTypeAttr {
   let Spellings = [GCC<"sysv_abi">];
 //  let Subjects = [Function, ObjCMethod];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def ThisCall : DeclOrTypeAttr {
@@ -2022,7 +1946,6 @@ def Pascal : DeclOrTypeAttr {
   let Spellings = [Clang<"pascal">, Keyword<"__pascal">, Keyword<"_pascal">];
 //  let Subjects = [Function, ObjCMethod];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def PreserveMost : DeclOrTypeAttr {
@@ -2125,7 +2048,6 @@ def Unavailable : InheritableAttr {
                  "IR_ARCInitReturnsUnrelated",
                  "IR_ARCFieldWithOwnership"], 1, /*fake*/ 1>];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def DiagnoseIf : InheritableAttr {
@@ -2155,28 +2077,24 @@ def ArcWeakrefUnavailable : InheritableA
   let Spellings = [Clang<"objc_arc_weak_reference_unavailable">];
   let Subjects = SubjectList<[ObjCInterface], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def ObjCGC : TypeAttr {
   let Spellings = [Clang<"objc_gc">];
   let Args = [IdentifierArgument<"Kind">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def ObjCOwnership : DeclOrTypeAttr {
   let Spellings = [Clang<"objc_ownership">];
   let Args = [IdentifierArgument<"Kind">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def ObjCRequiresPropertyDefs : InheritableAttr {
   let Spellings = [Clang<"objc_requires_property_definitions">];
   let Subjects = SubjectList<[ObjCInterface], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Unused : InheritableAttr {
@@ -2191,7 +2109,6 @@ def Used : InheritableAttr {
   let Spellings = [GCC<"used">];
   let Subjects = SubjectList<[NonLocalVar, Function, ObjCMethod]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Uuid : InheritableAttr {
@@ -2202,14 +2119,12 @@ def Uuid : InheritableAttr {
   // CPlusPlus && (MicrosoftExt || Borland)
   let LangOpts = [MicrosoftExt, Borland];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def VectorSize : TypeAttr {
   let Spellings = [GCC<"vector_size">];
   let Args = [ExprArgument<"NumBytes">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
   // Represented as VectorType instead.
   let ASTNode = 0;
 }
@@ -2220,7 +2135,6 @@ def VecTypeHint : InheritableAttr {
   let Args = [TypeArgument<"TypeHint">];
   let Subjects = SubjectList<[Function], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Visibility : InheritableAttr {
@@ -2231,7 +2145,6 @@ def Visibility : InheritableAttr {
                            ["Default", "Hidden", "Hidden", "Protected"]>];
   let MeaningfulToClassTemplateDefinition = 1;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def TypeVisibility : InheritableAttr {
@@ -2242,7 +2155,6 @@ def TypeVisibility : InheritableAttr {
                            ["Default", "Hidden", "Hidden", "Protected"]>];
 //  let Subjects = [Tag, ObjCInterface, Namespace];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def VecReturn : InheritableAttr {
@@ -2252,14 +2164,12 @@ def VecReturn : InheritableAttr {
   let Spellings = [Clang<"vecreturn", 0>];
   let Subjects = SubjectList<[CXXRecord], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def WarnUnused : InheritableAttr {
   let Spellings = [GCC<"warn_unused">];
   let Subjects = SubjectList<[Record]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def WarnUnusedResult : InheritableAttr {
@@ -2274,13 +2184,11 @@ def Weak : InheritableAttr {
   let Spellings = [GCC<"weak">];
   let Subjects = SubjectList<[Var, Function, CXXRecord]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def WeakImport : InheritableAttr {
   let Spellings = [Clang<"weak_import">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def WeakRef : InheritableAttr {
@@ -2289,7 +2197,6 @@ def WeakRef : InheritableAttr {
   let Args = [StringArgument<"Aliasee", 1>];
   let Subjects = SubjectList<[Var, Function], ErrorDiag>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def LTOVisibilityPublic : InheritableAttr {
@@ -2306,7 +2213,6 @@ def AnyX86Interrupt : InheritableAttr, T
   let ParseKind = "Interrupt";
   let HasCustomParsing = 1;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def AnyX86NoCallerSavedRegisters : InheritableAttr,
@@ -2370,21 +2276,18 @@ def GuardedVar : InheritableAttr {
   let Spellings = [Clang<"guarded_var", 0>];
   let Subjects = SubjectList<[Field, SharedVar]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def PtGuardedVar : InheritableAttr {
   let Spellings = [Clang<"pt_guarded_var", 0>];
   let Subjects = SubjectList<[Field, SharedVar]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Lockable : InheritableAttr {
   let Spellings = [GNU<"lockable">];
   let Subjects = SubjectList<[Record]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
   let ASTNode = 0;  // Replaced by Capability
 }
 
@@ -2392,7 +2295,6 @@ def ScopedLockable : InheritableAttr {
   let Spellings = [Clang<"scoped_lockable", 0>];
   let Subjects = SubjectList<[Record]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Capability : InheritableAttr {
@@ -2402,7 +2304,6 @@ def Capability : InheritableAttr {
   let Accessors = [Accessor<"isShared",
                     [Clang<"shared_capability", 0>]>];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
   let AdditionalMembers = [{
     bool isMutex() const { return getName().equals_lower("mutex"); }
     bool isRole() const { return getName().equals_lower("role"); }
@@ -2488,14 +2389,12 @@ def RequiresCapability : InheritableAttr
   let Accessors = [Accessor<"isShared", [Clang<"requires_shared_capability", 0>,
                                          Clang<"shared_locks_required", 0>]>];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def NoThreadSafetyAnalysis : InheritableAttr {
   let Spellings = [Clang<"no_thread_safety_analysis">];
   let Subjects = SubjectList<[Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def GuardedBy : InheritableAttr {
@@ -2507,7 +2406,6 @@ def GuardedBy : InheritableAttr {
   let InheritEvenIfAlreadyPresent = 1;
   let Subjects = SubjectList<[Field, SharedVar]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def PtGuardedBy : InheritableAttr {
@@ -2519,7 +2417,6 @@ def PtGuardedBy : InheritableAttr {
   let InheritEvenIfAlreadyPresent = 1;
   let Subjects = SubjectList<[Field, SharedVar]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def AcquiredAfter : InheritableAttr {
@@ -2531,7 +2428,6 @@ def AcquiredAfter : InheritableAttr {
   let InheritEvenIfAlreadyPresent = 1;
   let Subjects = SubjectList<[Field, SharedVar]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def AcquiredBefore : InheritableAttr {
@@ -2543,7 +2439,6 @@ def AcquiredBefore : InheritableAttr {
   let InheritEvenIfAlreadyPresent = 1;
   let Subjects = SubjectList<[Field, SharedVar]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def AssertExclusiveLock : InheritableAttr {
@@ -2555,7 +2450,6 @@ def AssertExclusiveLock : InheritableAtt
   let InheritEvenIfAlreadyPresent = 1;
   let Subjects = SubjectList<[Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def AssertSharedLock : InheritableAttr {
@@ -2567,7 +2461,6 @@ def AssertSharedLock : InheritableAttr {
   let InheritEvenIfAlreadyPresent = 1;
   let Subjects = SubjectList<[Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 // The first argument is an integer or boolean value specifying the return value
@@ -2581,7 +2474,6 @@ def ExclusiveTrylockFunction : Inheritab
   let InheritEvenIfAlreadyPresent = 1;
   let Subjects = SubjectList<[Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 // The first argument is an integer or boolean value specifying the return value
@@ -2595,7 +2487,6 @@ def SharedTrylockFunction : InheritableA
   let InheritEvenIfAlreadyPresent = 1;
   let Subjects = SubjectList<[Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def LockReturned : InheritableAttr {
@@ -2606,7 +2497,6 @@ def LockReturned : InheritableAttr {
   let ParseArgumentsAsUnevaluated = 1;
   let Subjects = SubjectList<[Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def LocksExcluded : InheritableAttr {
@@ -2618,7 +2508,6 @@ def LocksExcluded : InheritableAttr {
   let InheritEvenIfAlreadyPresent = 1;
   let Subjects = SubjectList<[Function]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 // C/C++ consumed attributes.
@@ -2642,7 +2531,6 @@ def ConsumableAutoCast : InheritableAttr
   let Spellings = [Clang<"consumable_auto_cast_state", 0>];
   let Subjects = SubjectList<[CXXRecord]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def ConsumableSetOnRead : InheritableAttr {
@@ -2652,7 +2540,6 @@ def ConsumableSetOnRead : InheritableAtt
   let Spellings = [Clang<"consumable_set_state_on_read", 0>];
   let Subjects = SubjectList<[CXXRecord]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def CallableWhen : InheritableAttr {
@@ -2755,7 +2642,6 @@ def MSStruct : InheritableAttr {
   let Spellings = [GCC<"ms_struct">];
   let Subjects = SubjectList<[Record]>;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def DLLExport : InheritableAttr, TargetSpecificAttr<TargetWindows> {
@@ -2800,25 +2686,21 @@ def Win64 : IgnoredAttr {
 def Ptr32 : TypeAttr {
   let Spellings = [Keyword<"__ptr32">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def Ptr64 : TypeAttr {
   let Spellings = [Keyword<"__ptr64">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def SPtr : TypeAttr {
   let Spellings = [Keyword<"__sptr">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def UPtr : TypeAttr {
   let Spellings = [Keyword<"__uptr">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def MSInheritance : InheritableAttr {
@@ -2869,7 +2751,6 @@ def MSVtorDisp : InheritableAttr {
   Mode getVtorDispMode() const { return Mode(vdm); }
   }];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def InitSeg : Attr {
@@ -2995,7 +2876,6 @@ def CapturedRecord : InheritableAttr {
   let Spellings = [];
   let SemaHandler = 0;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def OMPThreadPrivateDecl : InheritableAttr {
@@ -3003,7 +2883,6 @@ def OMPThreadPrivateDecl : InheritableAt
   let Spellings = [];
   let SemaHandler = 0;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def OMPCaptureNoInit : InheritableAttr {
@@ -3011,7 +2890,6 @@ def OMPCaptureNoInit : InheritableAttr {
   let Spellings = [];
   let SemaHandler = 0;
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def OMPCaptureKind : Attr {
@@ -3020,7 +2898,6 @@ def OMPCaptureKind : Attr {
   let SemaHandler = 0;
   let Args = [UnsignedArgument<"CaptureKind">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def OMPReferencedVar : Attr {
@@ -3029,7 +2906,6 @@ def OMPReferencedVar : Attr {
   let SemaHandler = 0;
   let Args = [ExprArgument<"Ref">];
   let Documentation = [Undocumented];
-  let PragmaAttributeSupport = 0;
 }
 
 def OMPDeclareSimdDecl : Attr {

Modified: cfe/trunk/test/Misc/pragma-attribute-supported-attributes-list.test
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/pragma-attribute-supported-attributes-list.test?rev=341437&r1=341436&r2=341437&view=diff
==============================================================================
--- cfe/trunk/test/Misc/pragma-attribute-supported-attributes-list.test (original)
+++ cfe/trunk/test/Misc/pragma-attribute-supported-attributes-list.test Tue Sep  4 17:28:57 2018
@@ -2,29 +2,48 @@
 
 // The number of supported attributes should never go down!
 
-// CHECK: #pragma clang attribute supports 75 attributes:
+// CHECK: #pragma clang attribute supports 128 attributes:
 // CHECK-NEXT: AMDGPUFlatWorkGroupSize (SubjectMatchRule_function)
 // CHECK-NEXT: AMDGPUNumSGPR (SubjectMatchRule_function)
 // CHECK-NEXT: AMDGPUNumVGPR (SubjectMatchRule_function)
 // CHECK-NEXT: AMDGPUWavesPerEU (SubjectMatchRule_function)
 // CHECK-NEXT: AVRSignal (SubjectMatchRule_function)
 // CHECK-NEXT: AbiTag (SubjectMatchRule_record_not_is_union, SubjectMatchRule_variable, SubjectMatchRule_function, SubjectMatchRule_namespace)
+// CHECK-NEXT: Alias (SubjectMatchRule_function, SubjectMatchRule_variable_is_global)
 // CHECK-NEXT: AlignValue (SubjectMatchRule_variable, SubjectMatchRule_type_alias)
 // CHECK-NEXT: AllocSize (SubjectMatchRule_function)
 // CHECK-NEXT: AlwaysDestroy (SubjectMatchRule_variable)
+// CHECK-NEXT: AlwaysInline (SubjectMatchRule_function)
 // CHECK-NEXT: Annotate ()
 // CHECK-NEXT: AnyX86NoCfCheck (SubjectMatchRule_hasType_functionType)
+// CHECK-NEXT: ArcWeakrefUnavailable (SubjectMatchRule_objc_interface)
 // CHECK-NEXT: AssumeAligned (SubjectMatchRule_objc_method, SubjectMatchRule_function)
 // CHECK-NEXT: Availability ((SubjectMatchRule_record, SubjectMatchRule_enum, SubjectMatchRule_enum_constant, SubjectMatchRule_field, SubjectMatchRule_function, SubjectMatchRule_namespace, SubjectMatchRule_objc_category, SubjectMatchRule_objc_interface, SubjectMatchRule_objc_method, SubjectMatchRule_objc_property, SubjectMatchRule_objc_protocol, SubjectMatchRule_record, SubjectMatchRule_type_alias, SubjectMatchRule_variable))
+// CHECK-NEXT: CFAuditedTransfer (SubjectMatchRule_function)
+// CHECK-NEXT: CFConsumed (SubjectMatchRule_variable_is_parameter)
+// CHECK-NEXT: CFUnknownTransfer (SubjectMatchRule_function)
 // CHECK-NEXT: CPUDispatch (SubjectMatchRule_function)
 // CHECK-NEXT: CPUSpecific (SubjectMatchRule_function)
+// CHECK-NEXT: CUDAConstant (SubjectMatchRule_variable)
+// CHECK-NEXT: CUDADevice (SubjectMatchRule_function, SubjectMatchRule_variable)
+// CHECK-NEXT: CUDAGlobal (SubjectMatchRule_function)
+// CHECK-NEXT: CUDAHost (SubjectMatchRule_function)
+// CHECK-NEXT: CUDALaunchBounds (SubjectMatchRule_objc_method, SubjectMatchRule_hasType_functionType)
+// CHECK-NEXT: CUDAShared (SubjectMatchRule_variable)
 // CHECK-NEXT: CXX11NoReturn (SubjectMatchRule_function)
 // CHECK-NEXT: CallableWhen (SubjectMatchRule_function_is_member)
+// CHECK-NEXT: Capability (SubjectMatchRule_record, SubjectMatchRule_type_alias)
 // CHECK-NEXT: CarriesDependency (SubjectMatchRule_variable_is_parameter, SubjectMatchRule_objc_method, SubjectMatchRule_function)
+// CHECK-NEXT: Cold (SubjectMatchRule_function)
+// CHECK-NEXT: Common (SubjectMatchRule_variable)
+// CHECK-NEXT: Constructor (SubjectMatchRule_function)
 // CHECK-NEXT: Consumable (SubjectMatchRule_record)
+// CHECK-NEXT: ConsumableAutoCast (SubjectMatchRule_record)
+// CHECK-NEXT: ConsumableSetOnRead (SubjectMatchRule_record)
 // CHECK-NEXT: Convergent (SubjectMatchRule_function)
 // CHECK-NEXT: DLLExport (SubjectMatchRule_function, SubjectMatchRule_variable, SubjectMatchRule_record, SubjectMatchRule_objc_interface)
 // CHECK-NEXT: DLLImport (SubjectMatchRule_function, SubjectMatchRule_variable, SubjectMatchRule_record, SubjectMatchRule_objc_interface)
+// CHECK-NEXT: Destructor (SubjectMatchRule_function)
 // CHECK-NEXT: DisableTailCalls (SubjectMatchRule_function, SubjectMatchRule_objc_method)
 // CHECK-NEXT: EnableIf (SubjectMatchRule_function)
 // CHECK-NEXT: EnumExtensibility (SubjectMatchRule_enum)
@@ -32,27 +51,51 @@
 // CHECK-NEXT: FlagEnum (SubjectMatchRule_enum)
 // CHECK-NEXT: Flatten (SubjectMatchRule_function)
 // CHECK-NEXT: GNUInline (SubjectMatchRule_function)
+// CHECK-NEXT: Hot (SubjectMatchRule_function)
+// CHECK-NEXT: IBAction (SubjectMatchRule_objc_method_is_instance)
 // CHECK-NEXT: IFunc (SubjectMatchRule_function)
+// CHECK-NEXT: InitPriority (SubjectMatchRule_variable)
 // CHECK-NEXT: InternalLinkage (SubjectMatchRule_variable, SubjectMatchRule_function, SubjectMatchRule_record)
 // CHECK-NEXT: LTOVisibilityPublic (SubjectMatchRule_record)
+// CHECK-NEXT: Lockable (SubjectMatchRule_record)
+// CHECK-NEXT: MSStruct (SubjectMatchRule_record)
 // CHECK-NEXT: MicroMips (SubjectMatchRule_function)
+// CHECK-NEXT: MinSize (SubjectMatchRule_function, SubjectMatchRule_objc_method)
 // CHECK-NEXT: MinVectorWidth (SubjectMatchRule_function)
+// CHECK-NEXT: Mips16 (SubjectMatchRule_function)
 // CHECK-NEXT: MipsLongCall (SubjectMatchRule_function)
 // CHECK-NEXT: MipsShortCall (SubjectMatchRule_function)
+// CHECK-NEXT: NSConsumed (SubjectMatchRule_variable_is_parameter)
+// CHECK-NEXT: NSConsumesSelf (SubjectMatchRule_objc_method)
+// CHECK-NEXT: Naked (SubjectMatchRule_function)
+// CHECK-NEXT: NoCommon (SubjectMatchRule_variable)
 // CHECK-NEXT: NoDebug (SubjectMatchRule_hasType_functionType, SubjectMatchRule_objc_method, SubjectMatchRule_variable_not_is_parameter)
 // CHECK-NEXT: NoDestroy (SubjectMatchRule_variable)
 // CHECK-NEXT: NoDuplicate (SubjectMatchRule_function)
 // CHECK-NEXT: NoEscape (SubjectMatchRule_variable_is_parameter)
+// CHECK-NEXT: NoInline (SubjectMatchRule_function)
+// CHECK-NEXT: NoInstrumentFunction (SubjectMatchRule_function)
 // CHECK-NEXT: NoMicroMips (SubjectMatchRule_function)
+// CHECK-NEXT: NoMips16 (SubjectMatchRule_function)
 // CHECK-NEXT: NoSanitize (SubjectMatchRule_function, SubjectMatchRule_objc_method, SubjectMatchRule_variable_is_global)
 // CHECK-NEXT: NoSanitizeSpecific (SubjectMatchRule_function, SubjectMatchRule_variable_is_global)
 // CHECK-NEXT: NoSplitStack (SubjectMatchRule_function)
 // CHECK-NEXT: NoStackProtector (SubjectMatchRule_function)
+// CHECK-NEXT: NoThreadSafetyAnalysis (SubjectMatchRule_function)
 // CHECK-NEXT: NoThrow (SubjectMatchRule_function)
 // CHECK-NEXT: NotTailCalled (SubjectMatchRule_function)
 // CHECK-NEXT: ObjCBoxable (SubjectMatchRule_record)
+// CHECK-NEXT: ObjCBridge (SubjectMatchRule_record, SubjectMatchRule_type_alias)
+// CHECK-NEXT: ObjCBridgeMutable (SubjectMatchRule_record)
+// CHECK-NEXT: ObjCBridgeRelated (SubjectMatchRule_record)
+// CHECK-NEXT: ObjCException (SubjectMatchRule_objc_interface)
+// CHECK-NEXT: ObjCExplicitProtocolImpl (SubjectMatchRule_objc_protocol)
 // CHECK-NEXT: ObjCMethodFamily (SubjectMatchRule_objc_method)
+// CHECK-NEXT: ObjCPreciseLifetime (SubjectMatchRule_variable)
+// CHECK-NEXT: ObjCRequiresPropertyDefs (SubjectMatchRule_objc_interface)
 // CHECK-NEXT: ObjCRequiresSuper (SubjectMatchRule_objc_method)
+// CHECK-NEXT: ObjCReturnsInnerPointer (SubjectMatchRule_objc_method, SubjectMatchRule_objc_property)
+// CHECK-NEXT: ObjCRootClass (SubjectMatchRule_objc_interface)
 // CHECK-NEXT: ObjCRuntimeName (SubjectMatchRule_objc_interface, SubjectMatchRule_objc_protocol)
 // CHECK-NEXT: ObjCRuntimeVisible (SubjectMatchRule_objc_interface)
 // CHECK-NEXT: ObjCSubclassingRestricted (SubjectMatchRule_objc_interface)
@@ -63,9 +106,13 @@
 // CHECK-NEXT: ParamTypestate (SubjectMatchRule_variable_is_parameter)
 // CHECK-NEXT: PassObjectSize (SubjectMatchRule_variable_is_parameter)
 // CHECK-NEXT: RenderScriptKernel (SubjectMatchRule_function)
+// CHECK-NEXT: ReqdWorkGroupSize (SubjectMatchRule_function)
 // CHECK-NEXT: RequireConstantInit (SubjectMatchRule_variable_is_global)
+// CHECK-NEXT: Restrict (SubjectMatchRule_function)
 // CHECK-NEXT: ReturnTypestate (SubjectMatchRule_function, SubjectMatchRule_variable_is_parameter)
 // CHECK-NEXT: ReturnsNonNull (SubjectMatchRule_objc_method, SubjectMatchRule_function)
+// CHECK-NEXT: ReturnsTwice (SubjectMatchRule_function)
+// CHECK-NEXT: ScopedLockable (SubjectMatchRule_record)
 // CHECK-NEXT: Section (SubjectMatchRule_function, SubjectMatchRule_variable_is_global, SubjectMatchRule_objc_method, SubjectMatchRule_objc_property)
 // CHECK-NEXT: SetTypestate (SubjectMatchRule_function_is_member)
 // CHECK-NEXT: SwiftContext (SubjectMatchRule_variable_is_parameter)
@@ -75,6 +122,12 @@
 // CHECK-NEXT: Target (SubjectMatchRule_function)
 // CHECK-NEXT: TestTypestate (SubjectMatchRule_function_is_member)
 // CHECK-NEXT: TrivialABI (SubjectMatchRule_record)
+// CHECK-NEXT: VecReturn (SubjectMatchRule_record)
+// CHECK-NEXT: VecTypeHint (SubjectMatchRule_function)
+// CHECK-NEXT: WarnUnused (SubjectMatchRule_record)
 // CHECK-NEXT: WarnUnusedResult (SubjectMatchRule_objc_method, SubjectMatchRule_enum, SubjectMatchRule_record, SubjectMatchRule_hasType_functionType)
+// CHECK-NEXT: Weak (SubjectMatchRule_variable, SubjectMatchRule_function, SubjectMatchRule_record)
+// CHECK-NEXT: WeakRef (SubjectMatchRule_variable, SubjectMatchRule_function)
+// CHECK-NEXT: WorkGroupSizeHint (SubjectMatchRule_function)
 // CHECK-NEXT: XRayInstrument (SubjectMatchRule_function, SubjectMatchRule_objc_method)
 // CHECK-NEXT: XRayLogArgs (SubjectMatchRule_function, SubjectMatchRule_objc_method)

Modified: cfe/trunk/test/Parser/pragma-attribute.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/pragma-attribute.cpp?rev=341437&r1=341436&r2=341437&view=diff
==============================================================================
--- cfe/trunk/test/Parser/pragma-attribute.cpp (original)
+++ cfe/trunk/test/Parser/pragma-attribute.cpp Tue Sep  4 17:28:57 2018
@@ -123,7 +123,9 @@ void function();
 #pragma clang attribute push (__attribute__((annotate)), apply_to=function foo) // expected-error {{extra tokens after attribute in a '#pragma clang attribute push'}}
 
 #pragma clang attribute push (__attribute__((objc_bridge_related)), apply_to=function)
-// expected-error at -1 {{attribute 'objc_bridge_related' is not supported by '#pragma clang attribute'}}
+// expected-error at -1 {{attribute 'objc_bridge_related' can't be applied to 'function'}}
+#pragma clang attribute pop
+
 #pragma clang attribute push (__attribute__((objc_bridge_related(1))), apply_to=function) // expected-error {{expected a related ObjectiveC class name, e.g., 'NSColor'}}
 
 #pragma clang attribute push (__attribute__((used)), apply_to=function) // expected-error {{attribute 'used' is not supported by '#pragma clang attribute'}}




More information about the cfe-commits mailing list