[PATCH] D82446: [clang] Fix duplicate warning

kamlesh kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 24 06:59:27 PDT 2020


kamleshbhalui marked an inline comment as done.
kamleshbhalui added inline comments.


================
Comment at: clang/lib/Parse/ParseExprCXX.cpp:2273
   ParseSpecifierQualifierList(DS, AS_none, DeclSpecContext::DSC_type_specifier);
-  DS.Finish(Actions, Actions.getASTContext().getPrintingPolicy());
   return false;
----------------
aaron.ballman wrote:
> This change is incorrect -- `Finish` is what ensures the `DeclSpec` is in a consistent state (even in the presence of errors), so removing it would be bad.
you are right but ParseSpecifierQualifierList ->(calls) ParseDeclarationSpecifiers
and it makes a call to Finish(https://github.com/llvm/llvm-project/blob/master/clang/lib/Parse/ParseDecl.cpp#L2962).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82446





More information about the cfe-commits mailing list