Skip to content

crash on invalid use of variable of type "const T&" where T = an unbound method #11157

@llvmbot

Description

@llvmbot
Bugzilla Link 10785
Resolution FIXED
Resolved on Oct 09, 2011 15:46
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @DougGregor

Extended Description

clang++ -fsyntax-only test.cc crashes on this invalid code:

struct Class {
void method();
};
template struct Helper {
virtual void helper(T x) {
x;
}
};
struct FunctionLike {
template void operator()(const T&) {
Helper<const T&> helper;
}
};
void TestBody() {
Class cls;
FunctionLike fl;
fl(cls.method);
}

with this assertion:

clang: SemaExpr.cpp:9968: clang::ExprResult clang::Sema::CheckPlaceholderExpr(clang::Expr*): Assertion `!type->isPlaceholderType()' failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions