From: Marshall Clow Date: Tue, 18 Mar 2014 14:13:10 +0000 (+0000) Subject: Added a __has_feature() for 'is_constructible' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5eb0349a726a8d7a8287d2c85b300f2cd0a9f6d8;p=clang Added a __has_feature() for 'is_constructible' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204153 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp index 78d4e14ccd..917d434c48 100644 --- a/lib/Lex/PPMacroExpansion.cpp +++ b/lib/Lex/PPMacroExpansion.cpp @@ -978,6 +978,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) { .Case("is_abstract", LangOpts.CPlusPlus) .Case("is_base_of", LangOpts.CPlusPlus) .Case("is_class", LangOpts.CPlusPlus) + .Case("is_constructible", LangOpts.CPlusPlus) .Case("is_convertible_to", LangOpts.CPlusPlus) .Case("is_empty", LangOpts.CPlusPlus) .Case("is_enum", LangOpts.CPlusPlus) diff --git a/test/Lexer/has_feature_type_traits.cpp b/test/Lexer/has_feature_type_traits.cpp index 0c2cfa56c4..f772d6d184 100644 --- a/test/Lexer/has_feature_type_traits.cpp +++ b/test/Lexer/has_feature_type_traits.cpp @@ -55,6 +55,11 @@ int is_class(); #endif // CHECK: int is_class(); +#if __has_feature(is_constructible) +int is_constructible(); +#endif +// CHECK: int is_constructible(); + #if __has_feature(is_convertible_to) int is_convertible_to(); #endif