http://llvm.org/bugs/show_bug.cgi?id=12812
Bug #: 12812
Summary: Error recovery can trigger Assertion `Proto &&
"Functions without a prototype cannot be overloaded"'
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Created attachment 8545
--> http://llvm.org/bugs/attachment.cgi?id=8545
reduced test case (provided by Craig Schroeder)
Running clang trunk on this C code:
k(0);k(a==8);int bar(){k(0);}
results in:
t7.c:1:3: error: expected parameter declarator
k(0);k(a==8);int bar(){k(0);}
^
t7.c:1:3: error: expected ')'
t7.c:1:2: note: to match this '('
k(0);k(a==8);int bar(){k(0);}
^
t7.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
k(0);k(a==8);int bar(){k(0);}
^
t7.c:1:8: error: unknown type name 'a'
k(0);k(a==8);int bar(){k(0);}
^
t7.c:1:9: error: expected ')'
k(0);k(a==8);int bar(){k(0);}
^
t7.c:1:7: note: to match this '('
k(0);k(a==8);int bar(){k(0);}
^
t7.c:1:6: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
k(0);k(a==8);int bar(){k(0);}
^
clang: /src/llvm-trunk-writable/tools/clang/lib/Sema/SemaOverload.cpp:5228:
void clang::Sema::AddOverloadCandidate(clang::FunctionDecl*,
clang::DeclAccessPair, llvm::ArrayRef<clang::Expr*>,
clang::OverloadCandidateSet&, bool, bool, bool): Assertion `Proto && "Functions
without a prototype cannot be overloaded"' failed.
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs