[PATCH] Add a truncation warning for values under a bitwise or
Dmitri Gribenko
gribozavr at gmail.com
Thu Feb 14 05:12:08 PST 2013
================
Comment at: lib/Sema/SemaChecking.cpp:4782
@@ +4781,3 @@
+static bool IsBitwiseOrWithConstant(Sema &S, llvm::APSInt &Value, Expr *E) {
+ E = E->IgnoreImpCasts();
+ if (const BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) {
----------------
IgnoreParenImpCasts? Does `x = (y | 0xfff);`work? Please add this test anyway.
http://llvm-reviews.chandlerc.com/D405
More information about the cfe-commits
mailing list