[PATCH] D153359: [clang][Diagnostics] Fix distant source ranges in bad-conversion notes
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 20 21:44:54 PDT 2023
tbaeder added a comment.
Can you post a before/after comparison of the exact output for that example?
================
Comment at: clang/lib/Sema/SemaOverload.cpp:10752
QualType ToTy = Conv.Bad.getToType();
+ ParmVarDecl *ToPVD = !isObjectArgument ? Fn->getParamDecl(I) : nullptr;
----------------
Can this be `const`?
================
Comment at: clang/lib/Sema/SemaOverload.cpp:10752
QualType ToTy = Conv.Bad.getToType();
+ ParmVarDecl *ToPVD = !isObjectArgument ? Fn->getParamDecl(I) : nullptr;
----------------
tbaeder wrote:
> Can this be `const`?
Actually, `ToPVD` is only used to access its source range later, isn't it? If so, can we just declare the a `ToPVDRange` or something here and use that later for diagnostics?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153359/new/
https://reviews.llvm.org/D153359
More information about the cfe-commits
mailing list