1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 301142 - [semantic highlighting] Exception is logged

This commit is contained in:
Anton Leherbauer 2010-01-29 08:41:56 +00:00
parent f7abbce100
commit 486834554b

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2009 IBM Corporation and others. * Copyright (c) 2000, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -510,7 +510,7 @@ public class SemanticHighlightings {
return false; return false;
} }
IBinding binding= token.getBinding(); IBinding binding= token.getBinding();
if (binding instanceof ICPPMethod) { if (binding instanceof ICPPMethod && !(binding instanceof IProblemBinding)) {
try { try {
return ((ICPPMethod)binding).isStatic(); return ((ICPPMethod)binding).isStatic();
} catch (DOMException exc) { } catch (DOMException exc) {
@ -1992,7 +1992,7 @@ public class SemanticHighlightings {
if(node instanceof IASTImplicitName) { if(node instanceof IASTImplicitName) {
IASTImplicitName name = (IASTImplicitName) node; IASTImplicitName name = (IASTImplicitName) node;
IBinding binding = name.resolveBinding(); IBinding binding = name.resolveBinding();
if(binding instanceof ICPPMethod && ((ICPPMethod)binding).isImplicit()) { if(binding instanceof ICPPMethod && !(binding instanceof IProblemBinding) && ((ICPPMethod)binding).isImplicit()) {
return false; return false;
} }
char[] chars = name.toCharArray(); char[] chars = name.toCharArray();