[LLVMbugs] [Bug 13022] New: [Windows] Can't compile `int (test)(); `
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jun 4 08:54:36 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13022
Bug #: 13022
Summary: [Windows] Can't compile `int (test)();`
Product: clang
Version: trunk
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: timurrrr at google.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
$ cat zz.cpp
int (test)();
void foo() { int z = test(); }
clang is r157687
$ clang++ -Xclang -cxx-abi -Xclang microsoft -c zz.cpp
Assertion failed: isa<X>(Val) && "cast<Ty>() argument of incompatible type!",
file C:\src\llvm\include\llvm/Support/Casting.h, line 198
$ clang++ -c zz.cpp
-> OK
$ cl -c zz.cpp
-> OK
The assertion happens at:
void MicrosoftCXXNameMangler::mangleFunctionEncoding(const FunctionDecl *FD) {
...
// We should never ever see a FunctionNoProtoType at this point.
// We don't even know how to mangle their types anyway :).
const FunctionProtoType *FT = cast<FunctionProtoType>(FD->getType()); <<<<
HERE
Looks like some unexpected type comes here.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list