[all-commits] [llvm/llvm-project] 79da30: [clang][AST] Handle dependent representation of ca...

Nathan Ridge via All-commits all-commits at lists.llvm.org
Fri Feb 14 13:19:41 PST 2025


  Branch: refs/heads/release/20.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 79da30bceea05b3096096ce613faf9a39f9cae2c
      https://github.com/llvm/llvm-project/commit/79da30bceea05b3096096ce613faf9a39f9cae2c
  Author: Nathan Ridge <zeratul976 at hotmail.com>
  Date:   2025-02-14 (Fri, 14 Feb 2025)

  Changed paths:
    M clang/lib/AST/Expr.cpp
    M clang/test/AST/ast-dump-cxx2b-deducing-this.cpp

  Log Message:
  -----------
  [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (#126868)

This fixes a crash where CallExpr::getBeginLoc() tries to access the
first argument of a CallExpr representing a call to a function with
an explicit object parameter, assuming that a first argument exists
because it's the object argument.

This is the case for non-dependent calls, but for dependent calls
the object argument is part of the callee (the semantic analysis
that separates it out has not been performed yet) and so there may
not be a first argument.

Fixes https://github.com/llvm/llvm-project/issues/126720

(cherry picked from commit 32c8754fbcb936ba6b5bc6cb6817cf3b6a4602f4)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list