[clang-tools-extra] [clang-tidy] Add avoid-pragma-once. (PR #140388)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Sat May 17 18:43:49 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]
----------------
zwuis wrote:
You can refer to this file https://github.com/llvm/llvm-project/blob/main/clang-tools-extra%2Ftest%2Fclang-tidy%2Fcheckers%2Fmisc%2Fheader-include-cycle.cpp .
https://github.com/llvm/llvm-project/pull/140388
More information about the cfe-commits
mailing list