[PATCH] D43741: [Analyzer] More accurate modeling about the increment operator of the operand with type bool.

Henry Wong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 2 02:28:42 PST 2018


MTC added a comment.

In https://reviews.llvm.org/D43741#1024949, @alexshap wrote:

> i see, but just in case - what about the decrement operator ?


@alexshap, If I'm not wrong, decrement operation is not allowed on bool type in C++98 and C++14.

> 5.2.6 Increment and decrement [expr.post.incr]
>  The operand of postfix -- is decremented analogously to the postfix ++ operator, except that the operand
>  shall not be of type bool. [ Note: For prefix increment and decrement, see 5.3.2. — end note ]




Repository:
  rC Clang

https://reviews.llvm.org/D43741





More information about the cfe-commits mailing list