summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker/ArrayBoundChecker.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
commit230ddf37af25b6e015af6a2485857ed41566c6af (patch)
tree6d64ba7d0e92a24697da4050ccc64f5dd3152f0f /clang/lib/Checker/ArrayBoundChecker.cpp
parent269f322110d7ed20f15eb40a85c70e7e3dbbd7ea (diff)
downloadbcm5719-llvm-230ddf37af25b6e015af6a2485857ed41566c6af.tar.gz
bcm5719-llvm-230ddf37af25b6e015af6a2485857ed41566c6af.zip
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?) llvm-svn: 113480
Diffstat (limited to 'clang/lib/Checker/ArrayBoundChecker.cpp')
-rw-r--r--clang/lib/Checker/ArrayBoundChecker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Checker/ArrayBoundChecker.cpp b/clang/lib/Checker/ArrayBoundChecker.cpp
index 98345bd7037..cf2a2fcf62f 100644
--- a/clang/lib/Checker/ArrayBoundChecker.cpp
+++ b/clang/lib/Checker/ArrayBoundChecker.cpp
@@ -51,7 +51,7 @@ void ArrayBoundChecker::VisitLocation(CheckerContext &C, const Stmt *S, SVal l){
return;
// Get the index of the accessed element.
- DefinedOrUnknownSVal &Idx = cast<DefinedOrUnknownSVal>(ER->getIndex());
+ DefinedOrUnknownSVal Idx = cast<DefinedOrUnknownSVal>(ER->getIndex());
const GRState *state = C.getState();
OpenPOWER on IntegriCloud