From 5e3c8acfedc7726810bf376bc8e32c8c686fc3a3 Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Mon, 6 Jan 2014 11:30:41 +0000 Subject: [PATCH] Use token kind instead of '%select{.|->}0' in diagnostic git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198599 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticParseKinds.td | 3 +-- lib/Parse/ParseExpr.cpp | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/clang/Basic/DiagnosticParseKinds.td b/include/clang/Basic/DiagnosticParseKinds.td index f5f21391e9..48446771ed 100644 --- a/include/clang/Basic/DiagnosticParseKinds.td +++ b/include/clang/Basic/DiagnosticParseKinds.td @@ -487,8 +487,7 @@ def ext_abstract_pack_declarator_parens : ExtWarn< "ISO C++11 requires a parenthesized pack declaration to have a name">, InGroup>; def err_function_is_not_record : Error< - "unexpected '%select{.|->}0' in function call; perhaps remove the " - "'%select{.|->}0'?">; + "unexpected %0 in function call; perhaps remove the %0?">; // C++ derived classes def err_dup_virtual : Error<"duplicate 'virtual' in base specifier">; diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index e7bc682211..d94155ba6c 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -1370,8 +1370,8 @@ Parser::ParsePostfixExpressionSuffix(ExprResult LHS) { (BaseType->isFunctionType() || BaseType->isSpecificPlaceholderType(BuiltinType::BoundMember))) { Diag(OpLoc, diag::err_function_is_not_record) - << (OpKind == tok::arrow) << Base->getSourceRange() - << FixItHint::CreateRemoval(OpLoc); + << OpKind << Base->getSourceRange() + << FixItHint::CreateRemoval(OpLoc); return ParsePostfixExpressionSuffix(Base); } -- 2.40.0