http://llvm.org/bugs/show_bug.cgi?id=19341
Paul Robinson <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #5 from Paul Robinson <[email protected]> --- (In reply to comment #3) > I /believe/ the code has UB, no diagnostic required by ODR-using the > variable but never defining it. Though I haven't looked at all the wording > necessary to back that up with certainty. You are right, I was wrong. The template-argument for these things is a constant expression (14.3.2p1). ODR says a constant expression does not ODR-use the vars or functions named in the expression, if the lvalue-to-rvalue conversion is immediately applied. But lvalue-to-rvalue conversion is not in the list of conversions applied to a template argument (14.3.2p5). So it is legit for the debug info to assume a definition. I'm closing this PR and withdrawing the patch. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ LLVMbugs mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs
