diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-25 18:07:12 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-25 18:07:12 +0000 |
commit | c1a3e5e73859ece9f106ae9d84c78bef4111956a (patch) | |
tree | 69169d264ef6b775ba1ceedb90a9bf5286469997 /lib/Sema/Sema.cpp | |
parent | 59a66946aa7723c7b14831aa50902d533baaa957 (diff) |
Initialize the translation-unit scope before lexing the first
token. The first token might be something that ends up triggering code
completion, which in turn requires a valid Scope. Test case forthcoming.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112066 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 31d6f0dd32..2e8827ddec 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -48,7 +48,7 @@ void FunctionScopeInfo::Clear(unsigned NumErrors) { BlockScopeInfo::~BlockScopeInfo() { } -void Sema::ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) { +void Sema::ActOnTranslationUnitScope(Scope *S) { TUScope = S; PushDeclContext(S, Context.getTranslationUnitDecl()); |