[PATCH] D71091: Make sure that the implicit arguments for direct methods have been setup

Pierre Habouzit via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 6 14:07:58 PST 2019


MadCoder added inline comments.


================
Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:674
   }
   Record.push_back(D->isInstanceMethod());
   Record.push_back(D->isVariadic());
----------------
arphaman wrote:
> @MadCoder Given the fact that you're now setting SelfDecl and CmdDecl for declarations, they need to be serialized properly. I would suggest the following change to the writer:
> 
> ```
> bool HasBody = D->getBody() != nullptr;
> Record.push_back(HasBody);
> if (HasBody)
>   Record.AddStmt(D->getBody());
> Record.AddDeclRef(D->getSelfDecl());
> Record.AddDeclRef(D-> getCmdDecl());
> ```
> 
> The AST reader should be updated accordingly.
hah was the source of the last etst failure I was chasing, thanks!


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

https://reviews.llvm.org/D71091





More information about the cfe-commits mailing list