rsmith added a comment.
In addition to @riccibruno's comment, I found a couple of other suspicious
things nearby (unrelated to the fix in this patch). No need to address them in
this patch unless you feel motivated :)
================
Comment at: clang/lib/Sema/SemaChecking.cpp:13384
case Stmt::MemberExprClass: {
expr = cast<MemberExpr>(expr)->getBase();
break;
----------------
Hmm, don't we need to do different things for dot and arrow in this case?
================
Comment at: clang/lib/Sema/SemaChecking.cpp:13413
if (const Expr *lhs = cond->getLHS())
CheckArrayAccess(lhs);
if (const Expr *rhs = cond->getRHS())
----------------
Doesn't this need to preserve the `AllowOnePastEnd` value to avoid a false
positive for `&(cond ? arr1[N] : arr2[N])`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71714/new/
https://reviews.llvm.org/D71714
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits