[PATCH] D76015: [clang-tidy] Mock system headers for portability-restrict-system-includes tests.

Paula Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 11 12:30:11 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf1736f7a2a66: [clang-tidy] Mock system headers for portability-restrict-system-includes tests. (authored by PaulkaToast).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76015/new/

https://reviews.llvm.org/D76015

Files:
  clang-tools-extra/test/clang-tidy/checkers/Inputs/portability-restrict-system-includes/a.h
  clang-tools-extra/test/clang-tidy/checkers/Inputs/portability-restrict-system-includes/system/cstdarg.h
  clang-tools-extra/test/clang-tidy/checkers/Inputs/portability-restrict-system-includes/system/cstdlib.h
  clang-tools-extra/test/clang-tidy/checkers/Inputs/portability-restrict-system-includes/system/float.h
  clang-tools-extra/test/clang-tidy/checkers/Inputs/portability-restrict-system-includes/system/j.h
  clang-tools-extra/test/clang-tidy/checkers/Inputs/portability-restrict-system-includes/system/stddef.h
  clang-tools-extra/test/clang-tidy/checkers/Inputs/portability-restrict-system-includes/system/stdint.h
  clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-allow.cpp
  clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-disallow.cpp
  clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-glob.cpp


Index: clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-glob.cpp
===================================================================
--- clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-glob.cpp
+++ clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-glob.cpp
@@ -1,5 +1,6 @@
 // RUN: %check_clang_tidy %s portability-restrict-system-includes %t \
-// RUN:     -- -config="{CheckOptions: [{key: portability-restrict-system-includes.Includes, value: '-*,std*.h'}]}"
+// RUN:     -- -config="{CheckOptions: [{key: portability-restrict-system-includes.Includes, value: '-*,std*.h'}]}" \
+// RUN:     -- -isystem %S/Inputs/portability-restrict-system-includes/system
 
 // Test glob functionality: disallow all headers except those that match
 // pattern "std*.h".
Index: clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-disallow.cpp
===================================================================
--- clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-disallow.cpp
+++ clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-disallow.cpp
@@ -1,5 +1,6 @@
 // RUN: %check_clang_tidy %s portability-restrict-system-includes %t \
-// RUN:     -- -config="{CheckOptions: [{key: portability-restrict-system-includes.Includes, value: '-*,stddef.h'}]}"
+// RUN:     -- -config="{CheckOptions: [{key: portability-restrict-system-includes.Includes, value: '-*,stddef.h'}]}" \
+// RUN:     -- -isystem %S/Inputs/portability-restrict-system-includes/system
 
 // Test allow-list functionality: disallow all but stddef.h.
 
Index: clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-allow.cpp
===================================================================
--- clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-allow.cpp
+++ clang-tools-extra/test/clang-tidy/checkers/portability-restrict-system-includes-allow.cpp
@@ -1,5 +1,6 @@
 // RUN: %check_clang_tidy %s portability-restrict-system-includes %t \
-// RUN:     -- -config="{CheckOptions: [{key: portability-restrict-system-includes.Includes, value: '*,-stddef.h'}]}"
+// RUN:     -- -config="{CheckOptions: [{key: portability-restrict-system-includes.Includes, value: '*,-stddef.h'}]}" \
+// RUN:     -- -isystem %S/Inputs/portability-restrict-system-includes/system
 
 // Test block-list functionality: allow all but stddef.h.
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76015.249727.patch
Type: text/x-patch
Size: 2509 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200311/c2d67cb2/attachment-0001.bin>


More information about the cfe-commits mailing list