diff options
| author | Alexis Hunt <alercah@gmail.com> | 2011-05-19 20:48:13 +0000 |
|---|---|---|
| committer | Alexis Hunt <alercah@gmail.com> | 2011-05-19 20:48:13 +0000 |
| commit | d6cbf0d4be49576ed6df225eb52e0de546b766b2 (patch) | |
| tree | 712408c3bf89dceb140271fb9839a0ac295677a2 | |
| parent | 3028e46e5725f956c9955aaef10d0a1649c1120a (diff) | |
| download | llvm-d6cbf0d4be49576ed6df225eb52e0de546b766b2.zip llvm-d6cbf0d4be49576ed6df225eb52e0de546b766b2.tar.gz llvm-d6cbf0d4be49576ed6df225eb52e0de546b766b2.tar.bz2 | |
Implement a __has_feature for __underlying_type
llvm-svn: 131672
| -rw-r--r-- | clang/lib/Lex/PPMacroExpansion.cpp | 1 | ||||
| -rw-r--r-- | clang/test/Lexer/has_feature_type_traits.cpp | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index 6a9d4ab..5315279 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 5da845f0..f46165d 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 |
