aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/CStringChecker.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-09-09 10:51:37 +0000
committerGabor Greif <ggreif@gmail.com>2010-09-09 10:51:37 +0000
commit89b06584402a38933e108b66ded3a168cd492dff (patch)
treed7f7a4efb604c3db57235f4d8841a62f81a1c926 /lib/Checker/CStringChecker.cpp
parent96ebad66c451d79c9f57b1edb31efaeeb23b9a01 (diff)
do not bind temporaries to non-const references
this fixes all analyser test failures in my gcc34-based environment how the cast result could bind to the non-const ref is somewhat mysterious and remains to be investigated; to avoid similar miscompilations (by gcc34 only?) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113480 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/CStringChecker.cpp')
-rw-r--r--lib/Checker/CStringChecker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Checker/CStringChecker.cpp b/lib/Checker/CStringChecker.cpp
index 9ea572f90d..d61fdd437d 100644
--- a/lib/Checker/CStringChecker.cpp
+++ b/lib/Checker/CStringChecker.cpp
@@ -193,7 +193,7 @@ const GRState *CStringChecker::CheckLocation(CheckerContext &C,
DefinedOrUnknownSVal Size = cast<DefinedOrUnknownSVal>(Extent);
// Get the index of the accessed element.
- DefinedOrUnknownSVal &Idx = cast<DefinedOrUnknownSVal>(ER->getIndex());
+ DefinedOrUnknownSVal Idx = cast<DefinedOrUnknownSVal>(ER->getIndex());
const GRState *StInBound = state->AssumeInBound(Idx, Size, true);
const GRState *StOutBound = state->AssumeInBound(Idx, Size, false);