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.

llvm-svn: 352672
This commit is contained in:
Erik Pilkington 2019-01-30 21:14:08 +00:00
parent 22457f8e9b
commit 28a892b972
2 changed files with 3 additions and 1 deletions

View File

@ -95,7 +95,7 @@ FEATURE(objc_arc, LangOpts.ObjCAutoRefCount)
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)

View File

@ -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