summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Grasman <kim.grasman@gmail.com>2019-03-09 16:57:17 +0100
committerKim Gräsman <kim.grasman@gmail.com>2019-03-14 17:00:29 +0100
commit452aeefb6e708f01bc8636bbd96b7a83b0df8811 (patch)
tree19c3d0354b63a225d7f630b09a7fbb84681ed069
parent08af10228745a756a8bfbb7bc2a179b5bb4c9505 (diff)
Remove now-unused IsCastToReferenceType
-rw-r--r--iwyu_ast_util.cc9
-rw-r--r--iwyu_ast_util.h6
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);