In MS-compatibility mode, we support the assume builtin. The assume builtin does not evaluate its arguments, and we should issue a warning if __assume is provided with an argument with side effects because these effects will be discarded.
This is similar in spirit to the warnings issued by other compilers (Intel Diagnostic 2261, MS Compiler Warning C4557).
The result currently looks like this:
<stdin>:3:12: warning: the argument to __assume has side effects that will be discarded __assume(++i > 2); ^~~~~~~ 1 warning generated.
This is neither necessary nor sufficient; the relevant thing here is Arg->isInstantiationDependent().