[PATCH] D89318: [ASTImporter] Fix crash caused by unset AttributeSpellingListIndex
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 14 05:10:58 PDT 2020
martong marked an inline comment as done.
martong added a comment.
Thanks for the reivew!
================
Comment at: clang/lib/AST/ASTImporter.cpp:8109
+ FromAttr->getAttributeSpellingListIndex());
+ ToAttr->setPackExpansion(FromAttr->isPackExpansion());
+ ToAttr->setImplicit(FromAttr->isImplicit());
----------------
shafik wrote:
> Why move these two but not `setInherited(...)` it is not really explained in the description.
Yeah, `setInherited` is a member of `InheritableAttr`, so the `Attr` base class does not have it.
Anyway, I changed the code and moved the calls of `setInherited` to an `if` block where we dyn_cast to `InheritableAttr`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89318/new/
https://reviews.llvm.org/D89318
More information about the cfe-commits
mailing list