]> granicus.if.org Git - clang/commitdiff
Simplify.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 8 Jun 2017 02:05:55 +0000 (02:05 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 8 Jun 2017 02:05:55 +0000 (02:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304960 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExpr.cpp

index d225168a986d32ad38b64800cba79e1a74327c4b..226359aa84eaff324f85d7b9abd71770575b9ae7 100644 (file)
@@ -11843,14 +11843,10 @@ ExprResult Sema::BuildBinOp(Scope *S, SourceLocation OpLoc,
           std::any_of(OE->decls_begin(), OE->decls_end(), [](NamedDecl *ND) {
             return isa<FunctionTemplateDecl>(ND);
           })) {
-        if (OE->getQualifier()) {
-          Diag(OE->getQualifierLoc().getBeginLoc(),
-               diag::err_template_kw_missing)
-            << OE->getName().getAsString() << "";
-        } else {
-          Diag(OE->getNameLoc(), diag::err_template_kw_missing)
-            << OE->getName().getAsString() << "";
-        }
+        Diag(OE->getQualifier() ? OE->getQualifierLoc().getBeginLoc()
+                                : OE->getNameLoc(),
+             diag::err_template_kw_missing)
+          << OE->getName().getAsString() << "";
         return ExprError();
       }
     }