We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3a2990 commit c60f112Copy full SHA for c60f112
mlir/include/mlir/Bindings/Python/Diagnostics.h
@@ -10,6 +10,7 @@
10
#define MLIR_BINDINGS_PYTHON_DIAGNOSTICS_H
11
12
#include <cassert>
13
+#include <cstdint>
14
#include <string>
15
16
#include "mlir-c/Diagnostics.h"
@@ -45,6 +46,11 @@ class CollectDiagnosticsToStringScope {
45
46
mlirLocationPrint(loc, printer, data);
47
*static_cast<std::string *>(data) += ": ";
48
mlirDiagnosticPrint(diag, printer, data);
49
+ for (intptr_t i = 0; i < mlirDiagnosticGetNumNotes(diag); i++) {
50
+ *static_cast<std::string *>(data) += "\n";
51
+ MlirDiagnostic note = mlirDiagnosticGetNote(diag, i);
52
+ handler(note, data);
53
+ }
54
return mlirLogicalResultSuccess();
55
}
56
0 commit comments