<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/82314>82314</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang-tidy marks as error compile flag -static-libasan [clang-diagnostic-error] 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-tidy
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          h1laryz
      </td>
    </tr>
</table>

<pre>
    Hi, I am using gcc/g++ as compilers in my projects, but also I want to use .clang-tidy as static analyzer.
While building I am getting an error

error: unknown argument '-static-libasan'; did you mean '-static-libsan'? [clang-diagnostic-error]
14068 warnings and 1 error generated.

How can I disable this warning in .clang-tidy?
Here is my .clang-tidy file:
Checks: >
bugprone-,
cppcoreguidelines-,
modernize-,
performance-,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-vararg,
-modernize-use-trailing-return-type,
readability-magic-numbers,
google-runtime-int,
misc-,
clang-analyzer-,

WarningsAsErrors: '*'
HeaderFilterRegex: 'a^'
FormatStyle: file


this from CMakeLists.txt getting an error during compilation. Because clang-tidy says it is an error.
Clangd I am using for vim/vscode and it also says that this -static-libasan flag is unknown, but actually this flag comes from a third_party library.

set_target_properties(
${PROJECT_NAME} PROPERTIES
CXX_CLANG_TIDY "${CLANG_TIDY_EXECUTABLE}"
)

![изображение](https://github.com/llvm/llvm-project/assets/71406854/eee4fd02-ed71-49e3-8382-446434b2b1ec)

How can I disable this error in .clang-tidy checks?
I tried to add something like this:
-clang-diagnostic-unknown-argument,
-no-unknown-warning-option,
-unknown-argument,

but it didn't help at all.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVU1z4zYM_TX0hUOPRMuWc_DBn9109muy6XR78kAkLLOhSA1JJav99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