aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2011-09-15 23:57:21 +0000
committerRichard Trieu <rtrieu@google.com>2011-09-15 23:57:21 +0000
commitc3ba24f8af1ded9ec494960061f544e953dc4abf (patch)
tree1592543322a0608608e6a183d9150c8b519b3d97 /lib/Sema/SemaExpr.cpp
parent5e3a23585f6e2f397be6ead14fee6b9c1b110fb1 (diff)
Remove no longer needed LHSType and RHSType from checkArithmeticNull()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139879 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 73c8283dbd..0f92c296e4 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -7691,9 +7691,7 @@ static void checkArithmeticNull(Sema &S, ExprResult &LHS, ExprResult &RHS,
bool LHSNull = isa<GNUNullExpr>(LHS.get()->IgnoreParenImpCasts());
bool RHSNull = isa<GNUNullExpr>(RHS.get()->IgnoreParenImpCasts());
- QualType LHSType = LHS.get()->getType();
- QualType RHSType = RHS.get()->getType();
- QualType NonNullType = LHSNull ? RHSType : LHSType;
+ QualType NonNullType = LHSNull ? RHS.get()->getType() : LHS.get()->getType();
// Avoid analyzing cases where the result will either be invalid (and
// diagnosed as such) or entirely valid and not something to warn about.