<div dir="ltr"><div dir="ltr">Hello Ivan,<br><br>This commit broke tests to few our builders:<br><br><a href="http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/40886">http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/40886</a><br><a href="http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast">http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast</a><br><br>. . .<br>Failing Tests (2):<br> Clang Tools :: clang-tidy/mpi-buffer-deref.cpp<br> Clang Tools :: clang-tidy/mpi-type-mismatch.cpp<br><br>Please have a look ASAP?<br><br>Thanks<br><br>Galina<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Dec 13, 2018 at 6:40 AM Ivan Donchevskii via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Author: yvvan<br>
Date: Thu Dec 13 06:37:17 2018<br>
New Revision: 349038<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=349038&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=349038&view=rev</a><br>
Log:<br>
[clang-tidy] Share the forced linking code between clang-tidy tool and plugin<br>
<br>
Extract code that forces linking to the separate header and include it in both plugin and standalone tool<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D55595" rel="noreferrer" target="_blank">https://reviews.llvm.org/D55595</a><br>
<br>
Added:<br>
clang-tools-extra/trunk/clang-tidy/ClangTidyForceLinker.h<br>
Modified:<br>
clang-tools-extra/trunk/clang-tidy/plugin/ClangTidyPlugin.cpp<br>
clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp<br>
<br>
Added: clang-tools-extra/trunk/clang-tidy/ClangTidyForceLinker.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidyForceLinker.h?rev=349038&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidyForceLinker.h?rev=349038&view=auto</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/clang-tidy/ClangTidyForceLinker.h (added)<br>
+++ clang-tools-extra/trunk/clang-tidy/ClangTidyForceLinker.h Thu Dec 13 06:37:17 2018<br>
@@ -0,0 +1,108 @@<br>
+//===- ClangTidyForceLinker.h - clang-tidy --------------------------------===//<br>
+//<br>
+// The LLVM Compiler Infrastructure<br>
+//<br>
+// This file is distributed under the University of Illinois Open Source<br>
+// License. See LICENSE.TXT for details.<br>
+//<br>
+//===----------------------------------------------------------------------===//<br>
+<br>
+#include "llvm/Support/Compiler.h"<br>
+<br>
+namespace clang {<br>
+namespace tidy {<br>
+<br>
+// This anchor is used to force the linker to link the CERTModule.<br>
+extern volatile int CERTModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED CERTModuleAnchorDestination =<br>
+ CERTModuleAnchorSource;<br>
+<br>
+// This anchor is used to force the linker to link the AbseilModule.<br>
+extern volatile int AbseilModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED AbseilModuleAnchorDestination =<br>
+ AbseilModuleAnchorSource;<br>
+<br>
+// This anchor is used to force the linker to link the BoostModule.<br>
+extern volatile int BoostModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED BoostModuleAnchorDestination =<br>
+ BoostModuleAnchorSource;<br>
+<br>
+// This anchor is used to force the linker to link the BugproneModule.<br>
+extern volatile int BugproneModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED BugproneModuleAnchorDestination =<br>
+ BugproneModuleAnchorSource;<br>
+<br>
+// This anchor is used to force the linker to link the LLVMModule.<br>
+extern volatile int LLVMModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED LLVMModuleAnchorDestination =<br>
+ LLVMModuleAnchorSource;<br>
+<br>
+// This anchor is used to force the linker to link the CppCoreGuidelinesModule.<br>
+extern volatile int CppCoreGuidelinesModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED CppCoreGuidelinesModuleAnchorDestination =<br>
+ CppCoreGuidelinesModuleAnchorSource;<br>
+<br>
+// This anchor is used to force the linker to link the FuchsiaModule.<br>
+extern volatile int FuchsiaModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED FuchsiaModuleAnchorDestination =<br>
+ FuchsiaModuleAnchorSource;<br>
+<br>
+// This anchor is used to force the linker to link the GoogleModule.<br>
+extern volatile int GoogleModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED GoogleModuleAnchorDestination =<br>
+ GoogleModuleAnchorSource;<br>
+<br>
+// This anchor is used to force the linker to link the AndroidModule.<br>
+extern volatile int AndroidModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED AndroidModuleAnchorDestination =<br>
+ AndroidModuleAnchorSource;<br>
+<br>
+// This anchor is used to force the linker to link the MiscModule.<br>
+extern volatile int MiscModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED MiscModuleAnchorDestination =<br>
+ MiscModuleAnchorSource;<br>
+<br>
+// This anchor is used to force the linker to link the ModernizeModule.<br>
+extern volatile int ModernizeModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED ModernizeModuleAnchorDestination =<br>
+ ModernizeModuleAnchorSource;<br>
+<br>
+#if CLANG_ENABLE_STATIC_ANALYZER<br>
+// This anchor is used to force the linker to link the MPIModule.<br>
+extern volatile int MPIModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED MPIModuleAnchorDestination =<br>
+ MPIModuleAnchorSource;<br>
+#endif<br>
+<br>
+// This anchor is used to force the linker to link the PerformanceModule.<br>
+extern volatile int PerformanceModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED PerformanceModuleAnchorDestination =<br>
+ PerformanceModuleAnchorSource;<br>
+<br>
+// This anchor is used to force the linker to link the PortabilityModule.<br>
+extern volatile int PortabilityModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED PortabilityModuleAnchorDestination =<br>
+ PortabilityModuleAnchorSource;<br>
+<br>
+// This anchor is used to force the linker to link the ReadabilityModule.<br>
+extern volatile int ReadabilityModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED ReadabilityModuleAnchorDestination =<br>
+ ReadabilityModuleAnchorSource;<br>
+<br>
+// This anchor is used to force the linker to link the ObjCModule.<br>
+extern volatile int ObjCModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED ObjCModuleAnchorDestination =<br>
+ ObjCModuleAnchorSource;<br>
+<br>
+// This anchor is used to force the linker to link the HICPPModule.<br>
+extern volatile int HICPPModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED HICPPModuleAnchorDestination =<br>
+ HICPPModuleAnchorSource;<br>
+<br>
+// This anchor is used to force the linker to link the ZirconModule.<br>
+extern volatile int ZirconModuleAnchorSource;<br>
+static int LLVM_ATTRIBUTE_UNUSED ZirconModuleAnchorDestination =<br>
+ ZirconModuleAnchorSource;<br>
+<br>
+} // namespace tidy<br>
+} // namespace clang<br>
<br>
Modified: clang-tools-extra/trunk/clang-tidy/plugin/ClangTidyPlugin.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/plugin/ClangTidyPlugin.cpp?rev=349038&r1=349037&r2=349038&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/plugin/ClangTidyPlugin.cpp?rev=349038&r1=349037&r2=349038&view=diff</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/clang-tidy/plugin/ClangTidyPlugin.cpp (original)<br>
+++ clang-tools-extra/trunk/clang-tidy/plugin/ClangTidyPlugin.cpp Thu Dec 13 06:37:17 2018<br>
@@ -8,6 +8,7 @@<br>
//===----------------------------------------------------------------------===//<br>
<br>
#include "../ClangTidy.h"<br>
+#include "../ClangTidyForceLinker.h"<br>
#include "../ClangTidyModule.h"<br>
#include "clang/Config/config.h"<br>
#include "clang/Frontend/CompilerInstance.h"<br>
@@ -75,96 +76,3 @@ volatile int ClangTidyPluginAnchorSource<br>
<br>
static clang::FrontendPluginRegistry::Add<clang::tidy::ClangTidyPluginAction><br>
X("clang-tidy", "clang-tidy");<br>
-<br>
-namespace clang {<br>
-namespace tidy {<br>
-<br>
-// This anchor is used to force the linker to link the AbseilModule.<br>
-extern volatile int AbseilModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED AbseilModuleAnchorDestination =<br>
- AbseilModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the AndroidModule.<br>
-extern volatile int AndroidModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED AndroidModuleAnchorDestination =<br>
- AndroidModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the BoostModule.<br>
-extern volatile int BoostModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED BoostModuleAnchorDestination =<br>
- BoostModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the CERTModule.<br>
-extern volatile int CERTModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED CERTModuleAnchorDestination =<br>
- CERTModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the CppCoreGuidelinesModule.<br>
-extern volatile int CppCoreGuidelinesModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED CppCoreGuidelinesModuleAnchorDestination =<br>
- CppCoreGuidelinesModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the FuchsiaModule.<br>
-extern volatile int FuchsiaModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED FuchsiaModuleAnchorDestination =<br>
- FuchsiaModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the GoogleModule.<br>
-extern volatile int GoogleModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED GoogleModuleAnchorDestination =<br>
- GoogleModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the HICPPModule.<br>
-extern volatile int HICPPModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED HICPPModuleAnchorDestination =<br>
- HICPPModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the LLVMModule.<br>
-extern volatile int LLVMModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED LLVMModuleAnchorDestination =<br>
- LLVMModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the MiscModule.<br>
-extern volatile int MiscModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED MiscModuleAnchorDestination =<br>
- MiscModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the ModernizeModule.<br>
-extern volatile int ModernizeModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED ModernizeModuleAnchorDestination =<br>
- ModernizeModuleAnchorSource;<br>
-<br>
-#if CLANG_ENABLE_STATIC_ANALYZER<br>
-// This anchor is used to force the linker to link the MPIModule.<br>
-extern volatile int MPIModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED MPIModuleAnchorDestination =<br>
- MPIModuleAnchorSource;<br>
-#endif<br>
-<br>
-// This anchor is used to force the linker to link the ObjCModule.<br>
-extern volatile int ObjCModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED ObjCModuleAnchorDestination =<br>
- ObjCModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the PerformanceModule.<br>
-extern volatile int PerformanceModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED PerformanceModuleAnchorDestination =<br>
- PerformanceModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the PortabilityModule.<br>
-extern volatile int PortabilityModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED PortabilityModuleAnchorDestination =<br>
- PortabilityModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the ReadabilityModule.<br>
-extern volatile int ReadabilityModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED ReadabilityModuleAnchorDestination =<br>
- ReadabilityModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the ZirconModule.<br>
-extern volatile int ZirconModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED ZirconModuleAnchorDestination =<br>
- ZirconModuleAnchorSource;<br>
-<br>
-} // namespace tidy<br>
-} // namespace clang<br>
<br>
Modified: clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp?rev=349038&r1=349037&r2=349038&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp?rev=349038&r1=349037&r2=349038&view=diff</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp (original)<br>
+++ clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp Thu Dec 13 06:37:17 2018<br>
@@ -16,6 +16,7 @@<br>
//===----------------------------------------------------------------------===//<br>
<br>
#include "../ClangTidy.h"<br>
+#include "../ClangTidyForceLinker.h"<br>
#include "clang/Config/config.h"<br>
#include "clang/Tooling/CommonOptionsParser.h"<br>
#include "llvm/Support/Process.h"<br>
@@ -482,98 +483,6 @@ static int clangTidyMain(int argc, const<br>
return 0;<br>
}<br>
<br>
-// This anchor is used to force the linker to link the CERTModule.<br>
-extern volatile int CERTModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED CERTModuleAnchorDestination =<br>
- CERTModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the AbseilModule.<br>
-extern volatile int AbseilModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED AbseilModuleAnchorDestination =<br>
- AbseilModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the BoostModule.<br>
-extern volatile int BoostModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED BoostModuleAnchorDestination =<br>
- BoostModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the BugproneModule.<br>
-extern volatile int BugproneModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED BugproneModuleAnchorDestination =<br>
- BugproneModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the LLVMModule.<br>
-extern volatile int LLVMModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED LLVMModuleAnchorDestination =<br>
- LLVMModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the CppCoreGuidelinesModule.<br>
-extern volatile int CppCoreGuidelinesModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED CppCoreGuidelinesModuleAnchorDestination =<br>
- CppCoreGuidelinesModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the FuchsiaModule.<br>
-extern volatile int FuchsiaModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED FuchsiaModuleAnchorDestination =<br>
- FuchsiaModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the GoogleModule.<br>
-extern volatile int GoogleModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED GoogleModuleAnchorDestination =<br>
- GoogleModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the AndroidModule.<br>
-extern volatile int AndroidModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED AndroidModuleAnchorDestination =<br>
- AndroidModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the MiscModule.<br>
-extern volatile int MiscModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED MiscModuleAnchorDestination =<br>
- MiscModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the ModernizeModule.<br>
-extern volatile int ModernizeModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED ModernizeModuleAnchorDestination =<br>
- ModernizeModuleAnchorSource;<br>
-<br>
-#if CLANG_ENABLE_STATIC_ANALYZER<br>
-// This anchor is used to force the linker to link the MPIModule.<br>
-extern volatile int MPIModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED MPIModuleAnchorDestination =<br>
- MPIModuleAnchorSource;<br>
-#endif<br>
-<br>
-// This anchor is used to force the linker to link the PerformanceModule.<br>
-extern volatile int PerformanceModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED PerformanceModuleAnchorDestination =<br>
- PerformanceModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the PortabilityModule.<br>
-extern volatile int PortabilityModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED PortabilityModuleAnchorDestination =<br>
- PortabilityModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the ReadabilityModule.<br>
-extern volatile int ReadabilityModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED ReadabilityModuleAnchorDestination =<br>
- ReadabilityModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the ObjCModule.<br>
-extern volatile int ObjCModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED ObjCModuleAnchorDestination =<br>
- ObjCModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the HICPPModule.<br>
-extern volatile int HICPPModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED HICPPModuleAnchorDestination =<br>
- HICPPModuleAnchorSource;<br>
-<br>
-// This anchor is used to force the linker to link the ZirconModule.<br>
-extern volatile int ZirconModuleAnchorSource;<br>
-static int LLVM_ATTRIBUTE_UNUSED ZirconModuleAnchorDestination =<br>
- ZirconModuleAnchorSource;<br>
-<br>
} // namespace tidy<br>
} // namespace clang<br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>