aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2012-07-23 20:21:35 +0000
committerRichard Trieu <rtrieu@google.com>2012-07-23 20:21:35 +0000
commite1ecdc168175719d74e112bcacd4aae5e12d4631 (patch)
tree3310709a9c9427a4c5677b77b3200ed83c8cd96e /lib/Sema/SemaChecking.cpp
parentf919985b6e3be23ec840f2c9d35bdf49890fe545 (diff)
Change APInt to APSInt in one instance. Also change a call to operator==() to
APSInt::isSameValue() when comparing different sized APSInt's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160641 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r--lib/Sema/SemaChecking.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index 2e92067665..73f9b01594 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/lib/Sema/SemaChecking.cpp
@@ -4259,7 +4259,7 @@ static bool AnalyzeBitFieldAssignment(Sema &S, FieldDecl *Bitfield, Expr *Init,
// Check whether the stored value is equal to the original value.
TruncatedValue = TruncatedValue.extend(OriginalWidth);
- if (Value == TruncatedValue)
+ if (llvm::APSInt::isSameValue(Value, TruncatedValue))
return false;
// Special-case bitfields of width 1: booleans are naturally 0/1, and