llvm / clangir

A new (MLIR based) high-level IR for clang.
https://clangir.org
Other
312 stars 86 forks source link

[CIR][Asm] Remove duplicated lambda & coroutine attributes #580

Closed keryell closed 2 months ago

keryell commented 2 months ago

Do not print in cir.func definition the 'attr { ... }' with coroutine or lambda attributes since they are already printed before the function name. Otherwise redundancy breaks a future parsing. Sort the attributes to be skipped so it is more obvious to see the list of attributes. Improve the tests to check there are no spurious attributes anymore.

keryell commented 2 months ago

I have also an lsp-server with CIR enabled which shows this kind of problems. I wonder how it is possible to have a CI that will parse again the CIR generated by all the existing tests.

bcardosolopes commented 2 months ago

I have also an lsp-server with CIR enabled which shows this kind of problems. I wonder how it is possible to have a CI that will parse again the CIR generated by all the existing tests.

That'd be cool, I'm not sure how to do that though, would love suggestions!