summaryrefslogtreecommitdiffstats
path: root/clang/tools/index-test/index-test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/index-test/index-test.cpp')
-rw-r--r--clang/tools/index-test/index-test.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/clang/tools/index-test/index-test.cpp b/clang/tools/index-test/index-test.cpp
index a188cd103ed..10449ed0baa 100644
--- a/clang/tools/index-test/index-test.cpp
+++ b/clang/tools/index-test/index-test.cpp
@@ -133,16 +133,9 @@ static void ProcessDecl(Decl *D) {
}
case PrintDecls :
- if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
- for (FunctionDecl::redecl_iterator I = FD->redecls_begin(),
- E = FD->redecls_end(); I != E; ++I)
- ASTLocation(*I).print(OS);
- } else if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
- for (VarDecl::redecl_iterator I = VD->redecls_begin(),
- E = VD->redecls_end(); I != E; ++I)
- ASTLocation(*I).print(OS);
- } else
- ASTLocation(D).print(OS);
+ for (Decl::redecl_iterator I = D->redecls_begin(),
+ E = D->redecls_end(); I != E; ++I)
+ ASTLocation(*I).print(OS);
break;
}
OpenPOWER on IntegriCloud