Add getSize() support for StringRegion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59930 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp
index 05d311d..cdc8b27 100644
--- a/lib/Analysis/RegionStore.cpp
+++ b/lib/Analysis/RegionStore.cpp
@@ -272,9 +272,8 @@
}
if (const StringRegion* SR = dyn_cast<StringRegion>(R)) {
- // FIXME: Unsupported yet.
- SR = 0;
- return UnknownVal();
+ const StringLiteral* Str = SR->getStringLiteral();
+ return NonLoc::MakeVal(getBasicVals(), Str->getByteLength(), false);
}
if (const AnonTypedRegion* ATR = dyn_cast<AnonTypedRegion>(R)) {