Issue |
131358
|
Summary |
Cleanup GCCAsmStmt children iterations
|
Labels |
clang:frontend,
code-cleanup
|
Assignees |
|
Reporter |
cor3ntin
|
`GCCAsmStmt` stores its arguments in separately allocated array
https://github.com/llvm/llvm-project/blob/b936ef18559aac8d982229040158c65843d43eb2/clang/include/clang/AST/Stmt.h#L3305-L3311
And is not considered to have any children.
Instead, we should store all these statements (contiguously) within the `Exprs` of `ASmStmt` and make sure that's returned from `children()`
https://github.com/llvm/llvm-project/blob/b936ef18559aac8d982229040158c65843d43eb2/clang/include/clang/AST/Stmt.h#L3160
However, we should also make sure that the order of the children - and therefore the order of elements
in Expr makes sense,
ie `Template, OutputConstraint0, OutputExpr0, ... OutputConstraintN, OutputExprN, InputConstraint0, InputExpr0, ... InputConstraintN, InputExprN, Label0, ...`
Constructors, Getter, Setters, etc of GCCAsmStmt needs to be adapted to understand this order
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs