Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VarDecl to Parser lowering #760

Merged
merged 5 commits into from
Jan 14, 2025
Merged

VarDecl to Parser lowering #760

merged 5 commits into from
Jan 14, 2025

Conversation

xlauko
Copy link
Member

@xlauko xlauko commented Jan 14, 2025

No description provided.

@xlauko xlauko added the parser label Jan 14, 2025
@xlauko xlauko requested a review from Jezurko January 14, 2025 08:51
@xlauko xlauko self-assigned this Jan 14, 2025
Copy link
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format (v19.1.1) reports: 4 file(s) not formatted
  • include/vast/Util/Terminator.hpp
  • lib/vast/Conversion/FromHL/EmitLazyRegions.cpp
  • lib/vast/Conversion/FromHL/ToLLCF.cpp
  • lib/vast/Conversion/Parser/ToParser.cpp
clang-tidy (v19.1.1) reports: 19 concern(s)
  • include/vast/Util/Terminator.hpp:47:29: error: [clang-diagnostic-error]

    unknown type name 'block_t'; did you mean 'clock_t'?

       47 |             static bool has(block_t &block) {
          |                             ^~~~~~~
          |                             clock_t
    /usr/include/x86_64-linux-gnu/bits/types/clock_t.h:7:19: note: 'clock_t' declared here
        7 | typedef __clock_t clock_t;
          |                   ^
  • include/vast/Util/Terminator.hpp:48:40: error: [clang-diagnostic-error]

    member reference base type 'clock_t' (aka 'long') is not a structure or union

       48 |                 if (std::distance(block.begin(), block.end()) == 0) {
          |                                   ~~~~~^~~~~~
  • include/vast/Util/Terminator.hpp:48:55: error: [clang-diagnostic-error]

    member reference base type 'clock_t' (aka 'long') is not a structure or union

       48 |                 if (std::distance(block.begin(), block.end()) == 0) {
          |                                                  ~~~~~^~~~
  • include/vast/Util/Terminator.hpp:51:41: error: [clang-diagnostic-error]

    member reference base type 'clock_t' (aka 'long') is not a structure or union

       51 |                 return self_t::is(&block.back());
          |                                    ~~~~~^~~~~
  • include/vast/Util/Terminator.hpp:54:31: error: [clang-diagnostic-error]

    unknown type name 'block_t'; did you mean 'clock_t'?

       54 |             static self_t get(block_t &block) {
          |                               ^~~~~~~
          |                               clock_t
    /usr/include/x86_64-linux-gnu/bits/types/clock_t.h:7:19: note: 'clock_t' declared here
        7 | typedef __clock_t clock_t;
          |                   ^
  • include/vast/Util/Terminator.hpp:58:38: error: [clang-diagnostic-error]

    member reference base type 'clock_t' (aka 'long') is not a structure or union

       58 |                 return self_t{ &block.back() };
          |                                 ~~~~~^~~~~
  • include/vast/Util/Terminator.hpp:63:38: error: [clang-diagnostic-error]

    unknown type name 'operation'; did you mean 'mlir::Operation'?

       63 |     static inline bool is_terminator(operation op) {
          |                                      ^~~~~~~~~
          |                                      mlir::Operation
    /usr/lib/llvm-19/include/mlir/IR/Operation.h:84:18: note: 'mlir::Operation' declared here
       84 | class alignas(8) Operation final
          |                  ^
  • include/vast/Util/Terminator.hpp:64:18: error: [clang-diagnostic-error]

    member reference type 'mlir::Operation' is not a pointer; did you mean to use '.'?

       64 |         return op->hasTrait< mlir::OpTrait::IsTerminator >();
          |                ~~^~
          |                  .
  • include/vast/Util/Terminator.hpp:68:26: error: [clang-diagnostic-error]

    use of undeclared 'operator>'

       68 |         : std::optional< operation >
          |                          ^
  • include/vast/Util/Terminator.hpp:68:26: error: [clang-diagnostic-error]

    use of undeclared identifier 'operation'; did you mean 'operator'?

       68 |         : std::optional< operation >
          |                          ^~~~~~~~~
          |                          operator
  • include/vast/Util/Terminator.hpp:71:9: error: [clang-diagnostic-error]

    unknown type name 'operation'; did you mean 'mlir::Operation'?

       71 |         operation op_ptr() const { return **this; }
          |         ^~~~~~~~~
          |         mlir::Operation
    /usr/lib/llvm-19/include/mlir/IR/Operation.h:84:18: note: 'mlir::Operation' declared here
       84 | class alignas(8) Operation final
          |                  ^
  • include/vast/Util/Terminator.hpp:71:43: error: [clang-diagnostic-error]

    indirection requires pointer operand ('const vast::hard_terminator' invalid)

       71 |         operation op_ptr() const { return **this; }
          |                                           ^~~~~~
  • include/vast/Util/Terminator.hpp:72:24: error: [clang-diagnostic-error]

    unknown type name 'operation'; did you mean 'mlir::Operation'?

       72 |         static bool is(operation op) { return is_terminator(op); }
          |                        ^~~~~~~~~
          |                        mlir::Operation
    /usr/lib/llvm-19/include/mlir/IR/Operation.h:84:18: note: 'mlir::Operation' declared here
       84 | class alignas(8) Operation final
          |                  ^
  • include/vast/Util/Terminator.hpp:72:61: error: [clang-diagnostic-error]

    call to implicitly-deleted copy constructor of 'mlir::Operation'

       72 |         static bool is(operation op) { return is_terminator(op); }
          |                                                             ^~
    /usr/lib/llvm-19/include/mlir/IR/Operation.h:86:7: note: copy constructor of 'Operation' is implicitly deleted because base class 'llvm::TrailingObjects<Operation, detail::OperandStorage, detail::OpProperties, BlockOperand, Region, OpOperand>' has a deleted copy constructor
       86 |       private llvm::TrailingObjects<Operation, detail::OperandStorage,
          |       ^
    /usr/lib/llvm-19/include/llvm/Support/TrailingObjects.h:332:3: note: 'TrailingObjects' has been explicitly marked deleted here
      332 |   TrailingObjects(const TrailingObjects &) = delete;
          |   ^
    /__w/vast/vast/include/vast/Util/Terminator.hpp:63:48: note: passing argument to parameter 'op' here
       63 |     static inline bool is_terminator(operation op) {
          |                                                ^
  • include/vast/Util/Terminator.hpp:76:26: error: [clang-diagnostic-error]

    use of undeclared 'operator>'

       76 |         : std::optional< operation >
          |                          ^
  • include/vast/Util/Terminator.hpp:76:26: error: [clang-diagnostic-error]

    use of undeclared identifier 'operation'; did you mean 'operator'?

       76 |         : std::optional< operation >
          |                          ^~~~~~~~~
          |                          operator
  • include/vast/Util/Terminator.hpp:79:9: error: [clang-diagnostic-error]

    unknown type name 'operation'; did you mean 'mlir::Operation'?

       79 |         operation op_ptr() const { return **this; }
          |         ^~~~~~~~~
          |         mlir::Operation
    /usr/lib/llvm-19/include/mlir/IR/Operation.h:84:18: note: 'mlir::Operation' declared here
       84 | class alignas(8) Operation final
          |                  ^
  • include/vast/Util/Terminator.hpp:79:43: error: [clang-diagnostic-error]

    indirection requires pointer operand ('const vast::any_terminator' invalid)

       79 |         operation op_ptr() const { return **this; }
          |                                           ^~~~~~
  • include/vast/Util/Terminator.hpp:80:24: error: [clang-diagnostic-error]

    unknown type name 'operation'; did you mean 'mlir::Operation'?

       80 |         static bool is(operation op) {
          |                        ^~~~~~~~~
          |                        mlir::Operation
    /usr/lib/llvm-19/include/mlir/IR/Operation.h:84:18: note: 'mlir::Operation' declared here
       84 | class alignas(8) Operation final
          |                  ^

Have any feedback or feature suggestions? Share it here.

@xlauko xlauko merged commit 4f65c1f into master Jan 14, 2025
8 checks passed
@xlauko xlauko deleted the xlauko/declref-to-parser branch January 14, 2025 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants