[all-commits] [llvm/llvm-project] bb41f8: [clangd] Correct SelectionTree behavior around ano...

Sam McCall via All-commits all-commits at lists.llvm.org
Wed Jun 30 08:45:01 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bb41f8569138f9f87baf7f4b4e26b3cdcdfd42c6
      https://github.com/llvm/llvm-project/commit/bb41f8569138f9f87baf7f4b4e26b3cdcdfd42c6
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2021-06-30 (Wed, 30 Jun 2021)

  Changed paths:
    M clang-tools-extra/clangd/Selection.cpp
    M clang-tools-extra/clangd/unittests/XRefsTests.cpp

  Log Message:
  -----------
  [clangd] Correct SelectionTree behavior around anonymous field access.

struct A { struct { int b; }; };
A().^b;

This should be considered a reference to b, but currently it's
considered a reference to the anonymous struct field.

Fixes https://github.com/clangd/clangd/issues/798

Differential Revision: https://reviews.llvm.org/D104376




More information about the All-commits mailing list