================
@@ -1648,8 +1648,11 @@ SourceLocation CallExpr::getBeginLoc() const {
   if (const auto *Method =
           dyn_cast_if_present<const CXXMethodDecl>(getCalleeDecl());
       Method && Method->isExplicitObjectMemberFunction()) {
-    assert(getNumArgs() > 0 && getArg(0));
-    return getArg(0)->getBeginLoc();
+    if (!isTypeDependent()) {
+      assert(getNumArgs() > 0 && getArg(0));
+      if (getNumArgs() > 0 && getArg(0))
----------------
AaronBallman wrote:

IMO, the `assert` by itself is sufficient. Otherwise everyone is paying the 
overhead for the check which should never fail anyway.

https://github.com/llvm/llvm-project/pull/126868
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to