mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 23:55:26 +02:00
Bug 458317 - Fix an NPE in MethodHighlighting.consumes()
Change-Id: I6a88e26aa60d57dd8c95079672ce0c1ceff8b3d7 Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
This commit is contained in:
parent
796991a0e4
commit
6fc37b10e7
2 changed files with 14 additions and 3 deletions
|
@ -426,4 +426,12 @@ public class SemanticHighlightingTest extends TestCase {
|
|||
public void testCStructureName_451772() throws Exception {
|
||||
makeAssertions(false /* parse as C file */);
|
||||
}
|
||||
|
||||
// template <typename T> //$templateParameter
|
||||
// void foo(T t) { //$functionDeclaration,templateParameter,parameterVariable
|
||||
// bar(t); //$function,parameterVariable
|
||||
// }
|
||||
public void testNPE_458317() throws Exception {
|
||||
makeAssertions();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -486,9 +486,12 @@ public class SemanticHighlightings {
|
|||
if (binding instanceof ICPPMethod) {
|
||||
return true;
|
||||
} else if (binding instanceof ICPPDeferredFunction) {
|
||||
for (ICPPFunction candidate : ((ICPPDeferredFunction) binding).getCandidates()) {
|
||||
if (candidate instanceof ICPPMethod) {
|
||||
return true;
|
||||
ICPPFunction[] candidates = ((ICPPDeferredFunction) binding).getCandidates();
|
||||
if (candidates != null) {
|
||||
for (ICPPFunction candidate : candidates) {
|
||||
if (candidate instanceof ICPPMethod) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue