[cfe-commits] r97436 - /cfe/trunk/lib/Checker/RegionStore.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Sun Feb 28 21:29:02 PST 2010
Author: zhongxingxu
Date: Sun Feb 28 23:29:02 2010
New Revision: 97436
URL: http://llvm.org/viewvc/llvm-project?rev=97436&view=rev
Log:
Assert when loading from a code text region instead of returning an unknown silently.
Modified:
cfe/trunk/lib/Checker/RegionStore.cpp
Modified: cfe/trunk/lib/Checker/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/RegionStore.cpp?rev=97436&r1=97435&r2=97436&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/RegionStore.cpp (original)
+++ cfe/trunk/lib/Checker/RegionStore.cpp Sun Feb 28 23:29:02 2010
@@ -975,8 +975,10 @@
if (isa<AllocaRegion>(MR) || isa<SymbolicRegion>(MR))
MR = GetElementZeroRegion(MR, T);
- if (isa<CodeTextRegion>(MR))
+ if (isa<CodeTextRegion>(MR)) {
+ assert(0 && "Why load from a code text region?");
return UnknownVal();
+ }
// FIXME: Perhaps this method should just take a 'const MemRegion*' argument
// instead of 'Loc', and have the other Loc cases handled at a higher level.
More information about the cfe-commits
mailing list