Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2008-12-27 18:09:39 +0000
committerSergey Prigogin2008-12-27 18:09:39 +0000
commitaf7be7e3959bca1dca30aebcce203170d1c763c8 (patch)
tree33d5f362a8b21e4b4b4bc73fce65733720d66a75
parent72e0dffa3da147111e113e3f69ccb76e599af419 (diff)
downloadorg.eclipse.cdt-af7be7e3959bca1dca30aebcce203170d1c763c8.tar.gz
org.eclipse.cdt-af7be7e3959bca1dca30aebcce203170d1c763c8.tar.xz
org.eclipse.cdt-af7be7e3959bca1dca30aebcce203170d1c763c8.zip
Fixed an NPE.
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java
index 4802a64be6b..efc0da3659b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java
@@ -1966,7 +1966,7 @@ public class CPPVisitor extends ASTQueries {
return ((ITypeContainer) type).getType();
}
return new ProblemBinding(expression, IProblemBinding.SEMANTIC_INVALID_TYPE,
- ("*" + type.toString()).toCharArray()); //$NON-NLS-1$
+ expression.getRawSignature().toCharArray());
} catch (DOMException e) {
return e.getProblem();
}
@@ -2401,7 +2401,7 @@ public class CPPVisitor extends ASTQueries {
IASTName[] qn= ((ICPPASTQualifiedName) node).getNames();
if (qn.length < 2)
return null;
- return qn[qn.length-2].resolveBinding();
+ return qn[qn.length - 2].resolveBinding();
}
node= node.getParent();
}
@@ -2410,18 +2410,18 @@ public class CPPVisitor extends ASTQueries {
/**
* Searches for the first function, class or namespace enclosing the declaration the provided
- * node belongs to and returns the binding for it. Returns <code>null</code>, if the declaration is not
- * enclosed by any of the above constructs.
+ * node belongs to and returns the binding for it. Returns <code>null</code>, if the declaration
+ * is not enclosed by any of the above constructs.
*/
public static IBinding findDeclarationOwner(IASTNode node, boolean allowFunction) {
- // search for declaration
+ // Search for declaration
while (!(node instanceof IASTDeclaration)) {
if (node == null)
return null;
node= node.getParent();
}
-
- // search for enclosing binding
+
+ // Search for enclosing binding
IASTName name= null;
node= node.getParent();
for (; node != null; node= node.getParent()) {

Back to the top