tomasz-kaminski-sonarsource added a comment. I have updated the description and implementation. Will look at adding a unit test tomorrow.
================ Comment at: clang/lib/AST/DeclTemplate.cpp:1467 +SourceRange VarTemplatePartialSpecializationDecl::getSourceRange() const { + if (const Expr *Init = getInit()) { + SourceLocation InitEnd = Init->getEndLoc(); ---------------- erichkeane wrote: > Looking closer... VarDecl already includes its init in its source range, > right? So perhaps all that needs to happen here is to have the > `isExplicitSpecialization` check be : > > `isExplicitSpecialization() && !hasInit()` > > WDYT? Great suggestion. I really disliked the repetition. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146733/new/ https://reviews.llvm.org/D146733 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits