[PATCH] D15411: [clang-tidy] Check for suspicious string assignments.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 10 10:09:19 PST 2015


aaron.ballman added a subscriber: aaron.ballman.
aaron.ballman added a comment.

In http://reviews.llvm.org/D15411#307030, @alexfh wrote:

> BTW, Richard, is the possibility of assignment of an integer to a std::string a bug in the standard?


This is the result of:

  basic_string& operator=(charT c);
  Returns: *this = basic_string(1,c).

So I believe it is by design.


http://reviews.llvm.org/D15411





More information about the cfe-commits mailing list