r208768 - [OPENMP] Fix warning in Release builds.
Alexey Bataev
a.bataev at hotmail.com
Wed May 14 03:40:55 PDT 2014
Author: abataev
Date: Wed May 14 05:40:54 2014
New Revision: 208768
URL: http://llvm.org/viewvc/llvm-project?rev=208768&view=rev
Log:
[OPENMP] Fix warning in Release builds.
Modified:
cfe/trunk/lib/Sema/SemaStmt.cpp
Modified: cfe/trunk/lib/Sema/SemaStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmt.cpp?rev=208768&r1=208767&r2=208768&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmt.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmt.cpp Wed May 14 05:40:54 2014
@@ -3412,6 +3412,15 @@ void Sema::ActOnCapturedRegionStart(Sour
}
}
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);
More information about the cfe-commits
mailing list