We were traversing AST twice to get the Decl in case of sugared
types(auto, decltype). They seem to be same in practice, so this patch gets rid
of the second traversal and makes use of TagDecl inside QualType instead.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Unit tests: pass. 60932 tests passed, 0 failed and 726 were skipped.
clang-tidy: pass.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
clang-tools-extra/clangd/Hover.cpp | ||
---|---|---|
353 | This might be a functional change in case of typedefs. Could you check on these cases (not sure if we already have those in the tests): typedef int int_type; ^auto x = int_type(); struct cls {}; typedef cls cls_type; ^auto y = cls_type(); template <class> struct templ {}; ^auto z = templ<int>(); Note that I don't necessarily think they will change behavior, but they might. Also happy to LGTM as is if you remove "NFC" from the description. It seems we're potentially changing behvior, but it's not tested currently and we can land this, discover and fix any regreessions later. |
Unit tests: pass. 60932 tests passed, 0 failed and 726 were skipped.
clang-tidy: pass.
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
This might be a functional change in case of typedefs.
Could you check on these cases (not sure if we already have those in the tests):
Note that I don't necessarily think they will change behavior, but they might.
Also happy to LGTM as is if you remove "NFC" from the description. It seems we're potentially changing behvior, but it's not tested currently and we can land this, discover and fix any regreessions later.