Skip to content

Commit d01f559

Browse files
authored
[mlir] Fix c++20 compat warning. NFC. (#65801)
`concept` is a c++20 keyword and makes some buildbots fail: https://lab.llvm.org/buildbot/#/builders/160/builds/24345
1 parent ca2a4e7 commit d01f559

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

mlir/test/mlir-tblgen/op-interface.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ def ExtraClassOfInterface : OpInterface<"ExtraClassOfInterface"> {
1111

1212
// DECL: class ExtraClassOfInterface
1313
// DECL: static bool classof(::mlir::Operation * base) {
14-
// DECL-NEXT: auto* concept = getInterfaceFor(base);
15-
// DECL-NEXT: if (!concept)
14+
// DECL-NEXT: auto* interface = getInterfaceFor(base);
15+
// DECL-NEXT: if (!interface)
1616
// DECL-NEXT: return false;
17-
// DECL-NEXT: ExtraClassOfInterface odsInterfaceInstance(base, concept);
17+
// DECL-NEXT: ExtraClassOfInterface odsInterfaceInstance(base, interface);
1818
// DECL-NEXT: return odsInterfaceInstance->someOtherMethod();
1919
// DECL-NEXT: }
2020

mlir/tools/mlir-tblgen/OpInterfacesGen.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,10 +584,10 @@ void InterfaceGenerator::emitInterfaceDecl(const Interface &interface) {
584584
auto extraClassOfFmt = tblgen::FmtContext();
585585
extraClassOfFmt.addSubst(substVar, "odsInterfaceInstance");
586586
os << " static bool classof(" << valueType << " base) {\n"
587-
<< " auto* concept = getInterfaceFor(base);\n"
588-
<< " if (!concept)\n"
587+
<< " auto* interface = getInterfaceFor(base);\n"
588+
<< " if (!interface)\n"
589589
" return false;\n"
590-
" " << interfaceName << " odsInterfaceInstance(base, concept);\n"
590+
" " << interfaceName << " odsInterfaceInstance(base, interface);\n"
591591
<< " " << tblgen::tgfmt(extraClassOf->trim(), &extraClassOfFmt)
592592
<< "\n }\n";
593593
}

0 commit comments

Comments
 (0)