Endless loop in Sema::CorrectTypo

With the ToT code, clang.exe gets stuck in Sema::CorrectType endlessly (at least minutes) trying to compile the code:

#define _LIBCPP_MSVCRT 1
#include

int main() {
zzzzzzzzz
std::cout<<“Hello\n”;
return 0;
}

where the #includes are from libcxx ToT.

clang revision r191323 (the compiled code from the windows alpha release) does handle the code correctly.

Looking at recent changes for Sema::CorrectTypo , r191543 may be related, however the problem may originate elsewhere.

Yaron

I had rebuilt clang r191323 locally on Visual C++ 2012 / Win 7 x64 and the above code is handled correctly, same as the r191323 binary version downloaded from http://llvm.org/builds/ .

So the problem started between r191323 and ToT.

Yaron

Does the problem still exist with clang built at or after r191846?

I don't have a way to see if that commit fixes the problem, as your
example being so slow to compile seems to not exist with clang+libcxx
under Linux.

Cheers,
Kaelyn

The problem is fixed in r191848. Thanks for the quick fix.

Yaron

Hi Kaelyn,

For some reason, Bugzilla does not accept your e-mail. Please take a look at

https://llvm.org/bugs/show_bug.cgi?id=26811

Thanks, Yaron

+cfe-dev so other folks can see, since I forgot to switch to reply-all last time.

Thanks!

A related assert is failing here:

http://llvm.org/PR27038

Yaron