This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Propagate header-guarded flag from preamble to main AST
ClosedPublic

Authored by sammccall on Jul 16 2021, 5:18 PM.

Diff Detail

Event Timeline

sammccall created this revision.Jul 16 2021, 5:18 PM
sammccall requested review of this revision.Jul 16 2021, 5:18 PM
sammccall updated this revision to Diff 359499.Jul 16 2021, 5:19 PM

revert unintended change

kadircet accepted this revision.Jul 19 2021, 10:13 AM

thanks!

clang-tools-extra/clangd/Preamble.cpp
87

nit: maybe do this at the top and keep the early exit?

400

any reason for not making this part of the constructor ?

This revision is now accepted and ready to land.Jul 19 2021, 10:13 AM

Sorry, forgot to address the style comments. Will send a followup patch.

clang-tools-extra/clangd/Preamble.cpp
87

that makes sense if ParsedCallback is the "main line" case that we're bailing out of (which is how it was written before), but I don't really see it that way.

400

I think this pattern of constructor (long list of args, forwards them into public fields) isn't terribly useful, but I should have been consistent here.

Will send a cleanup.