[PATCH] D138062: [clang] Don't include C++ Standard Library headers when -nostdinc is used

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 15 14:04:56 PST 2022


ldionne created this revision.
ldionne added reviewers: MaskRay, phosek, arphaman.
Herald added subscribers: pmatos, asb, abrachet, StephenFan, jgravelle-google, sbc100, dschuff.
Herald added a project: All.
ldionne requested review of this revision.
Herald added subscribers: cfe-commits, aheejin.
Herald added a project: clang.

This is a follow-up to 53c98d85a <https://reviews.llvm.org/rG53c98d85a8a609552448043d5512e70313b1eb1b>, which made the same change but only
for GNU. It seems that we should try to provide a consistent behavior
across all targets.

This fixes an issue where clang/test/Driver/nostdincxx.cpp would start
failing on non-GNU targets because that test was too loose in its checks.
It would only check that 'file not found' was part of the error message,
but didn't ensure that the file we had not found was <vector>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138062

Files:
  clang/lib/Driver/ToolChains/Darwin.cpp
  clang/lib/Driver/ToolChains/Fuchsia.cpp
  clang/lib/Driver/ToolChains/MinGW.cpp
  clang/lib/Driver/ToolChains/WebAssembly.cpp
  clang/test/Driver/darwin-header-search-libcxx.cpp
  clang/test/Driver/nostdincxx.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138062.475572.patch
Type: text/x-patch
Size: 6235 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221115/045523b1/attachment.bin>


More information about the cfe-commits mailing list