diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Checker/OSAtomicChecker.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Checker/OSAtomicChecker.cpp b/clang/lib/Checker/OSAtomicChecker.cpp index 44dcdd42307..1ea1bd98d6d 100644 --- a/clang/lib/Checker/OSAtomicChecker.cpp +++ b/clang/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())) { |