Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
Signed-off-by: Valentyn Yukhymenko <valentin.yukhymenko@gmail.com>
  • Loading branch information
BaLiKfromUA committed Sep 4, 2024
1 parent 4974bfa commit 3bab1b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion clang/lib/Sema/Metafunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4541,7 +4541,10 @@ CXXMethodDecl *getCXXMethodDeclFromDeclRefExpr(DeclRefExpr *DRE) {
}
}

return nullptr;
// if we reach this point
// then probably there is a bug in `is_nonstatic_member_function`
// or we failed to extract method from pointer
llvm_unreachable("failed to get member function from decl ref expression");
}

bool reflect_invoke(APValue &Result, Sema &S, EvalFn Evaluator,
Expand Down Expand Up @@ -4770,6 +4773,7 @@ bool reflect_invoke(APValue &Result, Sema &S, EvalFn Evaluator,

CXXMethodDecl *MD = getCXXMethodDeclFromDeclRefExpr(DRE);
if (!MD) {
// most likely, non-constexpr pointer to method was passed
return true;
}

Expand Down

0 comments on commit 3bab1b1

Please sign in to comment.