Add the ability to attach notes to Diagnostic/InFlightDiagnostic.
authorRiver Riddle <riverriddle@google.com>
Fri, 3 May 2019 18:40:22 +0000 (11:40 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Mon, 6 May 2019 15:26:54 +0000 (08:26 -0700)
commitbaa656352a02accb842c5c416decf2e444212332
tree7078b5b32a03b0a22bc329db3d489b7a70aaeadb
parent258e8d9ce2e7da290dbda335771d5e84e04c813a
Add the ability to attach notes to Diagnostic/InFlightDiagnostic.

    Notes are a way to add additional context to a diagnostic, but don't really make sense as standalone diagnostics. Moving forward, notes will no longer be able to be constructed directly and must be attached to a parent Diagnostic.

    Notes can be attached via `attachNote`:

      auto diag = ...;
      diag.attachNote() << "This is a note";

--

PiperOrigin-RevId: 246545971
mlir/include/mlir/IR/Block.h
mlir/include/mlir/IR/Diagnostics.h
mlir/include/mlir/IR/OpDefinition.h
mlir/include/mlir/IR/Operation.h
mlir/lib/AffineOps/AffineOps.cpp
mlir/lib/Analysis/Verifier.cpp
mlir/lib/IR/Block.cpp
mlir/lib/IR/Diagnostics.cpp
mlir/lib/IR/Operation.cpp