Skip to content

Commit b191ff0

Browse files
committed
[clang] Fix -Wunused-variable in ASTContext.cpp (NFC)
/llvm-project/clang/lib/AST/ASTContext.cpp:12938:46: error: unused variable 'DY' [-Werror,-Wunused-variable] const auto *DX = cast<DecltypeType>(X), *DY = cast<DecltypeType>(Y); ^ 1 error generated.
1 parent 06721bb commit b191ff0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/AST/ASTContext.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12935,7 +12935,8 @@ static QualType getCommonNonSugarTypeNode(ASTContext &Ctx, const Type *X,
1293512935
As, X->getCanonicalTypeInternal());
1293612936
}
1293712937
case Type::Decltype: {
12938-
const auto *DX = cast<DecltypeType>(X), *DY = cast<DecltypeType>(Y);
12938+
const auto *DX = cast<DecltypeType>(X);
12939+
[[maybe_unused]] const auto *DY = cast<DecltypeType>(Y);
1293912940
assert(DX->isDependentType());
1294012941
assert(DY->isDependentType());
1294112942
assert(Ctx.hasSameExpr(DX->getUnderlyingExpr(), DY->getUnderlyingExpr()));

0 commit comments

Comments
 (0)