From 36594561aa663b9d65e73eadef42ee5bd9fe5d35 Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Fri, 1 Nov 2013 21:47:19 +0000 Subject: Disable -Wtautological-compare in template instantiations. llvm-svn: 193888 --- clang/lib/Sema/SemaChecking.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/lib') diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 772fee32ceb..733bd0f9bbf 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -4779,6 +4779,10 @@ static bool HasEnumType(Expr *E) { } static void CheckTrivialUnsignedComparison(Sema &S, BinaryOperator *E) { + // Disable warning in template instantiations. + if (!S.ActiveTemplateInstantiations.empty()) + return; + BinaryOperatorKind op = E->getOpcode(); if (E->isValueDependent()) return; -- cgit v1.2.3