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

Denis Nikitin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 28 17:54:17 PDT 2019


denik added a comment.

Hi Aaron,

Thank you for your review. I updated the diff with suggested changes.



================
Comment at: clang/include/clang/Basic/DiagnosticGroups.td:1072
+// cross-compiling.
+def PoisonSystemDirectories : DiagGroup<"poison-system-directories">;
+
----------------
aaron.ballman wrote:
> 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.
Added the change. Thanks.


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


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

https://reviews.llvm.org/D52524





More information about the cfe-commits mailing list