[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 19 11:33:13 PDT 2019


aaron.ballman added a comment.

In D63423#1550768 <https://reviews.llvm.org/D63423#1550768>, @xbolva00 wrote:

> >> Perhaps the author can run the check over a large corpus of code to see whether fps come up in practice? (The presence of fps will suggest to not warn in macros, but the absence of fps won't tell us too much.)
>
> Sorry, I have no time nor spare computers to check big codebases. As @jfb said, let's start with a conservative approach and possibly improve it in the future.


I can live with that, but my concern is that we often don't do that "improve it in the future" bit and we already know about buggy cases in the wild where the diagnostic will not trigger. Given how often people use macros for simple, but wrong, constructs like my `POW` example, I think this reduces the utility of the check.

What are the GCC folks planning to do with macros?


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

https://reviews.llvm.org/D63423





More information about the cfe-commits mailing list