[cfe-commits] r65110 - /cfe/trunk/lib/Analysis/RegionStore.cpp

Zhongxing Xu xuzhongxing at gmail.com
Thu Feb 19 21:19:30 PST 2009


Author: zhongxingxu
Date: Thu Feb 19 23:19:30 2009
New Revision: 65110

URL: http://llvm.org/viewvc/llvm-project?rev=65110&view=rev
Log:
Add an example in comments.

Modified:
    cfe/trunk/lib/Analysis/RegionStore.cpp

Modified: cfe/trunk/lib/Analysis/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RegionStore.cpp?rev=65110&r1=65109&r2=65110&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)
+++ cfe/trunk/lib/Analysis/RegionStore.cpp Thu Feb 19 23:19:30 2009
@@ -559,8 +559,13 @@
   //  of a location but that value is not known.  In the future we should
   //  handle potential aliasing relationships; e.g. a loc::SymbolVal could
   //  be an alias for a particular region.
-  if (isa<loc::SymbolVal>(L))
+  // Example:
+  // void foo(char* buf) {
+  //   char c = *buf;
+  // }
+  if (isa<loc::SymbolVal>(L)) {
     return UnknownVal();
+  }
 
   // FIXME: Is this even possible?  Shouldn't this be treated as a null
   //  dereference at a higher level?





More information about the cfe-commits mailing list