Skip to content

Commit

Permalink
fixed containment relation
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Dec 21, 2023
1 parent 30de6ad commit 4f4763e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lang/cpp/internal/BindingsResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,13 @@ private ISourceLocation ownedBinding(IBinding binding, String scheme, ISourceLoc

if ("cpp+translationUnit".equals(ownerLocation.getScheme())) {
location = URIUtil.correctLocation(scheme, "", binding.getName());
containment.append(vf.tuple(translationUnit, location));
ownerLocation = translationUnit;
}
else {
location = URIUtil.changeScheme(URIUtil.getChildLocation(ownerLocation, binding.getName()), scheme);
containment.append(vf.tuple(ownerLocation, location));
}

containment.append(vf.tuple(ownerLocation, location));
return location;
}

Expand Down Expand Up @@ -628,7 +628,7 @@ private ISourceLocation resolveCFunction(CFunction binding, ISourceLocation orig
ISourceLocation decl = URIUtil.changeScheme(URIUtil.getChildLocation(owner, binding.getName()), scheme);
decl = URIUtil.changePath(decl, decl.getPath() + parameters.toString());

containment.append(vf.tuple(owner, decl));
containment.append(vf.tuple(owner.getScheme().equals("cpp+translationUnit") ? translationUnit : owner, decl));
return decl;
}

Expand Down

0 comments on commit 4f4763e

Please sign in to comment.