summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Lex/PPMacroExpansion.cpp1
-rw-r--r--clang/test/Lexer/has_feature_type_traits.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp
index 6a9d4abef1b..5315279f9a0 100644
--- a/clang/lib/Lex/PPMacroExpansion.cpp
+++ b/clang/lib/Lex/PPMacroExpansion.cpp
@@ -602,6 +602,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
.Case("is_trivial", LangOpts.CPlusPlus)
.Case("is_trivially_copyable", LangOpts.CPlusPlus)
.Case("is_union", LangOpts.CPlusPlus)
+ .Case("underlying_type", LangOpts.CPlusPlus)
.Case("tls", PP.getTargetInfo().isTLSSupported())
.Default(false);
}
diff --git a/clang/test/Lexer/has_feature_type_traits.cpp b/clang/test/Lexer/has_feature_type_traits.cpp
index 5da845f0651..f46165de3f2 100644
--- a/clang/test/Lexer/has_feature_type_traits.cpp
+++ b/clang/test/Lexer/has_feature_type_traits.cpp
@@ -99,3 +99,7 @@ int is_standard_layout();
int is_trivially_copyable();
#endif
// CHECK: int is_trivially_copyable();
+
+#if __has_feature(underlying_type)
+int underlying_type();
+#endif
OpenPOWER on IntegriCloud