[all-commits] [llvm/llvm-project] 90684d: [clangd] Collect references for externally visible...

Aleksandr Platonov via All-commits all-commits at lists.llvm.org
Mon Jul 27 05:36:44 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 90684d1545167ee4e0c93d8eaf6ba4a3c7ab710e
      https://github.com/llvm/llvm-project/commit/90684d1545167ee4e0c93d8eaf6ba4a3c7ab710e
  Author: Aleksandr Platonov <platonov.aleksandr at huawei.com>
  Date:   2020-07-27 (Mon, 27 Jul 2020)

  Changed paths:
    M clang-tools-extra/clangd/index/SymbolCollector.cpp
    M clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
    M clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp

  Log Message:
  -----------
  [clangd] Collect references for externally visible main-file symbols

Summary:
Without this patch clangd does not collect references for main-file symbols if there is no public declaration in preamble.
Example:
`test1.c`
```
void f1() {}
```

`test2.c`
```
extern void f1();
void f2() {
  f^1();
}
```
`Find all references` does not show definition of f1() in the result, but GTD works OK.

Reviewers: sammccall, kadircet

Reviewed By: kadircet

Subscribers: ilya-golovenko, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

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




More information about the All-commits mailing list