]> granicus.if.org Git - clang/commitdiff
Fix a regression on test/Sema/unused-expr.c by fixing the type predicates
authorChris Lattner <sabre@nondot.org>
Thu, 30 Aug 2007 06:10:41 +0000 (06:10 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 30 Aug 2007 06:10:41 +0000 (06:10 +0000)
to test for the right type class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41601 91177308-0d34-0410-b5e6-96231b3b80d8

Sema/SemaExpr.cpp

index 0747bbc8b1c8485244a575ea213631c2b8fa47ed..1ddbccb7e9061015fdfa07f88742f8a525d783d0 100644 (file)
@@ -1162,7 +1162,7 @@ inline QualType Sema::CheckCompareOperands( // C99 6.5.8
     if (lType->isRealType() && rType->isRealType())
       return Context.IntTy;
   } else {
-    if (lType->isRealType() && rType->isRealType()) 
+    if (lType->isFloatingType() && rType->isFloatingType()) 
       Diag(loc, diag::warn_floatingpoint_eq);
 
     if (lType->isArithmeticType() && rType->isArithmeticType())