1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-13 19:25:38 +02:00

Bug 509733 - Follow-up to exclude image locations of kind MACRO_DEFINITION

As per bug 344656 comment 5.

Change-Id: Ic28a4c9641533b6ee24d5a67cb8e104889ac4055
This commit is contained in:
Nathan Ridge 2017-01-10 00:52:11 -05:00
parent 8c74efdff4
commit 6132605f03

View file

@ -520,7 +520,9 @@ class OpenDeclarationsJob extends Job implements ASTRunnable {
if (name instanceof IASTName) { if (name instanceof IASTName) {
IASTName astName = (IASTName) name; IASTName astName = (IASTName) name;
IASTImageLocation imageLocation = astName.getImageLocation(); IASTImageLocation imageLocation = astName.getImageLocation();
if (imageLocation != null && astName.getTranslationUnit().getFilePath().equals(fileLocation.getFileName())) { if (imageLocation != null &&
imageLocation.getLocationKind() != IASTImageLocation.MACRO_DEFINITION &&
astName.getTranslationUnit().getFilePath().equals(fileLocation.getFileName())) {
fileLocation = imageLocation; fileLocation = imageLocation;
} }
} }