aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/CFRefCount.cpp
diff options
context:
space:
mode:
authorJordy Rose <jediknil@belkadan.com>2011-08-24 20:38:42 +0000
committerJordy Rose <jediknil@belkadan.com>2011-08-24 20:38:42 +0000
commitf95b19de813017e6a4aa99d71dd40112197c3019 (patch)
tree1262f36b5eab3b546a416d85db6102a37b262766 /lib/StaticAnalyzer/Core/CFRefCount.cpp
parent0a61437425fba6d3975cd571a16b6dae76d1992a (diff)
[analyzer] Silence an (incorrect) uninitialized variable warning, caught by Cameron.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138477 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/CFRefCount.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/CFRefCount.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/CFRefCount.cpp b/lib/StaticAnalyzer/Core/CFRefCount.cpp
index 25ec74ee44..9f48b6c6bb 100644
--- a/lib/StaticAnalyzer/Core/CFRefCount.cpp
+++ b/lib/StaticAnalyzer/Core/CFRefCount.cpp
@@ -1923,7 +1923,7 @@ namespace {
} // end anonymous namespace
void CFRefReport::addGCModeDescription(const CFRefCount &TF) {
- const char *GCModeDescription;
+ const char *GCModeDescription = 0;
switch (TF.getLangOptions().getGCMode()) {
case LangOptions::GCOnly:
@@ -1950,6 +1950,7 @@ void CFRefReport::addGCModeDescription(const CFRefCount &TF) {
}
}
+ assert(GCModeDescription && "invalid/unknown GC mode");
addExtraText(GCModeDescription);
}