summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2008-11-03 06:04:23 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2008-11-03 06:04:23 +0000
commitc8c71979a6d4c24aec7b33d85d0d7f7147206a38 (patch)
treed34fa78532e2c58ca5025f1a355ca5f8bbc347f0
parent8ea09cc5428c3bbcf894c1df72e1abb7ff77369d (diff)
downloadbcm5719-llvm-c8c71979a6d4c24aec7b33d85d0d7f7147206a38.tar.gz
bcm5719-llvm-c8c71979a6d4c24aec7b33d85d0d7f7147206a38.zip
Add some notes for SCA.
llvm-svn: 58597
-rw-r--r--clang/lib/Analysis/NOTES.TXT31
1 files changed, 31 insertions, 0 deletions
diff --git a/clang/lib/Analysis/NOTES.TXT b/clang/lib/Analysis/NOTES.TXT
index 97b7bf7c010..54ce078c1d8 100644
--- a/clang/lib/Analysis/NOTES.TXT
+++ b/clang/lib/Analysis/NOTES.TXT
@@ -22,3 +22,34 @@ One is PredefinedExpr.
//===----------------------------------------------------------------------===//
Remove PersistentSValPairs and PersistentSVals?
+
+//===----------------------------------------------------------------------===//
+
+If the pointer is symbolic, we should expand it to a full region with symbolic
+values. This can eliminate the following false warning.
+
+struct file {
+ int lineno;
+};
+
+struct file *fileinfo;
+
+void f10() {
+ int i;
+ int *p = 0;
+
+ if (fileinfo->lineno)
+ p = &i;
+
+ if (fileinfo->lineno)
+ *p = 3; // false warning
+}
+
+Now we return a symbolic region for fileinfo->lineno in RegionStore. Loading
+from it returns an UnknownVal. Therefore the path condition is not recorded.
+
+Where should we call this ExpandSymbolicPointer method? Perhaps in
+GRExprEngine::VisitMemberExpr().
+
+Problem: The base expr of MemberExpr can be in various form. How do we get the
+pointer varregion(or other kind of region) to be changed?
OpenPOWER on IntegriCloud