Author: Kazu Hirata Date: 2024-04-18T21:00:13-07:00 New Revision: bd676f00b80a064e1d377a758aec5b7ae6814e5f
URL: https://github.com/llvm/llvm-project/commit/bd676f00b80a064e1d377a758aec5b7ae6814e5f DIFF: https://github.com/llvm/llvm-project/commit/bd676f00b80a064e1d377a758aec5b7ae6814e5f.diff LOG: [Sema] Fix a warning This patch fixes clang/lib/Sema/SemaStmtAttr.cpp:114:18: error: unused variable 'R' [-Werror,-Wunused-variable] Added: Modified: clang/lib/Sema/SemaStmtAttr.cpp Removed: ################################################################################ diff --git a/clang/lib/Sema/SemaStmtAttr.cpp b/clang/lib/Sema/SemaStmtAttr.cpp index fbeffda95cee76..7cd494b42250d4 100644 --- a/clang/lib/Sema/SemaStmtAttr.cpp +++ b/clang/lib/Sema/SemaStmtAttr.cpp @@ -114,6 +114,7 @@ static Attr *handleLoopHintAttr(Sema &S, Stmt *St, const ParsedAttr &A, ExprResult R = S.VerifyIntegerConstantExpression(ValueExpr, &ValueAPS); assert(!R.isInvalid() && "unroll count value must be a valid value, it's " "should be checked in Sema::CheckLoopHintExpr"); + (void)R; // The values of 0 and 1 block any unrolling of the loop. if (ValueAPS.isZero() || ValueAPS.isOne()) SetHints(LoopHintAttr::UnrollCount, LoopHintAttr::Disable); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits