https://bugs.llvm.org/show_bug.cgi?id=37362
Bug ID: 37362
Summary: -Wglobal-constructors false positive
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: d...@znu.io
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
John McCall asked me to file the following code reduction. Top-of-tree
generates a -Wglobal-constructors warning with the following code, but no
actual constructor is emitted.
struct Once {
unsigned value;
constexpr Once() : value(0) {}
};
template<typename T>
class Lazy {
T t;
Once once;
public:
constexpr Lazy() = default;
};
Lazy<unsigned> lazy;
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs