diff options
author | Mark de Wever <koraq@xs4all.nl> | 2023-12-09 15:50:18 +0100 |
---|---|---|
committer | Mark de Wever <koraq@xs4all.nl> | 2023-12-09 15:50:18 +0100 |
commit | b5a6e8a433e9ecc0e3a05fc428d515f3a12413cf (patch) | |
tree | a018e30f05a01234760eaef525ae68306f81285c | |
parent | 4cfdef76a2228b1b52df82fc83f58b9453397d98 (diff) | |
download | llvm-b5a6e8a433e9ecc0e3a05fc428d515f3a12413cf.zip llvm-b5a6e8a433e9ecc0e3a05fc428d515f3a12413cf.tar.gz llvm-b5a6e8a433e9ecc0e3a05fc428d515f3a12413cf.tar.bz2 |
[NFC][libc++] Rewrites a return statement.
This fixes a clang-tidy diagnostic when building libc++ with RTTI
disabled. This was originally part of #65518.
-rw-r--r-- | libcxx/include/any | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libcxx/include/any b/libcxx/include/any index 516fd6d..7dcffc4 100644 --- a/libcxx/include/any +++ b/libcxx/include/any @@ -194,9 +194,7 @@ namespace __any_imp if (__id && *__id == typeid(_Tp)) return true; #endif - if (!__id && __fallback_id == __any_imp::__get_fallback_typeid<_Tp>()) - return true; - return false; + return !__id && __fallback_id == __any_imp::__get_fallback_typeid<_Tp>(); } template <class _Tp> |