[PATCH] D52524: Add -Wpoison-system-directories warning

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 28 11:44:49 PDT 2019


aaron.ballman added inline comments.


================
Comment at: clang/include/clang/Basic/DiagnosticGroups.td:1072
+// cross-compiling.
+def PoisonSystemDirectories : DiagGroup<"poison-system-directories">;
+
----------------
Do you envision more warnings being added to this group? If not, I would recommend dropping this change and instead using `InGroup<DiagGroup<"poison-system-directories">>` in the diagnostic.


================
Comment at: clang/lib/Frontend/InitHeaderSearch.cpp:145
+      Headers.getDiags().Report(diag::warn_poison_system_directories)
+          << MappedPathStr.str();
+    }
----------------
I don't think you need the `.str()` here.


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

https://reviews.llvm.org/D52524





More information about the cfe-commits mailing list