mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 536268 - Find uses of overloaded operators when checking for unused symbols
Change-Id: I4445b62d4419ffa12d505bcc8265492c22f49bb6
This commit is contained in:
parent
9b2a2c206d
commit
fa50ca7bc0
2 changed files with 13 additions and 0 deletions
|
@ -233,6 +233,7 @@ public class UnusedSymbolInFileScopeChecker extends AbstractIndexAstChecker {
|
|||
ast.accept(new ASTVisitor() {
|
||||
{
|
||||
shouldVisitNames = true;
|
||||
shouldVisitImplicitNames = true;
|
||||
shouldVisitDeclarations = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -346,4 +346,16 @@ public class UnusedSymbolInFileScopeCheckerTest extends CheckerTestCase {
|
|||
loadCodeAndRunCpp(getAboveComment());
|
||||
checkNoErrors();
|
||||
}
|
||||
|
||||
// class S {};
|
||||
// S operator+(S, S);
|
||||
//
|
||||
// int main() {
|
||||
// S a, b;
|
||||
// a + b;
|
||||
// }
|
||||
public void testOverloadedOperator_536268() throws Exception {
|
||||
loadCodeAndRunCpp(getAboveComment());
|
||||
checkNoErrors();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue