Author: Jie Fu Date: 2023-09-29T08:38:13+08:00 New Revision: b191ff01dc337e9a44e422b47cdc6d013cdf4bcf
URL: https://github.com/llvm/llvm-project/commit/b191ff01dc337e9a44e422b47cdc6d013cdf4bcf DIFF: https://github.com/llvm/llvm-project/commit/b191ff01dc337e9a44e422b47cdc6d013cdf4bcf.diff LOG: [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. Added: Modified: clang/lib/AST/ASTContext.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 5ce0b54166e0255..8917662c5336825 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -12935,7 +12935,8 @@ static QualType getCommonNonSugarTypeNode(ASTContext &Ctx, const Type *X, As, X->getCanonicalTypeInternal()); } case Type::Decltype: { - const auto *DX = cast<DecltypeType>(X), *DY = cast<DecltypeType>(Y); + const auto *DX = cast<DecltypeType>(X); + [[maybe_unused]] const auto *DY = cast<DecltypeType>(Y); assert(DX->isDependentType()); assert(DY->isDependentType()); assert(Ctx.hasSameExpr(DX->getUnderlyingExpr(), DY->getUnderlyingExpr())); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits