PKGBUILDs/extra/qtcreator/qtcreator-clang-plugins.patch

65 lines
3.4 KiB
Diff
Raw Normal View History

2018-08-26 16:27:21 +00:00
diff --git a/src/plugins/clangcodemodel/clangeditordocumentprocessor.cpp b/src/plugins/clangcodemodel/clangeditordocumentprocessor.cpp
2019-04-22 13:08:00 +00:00
index 706c5101a3..dbfaeb8457 100644
2018-08-26 16:27:21 +00:00
--- a/src/plugins/clangcodemodel/clangeditordocumentprocessor.cpp
+++ b/src/plugins/clangcodemodel/clangeditordocumentprocessor.cpp
2019-04-22 13:08:00 +00:00
@@ -511,6 +511,7 @@ private:
2018-08-26 16:27:21 +00:00
if (tidyMode == Mode::Disabled)
return;
2019-04-22 13:08:00 +00:00
+ m_options.append(CppTools::XclangArgs({"-load", "libclangTidyPlugin.so"}));
m_options.append(CppTools::XclangArgs({"-add-plugin", "clang-tidy"}));
2018-08-26 16:27:21 +00:00
if (tidyMode == Mode::File)
2019-04-22 13:08:00 +00:00
@@ -526,15 +527,15 @@ private:
2018-08-26 16:27:21 +00:00
if (checks.isEmpty())
return;
2019-04-22 13:08:00 +00:00
- m_options.append(CppTools::XclangArgs({"-add-plugin",
- "clang-lazy",
- "-plugin-arg-clang-lazy",
+ m_options.append(CppTools::XclangArgs({"-load", "ClazyPlugin.so", "-add-plugin",
+ "clazy",
+ "-plugin-arg-clazy",
"enable-all-fixits",
- "-plugin-arg-clang-lazy",
+ "-plugin-arg-clazy",
"no-autowrite-fixits",
- "-plugin-arg-clang-lazy",
+ "-plugin-arg-clazy",
checks,
- "-plugin-arg-clang-lazy",
+ "-plugin-arg-clazy",
"ignore-included-files"}));
}
2018-08-26 16:27:21 +00:00
diff --git a/src/plugins/clangtools/clangtidyclazyrunner.cpp b/src/plugins/clangtools/clangtidyclazyrunner.cpp
2019-04-22 13:08:00 +00:00
index a580704243..7a8740a5cc 100644
2018-08-26 16:27:21 +00:00
--- a/src/plugins/clangtools/clangtidyclazyrunner.cpp
+++ b/src/plugins/clangtools/clangtidyclazyrunner.cpp
2019-04-22 13:08:00 +00:00
@@ -76,6 +76,7 @@ QStringList ClangTidyClazyRunner::constructCommandLineArguments(const QStringLis
2018-08-26 16:27:21 +00:00
const ClangDiagnosticConfig::TidyMode tidyMode = m_diagnosticConfig.clangTidyMode();
if (tidyMode != ClangDiagnosticConfig::TidyMode::Disabled) {
2019-04-22 13:08:00 +00:00
+ arguments << XclangArgs({"-load", "libclangTidyPlugin.so"});
arguments << XclangArgs({"-add-plugin", "clang-tidy"});
2018-08-26 16:27:21 +00:00
if (tidyMode != ClangDiagnosticConfig::TidyMode::File) {
const QString tidyChecks = m_diagnosticConfig.clangTidyChecks();
2019-04-22 13:08:00 +00:00
@@ -85,13 +86,13 @@ QStringList ClangTidyClazyRunner::constructCommandLineArguments(const QStringLis
2018-08-26 16:27:21 +00:00
const QString clazyChecks = m_diagnosticConfig.clazyChecks();
if (!clazyChecks.isEmpty()) {
2019-04-22 13:08:00 +00:00
- arguments << XclangArgs({"-add-plugin",
+ arguments << XclangArgs({"-load", "ClazyPlugin.so", "-add-plugin",
"clang-lazy",
- "-plugin-arg-clang-lazy",
+ "-plugin-arg-clazy",
"enable-all-fixits",
- "-plugin-arg-clang-lazy",
+ "-plugin-arg-clazy",
"no-autowrite-fixits",
- "-plugin-arg-clang-lazy",
+ "-plugin-arg-clazy",
m_diagnosticConfig.clazyChecks()});
}