Skip to content

Commit 19541ed

Browse files
committed
use holds_alternative
1 parent ab36891 commit 19541ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/AST/ExprCXX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1864,7 +1864,7 @@ TypeTraitExpr::TypeTraitExpr(QualType T, SourceLocation Loc, TypeTrait Kind,
18641864
assert(static_cast<unsigned>(Kind) == TypeTraitExprBits.Kind &&
18651865
"TypeTraitExprBits.Kind overflow!");
18661866

1867-
TypeTraitExprBits.IsBooleanTypeTrait = Value.index() == 0;
1867+
TypeTraitExprBits.IsBooleanTypeTrait = std::holds_alternative<bool>(Value);
18681868
if (TypeTraitExprBits.IsBooleanTypeTrait)
18691869
TypeTraitExprBits.Value = std::get<bool>(Value);
18701870
else

0 commit comments

Comments
 (0)