This is mostly a workaround for
https://bugs.llvm.org/show_bug.cgi?id=42914. Once that is fixed, the
handling in VisitDeducedTyped() should be sufficient.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/clangd/unittests/XRefsTests.cpp | ||
---|---|---|
499 ↗ | (On Diff #235975) | could you rather add this test into FindTargetTests.cpp ? |
Thanks!
clang-tools-extra/clangd/FindTarget.cpp | ||
---|---|---|
361 | This needs a comment referencing the bug, and describing the consequence (we're going to miss the instantiation even when it's in principle known) |
Unit tests: pass. 61301 tests passed, 0 failed and 736 were skipped.
clang-tidy: fail. Please fix clang-tidy findings.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Unit tests: pass. 61301 tests passed, 0 failed and 736 were skipped.
clang-tidy: fail. Please fix clang-tidy findings.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
I'm also looking into fixing this in clang, this shouldn't be too hard.
But please land the workaround for now.
Here's my attempt at storing the deduced type in TypeLocs: D72442.
It almost worked, but still needs an update to fix some test failures.
The change proves it's possible to do this in principle, although it does require a few hacky tweaks to type and decl printing to make sure we produce the same output in diagnostics and other places that need it.
This needs a comment referencing the bug, and describing the consequence (we're going to miss the instantiation even when it's in principle known)