[clang] [compiler-rt] [Coverage] Fix region creation after try statements (PR #133463)

2025-04-05 Thread Justin Cady via cfe-commits
justincady wrote: Coverage report before: https://github.com/user-attachments/assets/80bb84a0-a76e-4f45-aca8-fd53378caa73"; /> Coverage report after: https://github.com/user-attachments/assets/987ae207-0eaf-4f33-aeb0-387c27cb382f"; /> https://github.com/llvm/llvm-project/pull/133463

[clang] [compiler-rt] Revert "[Coverage] Fix region termination for GNU statement expressions" (PR #132095)

2025-04-05 Thread Justin Cady via cfe-commits
https://github.com/justincady closed https://github.com/llvm/llvm-project/pull/132095 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] Reland [Coverage] Fix region termination for GNU statement expressions (PR #132222)

2025-04-04 Thread Justin Cady via cfe-commits
https://github.com/justincady updated https://github.com/llvm/llvm-project/pull/13 >From fa652581d03c962b61e7a350e0e9da0874e67109 Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Thu, 20 Mar 2025 10:01:42 -0400 Subject: [PATCH] Reland [Coverage] Fix region termination for GNU statement exp

[clang] [compiler-rt] [Coverage] Fix region creation after try statements (PR #133463)

2025-03-28 Thread Justin Cady via cfe-commits
https://github.com/justincady created https://github.com/llvm/llvm-project/pull/133463 In cases where a terminating statement exists within the try or catch block the coverage mapping can be incorrect. Coverage reports display lines following the last catch block as uncovered, when the lines hav

[clang] [compiler-rt] Reland [Coverage] Fix region termination for GNU statement expressions (PR #132222)

2025-03-21 Thread Justin Cady via cfe-commits
https://github.com/justincady closed https://github.com/llvm/llvm-project/pull/13 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] Reland [Coverage] Fix region termination for GNU statement expressions (PR #132222)

2025-03-20 Thread Justin Cady via cfe-commits
https://github.com/justincady created https://github.com/llvm/llvm-project/pull/13 Relands #130976 with adjustments to test requirements. Calls to __noreturn__ functions result in region termination for coverage mapping. But this creates incorrect coverage results when __noreturn__ function

[clang] [compiler-rt] Reland [Coverage] Fix region termination for GNU statement expressions (PR #132222)

2025-03-20 Thread Justin Cady via cfe-commits
justincady wrote: This is the buildbot failure from the initial commit: https://lab.llvm.org/buildbot/#/builders/133/builds/13131 I updated the failing test with the same restrictions as other tests using `-fuse-ld=lld` under `compiler-rt/test/profile/Linux`, specifically: ``` // REQUIRES: ll

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-19 Thread Justin Cady via cfe-commits
https://github.com/justincady closed https://github.com/llvm/llvm-project/pull/130976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] Revert "[Coverage] Fix region termination for GNU statement expressions" (PR #132095)

2025-03-19 Thread Justin Cady via cfe-commits
https://github.com/justincady created https://github.com/llvm/llvm-project/pull/132095 Reverts llvm/llvm-project#130976 Breaks clang-cmake-x86_64-avx512-linux bot. >From 2f37c9ec685b8ba82fdc3bd8387ce59b3f8a77dc Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Wed, 19 Mar 2025 16:45:26 -0400 S

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-19 Thread Justin Cady via cfe-commits
https://github.com/justincady updated https://github.com/llvm/llvm-project/pull/130976 >From 422fefad20557f1d9777afa363f558c92564f0ee Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Wed, 12 Mar 2025 11:23:19 -0400 Subject: [PATCH] [Coverage] Fix region termination for GNU statement expression

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-19 Thread Justin Cady via cfe-commits
https://github.com/justincady updated https://github.com/llvm/llvm-project/pull/130976 >From 1b7884bbff037efa5c69eeecafe8db282561b2fc Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Wed, 12 Mar 2025 11:23:19 -0400 Subject: [PATCH] [Coverage] Fix region termination for GNU statement expression

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-17 Thread Justin Cady via cfe-commits
justincady wrote: @MaskRay If you're satisfied with the current diff, could you please commit this whenever you get the chance? Thank you. https://github.com/llvm/llvm-project/pull/130976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-17 Thread Justin Cady via cfe-commits
@@ -346,6 +346,12 @@ int elsecondnoret(void) { return 0; } +// CHECK-LABEL: _Z18statementexprnoretb +int statementexprnoret(bool crash) { + int rc = ({ if (crash) abort(); 0; }); // CHECK-NOT: Gap,File 0, [[@LINE]]:41 -> [[@LINE+1]]:3 = 0 justincady wrote:

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-17 Thread Justin Cady via cfe-commits
https://github.com/justincady updated https://github.com/llvm/llvm-project/pull/130976 >From 6f3557780d06d6a2b1a7f315c49a3ad533d821e5 Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Wed, 12 Mar 2025 11:23:19 -0400 Subject: [PATCH 1/3] [Coverage] Fix region termination for GNU statement expres

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-17 Thread Justin Cady via cfe-commits
https://github.com/justincady updated https://github.com/llvm/llvm-project/pull/130976 >From 6f3557780d06d6a2b1a7f315c49a3ad533d821e5 Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Wed, 12 Mar 2025 11:23:19 -0400 Subject: [PATCH 1/2] [Coverage] Fix region termination for GNU statement expres

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-14 Thread Justin Cady via cfe-commits
https://github.com/justincady updated https://github.com/llvm/llvm-project/pull/130976 >From 6f3557780d06d6a2b1a7f315c49a3ad533d821e5 Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Wed, 12 Mar 2025 11:23:19 -0400 Subject: [PATCH 1/2] [Coverage] Fix region termination for GNU statement expres

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-12 Thread Justin Cady via cfe-commits
https://github.com/justincady created https://github.com/llvm/llvm-project/pull/130976 Calls to __noreturn__ functions result in region termination for coverage mapping. But this creates incorrect coverage results when __noreturn__ functions (or other constructs that result in region termination

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-13 Thread Justin Cady via cfe-commits
justincady wrote: I just want to double check my understanding. :) If I were to convert [this example](https://gist.github.com/MaskRay/24f4e2eed208b9d8b0a3752575a665d4#distributed-thinlto) to its functional equivalent in DTLTO, would it be: ``` clang -fuse-ld=lld -O2 -flto=thin -fthinlto-dist

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-10-14 Thread Justin Cady via cfe-commits
justincady wrote: @Baiyi27 Could you please file an issue as opposed to adding it as a comment here? It may or may not be related to this original change, and separating it out into its own discussion would be helpful. Thanks! https://github.com/llvm/llvm-project/pull/91400 ___

[clang] Add option to avoid generating coverage mappings for unused functions (PR #92582)

2024-07-03 Thread Justin Cady via cfe-commits
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 ___

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-29 Thread Justin Cady via cfe-commits
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-

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-14 Thread Justin Cady via cfe-commits
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

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-13 Thread Justin Cady via 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

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-13 Thread Justin Cady via cfe-commits
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

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-13 Thread Justin Cady via cfe-commits
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

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-13 Thread Justin Cady via cfe-commits
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

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-10 Thread Justin Cady via cfe-commits
@@ -311,7 +311,12 @@ ClangTidyDiagnosticConsumer::ClangTidyDiagnosticConsumer( : Context(Ctx), ExternalDiagEngine(ExternalDiagEngine), RemoveIncompatibleErrors(RemoveIncompatibleErrors), GetFixesFromNotes(GetFixesFromNotes), - EnableNolintBlocks(EnableNolin

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-10 Thread Justin Cady via cfe-commits
@@ -311,7 +311,12 @@ ClangTidyDiagnosticConsumer::ClangTidyDiagnosticConsumer( : Context(Ctx), ExternalDiagEngine(ExternalDiagEngine), RemoveIncompatibleErrors(RemoveIncompatibleErrors), GetFixesFromNotes(GetFixesFromNotes), - EnableNolintBlocks(EnableNolin

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-10 Thread Justin Cady via cfe-commits
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

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-09 Thread Justin Cady via cfe-commits
@@ -311,7 +311,12 @@ ClangTidyDiagnosticConsumer::ClangTidyDiagnosticConsumer( : Context(Ctx), ExternalDiagEngine(ExternalDiagEngine), RemoveIncompatibleErrors(RemoveIncompatibleErrors), GetFixesFromNotes(GetFixesFromNotes), - EnableNolintBlocks(EnableNolin

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-09 Thread Justin Cady via cfe-commits
@@ -311,7 +311,12 @@ ClangTidyDiagnosticConsumer::ClangTidyDiagnosticConsumer( : Context(Ctx), ExternalDiagEngine(ExternalDiagEngine), RemoveIncompatibleErrors(RemoveIncompatibleErrors), GetFixesFromNotes(GetFixesFromNotes), - EnableNolintBlocks(EnableNolin

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-09 Thread Justin Cady via cfe-commits
@@ -562,9 +567,10 @@ void ClangTidyDiagnosticConsumer::checkFilters(SourceLocation Location, } StringRef FileName(File->getName()); - LastErrorRelatesToUserCode = LastErrorRelatesToUserCode || - Sources.isInMainFile(Location) || -

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-09 Thread Justin Cady via cfe-commits
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

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-08 Thread Justin Cady via cfe-commits
@@ -578,6 +579,13 @@ llvm::Regex *ClangTidyDiagnosticConsumer::getHeaderFilter() { return HeaderFilter.get(); } +llvm::Regex *ClangTidyDiagnosticConsumer::getExcludeHeaderFilter() { + if (!ExcludeHeaderFilter) +ExcludeHeaderFilter = std::make_unique( +*Context.

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-08 Thread Justin Cady via cfe-commits
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

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-08 Thread Justin Cady via cfe-commits
@@ -578,6 +579,13 @@ llvm::Regex *ClangTidyDiagnosticConsumer::getHeaderFilter() { return HeaderFilter.get(); } +llvm::Regex *ClangTidyDiagnosticConsumer::getExcludeHeaderFilter() { + if (!ExcludeHeaderFilter) +ExcludeHeaderFilter = std::make_unique( +*Context.

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-08 Thread Justin Cady via cfe-commits
@@ -578,6 +579,13 @@ llvm::Regex *ClangTidyDiagnosticConsumer::getHeaderFilter() { return HeaderFilter.get(); } +llvm::Regex *ClangTidyDiagnosticConsumer::getExcludeHeaderFilter() { + if (!ExcludeHeaderFilter) +ExcludeHeaderFilter = std::make_unique( +*Context.

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-08 Thread Justin Cady via cfe-commits
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

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-07 Thread Justin Cady via cfe-commits
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

[clang-tools-extra] [clang-tidy] Fix false-positives in readability-container-size-empty (PR #74140)

2024-01-12 Thread Justin Cady via cfe-commits
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

[clang-tools-extra] [clang-tidy] Fix false-positives in misc-static-assert caused by non-constexpr variables (PR #77203)

2024-01-12 Thread Justin Cady via cfe-commits
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

[clang] [clang codegen][regression] Add dso_local/hidden/etc. markings to VTT definitions and declarations (PR #72452)

2023-11-21 Thread Justin Cady via cfe-commits
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