1// RUN: %check_clang_tidy %s portability-avoid-pragma-once %t \
2// RUN: -- --header-filter='.*' -- -I%S/Inputs/avoid-pragma-once
3
4// #pragma once
5#include "lib0.h"
6// CHECK-MESSAGES: lib0.h:1:1: warning: avoid 'pragma once' directive; use include guards instead
7
8
9// # pragma once
10#include "lib1.h"
11// CHECK-MESSAGES: lib1.h:1:1: warning: avoid 'pragma once' directive; use include guards instead
12
13// # pragma once
14#include "lib2.h"
15// CHECK-MESSAGES: lib2.h:1:1: warning: avoid 'pragma once' directive; use include guards instead
16

source code of clang-tools-extra/test/clang-tidy/checkers/portability/avoid-pragma-once.cpp