Refactored apply_if helper functions

This commit is contained in:
Bartek Kryza
2023-06-01 00:06:32 +02:00
parent ae44c2413b
commit 112f7cb806
5 changed files with 21 additions and 18 deletions

View File

@@ -163,7 +163,7 @@ std::string to_string(const clang::QualType &type, const clang::ASTContext &ctx,
// Try to get rid of 'type-parameter-X-Y' ugliness
if (result.find("type-parameter-") != std::string::npos) {
util::apply_if_not_null(
util::if_not_null(
common::dereference(type)->getAs<clang::TypedefType>(),
[&result, &type](auto *p) {
auto [unqualified_type, context] =