sammccall marked an inline comment as done. sammccall added inline comments.
================ Comment at: clang/lib/Sema/SemaCodeComplete.cpp:4984 + if (Q && isApprox(Q->getAsType(), T)) + addType(NNS->getAsIdentifier()); + } ---------------- kadircet wrote: > sammccall wrote: > > kadircet wrote: > > > as T is dependent i suppose NNS should always be an identifier, but would > > > be nice to spell it out explicitly with a comment. > > It doesn't need to be an identifier - it returns null and addType handles > > null. > i thought NNS->getAsIdentifier had an assertion instead of returning null. > > out of curiosity, when can this be non identifier though ? In general (non-dependent code) NNS is normally a decl rather than an identifier. But here in particular it can certainly be a typespec: that's the T::foo<X>::bar case mentioned in the comment, I think the NNS stores a TemplateSpecializationType for foo<X>. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73649/new/ https://reviews.llvm.org/D73649 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits