[cfe-commits] r68183 - /cfe/trunk/docs/AnalyzerRegions.txt

Zhongxing Xu xuzhongxing at gmail.com
Tue Mar 31 20:23:38 PDT 2009


Author: zhongxingxu
Date: Tue Mar 31 22:23:38 2009
New Revision: 68183

URL: http://llvm.org/viewvc/llvm-project?rev=68183&view=rev
Log:
Update docs.

Modified:
    cfe/trunk/docs/AnalyzerRegions.txt

Modified: cfe/trunk/docs/AnalyzerRegions.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/AnalyzerRegions.txt?rev=68183&r1=68182&r2=68183&view=diff

==============================================================================
--- cfe/trunk/docs/AnalyzerRegions.txt (original)
+++ cfe/trunk/docs/AnalyzerRegions.txt Tue Mar 31 22:23:38 2009
@@ -70,6 +70,30 @@
   NOTE: We plan not to use loc::SymbolVal in RegionStore and remove it
   gradually.
 
+  Symbolic regions get their rvalue types through the following ways:
+  * through the parameter or global variable that points to it, e.g.:
+
+    void f(struct s* p) {
+      ...
+    }
+
+    The symbolic region pointed to by 'p' has type 'struct s'.
+
+  * through explicit or implicit casts, e.g.:
+    void f(void* p) {
+      struct s* q = (struct s*) p;
+      ...
+    }
+
+  We attach the type information to the symbolic region lazily. For the first
+  case above, we create the TypedViewRegion only when the pointer is actually
+  used to access the pointee memory object, that is when the element or field
+  region is created. For the cast case, the TypedViewRegion is created when
+  visiting the CastExpr.
+
+  The reason for doing lazy typing is that symbolic regions are sometimes only
+  used to do location comparison.
+
 Pointer Casts
 
 Pointer casts allow people to impose different 'views' onto a chunk of memory.





More information about the cfe-commits mailing list