[PATCH] Add a truncation warning for values under a bitwise or
Sam Panzer
espanz at gmail.com
Thu Mar 28 12:12:57 PDT 2013
Xor checks disabled, indentation fixed, and one minor rephrasing later...and commited as r178273.
================
Comment at: lib/Sema/SemaChecking.cpp:5039-5040
@@ -4962,9 +5038,4 @@
- if (SourceRange.Width > TargetRange.Width) {
- // If the source is a constant, use a default-on diagnostic.
- // TODO: this should happen for bitfield stores, too.
- llvm::APSInt Value(32);
- if (E->isIntegerConstantExpr(Value, S.Context)) {
- if (S.SourceMgr.isInSystemMacro(CC))
- return;
-
+ llvm::APSInt Value(32);
+ Expr *NarrowedExpr = NULL;
+ // Use a default-on diagnostic if the source is involved in a
----------------
Richard Smith wrote:
> Some mysterious indentation has appeared here.
Now mysteriously un-indented.
http://llvm-reviews.chandlerc.com/D405
More information about the cfe-commits
mailing list