================
@@ -127,12 +127,24 @@ BraceInsertionHints getBraceInsertionsHints(const Stmt
*const S,
if (StartLoc.isInvalid())
return {};
+ const Stmt *InnerS = S;
+ while (const auto *AS = dyn_cast<AttributedStmt>(InnerS))
----------------
zeyi2 wrote:
> AttributedStmt be a substatement of a AttributedStmt
I couldn't find a way to produce a case like this. I use `while` initially for
safety (e.g. the util function still works as expected when giving a "weird"
input). But I think since parser merges attributes into a single
`AttributedStmt` node, I think it is fine to replace the `while` to `if` :)
https://github.com/llvm/llvm-project/pull/184095
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits