diff options
author | Jordy Rose <jediknil@belkadan.com> | 2011-08-24 20:38:42 +0000 |
---|---|---|
committer | Jordy Rose <jediknil@belkadan.com> | 2011-08-24 20:38:42 +0000 |
commit | f95b19de813017e6a4aa99d71dd40112197c3019 (patch) | |
tree | 1262f36b5eab3b546a416d85db6102a37b262766 /lib/StaticAnalyzer/Core/CFRefCount.cpp | |
parent | 0a61437425fba6d3975cd571a16b6dae76d1992a (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.cpp | 3 |
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); } |