[PATCH] D84144: [clangd] Remove TokenBuffer usage in TypeHierarchy
Aleksandr Platonov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 20 05:03:51 PDT 2020
ArcsinX marked an inline comment as done.
ArcsinX added inline comments.
================
Comment at: clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp:533
+
+ Annotations HeaderInPreambleAnnotations(R"cpp(
+struct Parent {
----------------
kadircet wrote:
> ArcsinX wrote:
> > kadircet wrote:
> > > this doesn't need to be an `Annotation` and sorry for missing it in the first pass but since this only has a single header, you can actually do something like:
> > >
> > > ```
> > > TestTU TU = TestTU::withCode(SourceAnnotations.code());
> > > TU.HeaderCode = "struct Parent { int a; }";
> > > ```
> > >
> > > and also drop the include directive in `SourceAnnotations` as `TU.HeaderCode` is implicitly included.
> > Seems now I need it to check selection range.
> right, you need annotations for the range, but you still can get away with just setting `TU.HeaderCode` instead of populating AdditionalFiles and including the header in the source. but not that important.
Thanks. fixed
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84144/new/
https://reviews.llvm.org/D84144
More information about the cfe-commits
mailing list