ilya-biryukov added inline comments.

================
Comment at: clang-tools-extra/clangd/Hover.cpp:353
 
-  if (D) {
+  if (const auto *D = T->getAsTagDecl()) {
     HI.Kind = index::getSymbolInfo(D).Kind;
----------------
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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71597/new/

https://reviews.llvm.org/D71597



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to