trailofbits / vast

VAST is an experimental compiler pipeline designed for program analysis of C and C++. It provides a tower of IRs as MLIR dialects to choose the best fit representations for a program analysis or further program abstraction.
https://trailofbits.github.io/vast/
Apache License 2.0
368 stars 23 forks source link

Allow visitors specify attribute names #617

Closed xlauko closed 2 weeks ago

xlauko commented 3 weeks ago

Changes visitor API to provide:

       std::optional< named_attr > visit(const clang_attr *, scope_context &scope);

instead of

        mlir_attr visit(const clang_attr *, scope_context &scope);

This allows visitors to take care of responsibility for attribute naming, and does not leak this abstraction to top-level visitors.

github-actions[bot] commented 2 weeks ago

Cpp-Linter Report :warning:

Some files did not pass the configured checks!

clang-format reports: 5 file(s) not formatted - include/vast/CodeGen/CodeGenVisitorList.hpp - include/vast/CodeGen/DefaultVisitor.hpp - include/vast/CodeGen/UnsupportedVisitor.hpp - lib/vast/CodeGen/CodeGenVisitorBase.cpp - lib/vast/CodeGen/DefaultVisitor.cpp

Have any feedback or feature suggestions? Share it here.