This revision was automatically updated to reflect the committed changes.
Closed by commit rG17198dfaff53: [AST] Fix recovery-expr crash on invalid
aligned attr. (authored by hokein).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78085/new/
https://
hokein updated this revision to Diff 257712.
hokein added a comment.
address comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78085/new/
https://reviews.llvm.org/D78085
Files:
clang/lib/AST/ComputeDependence.cpp
clang/lib/AST/DeclBase.c
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
LG with comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78085/new/
https://reviews.llvm.org/D78085
_
sammccall added inline comments.
Comment at: clang/lib/AST/ComputeDependence.cpp:74
for (const auto *I : D->specific_attrs()) {
+// FIXME: should we propagate the error bit?
if (I->isAlignmentDependent())
maybe just do this unless it causes regression
hokein added inline comments.
Comment at: clang/lib/AST/DeclBase.cpp:400
+ for (; I != E; ++I) {
+if (!I->isAlignmentDependent())
+ Align = std::max(Align, I->getAlignment(Ctx));
sammccall wrote:
> This doesn't seem great - previously if e.g. codegen en
hokein updated this revision to Diff 257638.
hokein marked an inline comment as done.
hokein added a comment.
Use isAlignmentErrorDependent.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78085/new/
https://reviews.llvm.org/D78085
Files:
clang/li
sammccall added inline comments.
Comment at: clang/lib/AST/DeclBase.cpp:400
+ for (; I != E; ++I) {
+if (!I->isAlignmentDependent())
+ Align = std::max(Align, I->getAlignment(Ctx));
This doesn't seem great - previously if e.g. codegen ends up needing th
hokein created this revision.
hokein added a reviewer: sammccall.
Herald added a project: clang.
crash stack:
lang: tools/clang/include/clang/AST/AttrImpl.inc:1490: unsigned int
clang::AlignedAttr::getAlignment(clang::ASTContext &) const: Assertion
`!isAlignmentDependent()' failed.
PLEASE s