This is an archive of the discontinued LLVM Phabricator instance.

Lex: add a callback for `#pragma mark`
ClosedPublic

Authored by compnerd on Jul 2 2021, 12:57 PM.

Details

Summary

Allow a preprocessor observer to be notified of mark pragmas. Although
this does not impact code generation in any way, it is useful for other
clients, such as clangd, to be able to identify any marked regions.

Diff Detail

Event Timeline

compnerd created this revision.Jul 2 2021, 12:57 PM
compnerd requested review of this revision.Jul 2 2021, 12:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 2 2021, 12:57 PM
dgoldman accepted this revision.Jul 2 2021, 1:11 PM
This revision is now accepted and ready to land.Jul 2 2021, 1:11 PM
dgoldman added inline comments.Jul 2 2021, 2:04 PM
clang/unittests/Lex/PPCallbacksTest.cpp
119

should this be an std::string? not sure of the lifetime guarantees here

compnerd updated this revision to Diff 356273.Jul 2 2021, 2:06 PM

Correct lifetime of data in the tests.

This revision was landed with ongoing or failed builds.Jul 2 2021, 3:44 PM
This revision was automatically updated to reflect the committed changes.