[clang-tools-extra] [clang-tidy] Add avoid-pragma-once. (PR #140388)

Tommy Chen via cfe-commits cfe-commits at lists.llvm.org
Sat May 17 23:01:29 PDT 2025


================
@@ -0,0 +1,5 @@
+// RUN: %check_clang_tidy %s portability-avoid-pragma-once %t \
+// RUN:   -- -- -isystem %S/Inputs/avoid-pragma-once
+
+#include <lib.h>
+// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: Avoid pragma once. [portability-avoid-pragma-once]
----------------
dl8sd11 wrote:

Thanks for the pointer. I fixed the test! Feel free to take a look.

https://github.com/llvm/llvm-project/pull/140388


More information about the cfe-commits mailing list