Skip to content

Commit

Permalink
chore: remove unused variable (kythe#5953)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahms authored Dec 5, 2023
1 parent c0cba1d commit 2e7bd4a
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions kythe/cxx/indexer/cxx/IndexerASTHooks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2727,14 +2727,10 @@ bool IndexerASTVisitor::VisitVarDecl(const clang::VarDecl* Decl) {
auto NameRangeInContext =
RangeInCurrentContext(Decl->isImplicit(), DeclNode, NameRange);
for (const auto* NextDecl : Decl->redecls()) {
const clang::Decl* OuterTemplate = nullptr;
// It's not useful to draw completion edges to implicit forward
// declarations, nor is it useful to declare that a definition completes
// itself.
if (NextDecl != Decl && !NextDecl->isImplicit()) {
if (auto* VD = dyn_cast<const clang::VarDecl>(NextDecl)) {
OuterTemplate = VD->getDescribedVarTemplate();
}
FileID NextDeclFile =
Observer.getSourceManager()->getFileID(NextDecl->getLocation());
// We should not point a completes edge from an abs node to a var node.
Expand Down Expand Up @@ -3276,14 +3272,10 @@ bool IndexerASTVisitor::VisitRecordDecl(const clang::RecordDecl* Decl) {
if (auto NameRangeInContext =
RangeInCurrentContext(Decl->isImplicit(), DeclNode, NameRange)) {
for (const auto* NextDecl : Decl->redecls()) {
const clang::Decl* OuterTemplate = nullptr;
// It's not useful to draw completion edges to implicit forward
// declarations, nor is it useful to declare that a definition completes
// itself.
if (NextDecl != Decl && !NextDecl->isImplicit()) {
if (auto* CRD = dyn_cast<const clang::CXXRecordDecl>(NextDecl)) {
OuterTemplate = CRD->getDescribedClassTemplate();
}
FileID NextDeclFile =
Observer.getSourceManager()->getFileID(NextDecl->getLocation());
// We should not point a completes edge from an abs node to a record
Expand Down Expand Up @@ -3629,10 +3621,7 @@ bool IndexerASTVisitor::VisitFunctionDecl(clang::FunctionDecl* Decl) {
FileID DeclFile =
Observer.getSourceManager()->getFileID(Decl->getLocation());
for (const auto* NextDecl : Decl->redecls()) {
const clang::Decl* OuterTemplate = nullptr;
if (NextDecl != Decl) {
const clang::Decl* OuterTemplate =
NextDecl->getDescribedFunctionTemplate();
FileID NextDeclFile =
Observer.getSourceManager()->getFileID(NextDecl->getLocation());
GraphObserver::NodeId TargetDecl = BuildNodeIdForDecl(NextDecl);
Expand Down

0 comments on commit 2e7bd4a

Please sign in to comment.