projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da2ebb6
)
[flang] Dodge bogus G++ 8.1.0 build warning
author
peter klausler
<pklausler@nvidia.com>
Tue, 5 Mar 2019 01:02:48 +0000
(17:02 -0800)
committer
peter klausler
<pklausler@nvidia.com>
Tue, 5 Mar 2019 01:02:48 +0000
(17:02 -0800)
Original-commit: flang-compiler/f18@
582c6d1eca5bc29fddadae4d25e418da4ace2c11
Reviewed-on: https://github.com/flang-compiler/f18/pull/311
Tree-same-pre-rewrite: false
flang/lib/evaluate/expression.cc
patch
|
blob
|
history
diff --git
a/flang/lib/evaluate/expression.cc
b/flang/lib/evaluate/expression.cc
index
21bc222
..
857d876
100644
(file)
--- a/
flang/lib/evaluate/expression.cc
+++ b/
flang/lib/evaluate/expression.cc
@@
-204,12
+204,11
@@
std::optional<DynamicType> ExpressionBase<A>::GetType() const {
return std::visit(
[](const auto &x) -> std::optional<DynamicType> {
using Ty = std::decay_t<decltype(x)>;
- if constexpr (std::is_same_v<Ty, BOZLiteralConstant> ||
- std::is_same_v<Ty, NullPointer>) {
- return std::nullopt; // typeless really means "no type"
- } else {
+ if constexpr (!std::is_same_v<Ty, BOZLiteralConstant> &&
+ !std::is_same_v<Ty, NullPointer>) {
return x.GetType();
}
+ return std::nullopt; // typeless really means "no type"
},
derived().u);
}