diff options
author | Kim Grasman <kim.grasman@gmail.com> | 2019-03-09 16:57:17 +0100 |
---|---|---|
committer | Kim Gräsman <kim.grasman@gmail.com> | 2019-03-14 17:00:29 +0100 |
commit | 452aeefb6e708f01bc8636bbd96b7a83b0df8811 (patch) | |
tree | 19c3d0354b63a225d7f630b09a7fbb84681ed069 | |
parent | 08af10228745a756a8bfbb7bc2a179b5bb4c9505 (diff) |
Remove now-unused IsCastToReferenceType
-rw-r--r-- | iwyu_ast_util.cc | 9 | ||||
-rw-r--r-- | iwyu_ast_util.h | 6 |
2 files changed, 0 insertions, 15 deletions
diff --git a/iwyu_ast_util.cc b/iwyu_ast_util.cc index 8f25649..ea601b7 100644 --- a/iwyu_ast_util.cc +++ b/iwyu_ast_util.cc @@ -1399,15 +1399,6 @@ const FunctionType* GetCalleeFunctionType(CallExpr* expr) { return callee_type->getAs<FunctionType>(); } -bool IsCastToReferenceType(const CastExpr* expr) { - if (const ExplicitCastExpr* explicit_cast = DynCastFrom(expr)) { - return explicit_cast->getTypeAsWritten()->isReferenceType(); - } else if (const ImplicitCastExpr* implicit_cast = DynCastFrom(expr)) { - return implicit_cast->getValueKind() == clang::VK_LValue; - } - CHECK_UNREACHABLE_("Unexpected type of cast expression"); -} - TemplateArgumentListInfo GetExplicitTplArgs(const Expr* expr) { TemplateArgumentListInfo explicit_tpl_args; if (const DeclRefExpr* decl_ref = DynCastFrom(expr)) diff --git a/iwyu_ast_util.h b/iwyu_ast_util.h index 0785be7..ac8707c 100644 --- a/iwyu_ast_util.h +++ b/iwyu_ast_util.h @@ -802,12 +802,6 @@ const clang::CXXDestructorDecl* GetSiblingDestructorFor( // Should never return nullptr. const clang::FunctionType* GetCalleeFunctionType(clang::CallExpr* expr); -// Figuring out whether the to-type is a reference or not is different -// depending on whether the cast is explicit or implicit. (You'd -// think it would work to just look at expr->getSubExpr()->getType(), -// but that seems to strip off the reference.) -bool IsCastToReferenceType(const clang::CastExpr* expr); - // Returns the list of explicit template args for all exprs that support // such a concept (declrefexpr, memberexpr), and empty list if none is present. clang::TemplateArgumentListInfo GetExplicitTplArgs(const clang::Expr* expr); |