[PATCH] D44231: [clang-tidy] Check for sizeof that call functions

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 26 08:47:34 PDT 2018


alexfh accepted this revision.
alexfh added a comment.

LG. Do you need someone to submit this for you?



================
Comment at: test/clang-tidy/misc-sizeof-expression.cpp:17
 
+enum E { E_VALUE = 0 };
+
----------------
aaron.ballman wrote:
> Can you add a C++11 test case using `enum class` -- I am worried that the `isInteger()` matcher will return false for that type.
> 
> Also, I think you should have a test case for `bool`; I think the check will diagnose bool types but I'm not certain there's value in diagnosing those. What do you think?
> I think the check will diagnose bool types but I'm not certain there's value in diagnosing those

It will be easier to decide once someone finds a few examples of those in real life code.


https://reviews.llvm.org/D44231





More information about the cfe-commits mailing list