[PATCH] D78085: [AST] Fix recovery-expr crash on invalid aligned attr.

2020-04-15 Thread Haojian Wu via Phabricator via cfe-commits
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://

[PATCH] D78085: [AST] Fix recovery-expr crash on invalid aligned attr.

2020-04-15 Thread Haojian Wu via Phabricator via cfe-commits
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

[PATCH] D78085: [AST] Fix recovery-expr crash on invalid aligned attr.

2020-04-15 Thread Sam McCall via Phabricator via cfe-commits
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 _

[PATCH] D78085: [AST] Fix recovery-expr crash on invalid aligned attr.

2020-04-15 Thread Sam McCall via Phabricator via cfe-commits
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

[PATCH] D78085: [AST] Fix recovery-expr crash on invalid aligned attr.

2020-04-15 Thread Haojian Wu via Phabricator via cfe-commits
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

[PATCH] D78085: [AST] Fix recovery-expr crash on invalid aligned attr.

2020-04-15 Thread Haojian Wu via Phabricator via cfe-commits
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

[PATCH] D78085: [AST] Fix recovery-expr crash on invalid aligned attr.

2020-04-14 Thread Sam McCall via Phabricator via cfe-commits
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

[PATCH] D78085: [AST] Fix recovery-expr crash on invalid aligned attr.

2020-04-14 Thread Haojian Wu via Phabricator via cfe-commits
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