[PATCH] D159162: [llvm] Add assembly syntax highlighting

David Spickett via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 5 01:02:48 PDT 2023


DavidSpickett added inline comments.


================
Comment at: llvm/include/llvm/MC/MCInstPrinter.h:100
+  public:
+    WithMarkup(raw_ostream &OS, Markup M, bool EnableMarkup, bool EnableColor);
+    ~WithMarkup();
----------------
danilaml wrote:
> danilaml wrote:
> > jroelofs wrote:
> > > maybe this should be `[[nodiscard]]`
> > `[[nodiscard]]` on constructors is a C++20 feature, even though it works on older compilers (like gcc 7.4 we claim to support), it still produces an annoying (especially if you compile with -Werror) warning. Just wanted to mention.
> Correction - it's a DR against C++17 so it's retroactively added there, but doesn't change the fact that older compilers may still produce warnings.
https://github.com/llvm/llvm-project/commit/48987fb8cc844667c6ee2a315140cb8f3d817fc1 removes it, just because it's blocking some downstream stuff we have.

I do see the logic in having it so we don't forget to colour things but not sure how to do that in a compatible way right now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159162/new/

https://reviews.llvm.org/D159162



More information about the llvm-commits mailing list