riccibruno added a comment.

@rsmith I have modified this patch to address your comment above (we should 
track where default argument(s) and/or default member initializer(s) were 
used). You accepted this originally but I would like to make sure that you are 
happy with the updated patch.

I was also confused for a while about the example:

  int a;
  struct S { int b = ++a; };
  void Test() {
    int c = S{}.b + a; // Warn in C++14 and above, but not before.
  }

I *think* that this should warn in C++14 and above, because `S` is an aggregate 
in C++14 and above, and the default member initializers of an aggregate are 
also part of the full-expression containing the initialization of the aggregate 
(`[intro.execution]p12`).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81003



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D81003: [clang] Sequen... Bruno Ricci via Phabricator via cfe-commits

Reply via email to