ilya marked an inline comment as done.
ilya added a comment.

In D71714#1791464 <https://reviews.llvm.org/D71714#1791464>, @riccibruno wrote:

> These are not the only AST nodes representing cast expressions (there is also 
> `CXXFunctionalCastExpr`, ...). What about replacing the 
> `IgnoreParenImpCasts()` above by `IgnoreParenCasts()` ? Incidentally doing 
> this uncovers another test (`Parser/cxx-ambig-decl-expr.cpp )` where this 
> diagnostic is triggered.


Thanks, using `IgnoreParenCasts` is even better.



================
Comment at: clang/lib/Sema/SemaChecking.cpp:13384
       case Stmt::MemberExprClass: {
         expr = cast<MemberExpr>(expr)->getBase();
         break;
----------------
rsmith wrote:
> Hmm, don't we need to do different things for dot and arrow in this case?
There are several test cases for an out of bounds access on an array member 
using dot and arrow operators in array-bounds.cpp. Do you have a specific test 
case for which you think the code is broken?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71714



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

Reply via email to