r356600 - Add a __has_extension check for '#pragma clang attribute' as an external-declaration
Erik Pilkington via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 20 12:26:37 PDT 2019
Author: epilk
Date: Wed Mar 20 12:26:37 2019
New Revision: 356600
URL: http://llvm.org/viewvc/llvm-project?rev=356600&view=rev
Log:
Add a __has_extension check for '#pragma clang attribute' as an external-declaration
This was added in r356075.
Modified:
cfe/trunk/include/clang/Basic/Features.def
cfe/trunk/test/Parser/pragma-attribute-context.cpp
Modified: cfe/trunk/include/clang/Basic/Features.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Features.def?rev=356600&r1=356599&r2=356600&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Features.def (original)
+++ cfe/trunk/include/clang/Basic/Features.def Wed Mar 20 12:26:37 2019
@@ -247,6 +247,7 @@ EXTENSION(cxx_variable_templates, LangOp
// Miscellaneous language extensions
EXTENSION(overloadable_unmarked, true)
EXTENSION(pragma_clang_attribute_namespaces, true)
+EXTENSION(pragma_clang_attribute_external_declaration, true)
#undef EXTENSION
#undef FEATURE
Modified: cfe/trunk/test/Parser/pragma-attribute-context.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/pragma-attribute-context.cpp?rev=356600&r1=356599&r2=356600&view=diff
==============================================================================
--- cfe/trunk/test/Parser/pragma-attribute-context.cpp (original)
+++ cfe/trunk/test/Parser/pragma-attribute-context.cpp Wed Mar 20 12:26:37 2019
@@ -1,6 +1,10 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin9.0.0 -verify -std=c++11 %s
// RUN: %clang_cc1 -triple x86_64-apple-darwin9.0.0 -xobjective-c++ -verify -std=c++11 %s
+#if !__has_extension(pragma_clang_attribute_external_declaration)
+#error
+#endif
+
#define BEGIN_PRAGMA _Pragma("clang attribute push (__attribute__((availability(macos, introduced=1000))), apply_to=function)")
#define END_PRAGMA _Pragma("clang attribute pop")
More information about the cfe-commits
mailing list