1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

Bug 512297 - Improve propagation of semantic problem IDs

Change-Id: I3c95a244e88abe37f550370ff6c7c9aec2c102da
This commit is contained in:
Nathan Ridge 2017-09-27 20:34:40 -04:00
parent afe7d18793
commit a561d301ca

View file

@ -2224,8 +2224,15 @@ public class CPPSemantics {
}
// Select among those bindings that have been created without problems.
if (temp instanceof IProblemBinding)
if (temp instanceof IProblemBinding) {
// If this ProblemBinding was the only binding, return it rather than
// creating a new ProblemBinding below. This way the caller potentially
// gets a more specific error than SEMANTIC_NAME_NOT_FOUND.
if (items.length == 1) {
return temp;
}
continue;
}
if (!declaredBefore && !(temp instanceof ICPPMember) && !(temp instanceof IType) &&
!(temp instanceof IEnumerator)) {