diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-03-09 05:15:28 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-03-09 05:15:28 +0000 |
| commit | 0098a4bd0434d9e65439748e08bc9b60d0220ca9 (patch) | |
| tree | 17a4d4c2b3b072f2e627284fa70ed9a73247df24 /clang/lib/Sema | |
| parent | 821b66669cc7ccd53221b1e4e7ad4dde861927d7 (diff) | |
| download | bcm5719-llvm-0098a4bd0434d9e65439748e08bc9b60d0220ca9.tar.gz bcm5719-llvm-0098a4bd0434d9e65439748e08bc9b60d0220ca9.zip | |
[Sema] Fix assertion hit with #pragma weak.
rdar://16264844
llvm-svn: 203372
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 1d5d9d12c1a..7817ca9efc5 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -4655,6 +4655,8 @@ void Sema::DeclApplyPragmaWeak(Scope *S, NamedDecl *ND, WeakInfo &W) { // to insert Decl at TU scope, sorry. DeclContext *SavedContext = CurContext; CurContext = Context.getTranslationUnitDecl(); + NewD->setDeclContext(CurContext); + NewD->setLexicalDeclContext(CurContext); PushOnScopeChains(NewD, S); CurContext = SavedContext; } else { // just add weak to existing |

