[clang] [analyzer] use `invalidateRegions()` in `VisitGCCAsmStmt` (PR #109838)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 30 06:15:44 PDT 2024
================
@@ -49,6 +63,6 @@ void testAsmWithVoidPtrArgument()
clang_analyzer_dump(*(int *)globalVoidPtr); // expected-warning-re {{reg_${{[0-9]+}}<int Element{SymRegion{reg_${{[0-9]+}}<void * globalVoidPtr>},0 S64b,int}>}}
clang_analyzer_dump_ptr(globalVoidPtr); // expected-warning-re {{&SymRegion{reg_${{[0-9]+}}<void * globalVoidPtr>}}}
asm ("" : : "a"(globalVoidPtr)); // no crash
- clang_analyzer_dump(*(int *)globalVoidPtr); // expected-warning {{Unknown}}
+ clang_analyzer_dump(*(int *)globalVoidPtr); // expected-warning-re {{derived_$3{conj_$2{int, LC1, S{{[0-9]+}}, #1},Element{SymRegion{reg_$0<void * globalVoidPtr>},0 S64b,int}}}}
----------------
steakhal wrote:
```suggestion
clang_analyzer_dump(*(int *)globalVoidPtr); // expected-warning {{derived_}}
```
I don't think we need to elaborate on this here.
https://github.com/llvm/llvm-project/pull/109838
More information about the cfe-commits
mailing list