summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-rename/USRLocFinder.cpp
diff options
context:
space:
mode:
authorKirill Bobyrev <omtcyfz@gmail.com>2016-07-28 10:31:16 +0000
committerKirill Bobyrev <omtcyfz@gmail.com>2016-07-28 10:31:16 +0000
commit1081ccf85593f916794c1f94f3eed0de9023a199 (patch)
tree483e8d0b9cc450d5a52f9af9306e0e8935f09385 /clang-tools-extra/clang-rename/USRLocFinder.cpp
parentfe68d81709304f9f109d2e88435dae054e21bad9 (diff)
downloadbcm5719-llvm-1081ccf85593f916794c1f94f3eed0de9023a199.tar.gz
bcm5719-llvm-1081ccf85593f916794c1f94f3eed0de9023a199.zip
[clang-rename] remove redundant *_cast<> traversal
llvm-svn: 276971
Diffstat (limited to 'clang-tools-extra/clang-rename/USRLocFinder.cpp')
-rw-r--r--clang-tools-extra/clang-rename/USRLocFinder.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/clang-tools-extra/clang-rename/USRLocFinder.cpp b/clang-tools-extra/clang-rename/USRLocFinder.cpp
index 834396d8869..5ab155874ab 100644
--- a/clang-tools-extra/clang-rename/USRLocFinder.cpp
+++ b/clang-tools-extra/clang-rename/USRLocFinder.cpp
@@ -95,22 +95,6 @@ public:
return true;
}
- bool VisitCXXStaticCastExpr(clang::CXXStaticCastExpr *Expr) {
- return handleCXXNamedCastExpr(Expr);
- }
-
- bool VisitCXXDynamicCastExpr(clang::CXXDynamicCastExpr *Expr) {
- return handleCXXNamedCastExpr(Expr);
- }
-
- bool VisitCXXReinterpretCastExpr(clang::CXXReinterpretCastExpr *Expr) {
- return handleCXXNamedCastExpr(Expr);
- }
-
- bool VisitCXXConstCastExpr(clang::CXXConstCastExpr *Expr) {
- return handleCXXNamedCastExpr(Expr);
- }
-
// Other visitors:
bool VisitTypeLoc(const TypeLoc Loc) {
@@ -139,24 +123,6 @@ public:
}
}
- bool handleCXXNamedCastExpr(clang::CXXNamedCastExpr *Expr) {
- clang::QualType Type = Expr->getType();
- // See if this a cast of a pointer.
- const RecordDecl *Decl = Type->getPointeeCXXRecordDecl();
- if (!Decl) {
- // See if this is a cast of a reference.
- Decl = Type->getAsCXXRecordDecl();
- }
-
- if (Decl && getUSRForDecl(Decl) == USR) {
- SourceLocation Location =
- Expr->getTypeInfoAsWritten()->getTypeLoc().getBeginLoc();
- checkAndAddLocation(Location);
- }
-
- return true;
- }
-
private:
void checkAndAddLocation(SourceLocation Loc) {
const auto BeginLoc = Loc;
OpenPOWER on IntegriCloud