justincady wrote:
@ZequanWu I tested your first suggestion (`-fprofile-list`) and I believe
there's a bug preventing reduction of binary size. See
https://github.com/llvm/llvm-project/issues/97588.
https://github.com/llvm/llvm-project/pull/92582
___
justincady wrote:
@codectile `--exclude-header-filter` is used in conjunction with
`--header-filter` to exclude certain headers from analysis. Check out the tests
that were modified as a part of this PR for more examples, but the basic idea
is:
```
$ clang-tidy --header-filter='.*' --exclude-
https://github.com/justincady closed
https://github.com/llvm/llvm-project/pull/91400
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/justincady updated
https://github.com/llvm/llvm-project/pull/91400
>From 58d3d52c666bdaa3534cd16080bb895d49f61008 Mon Sep 17 00:00:00 2001
From: Justin Cady
Date: Tue, 7 May 2024 16:54:35 -0400
Subject: [PATCH] Add option to exclude headers from clang-tidy analysis
This is a
https://github.com/justincady updated
https://github.com/llvm/llvm-project/pull/91400
>From e65bd48ef896f3327a1397a1b2f6f0a34e3711d2 Mon Sep 17 00:00:00 2001
From: Justin Cady
Date: Tue, 7 May 2024 16:54:35 -0400
Subject: [PATCH 1/3] Add option to exclude headers from clang-tidy analysis
This
https://github.com/justincady updated
https://github.com/llvm/llvm-project/pull/91400
>From e65bd48ef896f3327a1397a1b2f6f0a34e3711d2 Mon Sep 17 00:00:00 2001
From: Justin Cady
Date: Tue, 7 May 2024 16:54:35 -0400
Subject: [PATCH 1/2] Add option to exclude headers from clang-tidy analysis
This
https://github.com/justincady updated
https://github.com/llvm/llvm-project/pull/91400
>From e65bd48ef896f3327a1397a1b2f6f0a34e3711d2 Mon Sep 17 00:00:00 2001
From: Justin Cady
Date: Tue, 7 May 2024 16:54:35 -0400
Subject: [PATCH] Add option to exclude headers from clang-tidy analysis
This is a
@@ -311,7 +311,12 @@ ClangTidyDiagnosticConsumer::ClangTidyDiagnosticConsumer(
: Context(Ctx), ExternalDiagEngine(ExternalDiagEngine),
RemoveIncompatibleErrors(RemoveIncompatibleErrors),
GetFixesFromNotes(GetFixesFromNotes),
- EnableNolintBlocks(EnableNolin
@@ -311,7 +311,12 @@ ClangTidyDiagnosticConsumer::ClangTidyDiagnosticConsumer(
: Context(Ctx), ExternalDiagEngine(ExternalDiagEngine),
RemoveIncompatibleErrors(RemoveIncompatibleErrors),
GetFixesFromNotes(GetFixesFromNotes),
- EnableNolintBlocks(EnableNolin
https://github.com/justincady updated
https://github.com/llvm/llvm-project/pull/91400
>From a5de583aa94ef794a083c8b27df6dc6fc0762cb7 Mon Sep 17 00:00:00 2001
From: Justin Cady
Date: Tue, 7 May 2024 16:54:35 -0400
Subject: [PATCH 1/5] Add option to exclude headers from clang-tidy analysis
This
@@ -311,7 +311,12 @@ ClangTidyDiagnosticConsumer::ClangTidyDiagnosticConsumer(
: Context(Ctx), ExternalDiagEngine(ExternalDiagEngine),
RemoveIncompatibleErrors(RemoveIncompatibleErrors),
GetFixesFromNotes(GetFixesFromNotes),
- EnableNolintBlocks(EnableNolin
@@ -311,7 +311,12 @@ ClangTidyDiagnosticConsumer::ClangTidyDiagnosticConsumer(
: Context(Ctx), ExternalDiagEngine(ExternalDiagEngine),
RemoveIncompatibleErrors(RemoveIncompatibleErrors),
GetFixesFromNotes(GetFixesFromNotes),
- EnableNolintBlocks(EnableNolin
@@ -562,9 +567,10 @@ void
ClangTidyDiagnosticConsumer::checkFilters(SourceLocation Location,
}
StringRef FileName(File->getName());
- LastErrorRelatesToUserCode = LastErrorRelatesToUserCode ||
- Sources.isInMainFile(Location) ||
-
https://github.com/justincady updated
https://github.com/llvm/llvm-project/pull/91400
>From a5de583aa94ef794a083c8b27df6dc6fc0762cb7 Mon Sep 17 00:00:00 2001
From: Justin Cady
Date: Tue, 7 May 2024 16:54:35 -0400
Subject: [PATCH 1/3] Add option to exclude headers from clang-tidy analysis
This
@@ -578,6 +579,13 @@ llvm::Regex
*ClangTidyDiagnosticConsumer::getHeaderFilter() {
return HeaderFilter.get();
}
+llvm::Regex *ClangTidyDiagnosticConsumer::getExcludeHeaderFilter() {
+ if (!ExcludeHeaderFilter)
+ExcludeHeaderFilter = std::make_unique(
+*Context.
https://github.com/justincady updated
https://github.com/llvm/llvm-project/pull/91400
>From a5de583aa94ef794a083c8b27df6dc6fc0762cb7 Mon Sep 17 00:00:00 2001
From: Justin Cady
Date: Tue, 7 May 2024 16:54:35 -0400
Subject: [PATCH 1/2] Add option to exclude headers from clang-tidy analysis
This
@@ -578,6 +579,13 @@ llvm::Regex
*ClangTidyDiagnosticConsumer::getHeaderFilter() {
return HeaderFilter.get();
}
+llvm::Regex *ClangTidyDiagnosticConsumer::getExcludeHeaderFilter() {
+ if (!ExcludeHeaderFilter)
+ExcludeHeaderFilter = std::make_unique(
+*Context.
@@ -578,6 +579,13 @@ llvm::Regex
*ClangTidyDiagnosticConsumer::getHeaderFilter() {
return HeaderFilter.get();
}
+llvm::Regex *ClangTidyDiagnosticConsumer::getExcludeHeaderFilter() {
+ if (!ExcludeHeaderFilter)
+ExcludeHeaderFilter = std::make_unique(
+*Context.
justincady wrote:
> I wonder what is the target scenario for this feature.
This PR addresses clang-tidy's lack of ability to ignore some set of headers
when analyzing a file (most commonly third party code that cannot be modified).
> I remember regex can excluding some pattern, the we can exc
https://github.com/justincady created
https://github.com/llvm/llvm-project/pull/91400
This is a renewed attempt to land @toddlipcon's D34654. The comments on
that patch indicate a broad desire for some ability to ignore headers.
After considering various options, including migrating to std::reg
https://github.com/justincady approved this pull request.
[Context](https://github.com/llvm/llvm-project/pull/77203#pullrequestreview-1818501835).
LGTM.
https://github.com/llvm/llvm-project/pull/74140
___
cfe-commits mailing list
cfe-commits@lists.llv
https://github.com/justincady approved this pull request.
Context: I have limited experience writing AST matchers, but I saw [the request
for
reviewers](https://discourse.llvm.org/t/clang-tidy-18-reviewers-wanted/76108).
I'm basing this review on that limited experience and the tests put in pl
https://github.com/justincady commented:
LGTM as well, as the original fix remains in place.
https://github.com/llvm/llvm-project/pull/72452
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
23 matches
Mail list logo