[PATCH] D133108: [clang] Rework IsTailPaddedMemberArray into isFlexibleArrayMemberExpr

Martin Sebor via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 13 09:39:51 PDT 2022


msebor added inline comments.


================
Comment at: clang/lib/Sema/SemaChecking.cpp:15969
+  if (const MemberExpr *ME = dyn_cast<MemberExpr>(BaseExpr))
+    ND = ME->getMemberDecl();
+
----------------
I'm not familiar with this code but I'm guessing that at most one of the `if` conditionals is true, and if it's the first one then the second `dyn_cast` will fail.  Should the `if` guarding this assignment then be an `else if`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133108



More information about the cfe-commits mailing list