summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/DiagnosticParseKinds.td
diff options
context:
space:
mode:
authorErik Pilkington <erik.pilkington@gmail.com>2018-12-20 22:32:04 +0000
committerErik Pilkington <erik.pilkington@gmail.com>2018-12-20 22:32:04 +0000
commit5af7f70eef9405bdaa895370fc4702b47f0e953a (patch)
tree71e0ead9b6d8a627059ec57cd3a6d6c9e0e510e1 /include/clang/Basic/DiagnosticParseKinds.td
parent5faf6e9d41afa74a447da0b47349e4888e59e466 (diff)
Add support for namespaces on #pragma clang attribute
Namespaces are introduced by adding an "identifier." before a push/pop directive. Pop directives with namespaces can only pop a attribute group that was pushed with the same namespace. Push and pop directives that don't opt into namespaces have the same semantics. This is necessary to prevent a pitfall of using multiple #pragma clang attribute directives spread out in a large file, particularly when macros are involved. It isn't easy to see which pop corripsonds to which push, so its easy to inadvertently pop the wrong group. Differential revision: https://reviews.llvm.org/D55628 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticParseKinds.td')
-rw-r--r--include/clang/Basic/DiagnosticParseKinds.td7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticParseKinds.td b/include/clang/Basic/DiagnosticParseKinds.td
index 1e816bc5f2..bb5d2a18d4 100644
--- a/include/clang/Basic/DiagnosticParseKinds.td
+++ b/include/clang/Basic/DiagnosticParseKinds.td
@@ -1100,6 +1100,13 @@ def err_pragma_attribute_unknown_subject_sub_rule : Error<
"sub-rules: %3}2">;
def err_pragma_attribute_duplicate_subject : Error<
"duplicate attribute subject matcher '%0'">;
+def err_pragma_attribute_expected_period : Error<
+ "expected '.' after pragma attribute namespace %0">;
+def err_pragma_attribute_namespace_on_attribute : Error<
+ "namespace can only apply to 'push' or 'pop' directives">;
+def note_pragma_attribute_namespace_on_attribute : Note<
+ "omit the namespace to add attributes to the most-recently"
+ " pushed attribute group">;
def err_opencl_unroll_hint_on_non_loop : Error<
"OpenCL only supports 'opencl_unroll_hint' attribute on for, while, and do statements">;