From 5cfaf047c277163a75b7bab2fd58c812e7a13424 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 8 Jun 2017 02:05:55 +0000 Subject: [PATCH] Simplify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304960 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaExpr.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index d225168a98..226359aa84 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -11843,14 +11843,10 @@ ExprResult Sema::BuildBinOp(Scope *S, SourceLocation OpLoc, std::any_of(OE->decls_begin(), OE->decls_end(), [](NamedDecl *ND) { return isa(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(); } } -- 2.40.0