[PATCH] D38639: [clangd] #include statements support for Open definition

Marc-Andre Laperle via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 9 08:54:24 PST 2017


malaperle added a comment.

In https://reviews.llvm.org/D38639#920487, @ilya-biryukov wrote:

> I think we should never iterate through `SourceManager`, as it's much easier to get wrong than using the callbacks. I agree that all that fiddling with callbacks is unfortunate, but it's well worth the fact that it'd be much easier to tell that the implementation is correct by simply looking at the implementation and not knowing how `SourceManager` works. `PPCallbacks` is a much more direct API that was designed to handle our purposes.
>
> Note that we don't need to use `SourceManager` to find non-preamble includes, we should implement proper `PPCallbacks` and use them when building the AST.


Sounds good!


https://reviews.llvm.org/D38639





More information about the cfe-commits mailing list