[PATCH] D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls.
Josh Haberman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 12 10:42:24 PDT 2021
haberman marked an inline comment as done.
haberman added inline comments.
================
Comment at: clang/lib/Sema/SemaStmt.cpp:697-699
+ } else if (VD && dyn_cast<MemberPointerType>(VD->getType())) {
+ // Call is: obj->*method_ptr or obj.*method_ptr
+ const auto *MPT = VD->getType()->castAs<MemberPointerType>();
----------------
aaron.ballman wrote:
> I'm not certain if I should take a shower after writing that code or not, but it's one potential way not to perform the cast twice.
>
> If that code is too odious for others, we should at least change the `dyn_cast<>` in the `else if` to be an `isa<>`.
I changed `dyn_cast<>` to `isa<>`. If @rsmith concurs about the `dyn_cast_or_null<>` variant I'll switch to that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99517/new/
https://reviews.llvm.org/D99517
More information about the cfe-commits
mailing list