aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergio Martins <smartins@kde.org>2018-11-09 10:59:05 +0000
committerSergio Martins <smartins@kde.org>2018-11-09 10:59:05 +0000
commit8a5f5e5dccc0ecaf0e83c91226ad61cbd22b09c2 (patch)
tree47e15150efb3f40a656ccf1c00e0a1bbf2d2d346
parentdd1a33fa8374764c8c94143562e5eea731999093 (diff)
Also enable CLAZY_IGNORE_DIRS and CLAZY_HEADER_FILTER for the plugin
They were only being used by clazy-standalone for some reason.
-rw-r--r--src/Clazy.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Clazy.cpp b/src/Clazy.cpp
index 0751a18f..b8078227 100644
--- a/src/Clazy.cpp
+++ b/src/Clazy.cpp
@@ -223,8 +223,11 @@ bool ClazyASTAction::ParseArgs(const CompilerInstance &ci, const std::vector<std
std::vector<std::string> args = args_;
+ const string headerFilter = getEnvVariable("CLAZY_HEADER_FILTER");
+ const string ignoreDirs = getEnvVariable("CLAZY_IGNORE_DIRS");
+
if (parseArgument("help", args)) {
- m_context = new ClazyContext(ci, getEnvVariable("CLAZY_HEADER_FILTER"), getEnvVariable("CLAZY_IGNORE_DIRS"), ClazyContext::ClazyOption_None);
+ m_context = new ClazyContext(ci, headerFilter, ignoreDirs, ClazyContext::ClazyOption_None);
PrintHelp(llvm::errs());
return true;
}
@@ -257,7 +260,7 @@ bool ClazyASTAction::ParseArgs(const CompilerInstance &ci, const std::vector<std
if (parseArgument("ignore-included-files", args))
m_options |= ClazyContext::ClazyOption_IgnoreIncludedFiles;
- m_context = new ClazyContext(ci, /*headerFilter=*/ "", /*ignoreDirs=*/ "", m_options);
+ m_context = new ClazyContext(ci, headerFilter, ignoreDirs, m_options);
// This argument is for debugging purposes
const bool dbgPrintRequestedChecks = parseArgument("print-requested-checks", args);