minor refactoring of my last check-in.
authorFariborz Jahanian <fjahanian@apple.com>
Tue, 18 Sep 2012 17:46:26 +0000 (17:46 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Tue, 18 Sep 2012 17:46:26 +0000 (17:46 +0000)
llvm-svn: 164145

clang/lib/Sema/SemaChecking.cpp

index ed5517d..77058ac 100644 (file)
@@ -4355,11 +4355,11 @@ static void AnalyzeComparison(Sema &S, BinaryOperator *E) {
   QualType T = E->getLHS()->getType();
   assert(S.Context.hasSameUnqualifiedType(T, E->getRHS()->getType())
          && "comparison with mismatched types");
+  if (E->isValueDependent())
+    return AnalyzeImpConvsInComparison(S, E);
 
   Expr *LHS = E->getLHS()->IgnoreParenImpCasts();
   Expr *RHS = E->getRHS()->IgnoreParenImpCasts();
-  if (E->isValueDependent())
-    return AnalyzeImpConvsInComparison(S, E);
   
   bool IsComparisonConstant = false;