Page MenuHomePhabricator

[modules] Add PP callbacks for entering and leaving a submodule.
ClosedPublic

Authored by v.g.vassilev on May 23 2019, 2:06 AM.

Details

Reviewers
rsmith
bruno
Summary

Our usecase is that we would like to support making some modules visible (without corresponding #includes) while building a module.

Experimental implementation here: https://github.com/root-project/root/pull/3850/commits/cef39111ccff432e32db84952d0bb9b3aac8c7d5

Diff Detail

Repository
rC Clang

Event Timeline

v.g.vassilev created this revision.May 23 2019, 2:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2019, 2:06 AM

PPCallbacks seems to be missing the addition of EnteredSubmodule and LeftSubmodule; PPChainedCallbacks seems to be missing the addition of LeftSubmodule.

Generally this seems reasonable.

lib/Lex/PPLexerChange.cpp
741

Would it be useful to pass in the module (and maybe the import location) here?

jsji removed a subscriber: jsji.Jun 25 2019, 11:46 AM
v.g.vassilev marked an inline comment as done.

Add comments, add missing callbacks. Thanks Richard!

rsmith accepted this revision.Jun 27 2019, 3:18 PM
This revision is now accepted and ready to land.Jun 27 2019, 3:18 PM