[llvm-branch-commits] [cfe-branch] r352854 - Merging r352672:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Feb 1 02:50:43 PST 2019


Author: hans
Date: Fri Feb  1 02:50:43 2019
New Revision: 352854

URL: http://llvm.org/viewvc/llvm-project?rev=352854&view=rev
Log:
Merging r352672:
------------------------------------------------------------------------
r352672 | epilk | 2019-01-30 22:14:08 +0100 (Wed, 30 Jan 2019) | 4 lines

Don't define __has_feature(objc_fixed_enum) in non-objc mode

This is only a formal language feature in ObjC, otherwise its just an
extension. Making this change was also an ABI break.
------------------------------------------------------------------------

Modified:
    cfe/branches/release_80/   (props changed)
    cfe/branches/release_80/include/clang/Basic/Features.def
    cfe/branches/release_80/test/SemaObjC/enum-fixed-type.m

Propchange: cfe/branches/release_80/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Feb  1 02:50:43 2019
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:351334,351340,351344,351360,351457,351459,351531,351579-351580,352040,352079,352099,352102,352105,352221-352222,352229,352323,352539,352610
+/cfe/trunk:351334,351340,351344,351360,351457,351459,351531,351579-351580,352040,352079,352099,352102,352105,352221-352222,352229,352323,352539,352610,352672
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_80/include/clang/Basic/Features.def
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_80/include/clang/Basic/Features.def?rev=352854&r1=352853&r2=352854&view=diff
==============================================================================
--- cfe/branches/release_80/include/clang/Basic/Features.def (original)
+++ cfe/branches/release_80/include/clang/Basic/Features.def Fri Feb  1 02:50:43 2019
@@ -96,7 +96,7 @@ FEATURE(objc_arc, LangOpts.ObjCAutoRefCo
 FEATURE(objc_arc_fields, true)
 FEATURE(objc_arc_weak, LangOpts.ObjCWeak)
 FEATURE(objc_default_synthesize_properties, LangOpts.ObjC)
-FEATURE(objc_fixed_enum, true)
+FEATURE(objc_fixed_enum, LangOpts.ObjC)
 FEATURE(objc_instancetype, LangOpts.ObjC)
 FEATURE(objc_kindof, LangOpts.ObjC)
 FEATURE(objc_modules, LangOpts.ObjC && LangOpts.Modules)

Modified: cfe/branches/release_80/test/SemaObjC/enum-fixed-type.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_80/test/SemaObjC/enum-fixed-type.m?rev=352854&r1=352853&r2=352854&view=diff
==============================================================================
--- cfe/branches/release_80/test/SemaObjC/enum-fixed-type.m (original)
+++ cfe/branches/release_80/test/SemaObjC/enum-fixed-type.m Fri Feb  1 02:50:43 2019
@@ -1,9 +1,11 @@
 // RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
 // RUN: %clang_cc1 -fsyntax-only -verify -xc %s
 
+#ifdef __OBJC__
 #if !__has_feature(objc_fixed_enum)
 #  error Enumerations with a fixed underlying type are not supported
 #endif
+#endif
 
 #if !__has_extension(cxx_fixed_enum)
 #  error Enumerations with a fixed underlying type are not supported




More information about the llvm-branch-commits mailing list