diff options
author | Hans Wennborg <hans@hanshq.net> | 2019-02-01 10:50:43 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2019-02-01 10:50:43 +0000 |
commit | 2a08347d7fa20368c2d86a3fd56ad9398fad944b (patch) | |
tree | 2d5f261511779546d1c186b88b06bbeafd5cb3e1 | |
parent | 538ee7319dead9662507c59d87384be178c30c9e (diff) | |
download | llvm-2a08347d7fa20368c2d86a3fd56ad9398fad944b.zip llvm-2a08347d7fa20368c2d86a3fd56ad9398fad944b.tar.gz llvm-2a08347d7fa20368c2d86a3fd56ad9398fad944b.tar.bz2 |
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.
------------------------------------------------------------------------
llvm-svn: 352854
-rw-r--r-- | clang/include/clang/Basic/Features.def | 2 | ||||
-rw-r--r-- | clang/test/SemaObjC/enum-fixed-type.m | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/clang/include/clang/Basic/Features.def b/clang/include/clang/Basic/Features.def index 05464ed..8b3b59b 100644 --- a/clang/include/clang/Basic/Features.def +++ b/clang/include/clang/Basic/Features.def @@ -96,7 +96,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) diff --git a/clang/test/SemaObjC/enum-fixed-type.m b/clang/test/SemaObjC/enum-fixed-type.m index 88c895a..b4135a5 100644 --- a/clang/test/SemaObjC/enum-fixed-type.m +++ b/clang/test/SemaObjC/enum-fixed-type.m @@ -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 |