]> granicus.if.org Git - clang/commitdiff
Add an example in comments.
authorZhongxing Xu <xuzhongxing@gmail.com>
Fri, 20 Feb 2009 05:19:30 +0000 (05:19 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Fri, 20 Feb 2009 05:19:30 +0000 (05:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65110 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/RegionStore.cpp

index fe0ae17203ad35197bd79bcbfae75173fbf3f173..e2a1d3618225b800bf899c7c2caa72ff89aa52ad 100644 (file)
@@ -559,8 +559,13 @@ SVal RegionStoreManager::Retrieve(const GRState* St, Loc L, QualType T) {
   //  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?