diff options
author | Aleksandr Platonov <platonov.aleksandr@huawei.com> | 2025-06-13 18:32:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-13 18:32:42 +0300 |
commit | ca5040990ed17fa444d30c22fffcfa7ddc72612f (patch) | |
tree | 90e0ad06922278ab07f06a69a8f9c2a72121a8bf /clang/lib | |
parent | ec21b0fc9f64e8cffe689699d1e39533c62fcfc3 (diff) | |
download | llvm-ca5040990ed17fa444d30c22fffcfa7ddc72612f.zip llvm-ca5040990ed17fa444d30c22fffcfa7ddc72612f.tar.gz llvm-ca5040990ed17fa444d30c22fffcfa7ddc72612f.tar.bz2 |
[clangd] Collect references in array designators (#140356)
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Index/IndexBody.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Index/IndexBody.cpp b/clang/lib/Index/IndexBody.cpp index 2ed20df..98ce6f7 100644 --- a/clang/lib/Index/IndexBody.cpp +++ b/clang/lib/Index/IndexBody.cpp @@ -435,6 +435,13 @@ public: ParentDC, SymbolRoleSet(), /*Relations=*/{}, E); } + } else { + if (D.isArrayDesignator()) + TraverseStmt(E->getArrayIndex(D)); + else if (D.isArrayRangeDesignator()) { + TraverseStmt(E->getArrayRangeStart(D)); + TraverseStmt(E->getArrayRangeEnd(D)); + } } } return true; |