diff options
author | Yang Fan <nullptr.cpp@gmail.com> | 2021-02-10 11:15:39 +0800 |
---|---|---|
committer | Yang Fan <nullptr.cpp@gmail.com> | 2021-02-10 11:15:39 +0800 |
commit | 66ac53fe319be932d31ef96bdca34ad2b897cf04 (patch) | |
tree | db0234f3a637765dc7be1275a8b626d19c866c07 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 747c450e6f1f7238243150a6870daa6385476413 (diff) | |
download | llvm-66ac53fe319be932d31ef96bdca34ad2b897cf04.zip llvm-66ac53fe319be932d31ef96bdca34ad2b897cf04.tar.gz llvm-66ac53fe319be932d31ef96bdca34ad2b897cf04.tar.bz2 |
[clang][cli] Fix gcc "enumeral and non-enumeral type in conditional expression" warning (NFC)
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 928009eb..d06b2c9 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -386,7 +386,7 @@ template <typename T> static T extractForwardValue(T KeyPath) { template <typename T, typename U, U Value> static T extractMaskValue(T KeyPath) { - return ((KeyPath & Value) == Value) ? Value : T(); + return ((KeyPath & Value) == Value) ? static_cast<T>(Value) : T(); } #define PARSE_OPTION_WITH_MARSHALLING(ARGS, DIAGS, SUCCESS, ID, FLAGS, PARAM, \ |