From: Mikael Holmen Date: Fri, 16 Mar 2018 07:27:57 +0000 (+0000) Subject: Fix compilation warning introduced in r327654 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=290cc27fe21bfce479d30a3194a20045b90afb0e;p=clang Fix compilation warning introduced in r327654 The compiler complained about ../tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:184:15: error: unused variable 'CSI' [-Werror,-Wunused-variable] if (auto *CSI = CGF.CapturedStmtInfo) { ^ 1 error generated. I don't know this code but it seems like an easy fix so I push it anyway to get rid of the warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327694 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp b/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp index 637a86b455..0eb01e7afe 100644 --- a/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp +++ b/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp @@ -182,7 +182,7 @@ class CheckVarsEscapingDeclContext final return; // Variables captured by value must be globalized. if (auto *CSI = CGF.CapturedStmtInfo) { - if (const FieldDecl *FD = CGF.CapturedStmtInfo->lookup(cast(VD))) { + if (const FieldDecl *FD = CSI->lookup(cast(VD))) { if (FD->getType()->isReferenceType()) return; EscapedParameters.insert(VD);