[PATCH] D83438: [AST] Fix potential nullptr dereference in Expr::HasSideEffects

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 13 12:13:11 PDT 2020


riccibruno added a comment.

I think that adding an unittest for such a simple fix is a bit heavy handed. What about just exercising this code path. For example:

  void Test(int N) {
    int arr[N];
    decltype([&arr]{}) *p; // expected-error {{lambda expression in an unevaluated operand}}
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83438





More information about the cfe-commits mailing list