[PATCH] D124462: [Analyzer] Fix clang::ento::taint::dumpTaint definition

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 28 08:51:56 PDT 2022


aaron.ballman added a comment.

In D124462#3480219 <https://reviews.llvm.org/D124462#3480219>, @steakhal wrote:

> Thanks for the stats.
> @aaron.ballman WDYT, where should we put the `LLVM_DUMP_METHOD` ?

The documentation for the attribute says function definitions, but I don't think it matters in terms of the semantics of the attributes. I'd probably put it on the definition in this case because the goal is to keep the function around at runtime but it doesn't impact the interface of the call or how users would use it at compile time.

I noticed that we seem to be pretty bad about this advice however:

  /// Note that you should also surround dump() functions with
  /// `#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)` so they do always
  /// get stripped in release builds.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124462



More information about the cfe-commits mailing list