https://github.com/stmuench edited
https://github.com/llvm/llvm-project/pull/132924
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
stmuench wrote:
@vbvictor since is there no further activity by reviewers here, any idea on how
to continue with this PR?
https://github.com/llvm/llvm-project/pull/132924
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/c
stmuench wrote:
@PiotrZSL would have any further remarks for this PR?
https://github.com/llvm/llvm-project/pull/132924
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/stmuench updated
https://github.com/llvm/llvm-project/pull/132924
Rate limit ยท GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-
@@ -39,6 +39,29 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) {
return FD ? FD->isMain() : false;
}
+AST_MATCHER(clang::TypeLoc, isInImplicitTemplateInstantiation) {
+ const auto IsImplicitTemplateInstantiation = [](const auto *Node) {
+return (Node != nullptr) &&
+
@@ -39,6 +39,29 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) {
return FD ? FD->isMain() : false;
}
+AST_MATCHER(clang::TypeLoc, isInImplicitTemplateInstantiation) {
+ const auto IsImplicitTemplateInstantiation = [](const auto *Node) {
+return (Node != nullptr) &&
+
https://github.com/stmuench edited
https://github.com/llvm/llvm-project/pull/132924
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -39,6 +39,30 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) {
return FD ? FD->isMain() : false;
}
+bool isWithinImplicitTemplateInstantiation(const TypeLoc *MatchedTypeLoc,
stmuench wrote:
Precisely, there were no template types so far in the existing
stmuench wrote:
> Please add release notes in this patch. I think the idea is good, but you can
> look into my review after PiotrZSL's comments.
@vbvictor many thanks for your very valuable comments. I incorporated them as
far as possible.
https://github.com/llvm/llvm-project/pull/132924
https://github.com/stmuench updated
https://github.com/llvm/llvm-project/pull/132924
>From fb9f0c3db8609645588692eecc294407f48c1c34 Mon Sep 17 00:00:00 2001
From: stmuench
Date: Tue, 25 Mar 2025 12:38:53 +0100
Subject: [PATCH] [clang-tidy] do not diagn. array types in implicit templ.
instantia
@@ -39,6 +39,30 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) {
return FD ? FD->isMain() : false;
}
+bool isWithinImplicitTemplateInstantiation(const TypeLoc *MatchedTypeLoc,
stmuench wrote:
> Could you please elaborate what is this function for? I delet
@@ -39,6 +39,30 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) {
return FD ? FD->isMain() : false;
}
+bool isWithinImplicitTemplateInstantiation(const TypeLoc *MatchedTypeLoc,
stmuench wrote:
I tried to implement it this way at first but unfortunately the
stmuench wrote:
@PiotrZSL if it suits your convenience, could you maybe have a look at this PR?
Many thanks in advance.
https://github.com/llvm/llvm-project/pull/132924
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
@@ -92,3 +92,162 @@ const char name[] = "Some string";
void takeCharArray(const char name[]);
// CHECK-MESSAGES: :[[@LINE-1]]:26: warning: do not declare C-style arrays,
use 'std::array' or 'std::vector' instead [modernize-avoid-c-arrays]
+
+namespace std {
+ template
+ str
https://github.com/stmuench updated
https://github.com/llvm/llvm-project/pull/132924
>From 7f621bc7e169cf34d95ba34b0895c9fa75adb712 Mon Sep 17 00:00:00 2001
From: stmuench
Date: Tue, 25 Mar 2025 12:38:53 +0100
Subject: [PATCH] [clang-tidy] do not diagn. array types in implicit templ.
instantia
@@ -92,3 +92,162 @@ const char name[] = "Some string";
void takeCharArray(const char name[]);
// CHECK-MESSAGES: :[[@LINE-1]]:26: warning: do not declare C-style arrays,
use 'std::array' or 'std::vector' instead [modernize-avoid-c-arrays]
+
+namespace std {
+ template
+ str
https://github.com/stmuench updated
https://github.com/llvm/llvm-project/pull/132924
>From 29cfb29e064abf21c01a60aca380a58a4e5adb69 Mon Sep 17 00:00:00 2001
From: stmuench
Date: Tue, 25 Mar 2025 12:38:53 +0100
Subject: [PATCH] [clang-tidy] do not diagn. array types in implicit templ.
instantia
https://github.com/stmuench edited
https://github.com/llvm/llvm-project/pull/132924
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/stmuench updated
https://github.com/llvm/llvm-project/pull/132924
>From 823475c91f9cdf64c816e9498a42f5ee9b2080be Mon Sep 17 00:00:00 2001
From: stmuench
Date: Tue, 25 Mar 2025 12:38:53 +0100
Subject: [PATCH] [clang-tidy] do not diagn. array types in implicit templ.
instantia
stmuench wrote:
Ping
https://github.com/llvm/llvm-project/pull/132924
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -92,3 +92,162 @@ const char name[] = "Some string";
void takeCharArray(const char name[]);
// CHECK-MESSAGES: :[[@LINE-1]]:26: warning: do not declare C-style arrays,
use 'std::array' or 'std::vector' instead [modernize-avoid-c-arrays]
+
+namespace std {
+ template
+ str
https://github.com/stmuench edited
https://github.com/llvm/llvm-project/pull/132924
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -92,3 +92,162 @@ const char name[] = "Some string";
void takeCharArray(const char name[]);
// CHECK-MESSAGES: :[[@LINE-1]]:26: warning: do not declare C-style arrays,
use 'std::array' or 'std::vector' instead [modernize-avoid-c-arrays]
+
+namespace std {
+ template
+ str
https://github.com/stmuench updated
https://github.com/llvm/llvm-project/pull/132924
>From 8b720d23c2c2252a709d9fd94a2f2fffe8d3fd87 Mon Sep 17 00:00:00 2001
From: stmuench
Date: Tue, 25 Mar 2025 12:38:53 +0100
Subject: [PATCH] [clang-tidy] do not diagn. array types in implicit templ.
instantia
https://github.com/stmuench ready_for_review
https://github.com/llvm/llvm-project/pull/132924
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
stmuench wrote:
> Example:
>
> ```
> #include
>
> template > void f(T &&value) {}
>
> void test() {
> int t[10];
> f(t);
> }
> ```
>
> ```
> /root/1.cpp:3:50: warning: do not declare C-style arrays, use 'std::array'
> instead
> [cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,mod
https://github.com/stmuench created
https://github.com/llvm/llvm-project/pull/132924
So far, the clang-tidy check `modernize-avoid-c-arrays` also diagnosed array
types for type template parameters even though no actual array type got written
there but it got deduced to one. In such case, there
27 matches
Mail list logo