[clang] [Clang] Diagnose invalid non-dependent calls in dependent contexts. (PR #190965)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 13 07:11:37 PDT 2026
================
@@ -4171,8 +4171,11 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto,
const Expr *ThisArg, ArrayRef<const Expr *> Args,
bool IsMemberFunction, SourceLocation Loc,
SourceRange Range, VariadicCallType CallType) {
- // FIXME: We should check as much as we can in the template definition.
- if (CurContext->isDependentContext())
+
+ if ((ThisArg && ThisArg->isInstantiationDependent()) ||
----------------
cor3ntin wrote:
I added a test - If the call expression is dependent, we will get another opportunity to run the checks
https://github.com/llvm/llvm-project/pull/190965
More information about the cfe-commits
mailing list