[PATCH] D146733: [clang] source range of variable template specialization should include initializer
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 23 09:48:40 PDT 2023
erichkeane added inline comments.
================
Comment at: clang/lib/AST/DeclTemplate.cpp:1467
+SourceRange VarTemplatePartialSpecializationDecl::getSourceRange() const {
+ if (const Expr *Init = getInit()) {
+ SourceLocation InitEnd = Init->getEndLoc();
----------------
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?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146733/new/
https://reviews.llvm.org/D146733
More information about the cfe-commits
mailing list