aaron.ballman 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>();
----------------
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<>`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99517/new/

https://reviews.llvm.org/D99517

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to