[llvm-bugs] [Bug 33015] New: Improve error message for reading an object outside its lifetime
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu May 11 18:48:14 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=33015
Bug ID: 33015
Summary: Improve error message for reading an object outside
its lifetime
Product: clang
Version: 4.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: david at doublewise.net
CC: llvm-bugs at lists.llvm.org
The current error message is:
note: read of object outside its lifetime is not allowed in a constant
expression
It would be more helpful if, instead of just telling me it is outside of the
lifetime, it told me whether it was before its lifetime has begun or after it
has ended. I was very confused when I got this as I was obviously not reading
an object after its lifetime had ended, but then I realized I had misused a
cast to derived in a constructor and I was actually using it before it was
constructed.
--
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/20170512/2bae46a9/attachment-0001.html>
More information about the llvm-bugs
mailing list