[PATCH] D74417: [clang][ARC] Remove invalid assertion that can crash clangd

Erik Pilkington via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 13 10:43:09 PST 2020


erik.pilkington added a comment.

In D74417#1874747 <https://reviews.llvm.org/D74417#1874747>, @dgoldman wrote:

> Added but it's still failing due to a different assertion failure, do you think this could be because the abbreviation is different for the ParamVars? I'm not sure how to handle this...


Yeah, that looks to be the problem, the parameter abbreviation is assumed to be a literal zero (since it was previously impossible) for the ParmVarDecl case, i.e:

  Abv->Add(BitCodeAbbrevOp(0));                       // ARCPseudoStrong

But we really want it to look like the VarDecl case, where we actually get a bit for it:

  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isARCPseudoStrong

I think you can fix the crash by changing the BitCodeAbbrevOp(0) to BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74417





More information about the cfe-commits mailing list