diff options
| author | Alex Lorenz <arphaman@gmail.com> | 2017-04-18 14:33:39 +0000 |
|---|---|---|
| committer | Alex Lorenz <arphaman@gmail.com> | 2017-04-18 14:33:39 +0000 |
| commit | 9e7bf161ea9083e9282cf4af72ac0d5f13115753 (patch) | |
| tree | a51f80872174c643ea9571063b38a035b28ded07 /clang/test/Misc/pragma-attribute-supported-attributes-list.test | |
| parent | f9799c70a3dbb58b68b45640383ca2fe3d70caf6 (diff) | |
| download | bcm5719-llvm-9e7bf161ea9083e9282cf4af72ac0d5f13115753.tar.gz bcm5719-llvm-9e7bf161ea9083e9282cf4af72ac0d5f13115753.zip | |
Add #pragma clang attribute
This is a recommit of r300539 that was reverted in r300543 due to test failures.
The original commit message is displayed below:
The new '#pragma clang attribute' directive can be used to apply attributes to
multiple declarations. An attribute must satisfy the following conditions to
be supported by the pragma:
- It must have a subject list that's defined in the TableGen file.
- It must be documented.
- It must not be late parsed.
- It must have a GNU/C++11 spelling.
Differential Revision: https://reviews.llvm.org/D30009
llvm-svn: 300556
Diffstat (limited to 'clang/test/Misc/pragma-attribute-supported-attributes-list.test')
| -rw-r--r-- | clang/test/Misc/pragma-attribute-supported-attributes-list.test | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/clang/test/Misc/pragma-attribute-supported-attributes-list.test b/clang/test/Misc/pragma-attribute-supported-attributes-list.test new file mode 100644 index 00000000000..b1f2e66ab33 --- /dev/null +++ b/clang/test/Misc/pragma-attribute-supported-attributes-list.test @@ -0,0 +1,62 @@ +// RUN: clang-tblgen -gen-clang-test-pragma-attribute-supported-attributes -I%src_include_dir %src_include_dir/clang/Basic/Attr.td -o - | FileCheck %s + +// The number of supported attributes should never go down! + +// CHECK: #pragma clang attribute supports 57 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: AlignValue (SubjectMatchRule_variable, SubjectMatchRule_type_alias) +// CHECK-NEXT: AllocSize (SubjectMatchRule_function) +// CHECK-NEXT: Annotate () +// CHECK-NEXT: AssumeAligned (SubjectMatchRule_objc_method, SubjectMatchRule_function) +// CHECK-NEXT: CXX11NoReturn (SubjectMatchRule_function) +// CHECK-NEXT: CallableWhen (SubjectMatchRule_function_is_member) +// CHECK-NEXT: CarriesDependency (SubjectMatchRule_variable_is_parameter, SubjectMatchRule_objc_method, SubjectMatchRule_function) +// CHECK-NEXT: Consumable (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: DisableTailCalls (SubjectMatchRule_function, SubjectMatchRule_objc_method) +// CHECK-NEXT: EnableIf (SubjectMatchRule_function) +// CHECK-NEXT: EnumExtensibility (SubjectMatchRule_enum) +// CHECK-NEXT: FlagEnum (SubjectMatchRule_enum) +// CHECK-NEXT: Flatten (SubjectMatchRule_function) +// CHECK-NEXT: IFunc (SubjectMatchRule_function) +// CHECK-NEXT: InternalLinkage (SubjectMatchRule_variable, SubjectMatchRule_function, SubjectMatchRule_record) +// CHECK-NEXT: LTOVisibilityPublic (SubjectMatchRule_record) +// CHECK-NEXT: NoDebug (SubjectMatchRule_hasType_functionType, SubjectMatchRule_objc_method, SubjectMatchRule_variable_not_is_parameter) +// CHECK-NEXT: NoDuplicate (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: NotTailCalled (SubjectMatchRule_function) +// CHECK-NEXT: ObjCBoxable (SubjectMatchRule_record) +// CHECK-NEXT: ObjCMethodFamily (SubjectMatchRule_objc_method) +// CHECK-NEXT: ObjCRequiresSuper (SubjectMatchRule_objc_method) +// CHECK-NEXT: ObjCRuntimeName (SubjectMatchRule_objc_interface, SubjectMatchRule_objc_protocol) +// CHECK-NEXT: ObjCRuntimeVisible (SubjectMatchRule_objc_interface) +// CHECK-NEXT: ObjCSubclassingRestricted (SubjectMatchRule_objc_interface) +// CHECK-NEXT: OpenCLNoSVM (SubjectMatchRule_variable) +// CHECK-NEXT: OptimizeNone (SubjectMatchRule_function, SubjectMatchRule_objc_method) +// CHECK-NEXT: Overloadable (SubjectMatchRule_function) +// CHECK-NEXT: ParamTypestate (SubjectMatchRule_variable_is_parameter) +// CHECK-NEXT: PassObjectSize (SubjectMatchRule_variable_is_parameter) +// CHECK-NEXT: RenderScriptKernel (SubjectMatchRule_function) +// CHECK-NEXT: RequireConstantInit (SubjectMatchRule_variable_is_global) +// CHECK-NEXT: ReturnTypestate (SubjectMatchRule_function, SubjectMatchRule_variable_is_parameter) +// CHECK-NEXT: ReturnsNonNull (SubjectMatchRule_objc_method, SubjectMatchRule_function) +// 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) +// CHECK-NEXT: SwiftErrorResult (SubjectMatchRule_variable_is_parameter) +// CHECK-NEXT: SwiftIndirectResult (SubjectMatchRule_variable_is_parameter) +// CHECK-NEXT: TLSModel (SubjectMatchRule_variable_is_thread_local) +// CHECK-NEXT: Target (SubjectMatchRule_function) +// CHECK-NEXT: TestTypestate (SubjectMatchRule_function_is_member) +// CHECK-NEXT: WarnUnusedResult (SubjectMatchRule_objc_method, SubjectMatchRule_enum, SubjectMatchRule_record, SubjectMatchRule_hasType_functionType) +// CHECK-NEXT: XRayInstrument (SubjectMatchRule_function_is_member, SubjectMatchRule_objc_method, SubjectMatchRule_function) +// CHECK-NEXT: XRayLogArgs (SubjectMatchRule_function_is_member, SubjectMatchRule_objc_method, SubjectMatchRule_function) |

