Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Ridge2017-09-28 00:34:40 +0000
committerNathan Ridge2018-11-13 22:46:50 +0000
commita561d301ca4b2b2e1e40297a2510e03536461b75 (patch)
treeb0ae4b5358487fd8cead19a73428395c9ff54356
parentafe7d1879386391a0d88ef2ff3f23c6d789c7287 (diff)
downloadorg.eclipse.cdt-a561d301ca4b2b2e1e40297a2510e03536461b75.tar.gz
org.eclipse.cdt-a561d301ca4b2b2e1e40297a2510e03536461b75.tar.xz
org.eclipse.cdt-a561d301ca4b2b2e1e40297a2510e03536461b75.zip
Bug 512297 - Improve propagation of semantic problem IDs
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java
index 28da07be9de..ee277b06bd3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java
@@ -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)) {

Back to the top