Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Crash while reporting typo correction #24142

Closed Quuxplusone closed 9 years ago

Quuxplusone commented 9 years ago
Bugzilla Link PR24143
Status RESOLVED FIXED
Importance P normal
Reported by jacobly.alt@gmail.com
Reported on 2015-07-15 17:51:46 -0700
Last modified on 2015-08-21 06:15:11 -0700
Version trunk
Hardware PC Linux
CC jacobly.alt@gmail.com, llvm-bugs@lists.llvm.org, ogoffart@kde.org
Fixed by commit(s)
Attachments file_24143.txt (7402 bytes, text/plain)
file_24143.txt (122 bytes, text/plain)
file_24143.txt (1548 bytes, text/plain)
Blocks
Blocked by
See also
Created attachment 14594
Output / crash backtrace

Clang trunk crashed between reporting undeclared identifiers:

// foo and error declared, errno undeclared
error(foo(errno), errno);

It seems important that there is another identifier similar to the undeclared
identifier and that the undeclared identifier appears twice.  I'm not sure why
foo is necessary.
Quuxplusone commented 9 years ago

Attached file_24143.txt (7402 bytes, text/plain): Output / crash backtrace

Quuxplusone commented 9 years ago

Attached file_24143.txt (122 bytes, text/plain): Preprocessed source

Quuxplusone commented 9 years ago

Attached file_24143.txt (1548 bytes, text/plain): Run script

Quuxplusone commented 9 years ago
Here is the relevant assertion:

tools/clang/lib/Sema/SemaLookup.cpp:4805: const Sema::TypoExprState
&clang::Sema::getTypoExprState(clang::TypoExpr *) const: Assertion `Entry !=
DelayedTypos.end() && "Failed to get the state for a TypoExpr!"' failed.
Quuxplusone commented 9 years ago
Regression found!
Last good revision: r240441
First bad revision:
------------------------------------------------------------------------
r240443 | rikka | 2015-06-23 19:13:17 +0000 (Tue, 23 Jun 2015) | 7 lines

Make the typo resolution in r240441 apply to all function calls.

Regular function calls (such as to cabs()) run into the same problem
with handling dependent exprs, not just builtins with custom type
checking.

Fixes PR23775.
------------------------------------------------------------------------
Quuxplusone commented 9 years ago

I believe this should be fixed with r245560

Quuxplusone commented 9 years ago

Yes, that fixed it for me.