================
@@ -12488,8 +12488,7 @@ static void diagnoseTautologicalComparison(Sema &S, 
SourceLocation Loc,
   QualType LHSType = LHS->getType();
   QualType RHSType = RHS->getType();
   if (LHSType->hasFloatingRepresentation() ||
-      (LHSType->isBlockPointerType() && !BinaryOperator::isEqualityOp(Opc)) ||
-      S.inTemplateInstantiation())
+      (LHSType->isBlockPointerType() && !BinaryOperator::isEqualityOp(Opc)))
----------------
Sirraide wrote:

> That check makes sense if all we’re doing is emitting tautological comparison 
> warnings

Also, this means that in older language modes where these comparisons aren’t 
deprecated, the tautological comparison warning (but _not_ the deprecation 
warning or error) should continue to be guarded behind 
`inTemplateInstantiation()`

https://github.com/llvm/llvm-project/pull/191101
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to