[PATCH] D65592: [Parser] Avoid spurious 'missing template' error in presence of typos

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 19 04:49:36 PDT 2020


sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

Nice!

I don't love adding those overloads, but not clear there's something better.



================
Comment at: clang/lib/Parse/ParseExprCXX.cpp:2973
 
+bool Parser::ParseUnqualifiedId(CXXScopeSpec &SS, bool EnteringContext,
+                                bool AllowDestructorName,
----------------
I'd consider inlining these convenience overloads


================
Comment at: clang/lib/Parse/ParseTemplate.cpp:685
   if (ParseOptionalCXXScopeSpecifier(
-          SS, ParsedType(),
+          SS, ParsedType(), /*ObjectHadErrors*/false,
           /*EnteringContext=*/false,
----------------
nit: ObjectHadErrors=


================
Comment at: clang/lib/Parse/ParseTemplate.cpp:685
   if (ParseOptionalCXXScopeSpecifier(
-          SS, ParsedType(),
+          SS, ParsedType(), /*ObjectHadErrors*/false,
           /*EnteringContext=*/false,
----------------
sammccall wrote:
> nit: ObjectHadErrors=
this can use the simple overload, ParsedType() is the same as nullptr


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65592/new/

https://reviews.llvm.org/D65592





More information about the cfe-commits mailing list