Hi Markus, <div><br></div><div>I am not familiar with this piece of code, but I think the assert is worth keeping. It verifies function resolveKind does not make ResolveKind ambiguous if it wasn't ambiguous before. Am I correct? <br><div><br></div><div>Jingyue</div></div><br><div class="gmail_quote">On Sat Oct 04 2014 at 3:42:59 AM Markus Trippelsdorf <<a href="mailto:markus@trippelsdorf.de">markus@trippelsdorf.de</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On 2014.10.03 at 22:16 -0000, Jingyue Wu wrote:<br>
> Author: jingyue<br>
> Date: Fri Oct 3 17:16:40 2014<br>
> New Revision: 219029<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=219029&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=219029&view=rev</a><br>
> Log:<br>
> Suppress defined-but-unused warnings<br>
><br>
> by adding a fake use<br>
<br>
Why not get rid of WasAmbiguous altogether? It does nothing AFAICS.<br>
<br>
diff --git a/clang/include/clang/Sema/<u></u>Lookup.h b/clang/include/clang/Sema/<u></u>Lookup.h<br>
index 067e42210fde..b88b9682788e 100644<br>
--- a/clang/include/clang/Sema/<u></u>Lookup.h<br>
+++ b/clang/include/clang/Sema/<u></u>Lookup.h<br>
@@ -425,10 +425,8 @@ public:<br>
}<br>
} else {<br>
AmbiguityKind SavedAK;<br>
- bool WasAmbiguous = false;<br>
if (ResultKind == Ambiguous) {<br>
SavedAK = Ambiguity;<br>
- WasAmbiguous = true;<br>
}<br>
ResultKind = Found;<br>
resolveKind();<br>
@@ -436,8 +434,6 @@ public:<br>
// If we didn't make the lookup unambiguous, restore the old<br>
// ambiguity kind.<br>
if (ResultKind == Ambiguous) {<br>
- (void)WasAmbiguous;<br>
- assert(WasAmbiguous);<br>
Ambiguity = SavedAK;<br>
} else if (Paths) {<br>
deletePaths(Paths);<br>
<br>
--<br>
Markus<br>
<br>
</blockquote></div>