Index: clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp @@ -48,6 +48,9 @@ if (StartLoc.isMacroID() && IgnoreMacros) return; + if (MatchedDecl->getDeclContext()->isExternCContext()) + return; + static const char *UseUsingWarning = "use 'using' instead of 'typedef'"; // Warn at StartLoc but do not fix if there is macro or array. Index: clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp =================================================================== --- clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp +++ clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp @@ -278,3 +278,7 @@ // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef' // CHECK-FIXES: using EnumT2_CheckTypedefImpactFromAnotherFile = enum { ea2, eb2 }; +extern "C" { +typedef int Type; +// No messages expected, since this code may be shared verbatim with C. +}