[Mlir-commits] [mlir] 303d14f - [MLIR] NFC. Fix unused context warning from Parser.h
Uday Bondhugula
llvmlistbot at llvm.org
Thu Nov 17 02:35:24 PST 2022
Author: Uday Bondhugula
Date: 2022-11-17T16:03:09+05:30
New Revision: 303d14f33de09b38ffb00711de36e2c3b9023039
URL: https://github.com/llvm/llvm-project/commit/303d14f33de09b38ffb00711de36e2c3b9023039
DIFF: https://github.com/llvm/llvm-project/commit/303d14f33de09b38ffb00711de36e2c3b9023039.diff
LOG: [MLIR] NFC. Fix unused context warning from Parser.h
NFC. Fix unused context warning from Parser.h.
```
..include/mlir/Parser/Parser.h:39:38: warning: parameter ‘context’ set but not used [-Wunused-but-set-parameter]
39 | Block *parsedBlock, MLIRContext *context, Location sourceFileLoc) {
```
Differential Revision: https://reviews.llvm.org/D138192
Added:
Modified:
mlir/include/mlir/Parser/Parser.h
Removed:
################################################################################
diff --git a/mlir/include/mlir/Parser/Parser.h b/mlir/include/mlir/Parser/Parser.h
index f014b2bf7e62e..c17b568165ccb 100644
--- a/mlir/include/mlir/Parser/Parser.h
+++ b/mlir/include/mlir/Parser/Parser.h
@@ -49,6 +49,7 @@ inline OwningOpRef<ContainerOpT> constructContainerOpForParserIfNecessary(
// If not, then build a new top-level op if a concrete operation type was
// specified.
if constexpr (std::is_same_v<ContainerOpT, Operation *>) {
+ (void)context;
return emitError(sourceFileLoc)
<< "source must contain a single top-level operation, found: "
<< parsedBlock->getOperations().size(),
More information about the Mlir-commits
mailing list