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

            Bug ID: 31121
           Summary: Clang crashes on dllexport inline methods with default
                    arguments in PCH files in MS ABI mode
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangb...@nondot.org
          Reporter: r...@google.com
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

Consider:

$ cat t.h
struct __declspec(dllexport) Foo {
  enum E { E0 } e;
  Foo(E e = E0) : e(e) {}
};

$ cat t.cpp

$ clang-cl -FIt.h -Yct.h t.cpp
Assertion failed: DefaultArg && "sema forgot to instantiate default args", file
..\tools\clang\lib\CodeGen\MicrosoftCXXABI.cpp, line 3877
...

Basically, dllexport interacts with PCH in interesting ways that we should
seriously revisit.

This was reduced out of blink / WebKit, which had this issue here:
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/dom/ViewportDescription.h?rcl=0&l=67

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