This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy]: modernize-use-using: don't diagnose typedefs in `extern "C"` DeclContexts
Changes PlannedPublic

Authored by george.burgess.iv on Mar 2 2020, 4:50 PM.

Details

Summary

If code is shared between C and C++, converting a typedef to a using isn't possible. Being more conservative about emitting these lints in extern "C" blocks seems like a good compromise to me.

Diff Detail

Event Timeline

Eugene.Zelenko retitled this revision from [modernize-use-using] Don't diagnose typedefs in `extern "C"` DeclContexts to [clang-tidy]: modernize-use-using: don't diagnose typedefs in `extern "C"` DeclContexts.Mar 2 2020, 6:51 PM
Eugene.Zelenko added reviewers: alexfh, hokein.
Eugene.Zelenko set the repository for this revision to rG LLVM Github Monorepo.
Eugene.Zelenko added a project: Restricted Project.
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2020, 6:51 PM
Herald added a subscriber: xazax.hun. · View Herald Transcript
george.burgess.iv planned changes to this revision.Mar 3 2020, 12:59 PM

I see -- that seems like a much broader change, but also probably worthwhile. I have a few ideas about how to tackle that; let me see what I can come up with locally.

Thanks!