Skip to content

[clang] Incorrect source range for explicit object calls when callee is pointer #144856

Open
@necto

Description

@necto

In Clang v20.1.7, the issue range for explicit object calls has been improved for . calls, but not for the -> calls. As you can observe on Compiler Explorer, the object is included in the range for the . calls, but for the -> call:

struct ExplicitThis {
  void member(this ExplicitThis const& self);
};

void test1(ExplicitThis* ptr, ExplicitThis& ref, ExplicitThis val) {
  ptr->member(); // Begin or CallExpr range is lost.
  ref.member(); // Improved range
  val.member(); // Improved range
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions