diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-02-20 05:19:30 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-02-20 05:19:30 +0000 |
commit | 779747c85e865f4dc7c3ea9076de879cbff4680e (patch) | |
tree | a03332efeb71a1b63bb3f799e0954a8fd3018429 /lib/Analysis/RegionStore.cpp | |
parent | 8d10cdd9aa1d58f1898adf7752a7026f151ebc04 (diff) |
Add an example in comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65110 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r-- | lib/Analysis/RegionStore.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index fe0ae17203..e2a1d36182 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -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? |