[all-commits] [llvm/llvm-project] 089b6e: [Index] Remove reference to `UnresolvedUsingIfExists`

Ben Barham via All-commits all-commits at lists.llvm.org
Fri Apr 22 17:20:01 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 089b6efefc3dbfc88e8fa92673eeb63ee78e4adf
      https://github.com/llvm/llvm-project/commit/089b6efefc3dbfc88e8fa92673eeb63ee78e4adf
  Author: Ben Barham <ben_barham at apple.com>
  Date:   2022-04-22 (Fri, 22 Apr 2022)

  Changed paths:
    M clang/lib/Index/IndexDecl.cpp
    A clang/test/Index/using_if_exists.cpp

  Log Message:
  -----------
  [Index] Remove reference to `UnresolvedUsingIfExists`

Assuming `ns::foo` doesn't exist, given:
```
using ns::foo __attribute__((using_if_exists));
```

The AST will look something like:
UsingDecl
  UsingShadowDecl
    UnresolvedUsingIfExistsDecl

Thus we end up adding a reference to `UnresolvedUsingIfExistsDecl` when
processing `UsingDecl`, but never add the decl itself. In this case the
decl is really the `UsingDecl` anyway though (which we do output), so it
makes more sense to just remove the extra reference.

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




More information about the All-commits mailing list