[clang] [analyzer] Add missing expected-warning after #151908 (PR #152162)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 5 08:30:42 PDT 2025
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/152162
This should fix the bots like:
https://lab.llvm.org/buildbot/#/builders/10/builds/10899/steps/7/logs/FAIL__Clang__cxx23-assume-attribute_cpp
```
******************** TEST 'Clang :: Analysis/cxx23-assume-attribute.cpp' FAILED ********************
Exit Code: 1
Command Output (stderr):
--
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/clang -cc1 -internal-isystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/lib/clang/22/include -nostdsysteminc -analyze -setup-static-analyzer -std=c++23 -triple x86_64-pc-linux-gnu -analyzer-checker=core,debug.ExprInspection -verify /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/test/Analysis/cxx23-assume-attribute.cpp # RUN: at line 1
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/clang -cc1 -internal-isystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/lib/clang/22/include -nostdsysteminc -analyze -setup-static-analyzer -std=c++23 -triple x86_64-pc-linux-gnu -analyzer-checker=core,debug.ExprInspection -verify /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/test/Analysis/cxx23-assume-attribute.cpp
error: 'expected-warning' diagnostics seen but not expected:
File /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/test/Analysis/cxx23-assume-attribute.cpp Line 75: assumption is ignored because it contains (potential) side-effects
1 error generated.
--
********************
```
>From 6c9f1ce429809e5a91683ed6cef9a435047bebd1 Mon Sep 17 00:00:00 2001
From: Balazs Benics <benicsbalazs at gmail.com>
Date: Tue, 5 Aug 2025 17:28:49 +0200
Subject: [PATCH] [analyzer] Add missing expected-warning after #151908
---
clang/test/Analysis/cxx23-assume-attribute.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/clang/test/Analysis/cxx23-assume-attribute.cpp b/clang/test/Analysis/cxx23-assume-attribute.cpp
index dd15ff5d43505..4cc16446572dc 100644
--- a/clang/test/Analysis/cxx23-assume-attribute.cpp
+++ b/clang/test/Analysis/cxx23-assume-attribute.cpp
@@ -73,4 +73,5 @@ int assume_and_fallthrough_at_the_same_attrstmt(int a, int b) {
void assume_opaque_gh151854_no_crash() {
extern bool opaque();
[[assume(opaque())]]; // no-crash
+ // expected-warning at -1 {{assumption is ignored because it contains (potential) side-effects}}
}
More information about the cfe-commits
mailing list