| 2334 | #define checkIntToPointerCast(...) checkIntToPointerCast_(__FILE__, __LINE__, __VA_ARGS__) |
| 2335 | template<size_t size> |
| 2336 | void checkIntToPointerCast_(const char* file, int line, const char (&code)[size]) { |
| 2337 | |
| 2338 | const Settings settings = settingsBuilder().severity(Severity::portability).build(); |
| 2339 | |
| 2340 | // Tokenize.. |
| 2341 | SimpleTokenizer tokenizerCpp(settings, *this); |
| 2342 | ASSERT_LOC(tokenizerCpp.tokenize(code), file, line); |
| 2343 | |
| 2344 | CheckOtherImpl checkOtherCpp(&tokenizerCpp, settings, *this); |
| 2345 | checkOtherCpp.warningIntToPointerCast(); |
| 2346 | } |
| 2347 | |
| 2348 | void intToPointerCast() { |
| 2349 | // #3630 |
nothing calls this directly
no test coverage detected