[Mlir-commits] [mlir] ab86fc7 - [mlir] Add nodiscard attribute to allowsUnregisteredDialects (#105530)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Aug 21 14:18:25 PDT 2024


Author: Jonas Rickert
Date: 2024-08-21T23:18:21+02:00
New Revision: ab86fc74c04ff508f909b7b6131df1551dd833fc

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

LOG: [mlir] Add nodiscard attribute to allowsUnregisteredDialects (#105530)

This getter can easily be confused with the similar named
allowUnregisteredDialects setter

Added: 
    

Modified: 
    mlir/include/mlir/IR/MLIRContext.h

Removed: 
    


################################################################################
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


        


More information about the Mlir-commits mailing list