File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -2311,6 +2311,14 @@ TEST(FindReferences, WithinAST) {
23112311 $(S::deleteObject)[[de^lete]] S;
23122312 }
23132313 };
2314+ )cpp" ,
2315+ // Array designators
2316+ R"cpp(
2317+ const int $def[[F^oo]] = 0;
2318+ int Bar[] = {
2319+ [$(Bar)[[F^oo]]...$(Bar)[[Fo^o]] + 1] = 0,
2320+ [$(Bar)[[^Foo]] + 2] = 1
2321+ };
23142322 )cpp" };
23152323 for (const char *Test : Tests)
23162324 checkFindRefs (Test);
Original file line number Diff line number Diff line change @@ -435,6 +435,13 @@ class BodyIndexer : public RecursiveASTVisitor<BodyIndexer> {
435435 ParentDC, SymbolRoleSet (),
436436 /* Relations=*/ {}, E);
437437 }
438+ } else {
439+ if (D.isArrayDesignator ())
440+ TraverseStmt (E->getArrayIndex (D));
441+ else if (D.isArrayRangeDesignator ()) {
442+ TraverseStmt (E->getArrayRangeStart (D));
443+ TraverseStmt (E->getArrayRangeEnd (D));
444+ }
438445 }
439446 }
440447 return true ;
You can’t perform that action at this time.
0 commit comments