r219029 - Suppress defined-but-unused warnings
Markus Trippelsdorf
markus at trippelsdorf.de
Sat Oct 4 03:42:50 PDT 2014
On 2014.10.03 at 22:16 -0000, Jingyue Wu wrote:
> Author: jingyue
> Date: Fri Oct 3 17:16:40 2014
> New Revision: 219029
>
> URL: http://llvm.org/viewvc/llvm-project?rev=219029&view=rev
> Log:
> Suppress defined-but-unused warnings
>
> by adding a fake use
Why not get rid of WasAmbiguous altogether? It does nothing AFAICS.
diff --git a/clang/include/clang/Sema/Lookup.h b/clang/include/clang/Sema/Lookup.h
index 067e42210fde..b88b9682788e 100644
--- a/clang/include/clang/Sema/Lookup.h
+++ b/clang/include/clang/Sema/Lookup.h
@@ -425,10 +425,8 @@ public:
}
} else {
AmbiguityKind SavedAK;
- bool WasAmbiguous = false;
if (ResultKind == Ambiguous) {
SavedAK = Ambiguity;
- WasAmbiguous = true;
}
ResultKind = Found;
resolveKind();
@@ -436,8 +434,6 @@ public:
// If we didn't make the lookup unambiguous, restore the old
// ambiguity kind.
if (ResultKind == Ambiguous) {
- (void)WasAmbiguous;
- assert(WasAmbiguous);
Ambiguity = SavedAK;
} else if (Paths) {
deletePaths(Paths);
--
Markus
More information about the cfe-commits
mailing list