r303713 - Change __has_feature(objc_diagnose_if_attr) to __has_feature(attribute_diagnose_if_objc) for consistency with rest of attribute checks.
Argyrios Kyrtzidis via cfe-commits
cfe-commits at lists.llvm.org
Tue May 23 18:38:00 PDT 2017
Author: akirtzidis
Date: Tue May 23 20:38:00 2017
New Revision: 303713
URL: http://llvm.org/viewvc/llvm-project?rev=303713&view=rev
Log:
Change __has_feature(objc_diagnose_if_attr) to __has_feature(attribute_diagnose_if_objc) for consistency with rest of attribute checks.
Modified:
cfe/trunk/lib/Lex/PPMacroExpansion.cpp
cfe/trunk/test/SemaObjC/diagnose_if.m
Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=303713&r1=303712&r2=303713&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
+++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Tue May 23 20:38:00 2017
@@ -1125,6 +1125,7 @@ static bool HasFeature(const Preprocesso
.Case("attribute_overloadable", true)
.Case("attribute_unavailable_with_message", true)
.Case("attribute_unused_on_fields", true)
+ .Case("attribute_diagnose_if_objc", true)
.Case("blocks", LangOpts.Blocks)
.Case("c_thread_safety_attributes", true)
.Case("cxx_exceptions", LangOpts.CXXExceptions)
@@ -1166,7 +1167,6 @@ static bool HasFeature(const Preprocesso
.Case("objc_generics", LangOpts.ObjC2)
.Case("objc_generics_variance", LangOpts.ObjC2)
.Case("objc_class_property", LangOpts.ObjC2)
- .Case("objc_diagnose_if_attr", LangOpts.ObjC2)
// C11 features
.Case("c_alignas", LangOpts.C11)
.Case("c_alignof", LangOpts.C11)
Modified: cfe/trunk/test/SemaObjC/diagnose_if.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/diagnose_if.m?rev=303713&r1=303712&r2=303713&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/diagnose_if.m (original)
+++ cfe/trunk/test/SemaObjC/diagnose_if.m Tue May 23 20:38:00 2017
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 %s -verify -fno-builtin
-_Static_assert(__has_feature(objc_diagnose_if_attr), "feature check failed?");
+_Static_assert(__has_feature(attribute_diagnose_if_objc), "feature check failed?");
#define _diagnose_if(...) __attribute__((diagnose_if(__VA_ARGS__)))
More information about the cfe-commits
mailing list