Skip to content
Snippets Groups Projects
Commit 7a02dd69 authored by Alexey Bataev's avatar Alexey Bataev
Browse files

[OPENMP, C++11] Improve code of InitVLACaptures function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212162 91177308-0d34-0410-b5e6-96231b3b80d8
parent a262c946
No related branches found
No related tags found
No related merge requests found
......@@ -2055,11 +2055,14 @@ static LValue InitCapturedStruct(CodeGenFunction &CGF, const CapturedStmt &S) {
}
static void InitVLACaptures(CodeGenFunction &CGF, const CapturedStmt &S) {
for (CapturedStmt::const_capture_iterator I = S.capture_begin(),
E = S.capture_end();
I != E; ++I) {
if (I->capturesVariable()) {
QualType QTy = I->getCapturedVar()->getType();
for (auto &C : S.captures()) {
if (C.capturesVariable()) {
QualType QTy;
auto VD = C.getCapturedVar();
if (const ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(VD))
QTy = PVD->getOriginalType();
else
QTy = VD->getType();
if (QTy->isVariablyModifiedType()) {
CGF.EmitVariablyModifiedType(QTy);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment