Skip to content

Commit 276b23a

Browse files
author
git apple-llvm automerger
committed
Merge commit '0a1eff2ecedc' from llvm.org/main into next
2 parents 228ebbb + 0a1eff2 commit 276b23a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

clang/lib/StaticAnalyzer/Checkers/AssumeModeling.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ void AssumeModelingChecker::checkPostStmt(const AttributedStmt *A,
4545
continue;
4646

4747
const auto *Assumption = AssumptionVal.getAsInteger();
48-
assert(Assumption && "We should know the exact outcome of an assume expr");
4948
if (Assumption && Assumption->isZero()) {
5049
C.addSink();
5150
}

clang/test/Analysis/cxx23-assume-attribute.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,8 @@ int assume_and_fallthrough_at_the_same_attrstmt(int a, int b) {
6969

7070
return 0;
7171
}
72+
73+
void assume_opaque_gh151854_no_crash() {
74+
extern bool opaque();
75+
[[assume(opaque())]]; // no-crash
76+
}

0 commit comments

Comments
 (0)