[all-commits] [llvm/llvm-project] ef3f47: [attributes][analyzer] Implement [[clang::suppress...
Artem Dergachev via All-commits
all-commits at lists.llvm.org
Wed Dec 13 18:09:43 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ef3f476097c7a13c0578e331e44b584b706089ed
https://github.com/llvm/llvm-project/commit/ef3f476097c7a13c0578e331e44b584b706089ed
Author: Artem Dergachev <adergachev at apple.com>
Date: 2023-12-13 (Wed, 13 Dec 2023)
Changed paths:
M clang/include/clang/Basic/Attr.td
M clang/include/clang/Basic/AttrDocs.td
M clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
A clang/include/clang/StaticAnalyzer/Core/BugReporter/BugSuppression.h
M clang/lib/Sema/SemaDeclAttr.cpp
M clang/lib/Sema/SemaStmtAttr.cpp
M clang/lib/StaticAnalyzer/Core/BugReporter.cpp
A clang/lib/StaticAnalyzer/Core/BugSuppression.cpp
M clang/lib/StaticAnalyzer/Core/CMakeLists.txt
A clang/test/Analysis/suppression-attr-doc.cpp
A clang/test/Analysis/suppression-attr.m
A clang/test/SemaCXX/attr-suppress.cpp
R clang/test/SemaCXX/suppress.cpp
A clang/test/SemaObjC/attr-suppress.m
M clang/www/analyzer/faq.html
Log Message:
-----------
[attributes][analyzer] Implement [[clang::suppress]] - suppress static analysis warnings.
The new attribute can be placed on statements in order to suppress
arbitrary warnings produced by static analysis tools at those statements.
Previously such suppressions were implemented as either informal comments
(eg. clang-tidy `// NOLINT:`) or with preprocessor macros (eg.
clang static analyzer's `#ifdef __clang_analyzer__`). The attribute
provides a universal, formal, flexible and neat-looking suppression mechanism.
Implement support for the new attribute in the clang static analyzer;
clang-tidy coming soon.
The attribute allows specifying which specific warnings to suppress,
in the form of free-form strings that are intended to be specific to
the tools, but currently none are actually supported; so this is also
going to be a future improvement.
Differential Revision: https://reviews.llvm.org/D93110
More information about the All-commits
mailing list