[cfe-commits] r88837 - /cfe/trunk/include/clang/Analysis/Visitors/CFGVarDeclVisitor.h

Douglas Gregor dgregor at apple.com
Sat Nov 14 23:17:25 PST 2009


Author: dgregor
Date: Sun Nov 15 01:17:25 2009
New Revision: 88837

URL: http://llvm.org/viewvc/llvm-project?rev=88837&view=rev
Log:
Remove an obviously-broken header, which still tries to refer to ScopedDecl.

Removed:
    cfe/trunk/include/clang/Analysis/Visitors/CFGVarDeclVisitor.h

Removed: cfe/trunk/include/clang/Analysis/Visitors/CFGVarDeclVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Visitors/CFGVarDeclVisitor.h?rev=88836&view=auto

==============================================================================
--- cfe/trunk/include/clang/Analysis/Visitors/CFGVarDeclVisitor.h (original)
+++ cfe/trunk/include/clang/Analysis/Visitors/CFGVarDeclVisitor.h (removed)
@@ -1,63 +0,0 @@
-//==- CFGVarDeclVisitor - Generic visitor of VarDecls in a CFG --*- C++ --*-==//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements the template class CFGVarDeclVisitor, which provides
-// a generic way to visit all the VarDecl's in a CFG.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_ANALYSIS_CFG_VARDECL_VISITOR_H
-#define LLVM_CLANG_ANALYSIS_CFG_VARDECL_VISITOR_H
-
-#include "clang/Analysis/Visitors/CFGStmtVisitor.h"
-#include "clang/AST/Decl.h"
-#include "clang/AST/Stmt.h"
-
-namespace clang {
-
-template <typename ImplClass>
-class CFGVarDeclVisitor : public CFGStmtVisitor<ImplClass> {
-  const CFG& cfg;
-public:
-  CFGVarDeclVisitor(const CFG& c) : cfg(c) {}
-
-  void VisitStmt(Stmt* S) {
-    static_cast<ImplClass*>(this)->VisitChildren(S);
-  }
-
-  void VisitDeclRefExpr(DeclRefExpr* DR) {
-    static_cast<ImplClass*>(this)->VisitDeclChain(DR->getDecl());
-  }
-
-  void VisitDeclStmt(DeclStmt* DS) {
-    static_cast<ImplClass*>(this)->VisitDeclChain(DS->getDecl());
-  }
-
-  void VisitDeclChain(ScopedDecl* D) {
-    for (; D != NULL ; D = D->getNextDeclarator())
-      static_cast<ImplClass*>(this)->VisitScopedDecl(D);
-  }
-
-  void VisitScopedDecl(ScopedDecl* D) {
-    if (VarDecl* V = dyn_cast<VarDecl>(D))
-      static_cast<ImplClass*>(this)->VisitVarDecl(V);
-  }
-
-  void VisitVarDecl(VarDecl* D) {}
-
-  void VisitAllDecls() {
-    for (CFG::const_iterator BI = cfg.begin(), BE = cfg.end(); BI != BE; ++BI)
-      for (CFGBlock::const_iterator SI=BI->begin(),SE = BI->end();SI != SE;++SI)
-        static_cast<ImplClass*>(this)->BlockStmt_Visit(const_cast<Stmt*>(*SI));
-  }
-};
-
-} // end namespace clang
-
-#endif





More information about the cfe-commits mailing list