Rename the 'concept' variable in SymbolInterfaces.td
authorSameer Rahmani <lxsameer@gnu.org>
Fri, 26 Mar 2021 20:15:06 +0000 (20:15 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Fri, 26 Mar 2021 20:17:24 +0000 (20:17 +0000)
`concept` is a reserved keyword in C++20, it can't be used as a variable name.
Here is an example of the failure:

```
      auto *concept = getInterfaceFor(op);
            ^
include/mlir/IR/SymbolInterfaces.h.inc:156:12: error: expected expression [clang-diagnostic-error]
      if (!concept)
           ^
```

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D99369

mlir/include/mlir/IR/SymbolInterfaces.td

index 68483c9..0e8f5a1 100644 (file)
@@ -178,10 +178,10 @@ def Symbol : OpInterface<"SymbolOpInterface"> {
   let extraClassDeclaration = [{
     /// Custom classof that handles the case where the symbol is optional.
     static bool classof(Operation *op) {
-      auto *concept = getInterfaceFor(op);
-      if (!concept)
+      auto *opConcept = getInterfaceFor(op);
+      if (!opConcept)
         return false;
-      return !concept->isOptionalSymbol(concept, op) ||
+      return !opConcept->isOptionalSymbol(opConcept, op) ||
              op->getAttr(::mlir::SymbolTable::getSymbolAttrName());
     }
   }];