[Mlir-commits] [mlir] [mlir] Add nodiscard attribute to allowsUnregisteredDialects (PR #105530)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Aug 21 07:02:38 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-core
Author: Jonas Rickert (jorickert)
<details>
<summary>Changes</summary>
This getter can easily be confused with the similar named allowUnregisteredDialects setter
---
Full diff: https://github.com/llvm/llvm-project/pull/105530.diff
1 Files Affected:
- (modified) mlir/include/mlir/IR/MLIRContext.h (+1-1)
``````````diff
diff --git a/mlir/include/mlir/IR/MLIRContext.h b/mlir/include/mlir/IR/MLIRContext.h
index 11e5329f43e681..d17bbac81655b5 100644
--- a/mlir/include/mlir/IR/MLIRContext.h
+++ b/mlir/include/mlir/IR/MLIRContext.h
@@ -133,7 +133,7 @@ class MLIRContext {
Dialect *getOrLoadDialect(StringRef name);
/// Return true if we allow to create operation for unregistered dialects.
- bool allowsUnregisteredDialects();
+ [[nodiscard]] bool allowsUnregisteredDialects();
/// Enables creating operations in unregistered dialects.
/// This option is **heavily discouraged**: it is convenient during testing
``````````
</details>
https://github.com/llvm/llvm-project/pull/105530
More information about the Mlir-commits
mailing list