Skip to content

Commit bf58db7

Browse files
authored
Attempt fix of error: ignoring attributes on template argument ‘int (*)(FILE*)
1 parent bf093d9 commit bf58db7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/Interpreter/CppInterOp.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2737,7 +2737,12 @@ namespace Cpp {
27372737
#define DEBUG_TYPE "exec"
27382738

27392739
std::array<char, 256> buffer;
2740-
std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
2740+
struct pclose_deleter {
2741+
void operator()(struct FILE* d) const {
2742+
pclose(d);
2743+
}
2744+
};
2745+
std::unique_ptr<FILE, pclose_deleter > pipe(popen(cmd, "r"), pclose);
27412746
LLVM_DEBUG(dbgs() << "Executing command '" << cmd << "'\n");
27422747

27432748
if (!pipe) {

0 commit comments

Comments
 (0)