dtzWill accepted this revision. dtzWill added a comment. I've been bitten when attempting to use existence/nature of casts in the AST to reason about the original code, but this looks like it does the right thing in all the situations I can think of.
Missing overflows because of a bugged attempt to optimize the -O0 case would be unfortunate-- has this been tested and compared on larger codes (test-suite, other projects)? When it comes to C/C++ standards and constructs, it seems there's always some extension/language feature/flag that someone (ab)uses that you forgot all about when reasoning about these things abstractly... so it'd be good to see this checked out before the next major release. +1 to suggestion for a more readable name or wrapper for the common pattern of 'getUnwidenedIntegerType..hasValue()', if you get a chance. LGTM, thanks! https://reviews.llvm.org/D29369 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits