summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-03-21 21:03:48 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-03-21 21:03:48 +0000
commitc25c5e0ba23461a5d15e6eb77129fa750d28209a (patch)
treeec1d9deea8eaf0abb977cf683dc158f35290df72
parenta6983a9bce475937df894aa8fe359dc516eb3d0d (diff)
downloadbcm5719-llvm-c25c5e0ba23461a5d15e6eb77129fa750d28209a.tar.gz
bcm5719-llvm-c25c5e0ba23461a5d15e6eb77129fa750d28209a.zip
Remove unused variable, fix indentation.
llvm-svn: 153220
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
index 84366f434b9..65a6aacc67e 100644
--- a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
@@ -815,14 +815,12 @@ MallocChecker::getAllocationSite(const ExplodedNode *N, SymbolRef Sym,
// Find the most recent expression bound to the symbol in the current
// context.
- ProgramPoint L = N->getLocation();
if (!ReferenceRegion) {
- const MemRegion *MR = C.getLocationRegionIfPostStore(N);
- if (MR) {
- SVal Val = State->getSVal(MR);
- if (Val.getAsLocSymbol() == Sym)
- ReferenceRegion = MR;
- }
+ if (const MemRegion *MR = C.getLocationRegionIfPostStore(N)) {
+ SVal Val = State->getSVal(MR);
+ if (Val.getAsLocSymbol() == Sym)
+ ReferenceRegion = MR;
+ }
}
// Allocation node, is the last node in the current context in which the
OpenPOWER on IntegriCloud