[PATCH] D105439: [clang] protects users from relying on libc++ detail headers
Christopher Di Bella via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 5 10:10:24 PDT 2021
cjdb created this revision.
cjdb added reviewers: aaron.ballman, rsmith, manojgupta, gbiv, ldionne, EricWF.
Herald added a reviewer: george.burgess.iv.
cjdb requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
libc++ has started splicing standard library headers into much more
fine-grained content for maintainability. It's very likely that outdated
and naive tooling (some of which is outside of LLVM's scope) will
suggest users include things such as `<__algorithm/find.h>` instead of
`<algorithm>`, and Hyrum's law suggests that users will eventually begin
to rely on this without the help of tooling. As such, this commit
intends to protect users from themselves, by making it a hard error for
anyone outside of the standard library to include libc++ detail headers.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D105439
Files:
clang/include/clang/Basic/DiagnosticLexKinds.td
clang/lib/Lex/ModuleMap.cpp
clang/test/Modules/Inputs/libcxx-reserved/__libcxx/horde_prime.h
clang/test/Modules/Inputs/libcxx-reserved/__libcxx/princesses/she-ra.h
clang/test/Modules/Inputs/libcxx-reserved/module.modulemap
clang/test/Modules/Inputs/libcxx-reserved/princesses.h
clang/test/Modules/libcxx-reserved.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105439.356524.patch
Type: text/x-patch
Size: 5698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210705/f33f97dd/attachment-0001.bin>
More information about the cfe-commits
mailing list