<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW " title="NEW --- - [ms] &quot;Expected MSInheritanceAttr on the CXXRecordDecl!&quot; assert when passing address of base class member function through subclass access path" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23828&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=RbG8BcTh6Ex-r73irckClm_hYPNb5IUcYu3mGyQfOdc&s=UUuR99PWPLUvh9PRQLuvaOEtVWTe-RWQ60qMEVzZyBg&e=">23828</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[ms] "Expected MSInheritanceAttr on the CXXRecordDecl!" assert when passing address of base class member function through subclass access path
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nicolasweber@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This is not a recent regression, we just didn't have code like this in Chromium
until yesterday.

thakis$ cat repro.cc
template <typename T> void use(const T &);
struct Base { void Method(); };
class Child : public Base {};
void f() { use<void (Child::*)()>(&Child::Method); }

thakis$ ~/src/llvm-build/bin/clang -cc1 -triple x86_64-apple-windows-msvc
-emit-obj repro.cc
Assertion failed: (IA && "Expected MSInheritanceAttr on the CXXRecordDecl!"),
function getMSInheritanceModel, file
/Users/thakis/src/llvm-rw/tools/clang/lib/AST/MicrosoftCXXABI.cpp, line 159.
0  clang                    0x0000000103b294c9
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 57
1  clang                    0x0000000103b29feb SignalHandler(int) + 875
2  libsystem_platform.dylib 0x00007fff858dcf1a _sigtramp + 26
3  libsystem_platform.dylib 0x00007fff6ba4c764 _sigtramp + 3860265060
4  clang                    0x0000000103b29bc6 abort + 22
5  clang                    0x0000000103b29ba1 __assert_rtn + 81
6  clang                    0x0000000104f638c7
clang::CXXRecordDecl::getMSInheritanceModel() const + 167
7  clang                    0x0000000104f63ba9 (anonymous
namespace)::MicrosoftCXXABI::getMemberPointerWidthAndAlign(clang::MemberPointerType
const*) const + 57
8  clang                    0x0000000104ddae8d
clang::ASTContext::getTypeInfoImpl(clang::Type const*) const + 1309
9  clang                    0x0000000104dda7d2
clang::ASTContext::getTypeInfo(clang::Type const*) const + 194
10 clang                    0x0000000104dda571
clang::ASTContext::getTypeInfoInChars(clang::Type const*) const + 113
11 clang                    0x0000000104038338
clang::CodeGen::CodeGenModule::ConstructAttributeList(clang::CodeGen::CGFunctionInfo
const&, clang::Decl const*, llvm::SmallVector<llvm::AttributeSet, 8u>&,
unsigned int&, bool) + 4680
12 clang                    0x0000000104158031
clang::CodeGen::CodeGenModule::SetFunctionAttributes(clang::GlobalDecl,
llvm::Function*, bool, bool) + 225
13 clang                    0x000000010415a54b
clang::CodeGen::CodeGenModule::GetOrCreateLLVMFunction(llvm::StringRef,
llvm::Type*, clang::GlobalDecl, bool, bool, bool, llvm::AttributeSet) + 523
14 clang                    0x000000010415d530
clang::CodeGen::CodeGenModule::GetAddrOfFunction(clang::GlobalDecl,
llvm::Type*, bool, bool) + 128
15 clang                    0x0000000104090c45
EmitFunctionDeclLValue(clang::CodeGen::CodeGenFunction&, clang::Expr const*,
clang::FunctionDecl const*) + 117
16 clang                    0x000000010408864c
clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(clang::DeclRefExpr const*) +
876
17 clang                    0x0000000104081684
clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr const*) + 868
18 clang                    0x00000001040bf870 (anonymous
namespace)::ScalarExprEmitter::VisitCastExpr(clang::CastExpr*) + 1904
19 clang                    0x00000001040b7b6d
clang::StmtVisitorBase<clang::make_ptr, (anonymous
namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 493
20 clang                    0x00000001040af748
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 104
21 clang                    0x0000000104091cc6
clang::CodeGen::CodeGenFunction::EmitCallExpr(clang::CallExpr const*,
clang::CodeGen::ReturnValueSlot) + 582
22 clang                    0x00000001040befec (anonymous
namespace)::ScalarExprEmitter::VisitCallExpr(clang::CallExpr const*) + 172
23 clang                    0x00000001040b7b98
clang::StmtVisitorBase<clang::make_ptr, (anonymous
namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 536
24 clang                    0x00000001040af748
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 104
25 clang                    0x00000001040812aa
clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot, bool) + 250
26 clang                    0x00000001040811a7
clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) + 55
27 clang                    0x00000001041231f1
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 433
28 clang                    0x000000010412afab
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot) + 91
29 clang                    0x000000010414d8fa
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 1194
30 clang                    0x000000010415c6a3
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*) + 1283
31 clang                    0x000000010415909a
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) + 298
32 clang                    0x000000010415b4bd
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 1085
33 clang                    0x000000010415e214
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 228
34 clang                    0x00000001041c825f (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 127
35 clang                    0x0000000104147f95
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 165
36 clang                    0x0000000104507fb3 clang::ParseAST(clang::Sema&,
bool, bool) + 371
37 clang                    0x0000000104146c1b
clang::CodeGenAction::ExecuteAction() + 123
38 clang                    0x0000000103d58be3 clang::FrontendAction::Execute()
+ 67
39 clang                    0x0000000103d2763c
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 972
40 clang                    0x0000000103d99e6b
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4043
41 clang                    0x0000000102a9d45c cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 1068
42 clang                    0x0000000102a9c105 main + 11029
43 libdyld.dylib            0x00007fff888b45c9 start + 1
44 libdyld.dylib            0x0000000000000006 start + 2004138558
Stack dump:
0.    Program arguments: /Users/thakis/src/llvm-build/bin/clang -cc1 -triple
x86_64-apple-windows-msvc -emit-obj repro.cc 
1.    <eof> parser at end of file
2.    repro.cc:4:6: LLVM IR generation of declaration 'f'
3.    repro.cc:4:6: Generating code for declaration 'f'
Illegal instruction: 4</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>