[cfe-dev] CGF and initializers
Anders Carlsson
andersca at mac.com
Tue Jan 11 09:58:31 PST 2011
Hello,
I'm investigating a bug where -Wmissing-noreturn warns on any constructor with member or base initializers, for example:
int f();
struct A {
int a;
A() : a(f()) { }
};
The CFG for A::A() looks like:
[ B2 (ENTRY) ]
Predecessors (0):
Successors (1): B1
[ B1 ]
1: f()
2: a([B1.1]) (Member initializer)
Predecessors (1): B2
Successors (1): B0
[ B0 (EXIT) ]
Predecessors (1): B1
Successors (0):
not sure about this, but wouldn't it make more sense for the member initializer to come before the call to f() ?
- Anders
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110111/c723ac41/attachment.html>
More information about the cfe-dev
mailing list