1// RUN: %check_clang_tidy %s portability-restrict-system-includes %t \
2// RUN: -- -config="{CheckOptions: {portability-restrict-system-includes.Includes: '-*,stddef.h'}}" \
3// RUN: -- -isystem %S/Inputs/restrict-system-includes/system
4
5// Test allow-list functionality: disallow all but stddef.h.
6
7#include <stddef.h>
8#include <stdint.h>
9// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include stdint.h not allowed
10#include <float.h>
11// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include float.h not allowed
12

source code of clang-tools-extra/test/clang-tidy/checkers/portability/restrict-system-includes-disallow.cpp