From 54928ba0ec8355edbbdb31c7b01bb45eb2d384b6 Mon Sep 17 00:00:00 2001 From: Paula Toth Date: Tue, 10 Mar 2020 16:52:57 -0700 Subject: [PATCH] [clang-tidy] Use more widely available headers for protability-restrict-system-includes-check's test --- .../portability-restrict-system-includes-allow.cpp | 12 ++++++------ ...rtability-restrict-system-includes-disallow.cpp | 14 +++++++------- .../portability-restrict-system-includes-glob.cpp | 8 ++++---- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-allow.cpp b/clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-allow.cpp index faab977ad340..e3a9376a8638 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-allow.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-allow.cpp @@ -1,9 +1,9 @@ // RUN: %check_clang_tidy %s portability-restrict-system-includes %t \ -// RUN: -- -config="{CheckOptions: [{key: portability-restrict-system-includes.Includes, value: '*,-stdio.h'}]}" +// RUN: -- -config="{CheckOptions: [{key: portability-restrict-system-includes.Includes, value: '*,-stddef.h'}]}" -// Test block-list functionality: allow all but stdio.h. +// Test block-list functionality: allow all but stddef.h. -#include -// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include stdio.h not allowed -#include -#include +#include +// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include stddef.h not allowed +#include +#include diff --git a/clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-disallow.cpp b/clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-disallow.cpp index 58c1d4396ee5..f73cbbfc816d 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-disallow.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-disallow.cpp @@ -1,10 +1,10 @@ // RUN: %check_clang_tidy %s portability-restrict-system-includes %t \ -// RUN: -- -config="{CheckOptions: [{key: portability-restrict-system-includes.Includes, value: '-*,stdio.h'}]}" +// RUN: -- -config="{CheckOptions: [{key: portability-restrict-system-includes.Includes, value: '-*,stddef.h'}]}" -// Test allow-list functionality: disallow all but stdio.h. +// Test allow-list functionality: disallow all but stddef.h. -#include -#include -// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include stdlib.h not allowed -#include -// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include string.h not allowed +#include +#include +// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include stdint.h not allowed +#include +// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include float.h not allowed diff --git a/clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-glob.cpp b/clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-glob.cpp index ccde9438d93c..bee7ec73438c 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-glob.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-glob.cpp @@ -4,7 +4,7 @@ // Test glob functionality: disallow all headers except those that match // pattern "std*.h". -#include -#include -#include -// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include string.h not allowed +#include +#include +#include +// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: system include float.h not allowed