https://bugs.llvm.org/show_bug.cgi?id=36181

            Bug ID: 36181
           Summary: Microsoft mangling cannot mangle injected class name
                    type
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: smee...@fb.com
                CC: compn...@compnerd.org, david.majne...@gmail.com,
                    dgre...@apple.com, llvm-bugs@lists.llvm.org,
                    r...@google.com

Using the reduced test case from https://bugs.llvm.org/show_bug.cgi?id=16887 (I
independently arrived at an almost equivalent reduced test case before finding
that one, sigh):

% cat reduced.h
template <typename T> struct A {
  friend void f(A<T>) {}
};
void g() { f(A<int>()); }

% touch empty.cpp
% clang -cc1 -triple x86_64-windows-msvc -emit-pch -o reduced.h.pch -x
c++-header reduced.h
% clang -cc1 -triple x86_64-windows-msvc -emit-llvm -include-pch reduced.h.pch
empty.cpp
Cannot mangle injected class name type.
UNREACHABLE executed

https://reviews.llvm.org/rL188536 changed this from an error to an unreachable.
It should indeed be unreachable for -fdelayed-template-parsing (and running
both of the above clang invocations with -fdelayed-template-parsing doesn't
crash), but it is reachable otherwise.

This is the same underlying issue as
https://bugs.llvm.org/show_bug.cgi?id=35473 and
https://bugs.llvm.org/show_bug.cgi?id=35939. I'm reporting this separately
because this is triggered with a precompiled header vs. modules, and there's a
reduced standalone test case.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to