[PATCH] D132779: Enforce module decl-use restrictions and private header restrictions in textual headers

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 26 20:08:12 PDT 2022


rsmith created this revision.
rsmith added reviewers: Bigcheese, aaron.ballman.
Herald added a project: All.
rsmith requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Per the documentation, these restrictions were intended to apply to textual headers but previously this didn't work because we decided there was no requesting module when the `#include` was in a textual header.

      

A `-cc1` flag is provided to restore the old behavior for transitionary purposes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132779

Files:
  clang/include/clang/Basic/LangOptions.def
  clang/include/clang/Driver/Options.td
  clang/include/clang/Lex/Preprocessor.h
  clang/lib/Lex/PPDirectives.cpp
  clang/test/Modules/Inputs/declare-use/module.map
  clang/test/Modules/Inputs/declare-use/textual.h
  clang/test/Modules/declare-use-textual.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132779.456076.patch
Type: text/x-patch
Size: 5672 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220827/44e7faaf/attachment.bin>


More information about the cfe-commits mailing list