[cfe-commits] r142423 - in /cfe/trunk: lib/Lex/PPMacroExpansion.cpp test/SemaObjC/arc-cf.m
John McCall
rjmccall at apple.com
Tue Oct 18 14:18:53 PDT 2011
Author: rjmccall
Date: Tue Oct 18 16:18:53 2011
New Revision: 142423
URL: http://llvm.org/viewvc/llvm-project?rev=142423&view=rev
Log:
Add a __has_feature check for arc_cf_code_audited.
Modified:
cfe/trunk/lib/Lex/PPMacroExpansion.cpp
cfe/trunk/test/SemaObjC/arc-cf.m
Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=142423&r1=142422&r2=142423&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
+++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Tue Oct 18 16:18:53 2011
@@ -610,6 +610,7 @@
.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)
Modified: cfe/trunk/test/SemaObjC/arc-cf.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc-cf.m?rev=142423&r1=142422&r2=142423&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc-cf.m (original)
+++ cfe/trunk/test/SemaObjC/arc-cf.m Tue Oct 18 16:18:53 2011
@@ -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;
More information about the cfe-commits
mailing list