sammccall added a comment.

(I think this patch is good to go now, ready for a stamp if anyone agrees :-)).

In D120258#3340619 <https://reviews.llvm.org/D120258#3340619>, @Trass3r wrote:

> Ah ok explicit instantiation made the difference:

Interesting! Looks like we're traversing the bodies of explicitly instantiated 
templates.
This violates our assumption we're only traversing explicitly written code 
(here the instantiation is explicit but the bodies are not!)
This feels like a RecursiveASTVisitor bug, but IDK if we'll be able to fix it 
or need to hack around it.

In any case it's not specific to this change:

  template <typename T> void foo() {
    auto x = T{}; // x: short: int
  }
  template void foo<int>();
  template void foo<short>();


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120258

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

Reply via email to