]> granicus.if.org Git - clang/commitdiff
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)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198599 91177308-0d34-0410-b5e6-96231b3b80d8

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

index f5f21391e9b77574a80e400d46a9105372826a61..48446771ed66fa14ff7d2e952e24096a5621d56e 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 e7bc682211c944142bee9c7e34e5381f582af2e6..d94155ba6c6e2bf11c7cc7fd6de1e5e5e3e15297 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);
         }