Skip to content

Commit

Permalink
Bugfix: no warnings displayed in output
Browse files Browse the repository at this point in the history
  • Loading branch information
mariru27 committed Jul 31, 2024
1 parent 2d806f1 commit ca07776
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ClangPowerTools/ClangPowerToolsShared/Tooling/v1/clang-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ Set-Variable -name kClangTidyFixExportFixes -value "--export-fixes=" -option

Set-Variable -name kClangCompiler -value "clang++.exe" -option Constant

Set-Variable -name kQuiet -value '-quiet' -option Constant
Set-Variable -name kEndOptionMarker -value "--" -option Constant

Set-Variable -name kClangTidyFlagHeaderFilter -value "-header-filter=" -option Constant
Set-Variable -name kClangTidyFlagChecks -value "-checks=" -option Constant
Set-Variable -name kClangTidyUseFile -value ".clang-tidy" -option Constant
Expand Down Expand Up @@ -832,7 +835,7 @@ Function Get-TidyCallArguments( [Parameter(Mandatory=$false)][string[]] $preproc
, [Parameter(Mandatory=$false)][switch] $fix
, [Parameter(Mandatory=$false)][string] $compilationDatabaseDir)
{
[string[]] $tidyArgs = @('-quiet')
[string[]] $tidyArgs = @()
if ($fix)
{
# Map tidy-fix replacements temprorary file path to original file path
Expand Down Expand Up @@ -868,6 +871,7 @@ Function Get-TidyCallArguments( [Parameter(Mandatory=$false)][string[]] $preproc
}
}

$tidyArgs += $kQuiet
if (![string]::IsNullOrEmpty($compilationDatabaseDir))
{
if ($compilationDatabaseDir -eq '_')
Expand All @@ -881,7 +885,7 @@ Function Get-TidyCallArguments( [Parameter(Mandatory=$false)][string[]] $preproc
return $tidyArgs
}

$tidyArgs += "--"
$tidyArgs += $kEndOptionMarker

$tidyArgs += Get-ClangIncludeDirectories -includeDirectories $includeDirectories `
-additionalIncludeDirectories $additionalIncludeDirectories
Expand Down Expand Up @@ -1025,7 +1029,7 @@ Function Run-ClangJobs( [Parameter(Mandatory=$true)] $clangJobs
[string] $clangConfigContent = ""
if ($job.FilePath -like '*tidy*')
{
if (!$job.ArgumentList -like "$($job.kClangTidyCompilationDatabaseDir)*")
if (!($job.ArgumentList -like "$($job.kClangTidyCompilationDatabaseDir)*"))
{
# We have to separate Clang args from Tidy args
$splitparams = $job.ArgumentList -split " -- "
Expand Down

0 comments on commit ca07776

Please sign in to comment.