r327694 - Fix compilation warning introduced in r327654
Mikael Holmen via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 16 00:27:59 PDT 2018
Author: uabelho
Date: Fri Mar 16 00:27:57 2018
New Revision: 327694
URL: http://llvm.org/viewvc/llvm-project?rev=327694&view=rev
Log:
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.
Modified:
cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp?rev=327694&r1=327693&r2=327694&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp Fri Mar 16 00:27:57 2018
@@ -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<VarDecl>(VD))) {
+ if (const FieldDecl *FD = CSI->lookup(cast<VarDecl>(VD))) {
if (FD->getType()->isReferenceType())
return;
EscapedParameters.insert(VD);
More information about the cfe-commits
mailing list