njames93 added inline comments.

================
Comment at: 
clang-tools-extra/clang-tidy/llvmlibc/RestrictSystemLibcHeadersCheck.cpp:40
+    SrcMgr::CharacteristicKind FileType) {
+  if (SrcMgr::isSystem(FileType)) {
+    if (!SM.isInMainFile(HashLoc)) {
----------------
abrachet wrote:
> Could you whitelist the freestanding/compiler provided headers like stddef, 
> stdatomic...
Or have a user configurable whitelist 


================
Comment at: 
clang-tools-extra/clang-tidy/llvmlibc/RestrictSystemLibcHeadersCheck.cpp:42
+    if (!SM.isInMainFile(HashLoc)) {
+      auto D = Check.diag(
+          HashLoc,
----------------
Don't use auto when the type isn't an iterator or spelled out on the 
initialisation. 


================
Comment at: 
clang-tools-extra/clang-tidy/llvmlibc/RestrictSystemLibcHeadersCheck.cpp:47
+    } else {
+      auto D = Check.diag(HashLoc, "system libc header %0 not allowed");
+      D << FileName;
----------------
Ditto


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75332



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to