summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commit7a5c27276e8e01799ebf164c88442b5e4f265633 (patch)
tree6e109ad3d3cb3fb4cc9ce34f8166f3cb6cfe4a06 /clang/lib
parenta25995dbb40e09734e1a4afeda6ac8d03a73607c (diff)
downloadbcm5719-llvm-7a5c27276e8e01799ebf164c88442b5e4f265633.tar.gz
bcm5719-llvm-7a5c27276e8e01799ebf164c88442b5e4f265633.zip
Remove no longer needed LHSType and RHSType from checkArithmeticNull()
llvm-svn: 139879
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 73c8283dbd0..0f92c296e4f 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud