BaLiKfromUA wrote:
Could someone merge it?
Or do we need another reviewer?
I don't have merge permissions :)
https://github.com/llvm/llvm-project/pull/128437
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mail
https://github.com/BaLiKfromUA updated
https://github.com/llvm/llvm-project/pull/128437
>From 319ad0b803b8c6c6c5405178335bd1f2258be4b8 Mon Sep 17 00:00:00 2001
From: Valentyn Yukhymenko
Date: Sun, 23 Feb 2025 12:08:02 +
Subject: [PATCH 1/9] first implementation and basic tests
---
.../Mod
https://github.com/BaLiKfromUA edited
https://github.com/llvm/llvm-project/pull/128437
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BaLiKfromUA updated
https://github.com/llvm/llvm-project/pull/128437
>From 319ad0b803b8c6c6c5405178335bd1f2258be4b8 Mon Sep 17 00:00:00 2001
From: Valentyn Yukhymenko
Date: Sun, 23 Feb 2025 12:08:02 +
Subject: [PATCH 1/7] first implementation and basic tests
---
.../Mod
https://github.com/BaLiKfromUA ready_for_review
https://github.com/llvm/llvm-project/pull/128437
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
BaLiKfromUA wrote:
Addressed all comments. Thanks for the initial feedback!
Regarding documentation: looks like we need to merge
https://github.com/llvm/llvm-project/pull/122290 first and then update docs in
my PR
https://github.com/llvm/llvm-project/pull/128437
__
https://github.com/BaLiKfromUA updated
https://github.com/llvm/llvm-project/pull/128437
>From 319ad0b803b8c6c6c5405178335bd1f2258be4b8 Mon Sep 17 00:00:00 2001
From: Valentyn Yukhymenko
Date: Sun, 23 Feb 2025 12:08:02 +
Subject: [PATCH 1/7] first implementation and basic tests
---
.../Mod
https://github.com/BaLiKfromUA updated
https://github.com/llvm/llvm-project/pull/128437
>From 319ad0b803b8c6c6c5405178335bd1f2258be4b8 Mon Sep 17 00:00:00 2001
From: Valentyn Yukhymenko
Date: Sun, 23 Feb 2025 12:08:02 +
Subject: [PATCH 1/6] first implementation and basic tests
---
.../Mod
https://github.com/BaLiKfromUA updated
https://github.com/llvm/llvm-project/pull/128437
>From 319ad0b803b8c6c6c5405178335bd1f2258be4b8 Mon Sep 17 00:00:00 2001
From: Valentyn Yukhymenko
Date: Sun, 23 Feb 2025 12:08:02 +
Subject: [PATCH 1/5] first implementation and basic tests
---
.../Mod
https://github.com/BaLiKfromUA updated
https://github.com/llvm/llvm-project/pull/128437
>From 319ad0b803b8c6c6c5405178335bd1f2258be4b8 Mon Sep 17 00:00:00 2001
From: Valentyn Yukhymenko
Date: Sun, 23 Feb 2025 12:08:02 +
Subject: [PATCH 1/4] first implementation and basic tests
---
.../Mod
@@ -3863,6 +3863,192 @@ TEST_P(UncheckedOptionalAccessTest,
ConstBoolAccessorWithModInBetween) {
)cc");
}
+TEST_P(UncheckedOptionalAccessTest,
+ ConstRefAccessorToOptionalViaConstRefAccessorToHoldingObject) {
+ ExpectDiagnosticsFor(R"cc(
+#include "unchecked_opti
@@ -580,6 +580,26 @@ void handleConstMemberCall(const CallExpr *CE,
return;
}
+ // Cache if the const method returns a reference
+ if (RecordLoc != nullptr && CE->isGLValue()) {
+const FunctionDecl *DirectCallee = CE->getDirectCallee();
+if (DirectCallee == nul
@@ -580,6 +580,26 @@ void handleConstMemberCall(const CallExpr *CE,
return;
}
+ // Cache if the const method returns a reference
+ if (RecordLoc != nullptr && CE->isGLValue()) {
+const FunctionDecl *DirectCallee = CE->getDirectCallee();
+if (DirectCallee == nul
BaLiKfromUA wrote:
TODO: update release notes and
`clang-tools-extra/docs/clang-tidy/checks/bugprone/unchecked-optional-access.rst`
if needed
https://github.com/llvm/llvm-project/pull/128437
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
htt
https://github.com/BaLiKfromUA created
https://github.com/llvm/llvm-project/pull/128437
Fixes https://github.com/llvm/llvm-project/issues/126283
Extending https://github.com/llvm/llvm-project/pull/112605 to cache const
getters which return references.
This should fix false positive cases when
https://github.com/BaLiKfromUA updated
https://github.com/llvm/llvm-project/pull/123533
>From e451a8869420d9240f9006eb2adb599a3e6fd9f8 Mon Sep 17 00:00:00 2001
From: Valentyn Yukhymenko
Date: Sun, 19 Jan 2025 23:13:46 +
Subject: [PATCH 1/6] [Clang] Reject declaring an alias template with th
https://github.com/BaLiKfromUA updated
https://github.com/llvm/llvm-project/pull/123533
>From e451a8869420d9240f9006eb2adb599a3e6fd9f8 Mon Sep 17 00:00:00 2001
From: Valentyn Yukhymenko
Date: Sun, 19 Jan 2025 23:13:46 +
Subject: [PATCH 1/5] [Clang] Reject declaring an alias template with th
https://github.com/BaLiKfromUA edited
https://github.com/llvm/llvm-project/pull/123533
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -13464,6 +13464,14 @@ Decl *Sema::ActOnAliasDeclaration(Scope *S,
AccessSpecifier AS,
}
TemplateParameterList *TemplateParams = TemplateParamLists[0];
+// Check shadowing of a template parameter name
+for (NamedDecl *TP : TemplateParams->asArray()) {
+
https://github.com/BaLiKfromUA edited
https://github.com/llvm/llvm-project/pull/123533
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BaLiKfromUA updated
https://github.com/llvm/llvm-project/pull/123533
>From e451a8869420d9240f9006eb2adb599a3e6fd9f8 Mon Sep 17 00:00:00 2001
From: Valentyn Yukhymenko
Date: Sun, 19 Jan 2025 23:13:46 +
Subject: [PATCH 1/4] [Clang] Reject declaring an alias template with th
https://github.com/BaLiKfromUA updated
https://github.com/llvm/llvm-project/pull/123533
>From e451a8869420d9240f9006eb2adb599a3e6fd9f8 Mon Sep 17 00:00:00 2001
From: Valentyn Yukhymenko
Date: Sun, 19 Jan 2025 23:13:46 +
Subject: [PATCH 1/4] [Clang] Reject declaring an alias template with th
https://github.com/BaLiKfromUA edited
https://github.com/llvm/llvm-project/pull/123533
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -13464,6 +13464,14 @@ Decl *Sema::ActOnAliasDeclaration(Scope *S,
AccessSpecifier AS,
}
TemplateParameterList *TemplateParams = TemplateParamLists[0];
+// Check shadowing of a template parameter name
+for (NamedDecl *TP : TemplateParams->asArray()) {
+
https://github.com/BaLiKfromUA edited
https://github.com/llvm/llvm-project/pull/123533
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BaLiKfromUA edited
https://github.com/llvm/llvm-project/pull/123533
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BaLiKfromUA edited
https://github.com/llvm/llvm-project/pull/123533
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BaLiKfromUA edited
https://github.com/llvm/llvm-project/pull/123533
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -13464,6 +13464,14 @@ Decl *Sema::ActOnAliasDeclaration(Scope *S,
AccessSpecifier AS,
}
TemplateParameterList *TemplateParams = TemplateParamLists[0];
+// Check shadowing of a template parameter name
+for (NamedDecl *TP : TemplateParams->asArray()) {
+
https://github.com/BaLiKfromUA ready_for_review
https://github.com/llvm/llvm-project/pull/123533
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BaLiKfromUA edited
https://github.com/llvm/llvm-project/pull/123533
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BaLiKfromUA updated
https://github.com/llvm/llvm-project/pull/123533
>From e451a8869420d9240f9006eb2adb599a3e6fd9f8 Mon Sep 17 00:00:00 2001
From: Valentyn Yukhymenko
Date: Sun, 19 Jan 2025 23:13:46 +
Subject: [PATCH] [Clang] Reject declaring an alias template with the sa
https://github.com/BaLiKfromUA converted_to_draft
https://github.com/llvm/llvm-project/pull/123533
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/BaLiKfromUA edited
https://github.com/llvm/llvm-project/pull/123533
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -65,7 +65,8 @@ namespace InFunctions {
template struct S3 { // expected-note {{template parameter is
declared here}}
template using T = int; // expected-error {{declaration of 'T'
shadows template parameter}}
};
- template using Z = Z;
+ template // expected-note
https://github.com/BaLiKfromUA created
https://github.com/llvm/llvm-project/pull/123533
Fixes llvm#123423
**How did I test it?**
Modified existing test and checked an example from the issue manually.
>From 0852c8ca587e772d5f851ac0983f43bdeec2ebd5 Mon Sep 17 00:00:00 2001
From: Valentyn Yukhy
36 matches
Mail list logo