[clang] [clang][analyzer] Detect use-after-move for 3-arg std::move (PR #196602)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 8 01:43:25 PDT 2026
================
@@ -0,0 +1,52 @@
+// RUN: %clang_analyze_cc1 -std=c++17 \
+// RUN: -analyzer-checker=core,cplusplus.Move,alpha.cplusplus.IteratorModeling \
+// RUN: -analyzer-config aggressive-binary-operation-simplification=true \
+// RUN: -analyzer-config c++-container-inlining=false %s \
+// RUN: -verify -analyzer-config display-checker-name=false
----------------
steakhal wrote:
- indent
- drop `display-checker-name=false` - you probably don't need this
```suggestion
// RUN: %clang_analyze_cc1 -std=c++17 -verify %s \
// RUN: -analyzer-checker=core,cplusplus.Move,alpha.cplusplus.IteratorModeling \
// RUN: -analyzer-config aggressive-binary-operation-simplification=true \
// RUN: -analyzer-config c++-container-inlining=false
```
Why is `c++-container-inlining=false` necessary?
https://github.com/llvm/llvm-project/pull/196602
More information about the cfe-commits
mailing list