[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] [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-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

[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:

[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:

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

2024-07-07 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/97952 With `system-headers-coverage=false`, functions defined in system headers was not instrumented but corresponding covmap was emitted. It caused wasting covmap and profraw. This change improves: - Reduce object

[clang] 7ef2bd4 - Relax MC/DC tests

2024-06-19 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:

[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] [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 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] [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] [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] [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] [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] Cleanup MC/DC intrinsics for #82448 (PR #95496)

2024-06-18 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
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

[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] 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-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] [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] 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:

[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] [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] [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

[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:

[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

[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

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

2024-06-13 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:

[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

[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

[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

[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

[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

[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] 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] [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] [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

[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
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

[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.

[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] [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] [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 : SourceRegions) { +for (auto : SourceRegions) { SourceLocation Loc = Region.getBeginLoc(); + + // Replace Region with its

[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 : SourceRegions) { +for (auto : SourceRegions) { SourceLocation Loc = Region.getBeginLoc(); + + // Replace Region with its

[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] 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

[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(); +assert(BranchParams == nullptr || BranchParams->ID >= 0); +return (BranchParams

[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] [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] [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

[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

[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

[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

[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(); +assert(BranchParams == nullptr || BranchParams->ID >= 0); +return

[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:

[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:

[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(); +assert(BranchParams == nullptr || BranchParams->ID >= 0); chapuni

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

2024-05-10 Thread NAKAMURA Takumi via cfe-commits
@@ -1128,9 +1122,11 @@ void CodeGenPGO::emitMCDCParameters(CGBuilderTy ) { // 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
@@ -2050,23 +2069,74 @@ struct CounterCoverageMappingBuilder subtractCounters(ParentCount, TrueCount)); } - void createDecision(const BinaryOperator *E) { + void createOrCancelDecision(const BinaryOperator *E, unsigned Since) { unsigned

[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

[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.

[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 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

[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 : SourceRegions) { +for (auto : SourceRegions) { SourceLocation Loc = Region.getBeginLoc(); + + // Replace Region with its

[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
@@ -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
@@ -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
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

[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 : SourceRegions) { +for (auto : SourceRegions) { SourceLocation Loc = Region.getBeginLoc(); + + // Replace Region with its

[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

[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] [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] [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
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

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

2024-04-22 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] Add assertions into emitSourceRegions() (PR #89572)

2024-04-22 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] Add assertions into emitSourceRegions() (PR #89572)

2024-04-22 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

[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:

[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:

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-27 Thread NAKAMURA Takumi via cfe-commits
@@ -1503,38 +1527,53 @@ struct CounterCoverageMappingBuilder } // Create Branch Region around condition. -createBranchRegion(S->getCond(), BodyCount, - subtractCounters(CondCount, BodyCount)); +if (!llvm::EnableSingleByteCoverage) +

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

2024-02-26 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-02-26 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-02-26 Thread NAKAMURA Takumi via cfe-commits
@@ -1201,19 +1197,22 @@ void CodeGenPGO::emitMCDCCondBitmapUpdate(CGBuilderTy , const Expr *S, // Extract the ID of the condition we are setting in the bitmap. const auto = BranchStateIter->second; assert(Branch.ID >= 0 && "Condition has no ID!"); +

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

2024-02-26 Thread NAKAMURA Takumi via cfe-commits
@@ -1128,9 +1122,11 @@ void CodeGenPGO::emitMCDCParameters(CGBuilderTy ) { // 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-02-26 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-02-26 Thread NAKAMURA Takumi via cfe-commits
@@ -1201,19 +1197,22 @@ void CodeGenPGO::emitMCDCCondBitmapUpdate(CGBuilderTy , const Expr *S, // Extract the ID of the condition we are setting in the bitmap. const auto = BranchStateIter->second; assert(Branch.ID >= 0 && "Condition has no ID!"); +

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

2024-02-26 Thread NAKAMURA Takumi via cfe-commits
@@ -973,9 +970,11 @@ void InstrLowerer::lowerMCDCTestVectorBitmapUpdate( auto *MCDCCondBitmapAddr = Update->getMCDCCondBitmapAddr(); auto *BitmapAddr = getBitmapAddress(Update); - // Load Temp Val. + // Load Temp Val + BitmapIdx. // %mcdc.temp = load i32, ptr

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

2024-02-26 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni commented: TODO: * Version bump in file formats (wip) * Update documents https://github.com/llvm/llvm-project/pull/82448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-02-26 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-02-26 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni ready_for_review 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-02-26 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] 0c7a605 - clangCodeGen: [MC/DC] Refactor CoverageGen.

2024-02-25 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-02-26T16:44:19+09:00 New Revision: 0c7a605ada6cb392e6e8c16dbccf2b7e59017399 URL: https://github.com/llvm/llvm-project/commit/0c7a605ada6cb392e6e8c16dbccf2b7e59017399 DIFF:

[clang] 1f6a347 - Refactor: Let MCDC::State have DecisionByStmt and BranchByStmt

2024-02-25 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-02-25T18:33:53+09:00 New Revision: 1f6a347c8abf8868fb4630c404480226c2efc2c2 URL: https://github.com/llvm/llvm-project/commit/1f6a347c8abf8868fb4630c404480226c2efc2c2 DIFF:

[clang] cc53707 - LLVMInstrumentation: Simplify mcdc.tvbitmap.update with GEP.

2024-02-24 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-02-25T11:21:46+09:00 New Revision: cc53707a5c104eb7789829ecdb2e3ae2be1a42da URL: https://github.com/llvm/llvm-project/commit/cc53707a5c104eb7789829ecdb2e3ae2be1a42da DIFF:

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

2024-02-20 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @hanickadot Your comments to `llvm/CoverageMapping.cpp` are not for this PR. See #80676 . They are my preferences. https://github.com/llvm/llvm-project/pull/82448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-02-20 Thread NAKAMURA Takumi via cfe-commits
@@ -1959,9 +2013,44 @@ struct CounterCoverageMappingBuilder subtractCounters(ParentCount, TrueCount)); } + void RewindDecision(unsigned Since) { +#ifndef NDEBUG +llvm::DenseSet SeenIDs; +#endif +unsigned NConds = 0; chapuni

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

2024-02-20 Thread NAKAMURA Takumi via cfe-commits
@@ -723,7 +737,15 @@ struct MCDCCoverageBuilder { if (I == CondIDs.end()) return -1; else - return I->second; + return I->second.ID; + } + + void ccc(const Expr *CondExpr, mcdc::ConditionIDs IDs) { chapuni wrote: This is w-i-p.

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

2024-02-20 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni commented: Thanks for your comments and sorry for my hasty w-i-p work . I know a few rough implementations would be there. https://github.com/llvm/llvm-project/pull/82448 ___ cfe-commits mailing list

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

2024-02-20 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

  1   2   3   4   5   6   >