Author: Aiden Grossman Date: 2026-08-09T13:37:55-07:00 New Revision: 79341d1983b4b89f96987e9fcce8bd29df335a06
URL: https://github.com/llvm/llvm-project/commit/79341d1983b4b89f96987e9fcce8bd29df335a06 DIFF: https://github.com/llvm/llvm-project/commit/79341d1983b4b89f96987e9fcce8bd29df335a06.diff LOG: [Clang] Fix -Wunused-variable in #211482 (#215134) This is only used in asserts, so fails in a release build without asserts with -Werror -Wunused-variable with the latest clang. Added: Modified: clang/lib/Sema/SemaExprCXX.cpp Removed: ################################################################################ diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index 6cc80c8254a78..a76146a8d914f 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -2965,12 +2965,12 @@ ImplicitAllocationArguments::ImplicitAllocationArguments( PassAlignment(alignedAllocationModeFromBool(AlignArg)), IsMSVCCompatibilityFallback(IsMSVCCompatibilityFallback), ArgumentCount(0) { - ASTContext &Ctx = SemaRef.getASTContext(); if (TypeIdentityArg) { assert(SemaRef.isStdTypeIdentity(TypeIdentityArg->getType(), nullptr)); ImplicitArguments[ArgumentCount++] = TypeIdentityArg; } assert(SizeArg); + [[maybe_unused]] ASTContext &Ctx = SemaRef.getASTContext(); assert(Ctx.hasSameType(SizeArg->getType(), Ctx.getSizeType())); ImplicitArguments[ArgumentCount++] = SizeArg; if (AlignArg) { _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
