http://llvm.org/bugs/show_bug.cgi?id=19361

            Bug ID: 19361
           Summary: MS mangler: No mangling for C++11 reference qualified
                    methods
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
            Blocks: 12477
    Classification: Unclassified

TIL this program should print "lval ref\nrval ref\n":

extern "C" void puts(const char *);
struct A {
  void foo() &;
  void foo() &&;
};
void A::foo() & {
  puts("lval ref");
}
void A::foo() && {
  puts("rval ref");
}
int main() {
  A a;
  a.foo();
  A().foo();
}

MSVC doesn't know how to parse ref-qualified functions, so we don't have any
mangling to follow.  Clang currently does this:
$ clang-cl t.cpp -c
t.cpp(9,9) :  error: definition with same mangled name as another definition
void A::foo() && {
        ^
1 error generated.

-- 
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

Reply via email to