[clang-tools-extra] [clang-tidy] Fix performance-trivially-destructible with C++20 modules (PR #178471)
Victor Chernyakin via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 29 09:18:36 PST 2026
================
@@ -0,0 +1,27 @@
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+// RUN: split-file %s %t
+// RUN: %clang -std=c++20 -x c++-module --precompile %t/mymodule.cppm -o %t/mymodule.pcm -I%t
+// RUN: %check_clang_tidy %t/main.cpp performance-trivially-destructible %t/out -std=c++20 \
+// RUN: -- -I%t -fmodule-file=mymodule=%t/mymodule.pcm
----------------
localspook wrote:
All the tests pass... but I'm not sure how? AFAIK the syntax is
```cpp
// RUN: %check_clang_tidy -- <options to clang-tidy> -- <options to clang>
```
`-I%t` and `-fmodule-file=mymodule=%t/mymodule.pcm` are options to clang, but they come only after one `--`, so shouldn't clang-tidy be complaining about unrecognized arguments :thinking:
LGTM apart from that though
https://github.com/llvm/llvm-project/pull/178471
More information about the cfe-commits
mailing list