aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/OSAtomicChecker.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-06-23 02:12:00 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-06-23 02:12:00 +0000
commit2470446eb264ceb4070d0e14cd0f1fef33c2e78c (patch)
tree20a142b71e2c7d1e9c94054e236f62a310669e8a /lib/Checker/OSAtomicChecker.cpp
parent71f219a20ea33390239da825c1b4c8b937a30609 (diff)
add comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106617 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/OSAtomicChecker.cpp')
-rw-r--r--lib/Checker/OSAtomicChecker.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Checker/OSAtomicChecker.cpp b/lib/Checker/OSAtomicChecker.cpp
index 44dcdd4230..1ea1bd98d6 100644
--- a/lib/Checker/OSAtomicChecker.cpp
+++ b/lib/Checker/OSAtomicChecker.cpp
@@ -102,7 +102,11 @@ bool OSAtomicChecker::EvalOSAtomicCompareAndSwap(CheckerContext &C,
SVal location = state->getSVal(theValueExpr);
// Here we should use the value type of the region as the load type, because
// we are simulating the semantics of the function, not the semantics of
- // passing argument.
+ // passing argument. So the type of theValue expr is not we are loading.
+ // But usually the type of the varregion is not the type we want either,
+ // we still need to do a CastRetrievedVal in store manager. So actually this
+ // LoadTy specifying can be omitted. But we put it here to emphasize the
+ // semantics.
QualType LoadTy;
if (const TypedRegion *TR =
dyn_cast_or_null<TypedRegion>(location.getAsRegion())) {