-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[clang-tidy] support ak_attr_info in diagnostic forwarding #147503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-clang-tools-extra Author: Oleksandr T. (a-tarasyuk) ChangesThis patch addresses missing support for forwarding Full diff: https://github.com/llvm/llvm-project/pull/147503.diff 1 Files Affected:
diff --git a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
index c35f0b941c600..f9d75978d0ea8 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
@@ -544,6 +544,9 @@ void ClangTidyDiagnosticConsumer::forwardDiagnostic(const Diagnostic &Info) {
case clang::DiagnosticsEngine::ak_attr:
Builder << reinterpret_cast<Attr *>(Info.getRawArg(Index));
break;
+ case clang::DiagnosticsEngine::ak_attr_info:
+ Builder << reinterpret_cast<AttributeCommonInfo *>(Info.getRawArg(Index));
+ break;
case clang::DiagnosticsEngine::ak_addrspace:
Builder << static_cast<LangAS>(Info.getRawArg(Index));
break;
|
@llvm/pr-subscribers-clang-tidy Author: Oleksandr T. (a-tarasyuk) ChangesThis patch addresses missing support for forwarding Full diff: https://github.com/llvm/llvm-project/pull/147503.diff 1 Files Affected:
diff --git a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
index c35f0b941c600..f9d75978d0ea8 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
@@ -544,6 +544,9 @@ void ClangTidyDiagnosticConsumer::forwardDiagnostic(const Diagnostic &Info) {
case clang::DiagnosticsEngine::ak_attr:
Builder << reinterpret_cast<Attr *>(Info.getRawArg(Index));
break;
+ case clang::DiagnosticsEngine::ak_attr_info:
+ Builder << reinterpret_cast<AttributeCommonInfo *>(Info.getRawArg(Index));
+ break;
case clang::DiagnosticsEngine::ak_addrspace:
Builder << static_cast<LangAS>(Info.getRawArg(Index));
break;
|
This solves the compilation warning/error I reported in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM since it solves the warning/error.
Did any of the builders caught this, or it is some local configuration? |
I saw it locally when compiling with -Wall -Werror. I don't know if any builder use -Werror? I don't see any sign of it in #144619 at least. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This patch addresses missing support for forwarding
ak_attr_info
diagnostic arguments inClangTidyDiagnosticConsumer