diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2014-05-14 10:40:54 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2014-05-14 10:40:54 +0000 |
commit | 301a2d9249b61510f827ffb9413b08845fff1121 (patch) | |
tree | 6c3fd52ad804b9f0f547d4145eb0f225a7fb8632 | |
parent | aaf4bb239487e0a3b20a8eaf94fc641235ba2c29 (diff) | |
download | bcm5719-llvm-301a2d9249b61510f827ffb9413b08845fff1121.tar.gz bcm5719-llvm-301a2d9249b61510f827ffb9413b08845fff1121.zip |
[OPENMP] Fix warning in Release builds.
llvm-svn: 208768
-rw-r--r-- | clang/lib/Sema/SemaStmt.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp index 056b93dc86e..d398f7b12d2 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -3412,6 +3412,15 @@ void Sema::ActOnCapturedRegionStart(SourceLocation Loc, Scope *CurScope, } } assert(ContextIsFound && "no null type for '__context' parameter"); + if (!ContextIsFound) { + // Add __context implicitly if it is not specified. + IdentifierInfo *ParamName = &Context.Idents.get("__context"); + QualType ParamType = Context.getPointerType(Context.getTagDeclType(RD)); + ImplicitParamDecl *Param = + ImplicitParamDecl::Create(Context, DC, Loc, ParamName, ParamType); + DC->addDecl(Param); + CD->setContextParam(ParamNum, Param); + } // Enter the capturing scope for this captured region. PushCapturedRegionScope(CurScope, CD, RD, Kind); |