[clang] [Clang] prevent null explicit object argument from being deduced (PR #104328)
Oleksandr T. via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 15 12:49:08 PDT 2024
================
@@ -4462,6 +4462,9 @@ TemplateDeductionResult Sema::DeduceTemplateArguments(
ParamTypesForArgChecking.push_back(ParamType);
if (ParamIdx == 0 && HasExplicitObject) {
+ if (ObjectType.isNull())
+ return TemplateDeductionResult::InvalidExplicitArguments;
----------------
a-tarasyuk wrote:
@mizvekov thanks for your feedback. I assumed `TemplateDeductionResult::AlreadyDiagnosed` was intended for situations where the checker has already detected errors. Is it? Should I revert these changes, or would opening a new issue/PR be better?
/cc @cor3ntin
https://github.com/llvm/llvm-project/pull/104328
More information about the cfe-commits
mailing list