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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits