brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · e2d2be5 Raw
95 lines · plain
1// RUN: mlir-irdl-to-cpp %s --verify-diagnostics --split-input-file2// expected-error@+1 {{name of dialect should not contain leading or double underscores}}3irdl.dialect @_no_leading_underscore {4}5 6// -----7 8// expected-error@+1 {{name of dialect should not contain leading or double underscores}}9irdl.dialect @no__double__underscores {10}11 12// -----13 14// expected-error@+1 {{name of dialect should not contain uppercase letters}}15irdl.dialect @NoUpperCase {16}17 18// -----19 20// expected-error@+1 {{name of dialect must contain only lowercase letters, digits and underscores}}21irdl.dialect @no_weird_symbol$ {22}23 24// -----25 26irdl.dialect @test_dialect {27  // expected-error@+1 {{name of operation should not contain leading or double underscores}}28  irdl.operation @_no_leading_underscore {29    %0 = irdl.any30    irdl.results(res: %0)31  }32}33 34// -----35 36irdl.dialect @test_dialect {37  // expected-error@+1 {{name of operation should not contain leading or double underscores}}38  irdl.operation @no__double__underscores {39    %0 = irdl.any40    irdl.results(res: %0)41  }42}43 44// -----45 46irdl.dialect @test_dialect {47    // expected-error@+1 {{name of operation should not contain uppercase letters}}48    irdl.operation @NoUpperCase {49        %0 = irdl.any50        irdl.results(res: %0)51    }52}53 54// -----55 56irdl.dialect @test_dialect {57  // expected-error@+1 {{name of operation must contain only lowercase letters, digits and underscores}}58  irdl.operation @no_weird_symbol$ {59    %0 = irdl.any60    irdl.results(res: %0)61  }62}63 64// -----65 66irdl.dialect @test_dialect {67  irdl.operation @test_op {68    %0 = irdl.any69    // expected-error@+1 {{name of result #0 should not contain leading or double underscores}}70    irdl.results(_no_leading_underscore: %0)71  }72}73 74// -----75 76irdl.dialect @test_dialect {77  irdl.operation @test_op {78    %0 = irdl.any79    // expected-error@+1 {{name of result #0 should not contain leading or double underscores}}80    irdl.results(no__double__underscores: %0)81  }82}83 84// -----85 86irdl.dialect @test_dialect {87  irdl.operation @test_op {88    %0 = irdl.any89    // expected-error@+1 {{name of result #0 should not contain uppercase letters}}90    irdl.results(NoUpperCase: %0)91  }92}93 94// -----95