Use token kind instead of '%select{.|->}0' in diagnostic
authorAlp Toker <alp@nuanti.com>
Mon, 6 Jan 2014 11:30:41 +0000 (11:30 +0000)
committerAlp Toker <alp@nuanti.com>
Mon, 6 Jan 2014 11:30:41 +0000 (11:30 +0000)
llvm-svn: 198599

clang/include/clang/Basic/DiagnosticParseKinds.td
clang/lib/Parse/ParseExpr.cpp

index f5f2139..4844677 100644 (file)
@@ -487,8 +487,7 @@ def ext_abstract_pack_declarator_parens : ExtWarn<
   "ISO C++11 requires a parenthesized pack declaration to have a name">,
   InGroup<DiagGroup<"anonymous-pack-parens">>;
 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">;
index e7bc682..d94155b 100644 (file)
@@ -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);
         }