[clang-tools-extra] [clang-tidy] Fix performance-trivially-destructible with C++20 modules (PR #178471)
Gareth Andrew Lloyd via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 29 10:17:31 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
----------------
Ignition wrote:
There is a problem when you have `-- --`. The empty list of clang-tidy flags is not processed properly and we end up getting an extra `--` being propagated and causes failure.
I couldn't make a quick fix to `check_clang_tidy.py` so I let the clang flags be passed into clang-tidy, and let it handle the unknown flags. Which AFICT is lenient and passes them as clang flags.
https://github.com/llvm/llvm-project/pull/178471
More information about the cfe-commits
mailing list