[PATCH] D96725: [clang-tidy] Fix modernize-use-using in extern C code

2021-02-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp:305 }; + +extern "C" { steveire wrote: > njames93 wrote: > > steveire wrote: > > > Can you add tests for typedefs in other scopes like > > > > >

[PATCH] D96725: [clang-tidy] Fix modernize-use-using in extern C code

2021-02-15 Thread Stephen Kelly via Phabricator via cfe-commits
steveire accepted this revision. steveire added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp:305 }; + +extern "C" { njames93 wrote: > steveire wrote: > > Can you

[PATCH] D96725: [clang-tidy] Fix modernize-use-using in extern C code

2021-02-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp:19 +AST_MATCHER(Decl, isInExternC) { + return Node.getDeclContext()->isExternCContext(); This matcher may be useful for other checks, for example, `mode

[PATCH] D96725: [clang-tidy] Fix modernize-use-using in extern C code

2021-02-15 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp:305 }; + +extern "C" { steveire wrote: > Can you add tests for typedefs in other scopes like > > ``` > > extern "C" { > typedef int CType; > > stru

[PATCH] D96725: [clang-tidy] Fix modernize-use-using in extern C code

2021-02-15 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp:305 }; + +extern "C" { Can you add tests for typedefs in other scopes like ``` extern "C" { typedef int CType; struct CAnother { }; typedef struct

[PATCH] D96725: [clang-tidy] Fix modernize-use-using in extern C code

2021-02-15 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 323796. njames93 added a comment. Newline. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96725/new/ https://reviews.llvm.org/D96725 Files: clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp clang-to

[PATCH] D96725: [clang-tidy] Fix modernize-use-using in extern C code

2021-02-15 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh. Herald added a subscriber: xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The check currently erroneously flags typedefs in extern "C" blo