diff options
author | John McCall <rjmccall@apple.com> | 2010-08-25 08:40:02 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-25 08:40:02 +0000 |
commit | aab3e41eb2391fd6aeb6ff65adc78cf3d015af9f (patch) | |
tree | 6eae086730849fcad1e21036c70a3275857e18cd /clang/lib/Sema/SemaCodeComplete.cpp | |
parent | cfe41db403840e4b929db3e92f938f3da01bd772 (diff) | |
download | bcm5719-llvm-aab3e41eb2391fd6aeb6ff65adc78cf3d015af9f.tar.gz bcm5719-llvm-aab3e41eb2391fd6aeb6ff65adc78cf3d015af9f.zip |
Split FunctionScopeInfo and BlockScopeInfo into their own header.
llvm-svn: 112038
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r-- | clang/lib/Sema/SemaCodeComplete.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp index 4228bed9ee0..ad4382e09b3 100644 --- a/clang/lib/Sema/SemaCodeComplete.cpp +++ b/clang/lib/Sema/SemaCodeComplete.cpp @@ -16,6 +16,7 @@ #include "clang/Sema/CodeCompleteConsumer.h" #include "clang/Sema/ExternalSemaSource.h" #include "clang/Sema/Scope.h" +#include "clang/Sema/ScopeInfo.h" #include "clang/AST/DeclObjC.h" #include "clang/AST/ExprCXX.h" #include "clang/AST/ExprObjC.h" @@ -29,6 +30,7 @@ #include <vector> using namespace clang; +using namespace sema; namespace { /// \brief A container of code-completion results. @@ -1376,7 +1378,7 @@ static void AddOrdinaryNameResults(Action::ParserCompletionContext CCC, } // Switch-specific statements. - if (!SemaRef.getSwitchStack().empty()) { + if (!SemaRef.getCurFunction()->SwitchStack.empty()) { // case expression: Pattern = new CodeCompletionString; Pattern->AddTypedTextChunk("case"); @@ -2751,10 +2753,10 @@ void Sema::CodeCompleteTag(Scope *S, unsigned TagSpec) { } void Sema::CodeCompleteCase(Scope *S) { - if (getSwitchStack().empty() || !CodeCompleter) + if (getCurFunction()->SwitchStack.empty() || !CodeCompleter) return; - SwitchStmt *Switch = getSwitchStack().back(); + SwitchStmt *Switch = getCurFunction()->SwitchStack.back(); if (!Switch->getCond()->getType()->isEnumeralType()) { CodeCompleteExpressionData Data(Switch->getCond()->getType()); Data.IntegralConstantExpression = true; |