[clang] [Clang] Fix a crash when incorrectly calling an explicit object member function template (PR #75913)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 19 06:11:28 PST 2023


================
@@ -253,7 +253,9 @@ static void diagnoseInstanceReference(Sema &SemaRef,
     SemaRef.Diag(Loc, diag::err_member_call_without_object)
         << Range << /*static*/ 0;
   else {
-    const auto *Callee = dyn_cast<CXXMethodDecl>(Rep);
+    if (auto *Tpl = dyn_cast<FunctionTemplateDecl>(Rep))
----------------
Fznamznon wrote:

Perhaps a const can be added here.

https://github.com/llvm/llvm-project/pull/75913


More information about the cfe-commits mailing list