1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-06 07:45:50 +02:00

Bug 340492 - Wrong coloring of template template parameters

This commit is contained in:
Anton Leherbauer 2011-03-31 14:23:29 +00:00
parent 82aa60a838
commit 4fd6f1407b
3 changed files with 9 additions and 4 deletions

View file

@ -143,3 +143,6 @@ int f()
//http://bugs.eclipse.org/220392
#define EMPTY
EMPTY int f();
//http://bugs.eclipse.org/340492
template< template<class> class U > class myClass {};

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2009 IBM Corporation and others.
* Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -27,7 +27,7 @@ import org.eclipse.cdt.internal.ui.editor.SemanticHighlightings;
*/
public class SemanticHighlightingTest extends AbstractSemanticHighlightingTest {
private static final boolean PRINT_POSITIONS= false;
private static final boolean PRINT_POSITIONS= true;
private static final Class<?> THIS= SemanticHighlightingTest.class;
@ -201,6 +201,7 @@ public class SemanticHighlightingTest extends AbstractSemanticHighlightingTest {
createPosition(85, 66, 2),
createPosition(136, 14, 1),
createPosition(139, 9, 1),
createPosition(147, 32, 1),
};
if (PRINT_POSITIONS) System.out.println(toString(actual));
assertEqualPositions(expected, actual);
@ -257,6 +258,7 @@ public class SemanticHighlightingTest extends AbstractSemanticHighlightingTest {
createPosition(118, 4, 9),
createPosition(120, 4, 8),
createPosition(129, 4, 8),
createPosition(147, 42, 7),
};
if (PRINT_POSITIONS) System.out.println(toString(actual));
assertEqualPositions(expected, actual);

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 IBM Corporation and others.
* Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -1226,7 +1226,7 @@ public class SemanticHighlightings {
}
if (node instanceof IASTName) {
IBinding binding= token.getBinding();
if (binding instanceof ICPPClassType) {
if (binding instanceof ICPPClassType && !(binding instanceof ICPPTemplateParameter)) {
return true;
}
}