summaryrefslogtreecommitdiffstats
path: root/clang/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
commit9ff029993543e1258d83cdba75e70e21c60f432c (patch)
tree08cc44fcc97b8b3bf603752f4adf4d3a452813b1 /clang/lib/StaticAnalyzer/Core/CFRefCount.cpp
parent38eea65acdfe5fc86e48f91f55524b4347c1d031 (diff)
downloadbcm5719-llvm-9ff029993543e1258d83cdba75e70e21c60f432c.tar.gz
bcm5719-llvm-9ff029993543e1258d83cdba75e70e21c60f432c.zip
[analyzer] Silence an (incorrect) uninitialized variable warning, caught by Cameron.
llvm-svn: 138477
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/CFRefCount.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/CFRefCount.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp b/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp
index 25ec74ee444..9f48b6c6bbe 100644
--- a/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud