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 | f11096c99ce40cfb7eb02f86a612133deb8c1b58 (patch) | |
tree | 8ff60c1c0264a2e00a624ed5eed1d695275d221c /clang/lib/Sema/Sema.cpp | |
parent | ea14705c8c7370be38523b0b808f084a6848608d (diff) | |
download | bcm5719-llvm-f11096c99ce40cfb7eb02f86a612133deb8c1b58.tar.gz bcm5719-llvm-f11096c99ce40cfb7eb02f86a612133deb8c1b58.zip |
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.
llvm-svn: 112066
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r-- | clang/lib/Sema/Sema.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index 31d6f0dd324..2e8827ddec9 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/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()); |