[Mlir-commits] [mlir] 86a2fa4 - Rename the 'concept' variable in SymbolInterfaces.td

Mehdi Amini llvmlistbot at llvm.org
Fri Mar 26 13:19:26 PDT 2021


Author: Sameer Rahmani
Date: 2021-03-26T20:17:24Z
New Revision: 86a2fa499879a5d097a5c08cd7111f1ea1cad396

URL: https://github.com/llvm/llvm-project/commit/86a2fa499879a5d097a5c08cd7111f1ea1cad396
DIFF: https://github.com/llvm/llvm-project/commit/86a2fa499879a5d097a5c08cd7111f1ea1cad396.diff

LOG: Rename the 'concept' variable in  SymbolInterfaces.td

`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

Added: 
    

Modified: 
    mlir/include/mlir/IR/SymbolInterfaces.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/SymbolInterfaces.td b/mlir/include/mlir/IR/SymbolInterfaces.td
index 68483c9677db..0e8f5a13fe55 100644
--- a/mlir/include/mlir/IR/SymbolInterfaces.td
+++ b/mlir/include/mlir/IR/SymbolInterfaces.td
@@ -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());
     }
   }];


        


More information about the Mlir-commits mailing list