[clang] [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #102848)

2024-08-15 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/102848 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #102848)

2024-08-15 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni commented: Fixed in fa343be414f9364911b947f109f3df5539e23068. https://github.com/llvm/llvm-project/pull/102848 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #102848)

2024-08-15 Thread NAKAMURA Takumi via cfe-commits
@@ -2900,17 +2958,51 @@ void MicrosoftCXXNameMangler::mangleFunctionType(const FunctionType *T, // can differ by their calling convention and are typically deduced. So // we make sure that this type gets mangled properly. mangleType(ResultType, Range, QMM_Re

[clang] [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #102848)

2024-08-15 Thread NAKAMURA Takumi via cfe-commits
@@ -2900,17 +2958,51 @@ void MicrosoftCXXNameMangler::mangleFunctionType(const FunctionType *T, // can differ by their calling convention and are typically deduced. So // we make sure that this type gets mangled properly. mangleType(ResultType, Range, QMM_Re

[clang] d08a76d - Fix warnings discovered by #87348 [-Wunused-but-set-variable]

2024-04-06 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-04-07T11:02:08+09:00 New Revision: d08a76d1ac1ba6b376faa908ccbaaabc999dfbc5 URL: https://github.com/llvm/llvm-project/commit/d08a76d1ac1ba6b376faa908ccbaaabc999dfbc5 DIFF: https://github.com/llvm/llvm-project/commit/d08a76d1ac1ba6b376faa908ccbaaabc999dfbc5.dif

[clang] 36e2577 - clang/test/APINotes/instancetype.m: Clean the cache dir

2024-04-09 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-04-10T10:14:22+09:00 New Revision: 36e25772ddd049c8c742e55fbd2b3c9aaceb7060 URL: https://github.com/llvm/llvm-project/commit/36e25772ddd049c8c742e55fbd2b3c9aaceb7060 DIFF: https://github.com/llvm/llvm-project/commit/36e25772ddd049c8c742e55fbd2b3c9aaceb7060.dif

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-10 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/82448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-10 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: I am certain this is ready for land. Could I update release notes later? I am afraid since I have been always missing release schedules. https://github.com/llvm/llvm-project/pull/82448 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-10 Thread NAKAMURA Takumi via cfe-commits
@@ -484,10 +484,31 @@ MC/DC Instrumentation - When instrumenting for Modified Condition/Decision Coverage (MC/DC) using the -clang option ``-fcoverage-mcdc``, users are limited to at most **six** leaf-level -conditions in a boolean expression. A warning w

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-10 Thread NAKAMURA Takumi via cfe-commits
@@ -484,10 +484,31 @@ MC/DC Instrumentation - When instrumenting for Modified Condition/Decision Coverage (MC/DC) using the -clang option ``-fcoverage-mcdc``, users are limited to at most **six** leaf-level -conditions in a boolean expression. A warning w

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-10 Thread NAKAMURA Takumi via cfe-commits
@@ -484,10 +484,31 @@ MC/DC Instrumentation - When instrumenting for Modified Condition/Decision Coverage (MC/DC) using the -clang option ``-fcoverage-mcdc``, users are limited to at most **six** leaf-level -conditions in a boolean expression. A warning w

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-11 Thread NAKAMURA Takumi via cfe-commits
@@ -484,10 +484,31 @@ MC/DC Instrumentation - When instrumenting for Modified Condition/Decision Coverage (MC/DC) using the -clang option ``-fcoverage-mcdc``, users are limited to at most **six** leaf-level -conditions in a boolean expression. A warning w

[clang] [clang] fix broken canonicalization of DeducedTemplateSpecializationType (PR #95202)

2024-06-12 Thread NAKAMURA Takumi via cfe-commits
@@ -0,0 +1,73 @@ +//===- unittests/AST/ProfilingTest.cpp --- Tests for Profiling --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-13 Thread NAKAMURA Takumi via cfe-commits
@@ -14416,7 +14416,7 @@ Syntax: :: declare void @llvm.instrprof.mcdc.tvbitmap.update(ptr , i64 , -i32 ) +i32 ) chapuni wrote: I wanted to lea

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-13 Thread NAKAMURA Takumi via cfe-commits
@@ -484,10 +484,31 @@ MC/DC Instrumentation - When instrumenting for Modified Condition/Decision Coverage (MC/DC) using the -clang option ``-fcoverage-mcdc``, users are limited to at most **six** leaf-level -conditions in a boolean expression. A warning w

[clang] 8b435c1 - ASTTests: Suppress a warning in -Asserts for #95202 [-Wunused-variable]

2024-06-13 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-06-13T17:34:39+09:00 New Revision: 8b435c18314e62530367a8721883a28c532e02ad URL: https://github.com/llvm/llvm-project/commit/8b435c18314e62530367a8721883a28c532e02ad DIFF: https://github.com/llvm/llvm-project/commit/8b435c18314e62530367a8721883a28c532e02ad.dif

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-13 Thread NAKAMURA Takumi via cfe-commits
@@ -2122,20 +2135,70 @@ struct CounterCoverageMappingBuilder subtractCounters(ParentCount, TrueCount)); } - void createDecision(const BinaryOperator *E) { + void createOrCancelDecision(const BinaryOperator *E, unsigned Since) { unsigned NumCon

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-13 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/82448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Cleanup MC/DC intrinsics for #82448 (PR #95496)

2024-06-13 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/95496 3rd arg of `tvbitmap.update` was made unused. Remove 3rd arg. Sweep `condbitmap.update`, since it is no longer used. >From 80e4ff0501e6ba4c30bd94faec03ba3dcd2ad4ee Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi

[clang] 43bd7ae - StreamChecker.cpp: Use isa<> (for #93408) [-Wunused-but-set-variable]

2024-06-13 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-06-14T12:18:41+09:00 New Revision: 43bd7ae65af40ff3378d5a0395a058ba834ad8dd URL: https://github.com/llvm/llvm-project/commit/43bd7ae65af40ff3378d5a0395a058ba834ad8dd DIFF: https://github.com/llvm/llvm-project/commit/43bd7ae65af40ff3378d5a0395a058ba834ad8dd.dif

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-14 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: Oh, it's apple-specific continuous mode test :( https://github.com/llvm/llvm-project/pull/82448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Cleanup MC/DC intrinsics for #82448 (PR #95496)

2024-06-15 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/95496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Cleanup MC/DC intrinsics for #82448 (PR #95496)

2024-06-17 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @zmodem Thanks for the notification. I supposed release notes may be updated just before the release. I was wondering how I could propagate changes. I will fill recent changes to Release notes, later. Re. condbitmap.update, it has become useless after #82448 . I think pruning it

[clang] [llvm] Cleanup MC/DC intrinsics for #82448 (PR #95496)

2024-06-17 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @zmodem #82448 doesn't use intermediate condbitmap but integer index. I decided not to modify and use the intrinsic `condbitmapupdate`, since the signature will be quite different and this is too simple to be put into the intrinsic. Also pre-#82448 impl of `condbitmapupdate` was

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-17 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/95887 Mostly apparent changes are described here. >From defd3f6b694a5091da92d925738631b8359c43bb Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 18 Jun 2024 11:10:14 +0900 Subject: [PATCH] Update ReleaseNote

[clang] [llvm] Cleanup MC/DC intrinsics for #82448 (PR #95496)

2024-06-17 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: I've created #95887 (Release notes). https://github.com/llvm/llvm-project/pull/95496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-18 Thread NAKAMURA Takumi via cfe-commits
@@ -586,6 +586,20 @@ Improvements to Clang's time-trace - Clang now specifies that using ``auto`` in a lambda parameter is a C++14 extension when appropriate. (`#46059: `_). +Improvements to Coverage mapping +-

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/95887 >From defd3f6b694a5091da92d925738631b8359c43bb Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 18 Jun 2024 11:10:14 +0900 Subject: [PATCH 1/2] Update ReleaseNotes for MC/DC changes. --- clang/docs/Rel

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/95887 >From defd3f6b694a5091da92d925738631b8359c43bb Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 18 Jun 2024 11:10:14 +0900 Subject: [PATCH 1/4] Update ReleaseNotes for MC/DC changes. --- clang/docs/Rel

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/95887 >From defd3f6b694a5091da92d925738631b8359c43bb Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 18 Jun 2024 11:10:14 +0900 Subject: [PATCH 1/5] Update ReleaseNotes for MC/DC changes. --- clang/docs/Rel

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/95887 >From defd3f6b694a5091da92d925738631b8359c43bb Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 18 Jun 2024 11:10:14 +0900 Subject: [PATCH 1/6] Update ReleaseNotes for MC/DC changes. --- clang/docs/Rel

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/95887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/95887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7ef2bd4 - Relax MC/DC tests

2024-06-18 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-06-19T15:41:59+09:00 New Revision: 7ef2bd4e447280015803cff7fc91ec4dd09cd4b3 URL: https://github.com/llvm/llvm-project/commit/7ef2bd4e447280015803cff7fc91ec4dd09cd4b3 DIFF: https://github.com/llvm/llvm-project/commit/7ef2bd4e447280015803cff7fc91ec4dd09cd4b3.dif

[clang] [MC/DC][Coverage] Add assertions into emitSourceRegions() (PR #89572)

2024-04-21 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/89572 `emitSourceRegions()` has bugs to emit malformed MC/DC coverage mappings. They were detected in `llvm-cov` as the crash. Detect inconsistencies earlier in `clang` with assertions. * mcdc-system-headers.cpp cove

[clang] [MC/DC][Coverage] Add assertions into emitSourceRegions() (PR #89572)

2024-04-21 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/89572 >From 13035b230fd51422f6c3223fcffab4f44bd00956 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Fri, 19 Apr 2024 15:26:34 +0900 Subject: [PATCH 1/2] [MC/DC][Coverage] Add assertions into emitSourceRegions()

[clang] [MC/DC][Coverage] Workaround for `##` conditions (PR #89573)

2024-04-21 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/89573 A synthesized identifier with `##` is emitted to ``. `llvm-cov` cannot handle ` since it doesn't have actual files. As a workaround, peel `` to the actual definition if the definition is present. This affects

[clang] [MC/DC][Coverage] Workaround for `##` conditions (PR #89573)

2024-04-23 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @whentojump Thanks. Would you like to take this over? Then I will close this. https://github.com/llvm/llvm-project/pull/89573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [MC/DC][Coverage] Workaround for `##` conditions (PR #89573)

2024-04-24 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: See #89869 . https://github.com/llvm/llvm-project/pull/89573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MC/DC][Coverage] Workaround for `##` conditions (PR #89573)

2024-04-24 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/89573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-04-24 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/89869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-04-24 Thread NAKAMURA Takumi via cfe-commits
@@ -298,6 +298,22 @@ class CoverageMappingBuilder { : SM.getIncludeLoc(SM.getFileID(Loc)); } + /// Find out where the current file is included or macro is expanded. If the + /// found expansion is a , keep looking. + SourceLocation getIncludeOrN

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-04-24 Thread NAKAMURA Takumi via cfe-commits
@@ -339,8 +355,18 @@ class CoverageMappingBuilder { llvm::SmallSet Visited; SmallVector, 8> FileLocs; -for (const auto &Region : SourceRegions) { +for (auto &Region : SourceRegions) { SourceLocation Loc = Region.getBeginLoc(); + + // Replace Region

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-04-24 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni commented: I've confirmed this works. I'd like to wait for other opinions. My comments are just my preferences. https://github.com/llvm/llvm-project/pull/89869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-04-24 Thread NAKAMURA Takumi via cfe-commits
@@ -292,10 +292,22 @@ class CoverageMappingBuilder { return SM.getLocForEndOfFile(SM.getFileID(Loc)); } - /// Find out where the current file is included or macro is expanded. - SourceLocation getIncludeOrExpansionLoc(SourceLocation Loc) { -return Loc.isMacroID() ?

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-04-24 Thread NAKAMURA Takumi via cfe-commits
@@ -292,10 +292,36 @@ class CoverageMappingBuilder { return SM.getLocForEndOfFile(SM.getFileID(Loc)); } - /// Find out where the current file is included or macro is expanded. - SourceLocation getIncludeOrExpansionLoc(SourceLocation Loc) { -return Loc.isMacroID() ?

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-04-24 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/89869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-04-24 Thread NAKAMURA Takumi via cfe-commits
@@ -339,8 +365,17 @@ class CoverageMappingBuilder { llvm::SmallSet Visited; SmallVector, 8> FileLocs; -for (const auto &Region : SourceRegions) { +for (auto &Region : SourceRegions) { SourceLocation Loc = Region.getBeginLoc(); + + // Replace Region

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-04-24 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni commented: They could be simpler if `SourceRegion` were compatible to `std::pair`. (I don't require you to work) https://github.com/llvm/llvm-project/pull/89869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-04-24 Thread NAKAMURA Takumi via cfe-commits
@@ -292,10 +292,36 @@ class CoverageMappingBuilder { return SM.getLocForEndOfFile(SM.getFileID(Loc)); } - /// Find out where the current file is included or macro is expanded. - SourceLocation getIncludeOrExpansionLoc(SourceLocation Loc) { -return Loc.isMacroID() ?

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-28 Thread NAKAMURA Takumi via cfe-commits
@@ -1115,7 +1115,9 @@ int64_t Decl::getID() const { const FunctionType *Decl::getFunctionType(bool BlocksToo) const { QualType Ty; - if (const auto *D = dyn_cast(this)) + if (const auto *D = dyn_cast(this)) chapuni wrote: Seems causes the warning. `[-Wunu

[clang] 3029378 - Update clang/test/system_macro.cpp for both -system-headers-coverage=true/false

2024-07-09 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-07-09T22:21:20+09:00 New Revision: 302937859fce0bb506ef6edf9c3e77c86ab44b86 URL: https://github.com/llvm/llvm-project/commit/302937859fce0bb506ef6edf9c3e77c86ab44b86 DIFF: https://github.com/llvm/llvm-project/commit/302937859fce0bb506ef6edf9c3e77c86ab44b86.dif

[clang] 4801757 - Move `SystemHeadersCoverage` into `llvm::coverage` in CoverageMappingGen.h

2024-07-09 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-07-09T22:21:20+09:00 New Revision: 48017579e523085bc3ee99004c36526333a3c8b3 URL: https://github.com/llvm/llvm-project/commit/48017579e523085bc3ee99004c36526333a3c8b3 DIFF: https://github.com/llvm/llvm-project/commit/48017579e523085bc3ee99004c36526333a3c8b3.dif

[clang] [Coverage] Suppress covmap and profdata for system headers. (PR #97952)

2024-07-09 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/97952 >From 0d87f3b0be84230e40025f221c501f9104fdc261 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 7 Jul 2024 22:48:20 +0900 Subject: [PATCH 1/3] Update clang/test/system_macro.cpp for both -system-headers

[clang] [libcxx] [Clang] Implement resolution for CWG1835 (PR #92957)

2024-07-09 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: Reverted, thank you. https://github.com/llvm/llvm-project/pull/92957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Suppress covmap and profdata for system headers. (PR #97952)

2024-07-10 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/97952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Rework !SystemHeadersCoverage (PR #91446)

2024-05-08 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/91446 - Introduce `LeafExprSet`, - Suppress traversing LAnd and LOr expr under system headers. - Handle LAnd and LOr as instrumented leaves to override `!isInstrumentedCondition(C)`. - Replace Loc with FileLoc if i

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-05-09 Thread NAKAMURA Takumi via cfe-commits
@@ -2050,23 +2069,74 @@ struct CounterCoverageMappingBuilder subtractCounters(ParentCount, TrueCount)); } - void createDecision(const BinaryOperator *E) { + void createOrCancelDecision(const BinaryOperator *E, unsigned Since) { unsigned NumCon

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-05-09 Thread NAKAMURA Takumi via cfe-commits
@@ -1128,9 +1122,11 @@ void CodeGenPGO::emitMCDCParameters(CGBuilderTy &Builder) { // Emit intrinsic representing MCDC bitmap parameters at function entry. // This is used by the instrumentation pass, but it isn't actually lowered to // anything. - llvm::Value *Args[3]

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-05-09 Thread NAKAMURA Takumi via cfe-commits
@@ -190,18 +190,30 @@ class SourceMappingRegion { bool isBranch() const { return FalseCount.has_value(); } + bool isMCDCBranch() const { +const auto *BranchParams = std::get_if(&MCDCParams); +assert(BranchParams == nullptr || BranchParams->ID >= 0); --

[clang] 7e52ad3 - Fix a warning for #91455 [-Wc++20-extensions]

2024-05-10 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-05-10T16:00:16+09:00 New Revision: 7e52ad3b5b9509d0873965e8492ab01141342822 URL: https://github.com/llvm/llvm-project/commit/7e52ad3b5b9509d0873965e8492ab01141342822 DIFF: https://github.com/llvm/llvm-project/commit/7e52ad3b5b9509d0873965e8492ab01141342822.dif

[clang] 2a61eeb - Cleanup asserts in BranchParameters and DecisionParameters

2024-05-10 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-05-10T16:00:16+09:00 New Revision: 2a61eebc66c0903cf3834a520b1f975ac3cdf92b URL: https://github.com/llvm/llvm-project/commit/2a61eebc66c0903cf3834a520b1f975ac3cdf92b DIFF: https://github.com/llvm/llvm-project/commit/2a61eebc66c0903cf3834a520b1f975ac3cdf92b.dif

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-05-10 Thread NAKAMURA Takumi via cfe-commits
@@ -190,18 +190,30 @@ class SourceMappingRegion { bool isBranch() const { return FalseCount.has_value(); } + bool isMCDCBranch() const { +const auto *BranchParams = std::get_if(&MCDCParams); +assert(BranchParams == nullptr || BranchParams->ID >= 0); +return (B

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-05-16 Thread NAKAMURA Takumi via cfe-commits
@@ -983,7 +979,7 @@ void CodeGenPGO::mapRegionCounters(const Decl *D) { // for most embedded applications. Setting a maximum value prevents the // bitmap footprint from growing too large without the user's knowledge. In // the future, this value could be adjusted with a c

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-05-16 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: For now, I've implemented almost functionalities for this. Both `-fmcdc-max-conditions=32767` and `-fmcdc-max-test-vectors=0x7FFE` are cc1options. `llvm-cov` can understand `clang-18`'s profdata (and objects). TODO: documents and test cases https://github.com/llvm/llvm-pro

[clang] [Coverage] Rework !SystemHeadersCoverage (PR #91446)

2024-05-19 Thread NAKAMURA Takumi via cfe-commits
@@ -2064,7 +2082,20 @@ struct CounterCoverageMappingBuilder createDecisionRegion(E, DecisionParams); } + /// Check if E belongs to system headers. + bool isExprInSystemHeader(const BinaryOperator *E) const { chapuni wrote: I assume each visitor (`visi

[clang] [Coverage] Rework !SystemHeadersCoverage (PR #91446)

2024-05-20 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/91446 >From d3ee2d086d07ce0803117ec9fa16ac72801619c7 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 2 May 2024 09:36:39 +0900 Subject: [PATCH 1/2] [Coverage] Rework !SystemHeadersCoverage - Introduce `LeafE

[clang] [Coverage] Rework !SystemHeadersCoverage (PR #91446)

2024-05-20 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/91446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MC/DC][Coverage] Add assertions into emitSourceRegions() (PR #89572)

2024-05-20 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/89572 >From 13035b230fd51422f6c3223fcffab4f44bd00956 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Fri, 19 Apr 2024 15:26:34 +0900 Subject: [PATCH 1/4] [MC/DC][Coverage] Add assertions into emitSourceRegions()

[clang] [MC/DC][Coverage] Add assertions into emitSourceRegions() (PR #89572)

2024-05-20 Thread NAKAMURA Takumi via cfe-commits
@@ -190,6 +190,16 @@ class SourceMappingRegion { bool isBranch() const { return FalseCount.has_value(); } + bool isMCDCBranch() const { +const auto *BranchParams = std::get_if(&MCDCParams); +assert(BranchParams == nullptr || BranchParams->ID >= 0); +return (Br

[clang] [Coverage] Rework !SystemHeadersCoverage (PR #91446)

2024-05-20 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @AaronBallman Thanks. Aha, I've noticed my test was incompatible for targeting msvc mangling. https://github.com/llvm/llvm-project/pull/91446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-05-21 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @whentojump Any updates? Or Is it better for me to take this over? https://github.com/llvm/llvm-project/pull/89869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-05-22 Thread NAKAMURA Takumi via cfe-commits
@@ -339,8 +365,18 @@ class CoverageMappingBuilder { llvm::SmallSet Visited; SmallVector, 8> FileLocs; -for (const auto &Region : SourceRegions) { +for (auto &Region : SourceRegions) { SourceLocation Loc = Region.getBeginLoc(); + + // Replace Region

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-05-22 Thread NAKAMURA Takumi via cfe-commits
@@ -292,10 +292,36 @@ class CoverageMappingBuilder { return SM.getLocForEndOfFile(SM.getFileID(Loc)); } - /// Find out where the current file is included or macro is expanded. - SourceLocation getIncludeOrExpansionLoc(SourceLocation Loc) { -return Loc.isMacroID() ?

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-05-22 Thread NAKAMURA Takumi via cfe-commits
@@ -339,8 +365,18 @@ class CoverageMappingBuilder { llvm::SmallSet Visited; SmallVector, 8> FileLocs; -for (const auto &Region : SourceRegions) { +for (auto &Region : SourceRegions) { SourceLocation Loc = Region.getBeginLoc(); + + // Replace Region

[clang] [MC/DC][Coverage] Add assertions into emitSourceRegions() (PR #89572)

2024-05-22 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/89572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MC/DC][Coverage] Add assertions into emitSourceRegions() (PR #89572)

2024-05-22 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/89572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-05-23 Thread NAKAMURA Takumi via cfe-commits
@@ -0,0 +1,65 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c99 -fcoverage-mcdc -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only %s | FileCheck %s chapuni wrote: You may overwrite 896bceb with this. https://github.

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-05-23 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni approved this pull request. I'd like other approvals by clang guys. @AaronBallman Could you nominate anyone? https://github.com/llvm/llvm-project/pull/89869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-05-23 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/89869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-05-23 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @whentojump AFAIK, both of them missed boarding 18.1.6. I'll wait for opportunities. https://github.com/llvm/llvm-project/pull/89869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [webkit.RefCntblBaseVirtualDtor] Allow CRTP classes without a virtual destructor. (PR #92837)

2024-05-25 Thread NAKAMURA Takumi via cfe-commits
@@ -11,16 +11,116 @@ #include "PtrTypesSemantics.h" #include "clang/AST/CXXInheritance.h" #include "clang/AST/RecursiveASTVisitor.h" +#include "clang/AST/StmtVisitor.h" #include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h" #include "clang/StaticAnalyzer/Core/B

[clang] Fix the warning in RefCntblBaseVirtualDtorChecker.cpp:61 (PR #93403)

2024-05-26 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/93403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-19 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/112694 >From ea3e2df8c712ae5da77e55a14e97b1b6855a6b76 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 6 Oct 2024 10:11:54 +0900 Subject: [PATCH 1/2] [Coverage] Introduce "partial fold" on BranchRegion Curren

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-19 Thread NAKAMURA Takumi via cfe-commits
@@ -125,7 +125,7 @@ json::Array renderRegions(ArrayRef Regions) { json::Array renderBranchRegions(ArrayRef Regions) { json::Array RegionArray; for (const auto &Region : Regions) -if (!Region.Folded) +if (!Region.TrueFolded || !Region.FalseFolded) c

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-19 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/112694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang/test/CoverageMapping/single-byte-counters.cpp: Rewrite counters with matches (PR #113114)

2024-10-20 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/113114 None >From 52f072e5058267660aa8c8fbb00c5d09634f22b3 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Fri, 18 Oct 2024 08:32:39 +0900 Subject: [PATCH] clang/test/CoverageMapping/single-byte-counters.cpp: Rew

[clang] clang/test/CoverageMapping/single-byte-counters.cpp: Rewrite counters with matches (PR #113114)

2024-10-20 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: I think I could dissolve `single-byte-counters.cpp` to other tests. Let me rework. https://github.com/llvm/llvm-project/pull/113114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2024-10-17 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/112702 This aggregates the generation of branch counter pair as `ExecCnt` and `SkipCnt`, to aggregate `CounterExpr::subtract`. At the moment: - This change preserves the behavior of `llvm::EnableSingleByteCoverage`.

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-17 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/112694 Currently both True/False counts were folded. It lost the information, "It is True or False before folding." It prevented recalling branch counts in merging template instantiations. In `llvm-cov`, a folded bra

[clang] 5bcc66d - VisitIfStmt: Prune a redundant condition.

2024-10-17 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-10-17T20:04:00+09:00 New Revision: 5bcc66dc009893c55aefdcd16a0ca2dad315481b URL: https://github.com/llvm/llvm-project/commit/5bcc66dc009893c55aefdcd16a0ca2dad315481b DIFF: https://github.com/llvm/llvm-project/commit/5bcc66dc009893c55aefdcd16a0ca2dad315481b.dif

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2024-10-17 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/112702 >From fc697f04fd6c9f3c217ce04e3f1dd082c1f1a705 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 16 Oct 2024 23:16:53 +0900 Subject: [PATCH 1/2] [Coverage] Introduce `getBranchCounterPair()`. NFC. This

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-18 Thread NAKAMURA Takumi via cfe-commits
@@ -19,18 +19,18 @@ using namespace coverage; static void sumBranches(size_t &NumBranches, size_t &CoveredBranches, const ArrayRef &Branches) { for (const auto &BR : Branches) { -// Skip folded branches. -if (BR.Folded) - continue; - -

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/112694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-18 Thread NAKAMURA Takumi via cfe-commits
@@ -125,7 +125,7 @@ json::Array renderRegions(ArrayRef Regions) { json::Array renderBranchRegions(ArrayRef Regions) { json::Array RegionArray; for (const auto &Region : Regions) -if (!Region.Folded) +if (!Region.TrueFolded || !Region.FalseFolded) c

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni commented: Thanks for comments! https://github.com/llvm/llvm-project/pull/112694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-18 Thread NAKAMURA Takumi via cfe-commits
@@ -719,10 +720,10 @@ struct FunctionRecord { Region.Kind == CounterMappingRegion::MCDCBranchRegion) { CountedBranchRegions.emplace_back(Region, Count, FalseCount, HasSingleByteCoverage); - // If both counters are hard-

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-18 Thread NAKAMURA Takumi via cfe-commits
@@ -19,18 +19,18 @@ using namespace coverage; static void sumBranches(size_t &NumBranches, size_t &CoveredBranches, const ArrayRef &Branches) { for (const auto &BR : Branches) { -// Skip folded branches. -if (BR.Folded) - continue; - -

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2024-10-24 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/112724 >From e4172ca273a6fdfcbfc4662c9e37276ef34c2df4 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 17 Oct 2024 00:32:26 +0900 Subject: [PATCH 1/3] Introduce the type `CounterPair` for RegionCounterMap `Co

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2024-10-24 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @ornata I put #113115 as the final form. HTH https://github.com/llvm/llvm-project/pull/112702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   7   >