[PATCH] D154880: [-Wunsafe-buffer-usage] Add a facility for debugging low fixit coverage.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 26 14:17:26 PDT 2023


NoQ added inline comments.


================
Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:1730-1731
 
+#define DEBUG_NOTE_DECL_FAIL(D, Msg)  \
+Handler.addDebugNoteForVar((D), (D)->getBeginLoc(), "failed to produce fixit for declaration '" + D->getNameAsString() + "'" + Msg)
+
----------------
Ooo that's actually really nice! Maybe you can go even further and add this extra harness, so that to eliminate the need for `#ifndef NDEBUG` at every use.


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

https://reviews.llvm.org/D154880



More information about the cfe-commits mailing list