[PATCH] D111909: [clang-tidy] DefinitionsInHeadersCheck: Added option for checking C Code

2021-10-15 Thread Max Schroetter via Phabricator via cfe-commits
schrc3b6 created this revision. Herald added a subscriber: xazax.hun. schrc3b6 added a reviewer: alexfh. schrc3b6 updated this revision to Diff 380104. schrc3b6 added a comment. schrc3b6 published this revision for review. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-co

[PATCH] D111909: [clang-tidy] DefinitionsInHeadersCheck: Added option for checking C Code

2021-10-15 Thread Max Schroetter via Phabricator via cfe-commits
schrc3b6 added a comment. This is my first PR here, so if I missed something, I will be more than happy to change anything if you point me in the right direction. I didn't add an extra test so far, because check_clang_tidy.py doesn't support the .h extension so far. And before adding C support

[PATCH] D111909: [clang-tidy] DefinitionsInHeadersCheck: Added option for checking C Code

2021-10-18 Thread Max Schroetter via Phabricator via cfe-commits
schrc3b6 added a comment. In D111909#3069668 , @whisperity wrote: > Will `int I;` being in a header, with no initialiser, be caught? Currently it will be caught. 1 warning generated. ./foo.h:1:5: warning: variable 'i' defined in a header file; vari