[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-19 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added reviewers: rtrieu, aaron.ballman. manojgupta added a comment. Thanks, Adding a few more reviewers since I am not very familiar with this part of clang. Please also update the patch description as suggested by @thakis CHANGES SINCE LAST ACTION

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-19 Thread Denis Nikitin via Phabricator via cfe-commits
denik added a comment. Manoj, please check updated diff. Comment at: clang/test/Frontend/warning-poison-system-directories.c:12 +// Missing target but included sysroot still causes the warning. +// RUN: %clang -Wpoison-system-directories -I/usr/include --sysroot

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-19 Thread Denis Nikitin via Phabricator via cfe-commits
denik updated this revision to Diff 215958. denik marked 3 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52524/new/ https://reviews.llvm.org/D52524 Files: clang/include/clang/Basic/DiagnosticCommonKinds.td clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-19 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added inline comments. Comment at: clang/test/Frontend/warning-poison-system-directories.c:12 +// Missing target but included sysroot still causes the warning. +// RUN: %clang -Wpoison-system-directories -I/usr/include --sysroot

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-19 Thread Denis Nikitin via Phabricator via cfe-commits
denik marked 2 inline comments as done. denik added inline comments. Comment at: clang/include/clang/Basic/DiagnosticGroups.td:1071 +// cross-compiling. +def PoisonSystemDirectories : DiagGroup<"poison-system-directories">; + manojgupta wrote: > Please verify

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-19 Thread Denis Nikitin via Phabricator via cfe-commits
denik updated this revision to Diff 215945. denik added a comment. Changed Wpoison-system-directories warning to be disabled by default. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52524/new/ https://reviews.llvm.org/D52524 Files: clang/include/clang/Basic/DiagnosticCommonKinds.td

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-15 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Ok, makes sense, thanks for explaining. Please add a summary of that discussion to the patch description / commit message :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52524/new/ https://reviews.llvm.org/D52524

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-14 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added inline comments. Comment at: clang/include/clang/Basic/DiagnosticGroups.td:1071 +// cross-compiling. +def PoisonSystemDirectories : DiagGroup<"poison-system-directories">; + Please verify that the warning is not enabled by default. CHANGES

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-14 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. In D52524#1630767 , @thakis wrote: > Wouldn't those projects just move to also disabling the warning by passing > -Wno-poison-system-directories? If there are projects that are actively > adding -I/usr/include, that means

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-14 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Wouldn't those projects just move to also disabling the warning by passing -Wno-poison-system-directories? If there are projects that are actively adding -I/usr/include, that means they're consciously fighting the build system and you've kind of already lost, no? Can't

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-14 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. In D52524#1621468 , @thakis wrote: > Couldn't cross build users just pass -nostdsysteminc to tell clang to not > look in system header locations? My understanding is "-nostdsysteminc " does not block users from passing

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-14 Thread Denis Nikitin via Phabricator via cfe-commits
denik updated this revision to Diff 215271. denik added a comment. Fixed clang-format. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52524/new/ https://reviews.llvm.org/D52524 Files: clang/include/clang/Basic/DiagnosticCommonKinds.td clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-14 Thread Denis Nikitin via Phabricator via cfe-commits
denik updated this revision to Diff 215260. denik added a comment. Herald added a subscriber: ormris. Updated the code (removed Diag propagation). Added test cases. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52524/new/ https://reviews.llvm.org/D52524 Files:

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-08 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Couldn't cross build users just pass -nostdsysteminc to tell clang to not look in system header locations? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52524/new/ https://reviews.llvm.org/D52524

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-08 Thread Denis Nikitin via Phabricator via cfe-commits
denik commandeered this revision. denik added a reviewer: yunlian. denik added a comment. Herald added a project: clang. Taking ownership of the change as Yunlian is no longer working on this CL. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52524/new/

[PATCH] D52524: Add -Wno-poison-system-directories flag

2018-09-25 Thread Yunlian Jiang via Phabricator via cfe-commits
yunlian created this revision. Herald added a subscriber: cfe-commits. When using clang as a cross-compiler, we should not use system headers or libraries to do the compilation. This CL creates a new warning flag -Wpoison-system-directories support to emit warnings if --sysroot is set and