[Issue 14247] New: string within demangled symbol name should be made escape

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Mar 4 20:41:23 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14247

          Issue ID: 14247
           Summary: string within demangled symbol name should be made
                    escape
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: jiki at red.email.ne.jp

I wonder if I should post this as a compiler issue, because my problem is on
the profiler output.

A function template can be instantiated with string literal.
After this is demangled, inprintable characters and quotes are not cared.
Especially,  line-break in a symbol name is undesirable.

-------------------------------------
import std.stdio;
import core.demangle;

string func(alias s)() { return s; }

void main(string[] args) {
    writeln( func!"a\nb".mangleof );
    writeln( demangle(func!"a\nb".mangleof) );
}
-------------------------------------

--


More information about the Digitalmars-d-bugs mailing list