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.


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to