rsmith added inline comments.
================
Comment at: clang/lib/Sema/SemaExpr.cpp:15441-15443
     // C++11 5.17p9:
     //   The meaning of x = {v} [...] is that of x = T(v) [...]. The meaning
     //   of x = {} is x = T().
----------------
The code change doesn't match this comment, which says we should use direct 
non-list initialization. Though the comment is slightly wrong / out of date: 
the standard text now says:

"an assignment to a scalar, in which case the initializer list shall have at 
most a single element. The meaning of `x = {v}`, where `T` is the scalar type 
of the expression `x`, is that of `x = T{v}`. The meaning of `x = {}` is `x = 
T{}`."

... which says to use direct list initialization to create a temporary in the 
scalar type case.


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

https://reviews.llvm.org/D153375

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

Reply via email to