Skip to content

Commit 32c8beb

Browse files
shiltianronlieb
authored andcommitted
[Clang] Fix a crash introduced in PR#88666 (llvm#89567)
Change-Id: I0b7fb53576e77dec5c1843a99e89ec466ed63c89
1 parent b238526 commit 32c8beb

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

clang/lib/Sema/SemaStmtAttr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static Attr *handleLoopHintAttr(Sema &S, Stmt *St, const ParsedAttr &A,
109109
SetHints(LoopHintAttr::Unroll, LoopHintAttr::Disable);
110110
} else if (PragmaName == "unroll") {
111111
// #pragma unroll N
112-
if (ValueExpr) {
112+
if (ValueExpr && !ValueExpr->isValueDependent()) {
113113
llvm::APSInt ValueAPS;
114114
ExprResult R = S.VerifyIntegerConstantExpression(ValueExpr, &ValueAPS);
115115
assert(!R.isInvalid() && "unroll count value must be a valid value, it's "

revert_patches.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,3 @@ Revert :breaks hip catch tests.
99
1de7e6c8cba2 [clang] move -Wcast-function-type under -Wextra (#77178)
1010
999d4f840777 Split -Wcast-function-type into a separate group (#86131)
1111

12-
Revert; breaks build of rccl and blas and rocSolver
13-
* f4bbcac2 [Clang] Allow the value of unroll count to be zero in `#pragma GCC unroll` and `#pragma unroll` (#88666)
14-
Clang] Fix a crash introduced in PR#88666 (#89567)

0 commit comments

Comments
 (0)