summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Lex/PPMacroExpansion.cpp1
-rw-r--r--clang/test/SemaObjC/arc-cf.m4
2 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp
index e10c95c75f2..50929158b24 100644
--- a/clang/lib/Lex/PPMacroExpansion.cpp
+++ b/clang/lib/Lex/PPMacroExpansion.cpp
@@ -610,6 +610,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
.Case("ownership_holds", true)
.Case("ownership_returns", true)
.Case("ownership_takes", true)
+ .Case("arc_cf_code_audited", true)
// C1X features
.Case("c_alignas", LangOpts.C1X)
.Case("c_generic_selections", LangOpts.C1X)
diff --git a/clang/test/SemaObjC/arc-cf.m b/clang/test/SemaObjC/arc-cf.m
index b9a44d9e68c..e7dcc22d56c 100644
--- a/clang/test/SemaObjC/arc-cf.m
+++ b/clang/test/SemaObjC/arc-cf.m
@@ -1,5 +1,9 @@
// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -verify %s
+#if __has_feature(arc_cf_code_audited)
+char _global[-1]; // expected-error {{declared as an array with a negative size}}
+#endif
+
typedef const void *CFTypeRef;
typedef const struct __CFString *CFStringRef;
OpenPOWER on IntegriCloud