Invalid assert in lib/Sema/Lookup.h ?

Hello,

What is the meaning of this assert statement in Lookup.h?

void setNotFoundInCurrentInstantiation() {
assert(ResultKind == NotFound && Decls.empty());
ResultKind = NotFoundInCurrentInstantiation;
}

I saw assert failing when compiling some code that includes Qt headers. I think the code I was compiling was actually missing some class definitions, so I was expecting to see an error - not a failing assert. Btw, in the debugger I see that ResultKind == NotFoundInCurrentInstantiation when assert statement is reached.

Thanks,
Eugene

It roughly means that the caller thinks nothing was found when
something actually was found. It's hard to say more without more
information; can you provide a preprocessed file which reproduces the
issue, or at least a backtrace?

-Eli

Erm, wait, actually, what's most likely happening is that
LookupQualifiedName is getting called multiple times and failing...
random guess: does -fno-spell-checking help?

-Eli

Umm, actually, I just realized we already have a bug filed for this;
see http://llvm.org/bugs/show_bug.cgi?id=7625 .

-Eli

... which I've just fixed in Clang r110615. Please check whether this was the problem!

  - Doug