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
whentojump wrote:
Thanks everyone!
I notice that #87000 has been tagged with release milestone. I can handle the
backport there. Maybe in a few days? Or sooner if that's needed.
https://github.com/llvm/llvm-project/pull/89869
___
cfe-commits mailing
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
https://github.com/hanickadot approved this pull request.
lgtm
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
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
https://github.com/whentojump updated
https://github.com/llvm/llvm-project/pull/89869
>From 510e0f131ad11d7924f33fc4c4130dcf866bd8da Mon Sep 17 00:00:00 2001
From: NAKAMURA Takumi
Date: Fri, 19 Apr 2024 15:16:05 +0900
Subject: [PATCH 1/9] [MC/DC][Coverage] Workaround for `##` conditions
A synt
https://github.com/whentojump updated
https://github.com/llvm/llvm-project/pull/89869
>From 510e0f131ad11d7924f33fc4c4130dcf866bd8da Mon Sep 17 00:00:00 2001
From: NAKAMURA Takumi
Date: Fri, 19 Apr 2024 15:16:05 +0900
Subject: [PATCH 1/8] [MC/DC][Coverage] Workaround for `##` conditions
A synt
@@ -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.
@@ -517,7 +552,7 @@ class CoverageMappingBuilder {
SourceRegionFilter Filter;
for (const auto &FM : FileIDMapping) {
SourceLocation ExpandedLoc = FM.second.second;
- SourceLocation ParentLoc = getIncludeOrExpansionLoc(ExpandedLoc);
+ SourceLocation Paren
@@ -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
@@ -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() ?
@@ -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
@@ -517,7 +552,7 @@ class CoverageMappingBuilder {
SourceRegionFilter Filter;
for (const auto &FM : FileIDMapping) {
SourceLocation ExpandedLoc = FM.second.second;
- SourceLocation ParentLoc = getIncludeOrExpansionLoc(ExpandedLoc);
+ SourceLocation Paren
whentojump wrote:
Sorry for getting back this late.
I reverted the latest commit (using `SourceRange`) and addressed the earlier
comment about updating region sloc only when they are changed.
And yes if you have better ideas about `getNonScratchExpansion` implementation
you can please post a
https://github.com/whentojump updated
https://github.com/llvm/llvm-project/pull/89869
>From 968ef430dd09ee4545323426d0c5b550c6a0f690 Mon Sep 17 00:00:00 2001
From: NAKAMURA Takumi
Date: Fri, 19 Apr 2024 15:16:05 +0900
Subject: [PATCH 1/8] [MC/DC][Coverage] Workaround for `##` conditions
A synt
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
@@ -517,7 +552,7 @@ class CoverageMappingBuilder {
SourceRegionFilter Filter;
for (const auto &FM : FileIDMapping) {
SourceLocation ExpandedLoc = FM.second.second;
- SourceLocation ParentLoc = getIncludeOrExpansionLoc(ExpandedLoc);
+ SourceLocation Paren
@@ -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() ?
@@ -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() ?
https://github.com/whentojump updated
https://github.com/llvm/llvm-project/pull/89869
>From 968ef430dd09ee4545323426d0c5b550c6a0f690 Mon Sep 17 00:00:00 2001
From: NAKAMURA Takumi
Date: Fri, 19 Apr 2024 15:16:05 +0900
Subject: [PATCH 1/6] [MC/DC][Coverage] Workaround for `##` conditions
A synt
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://
@@ -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
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
@@ -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() ?
https://github.com/whentojump updated
https://github.com/llvm/llvm-project/pull/89869
>From 968ef430dd09ee4545323426d0c5b550c6a0f690 Mon Sep 17 00:00:00 2001
From: NAKAMURA Takumi
Date: Fri, 19 Apr 2024 15:16:05 +0900
Subject: [PATCH 1/5] [MC/DC][Coverage] Workaround for `##` conditions
A synt
https://github.com/whentojump 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
@@ -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
https://github.com/whentojump updated
https://github.com/llvm/llvm-project/pull/89869
>From 968ef430dd09ee4545323426d0c5b550c6a0f690 Mon Sep 17 00:00:00 2001
From: NAKAMURA Takumi
Date: Fri, 19 Apr 2024 15:16:05 +0900
Subject: [PATCH 1/4] [MC/DC][Coverage] Workaround for `##` conditions
A synt
@@ -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() ?
https://github.com/whentojump updated
https://github.com/llvm/llvm-project/pull/89869
>From 968ef430dd09ee4545323426d0c5b550c6a0f690 Mon Sep 17 00:00:00 2001
From: NAKAMURA Takumi
Date: Fri, 19 Apr 2024 15:16:05 +0900
Subject: [PATCH 1/3] [MC/DC][Coverage] Workaround for `##` conditions
A synt
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://
@@ -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
@@ -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
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
https://github.com/whentojump 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
https://github.com/whentojump 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
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Wentao Zhang (whentojump)
Changes
The problematic program is as follows:
```shell
#define pre_a 0
#define PRE(x) pre_##x
void f(void) {
PRE(a) && 0;
}
int main(void) { return 0; }
```
in which after token concatenation (`##`), there
llvmbot wrote:
@llvm/pr-subscribers-clang-codegen
Author: Wentao Zhang (whentojump)
Changes
The problematic program is as follows:
```shell
#define pre_a 0
#define PRE(x) pre_##x
void f(void) {
PRE(a) && 0;
}
int main(void) { return 0; }
```
in which after token concatenation (`##`
https://github.com/whentojump ready_for_review
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
https://github.com/whentojump 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
https://github.com/whentojump updated
https://github.com/llvm/llvm-project/pull/89869
>From 968ef430dd09ee4545323426d0c5b550c6a0f690 Mon Sep 17 00:00:00 2001
From: NAKAMURA Takumi
Date: Fri, 19 Apr 2024 15:16:05 +0900
Subject: [PATCH 1/2] [MC/DC][Coverage] Workaround for `##` conditions
A synt
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 92631a4824a91f3268a5716dd3459df8dc6bfb63
2010fb3d7da4790985e16aabc634a50e9562bad3 --
https://github.com/whentojump created
https://github.com/llvm/llvm-project/pull/89869
None
>From 968ef430dd09ee4545323426d0c5b550c6a0f690 Mon Sep 17 00:00:00 2001
From: NAKAMURA Takumi
Date: Fri, 19 Apr 2024 15:16:05 +0900
Subject: [PATCH 1/2] [MC/DC][Coverage] Workaround for `##` conditions
43 matches
Mail list logo