From: Argyrios Kyrtzidis Date: Wed, 24 May 2017 01:38:00 +0000 (+0000) Subject: Change __has_feature(objc_diagnose_if_attr) to __has_feature(attribute_diagnose_if_ob... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f4950afd2a78ca1bdd7c60356273402962479fa;p=platform%2Fupstream%2Fllvm.git Change __has_feature(objc_diagnose_if_attr) to __has_feature(attribute_diagnose_if_objc) for consistency with rest of attribute checks. llvm-svn: 303713 --- diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index 2f141a1..a6bfc32 100644 --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/lib/Lex/PPMacroExpansion.cpp @@ -1125,6 +1125,7 @@ static bool HasFeature(const Preprocessor &PP, StringRef Feature) { .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 Preprocessor &PP, StringRef Feature) { .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) diff --git a/clang/test/SemaObjC/diagnose_if.m b/clang/test/SemaObjC/diagnose_if.m index 7b3eabb..9f281e4 100644 --- a/clang/test/SemaObjC/diagnose_if.m +++ b/clang/test/SemaObjC/diagnose_if.m @@ -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__)))