[llvm-bugs] [Bug 37362] New: -Wglobal-constructors false positive
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon May 7 19:05:18 PDT 2018
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: unassignedclangbugs at nondot.org
Reporter: dave at znu.io
CC: dgregor at apple.com, llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180508/55f2a332/attachment.html>
More information about the llvm-bugs
mailing list