mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 06:02:11 +02:00
Bug 486082 - Have ProblemBindingChecker report errors of type IProblemBinding.SEMANTIC_INVALID_TYPE
Change-Id: I58f27a8783ea0dca53da5b45c2da11c6623892fd
This commit is contained in:
parent
bfe45e8c74
commit
bd6da0b03d
2 changed files with 11 additions and 0 deletions
|
@ -143,6 +143,10 @@ public class ProblemBindingChecker extends AbstractIndexAstChecker {
|
||||||
reportProblem(ERR_ID_InvalidTemplateArgumentsProblem, templateName, contextFlagsString);
|
reportProblem(ERR_ID_InvalidTemplateArgumentsProblem, templateName, contextFlagsString);
|
||||||
return PROCESS_CONTINUE;
|
return PROCESS_CONTINUE;
|
||||||
}
|
}
|
||||||
|
if (id == IProblemBinding.SEMANTIC_INVALID_TYPE) {
|
||||||
|
reportProblem(ERR_ID_TypeResolutionProblem, name, name.getRawSignature(), contextFlagsString);
|
||||||
|
return PROCESS_CONTINUE;
|
||||||
|
}
|
||||||
// From this point, we'll deal only with NAME_NOT_FOUND problems.
|
// From this point, we'll deal only with NAME_NOT_FOUND problems.
|
||||||
// If it's something else continue because we don't want to give bad messages.
|
// If it's something else continue because we don't want to give bad messages.
|
||||||
if (id != IProblemBinding.SEMANTIC_NAME_NOT_FOUND) {
|
if (id != IProblemBinding.SEMANTIC_NAME_NOT_FOUND) {
|
||||||
|
|
|
@ -117,4 +117,11 @@ public class ProblemBindingCheckerTest extends CheckerTestCase {
|
||||||
loadCodeAndRun(getAboveComment());
|
loadCodeAndRun(getAboveComment());
|
||||||
checkErrorLine(2, ProblemBindingChecker.ERR_ID_InvalidArguments);
|
checkErrorLine(2, ProblemBindingChecker.ERR_ID_InvalidArguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// template <typename> class Waldo {};
|
||||||
|
// Waldo w;
|
||||||
|
public void testInvalidTypeError_486082() throws Exception {
|
||||||
|
loadCodeAndRun(getAboveComment());
|
||||||
|
checkErrorLine(2, ProblemBindingChecker.ERR_ID_TypeResolutionProblem);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue