mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-02 13:55:39 +02:00
Bug 511331 - Do not color entire qualified name with problem highlighting
Change-Id: Ic712ec2e03bdf03f5ae97019fb9ae8994c5dec23
This commit is contained in:
parent
a88b16d124
commit
ec3ab3016d
2 changed files with 15 additions and 0 deletions
|
@ -643,4 +643,14 @@ public class SemanticHighlightingTest extends TestCase {
|
||||||
public void testArgumentsOfFunctionTemplateSpecialization_510788() throws Exception {
|
public void testArgumentsOfFunctionTemplateSpecialization_510788() throws Exception {
|
||||||
makeAssertions();
|
makeAssertions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// struct Waldo { //$class
|
||||||
|
// static void find(); //$methodDeclaration
|
||||||
|
// };
|
||||||
|
// int main() { //$functionDeclaration
|
||||||
|
// Waldo::search(); //$class,problem
|
||||||
|
// }
|
||||||
|
public void testQualifiedName_511331() throws Exception {
|
||||||
|
makeAssertions();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1469,6 +1469,11 @@ public class SemanticHighlightings {
|
||||||
if (node instanceof IASTProblem) {
|
if (node instanceof IASTProblem) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (node instanceof ICPPASTQualifiedName) {
|
||||||
|
// Do not highlight entire qualified name. Allow those of its segments
|
||||||
|
// which resolve, to get a non-Problem highlighting.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
IBinding binding= token.getBinding();
|
IBinding binding= token.getBinding();
|
||||||
if (binding instanceof IProblemBinding) {
|
if (binding instanceof IProblemBinding) {
|
||||||
IProblemBinding problemBinding = (IProblemBinding) binding;
|
IProblemBinding problemBinding = (IProblemBinding) binding;
|
||||||
|
|
Loading…
Add table
Reference in a new issue