mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 06:32:10 +02:00
Bug 532781 - Ensure the model builder looks up SourceManipulationInfo for anonymous namespaces in its local cache
Change-Id: I98ff370d4cd04254d8896409455fae61182fb3df
This commit is contained in:
parent
f80be34148
commit
a10fc3eafe
1 changed files with 5 additions and 4 deletions
|
@ -514,7 +514,9 @@ public class CModelBuilder2 implements IContributedModelBuilder {
|
|||
} else {
|
||||
final IASTFileLocation nsLocation= declaration.getFileLocation();
|
||||
if (nsLocation != null) {
|
||||
element.setIdPos(nsLocation.getNodeOffset(), type.length());
|
||||
// Note: don't want to call element.setIdPos(), because we want the SourceManipulationInfo
|
||||
// lookup to go through the local 'fNewElements' cache.
|
||||
getSourceManipulationInfo(element).setIdPos(nsLocation.getNodeOffset(), type.length());
|
||||
}
|
||||
}
|
||||
setBodyPosition(element, declaration);
|
||||
|
@ -1194,9 +1196,8 @@ public class CModelBuilder2 implements IContributedModelBuilder {
|
|||
*
|
||||
* @param element
|
||||
* @param astName
|
||||
* @throws CModelException
|
||||
*/
|
||||
private void setIdentifierPosition(SourceManipulation element, IASTName astName) throws CModelException {
|
||||
private void setIdentifierPosition(SourceManipulation element, IASTName astName) {
|
||||
setIdentifierPosition(getSourceManipulationInfo(element), astName);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue