@@ -299,3 +299,18 @@ void test10() {
for (auto[i, j, k] = arr; i < a; ++i) { }
for (auto[i, j, k] = arr; i < a; ++arr[0]) { }
};
+
+extern void foo(int);
a-tarasyuk wrote:
@shafik, thanks for the review. I've updated tests
https://github.com/llvm/llvm-pro
a-tarasyuk wrote:
@AaronBallman Should this issue ideally be resolved by CFG rather than the
current AST matcher fix?
https://github.com/llvm/llvm-project/pull/135573
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-b
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/136328
>From 0729ae4d4a971905aefc8f1c1ec2ec81a0f149e9 Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Fri, 18 Apr 2025 20:09:56 +0300
Subject: [PATCH 1/2] [Clang] disallow use of attributes before extern tem
@@ -142,6 +142,13 @@ NamedDecl *Parser::ParseCXXInlineMethodDef(
SkipUntil(tok::semi);
}
+Decl *PrevDecl = FnD->getPreviousDecl();
+if (PrevDecl && isa(PrevDecl) &&
a-tarasyuk wrote:
@zwuis thanks
https://github.com/llvm/llvm-project/pull/
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/136717
>From cca0eacad86036539b41971794cc2ee0d1e2d577 Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Tue, 22 Apr 2025 18:35:46 +0300
Subject: [PATCH 1/2] [Clang] diagnose deleted/defaulted redeclaration of
a-tarasyuk wrote:
@erichkeane @AaronBallman @cor3ntin, just checking if there are any updates on
this, as the `Clang 20` release was landed.
https://github.com/llvm/llvm-project/pull/120925
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
htt
@@ -142,6 +142,14 @@ NamedDecl *Parser::ParseCXXInlineMethodDef(
SkipUntil(tok::semi);
}
+if (FunctionDecl *FD =
+dyn_cast_if_present(FnD->getPreviousDecl())) {
+ if (isa(FD->getLexicalDeclContext()) ||
+ Actions.getDefaultedFunctionKind
https://github.com/a-tarasyuk closed
https://github.com/llvm/llvm-project/pull/136717
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -142,6 +142,14 @@ NamedDecl *Parser::ParseCXXInlineMethodDef(
SkipUntil(tok::semi);
}
+if (FunctionDecl *FD =
+dyn_cast_if_present(FnD->getPreviousDecl())) {
+ if (isa(FD->getLexicalDeclContext()) ||
+ Actions.getDefaultedFunctionKind
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/135573
>From 05125bafc45755624973feba0f4e6c2050fad36f Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Mon, 14 Apr 2025 01:37:05 +0300
Subject: [PATCH] [Clang] enhance loop analysis to handle variable changes
https://github.com/a-tarasyuk created
https://github.com/llvm/llvm-project/pull/135573
Fixes #132038
---
This PR extends `-Wloop-analysis` to handle variable modifications inside
lambda expressions.
>From 05125bafc45755624973feba0f4e6c2050fad36f Mon Sep 17 00:00:00 2001
From: Oleksandr Ta
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/135573
>From fd46c6b9af7193376f294a3adae47d579de8503b Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Mon, 14 Apr 2025 14:05:25 +0300
Subject: [PATCH] [Clang] enhance loop analysis to handle variable changes
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/135573
>From f3a021b0acbb028b647e5fab02ff053ad88b Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Wed, 16 Apr 2025 01:08:55 +0300
Subject: [PATCH] [Clang] enhance loop analysis to handle variable changes
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/135573
>From 6a4bfc48c306928cc0fb516cd340e06fa83d54e8 Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Wed, 16 Apr 2025 15:57:00 +0300
Subject: [PATCH] [Clang] enhance loop analysis to handle variable changes
https://github.com/a-tarasyuk approved this pull request.
https://github.com/llvm/llvm-project/pull/134398
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/135573
>From 05125bafc45755624973feba0f4e6c2050fad36f Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Mon, 14 Apr 2025 01:37:05 +0300
Subject: [PATCH] [Clang] enhance loop analysis to handle variable changes
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/135573
>From 27e98b9fbfb808ab19cf688d48d688801d9647c1 Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Thu, 17 Apr 2025 00:40:34 +0300
Subject: [PATCH] [Clang] enhance loop analysis to handle variable changes
https://github.com/a-tarasyuk edited
https://github.com/llvm/llvm-project/pull/120925
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/138519
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,san
https://github.com/a-tarasyuk edited
https://github.com/llvm/llvm-project/pull/138519
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -385,6 +385,8 @@ related warnings within the method body.
- Clang now disallows the use of attributes applied before an
``extern template`` declaration (#GH79893).
+- Clang now diagnoses unknown attribute namespaces
a-tarasyuk wrote:
@erichkeane I’ve upd
https://github.com/a-tarasyuk created
https://github.com/llvm/llvm-project/pull/138519
This patch enhances Clang's attribute handling by diagnosing unknown attribute
namespaces
```c++
[[foo::nodiscard]] int f(); // warning: unknown attribute namespace 'unknown';
attribute 'unknown::foo' igno
@@ -6861,13 +6861,19 @@ ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D,
const ParsedAttr &AL,
// though they were unknown attributes.
if (AL.getKind() == ParsedAttr::UnknownAttribute ||
!AL.existsInTarget(S.Context.getTargetInfo())) {
-S.Diag(AL.getLoc(),
-
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/138519
>From 7d376b33f09801be504ec65a2853679dff8b726c Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Mon, 5 May 2025 15:30:14 +0300
Subject: [PATCH 1/3] [Clang] diagnose unknown attribute namespaces
---
c
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/138519
>From 7d376b33f09801be504ec65a2853679dff8b726c Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Mon, 5 May 2025 15:30:14 +0300
Subject: [PATCH 1/3] [Clang] diagnose unknown attribute namespaces
---
c
https://github.com/a-tarasyuk edited
https://github.com/llvm/llvm-project/pull/136717
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/136717
>From cca0eacad86036539b41971794cc2ee0d1e2d577 Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Tue, 22 Apr 2025 18:35:46 +0300
Subject: [PATCH 1/3] [Clang] diagnose deleted/defaulted redeclaration of
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/136717
>From cca0eacad86036539b41971794cc2ee0d1e2d577 Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Tue, 22 Apr 2025 18:35:46 +0300
Subject: [PATCH 1/3] [Clang] diagnose deleted/defaulted redeclaration of
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/134617
>From 64210203803f7ba9deec06d467ee570bff761108 Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Sun, 6 Apr 2025 00:17:38 +0300
Subject: [PATCH 1/4] [Clang] add ext warning for missing return in 'main'
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/135573
>From ab01bebfa99f635d80c234e19bf3aa73977ce149 Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Wed, 16 Apr 2025 01:08:55 +0300
Subject: [PATCH] [Clang] enhance loop analysis to handle variable changes
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/120925
>From c1aa5c649c052c230cc76d073186ad8fdd14723f Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Sun, 4 May 2025 02:13:29 +0300
Subject: [PATCH] [Clang] raise extension warning for unknown namespaced
a
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/120925
>From 9bb85586f40f659a8bff414511bed9592083efbd Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Sun, 4 May 2025 01:13:20 +0300
Subject: [PATCH] [Clang] raise extension warning for unknown namespaced
a
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/120925
>From 9bb85586f40f659a8bff414511bed9592083efbd Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Sun, 4 May 2025 01:13:20 +0300
Subject: [PATCH 1/2] [Clang] raise extension warning for unknown namespace
https://github.com/a-tarasyuk edited
https://github.com/llvm/llvm-project/pull/120925
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/a-tarasyuk created
https://github.com/llvm/llvm-project/pull/136328
Fixes #79893
---
This PR addresses the issue of _attributes_ being incorrectly allowed on
`extern template` declarations
```cpp
[[deprecated]] extern template struct S;
```
>From 0729ae4d4a971905aefc
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/135573
>From 93c8fc7faba6ab9537039b8745e62f5d79785cd0 Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Thu, 17 Apr 2025 23:58:35 +0300
Subject: [PATCH] [Clang] enhance loop analysis to handle variable changes
@@ -1049,6 +1049,7 @@ Parser::ParseExternalDeclaration(ParsedAttributes &Attrs,
case tok::kw_extern:
if (getLangOpts().CPlusPlus && NextToken().is(tok::kw_template)) {
+ ProhibitAttributes(Attrs);
a-tarasyuk wrote:
@AaronBallman @erichkeane thanks
https://github.com/a-tarasyuk edited
https://github.com/llvm/llvm-project/pull/136328
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/a-tarasyuk closed
https://github.com/llvm/llvm-project/pull/136328
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/a-tarasyuk deleted
https://github.com/llvm/llvm-project/pull/136328
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/135573
>From 93c8fc7faba6ab9537039b8745e62f5d79785cd0 Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Thu, 17 Apr 2025 23:58:35 +0300
Subject: [PATCH 1/2] [Clang] enhance loop analysis to handle variable cha
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/138519
>From cbbca4d26b8d00eb103f110c2341fab2e4a2e40d Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Mon, 5 May 2025 15:30:14 +0300
Subject: [PATCH 1/2] [Clang] diagnose unknown attribute namespaces
---
c
https://github.com/a-tarasyuk edited
https://github.com/llvm/llvm-project/pull/138519
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7115,6 +7115,9 @@ def warn_shift_result_sets_sign_bit : Warning<
"signed shift result (%0) sets the sign bit of the shift expression's "
"type (%1) and becomes negative">,
InGroup>, DefaultIgnore;
+def warn_shift_bool : Warning<
+ "%select{left|right}0 shifting a `bo
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/127061
>From a76ee008bdb87655da465e21d09c840edecc2b1b Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Thu, 13 Feb 2025 15:24:09 +0200
Subject: [PATCH 1/2] [Clang] emit -Wunused-variable warning for unused
structur
@@ -11246,6 +11246,12 @@ static void DiagnoseBadShiftValues(Sema& S, ExprResult
&LHS, ExprResult &RHS,
if (S.getLangOpts().OpenCL)
return;
+ if (LHS.get()->IgnoreParenImpCasts()->getType()->isBooleanType()) {
+S.Diag(Loc, diag::warn_shift_bool)
+<< (Opc ==
@@ -11246,6 +11246,12 @@ static void DiagnoseBadShiftValues(Sema& S, ExprResult
&LHS, ExprResult &RHS,
if (S.getLangOpts().OpenCL)
return;
+ if (LHS.get()->IgnoreParenImpCasts()->getType()->isBooleanType()) {
+S.Diag(Loc, diag::warn_shift_bool)
+<< (Opc ==
https://github.com/a-tarasyuk created
https://github.com/llvm/llvm-project/pull/130339
Fixes
https://github.com/llvm/llvm-project/pull/127336#pullrequestreview-2665950553
>From bed2cb009ae2e560aa00f86b90c57d82f97bb435 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Fri, 7 Mar 2025 22:10:24 +
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/123667
>From 00b8b64879ad3ae35a0a671da563ac876ffaf228 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Mon, 20 Jan 2025 22:51:00 +0200
Subject: [PATCH 1/5] [Clang] use constant evaluation context for constexpr if
c
https://github.com/a-tarasyuk closed
https://github.com/llvm/llvm-project/pull/127336
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/127061
>From a76ee008bdb87655da465e21d09c840edecc2b1b Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Thu, 13 Feb 2025 15:24:09 +0200
Subject: [PATCH 1/2] [Clang] emit -Wunused-variable warning for unused
structur
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/123667
>From 00b8b64879ad3ae35a0a671da563ac876ffaf228 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Mon, 20 Jan 2025 22:51:00 +0200
Subject: [PATCH 1/6] [Clang] use constant evaluation context for constexpr if
c
@@ -309,6 +309,7 @@ Bug Fixes to AST Handling
^
- Fixed type checking when a statement expression ends in an l-value of atomic
type. (#GH106576)
- Fixed uninitialized use check in a lambda within CXXOperatorCallExpr.
(#GH129198)
+- Clang now correctly
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/123667
>From 00b8b64879ad3ae35a0a671da563ac876ffaf228 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Mon, 20 Jan 2025 22:51:00 +0200
Subject: [PATCH 1/7] [Clang] use constant evaluation context for constexpr if
c
https://github.com/a-tarasyuk deleted
https://github.com/llvm/llvm-project/pull/123667
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/a-tarasyuk closed
https://github.com/llvm/llvm-project/pull/129139
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/127336
>From 272385df25b791b50472b92e12157477d021a26f Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sat, 15 Feb 2025 18:19:44 +0200
Subject: [PATCH 1/8] [Clang] add -Wshift-bool warning to handle shifting of
boo
https://github.com/a-tarasyuk closed
https://github.com/llvm/llvm-project/pull/123667
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/127061
>From a76ee008bdb87655da465e21d09c840edecc2b1b Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Thu, 13 Feb 2025 15:24:09 +0200
Subject: [PATCH 1/2] [Clang] emit -Wunused-variable warning for unused
structur
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/130339
>From bed2cb009ae2e560aa00f86b90c57d82f97bb435 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Fri, 7 Mar 2025 22:10:24 +0200
Subject: [PATCH 1/2] [Clang] add additional tests for -Wshift-bool
---
clang/te
@@ -22,4 +23,6 @@ void t() {
if ((y << 1) != 0) { }
if ((y >> 1) != 0) { } // expected-warning {{right shifting a 'bool'
implicitly converts it to 'int'}}
+
+ bool k = (x < z) >> 1; // expected-warning {{right shifting a 'bool'
implicitly converts it to 'int'}}
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/123667
>From 00b8b64879ad3ae35a0a671da563ac876ffaf228 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Mon, 20 Jan 2025 22:51:00 +0200
Subject: [PATCH 1/7] [Clang] use constant evaluation context for constexpr if
c
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++2c -Wunused %s
+
+namespace GH125810 {
+struct S {
+ int a, b;
+};
+
+void t(S s) {
+ auto &[_, _] = s;
+ auto &[a1, _] = s; // expected-warning {{unused variable '[a1, _]'}}
a-tarasyuk wrote:
@@ -0,0 +1,24 @@
+// RUN: %clang_cc1 -fsyntax-only -Wshift-bool -verify %s
+
+void t() {
+ int x = 10;
+ int y = 1;
+
+ int a = y << x;
+ int b = y >> x;
+
+ int c = 0 << x;
+ int d = 0 >> x;
+
+ int e = y << 1;
+ int f = y >> 1;
+
+ int g = y << -1; // expected-warning {
@@ -2203,8 +2203,18 @@ Parser::ParseCXXCondition(StmtResult *InitStmt,
SourceLocation Loc,
return ParseCXXCondition(nullptr, Loc, CK, MissingOK);
}
-// Parse the expression.
-ExprResult Expr = ParseExpression(); // expression
+ExprResult Expr;
+{
+
https://github.com/a-tarasyuk created
https://github.com/llvm/llvm-project/pull/129139
Fixes #46386
---
When an abbreviated function template appears in an `extern "C"` block and all
template parameters are invented, `TemplateParams->getTemplateLoc()` becomes
invalid, leading to an incorrec
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/130339
>From bed2cb009ae2e560aa00f86b90c57d82f97bb435 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Fri, 7 Mar 2025 22:10:24 +0200
Subject: [PATCH 1/4] [Clang] add additional tests for -Wshift-bool
---
clang/te
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/127061
>From a76ee008bdb87655da465e21d09c840edecc2b1b Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Thu, 13 Feb 2025 15:24:09 +0200
Subject: [PATCH 1/2] [Clang] emit -Wunused-variable warning for unused
structur
https://github.com/a-tarasyuk deleted
https://github.com/llvm/llvm-project/pull/127061
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++2c -Wunused %s
+
+namespace GH125810 {
+struct S {
+ int a, b;
+};
+
+void t(S s) {
+ auto &[_, _] = s;
+ auto &[a1, _] = s; // expected-warning {{unused variable '[a1, _]'}}
a-tarasyuk wrote:
@@ -7991,8 +7991,12 @@ Sema::CheckTemplateDeclScope(Scope *S,
TemplateParameterList *TemplateParams) {
// have C linkage.
DeclContext *Ctx = S->getEntity();
if (Ctx && Ctx->isExternCContext()) {
-Diag(TemplateParams->getTemplateLoc(), diag::err_template_linkage)
-
@@ -11246,6 +11246,12 @@ static void DiagnoseBadShiftValues(Sema& S, ExprResult
&LHS, ExprResult &RHS,
if (S.getLangOpts().OpenCL)
return;
+ if (LHS.get()->IgnoreParenImpCasts()->getType()->isBooleanType()) {
+S.Diag(Loc, diag::warn_shift_bool)
+<< (Opc ==
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/123667
>From 00b8b64879ad3ae35a0a671da563ac876ffaf228 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Mon, 20 Jan 2025 22:51:00 +0200
Subject: [PATCH 1/5] [Clang] use constant evaluation context for constexpr if
c
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/129139
>From 4ae7fe210d36daa111ba78d1cc26785d805148b6 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Fri, 28 Feb 2025 00:41:43 +0200
Subject: [PATCH 1/2] [Clang] use parameter location for abbreviated function
te
@@ -7991,8 +7991,12 @@ Sema::CheckTemplateDeclScope(Scope *S,
TemplateParameterList *TemplateParams) {
// have C linkage.
DeclContext *Ctx = S->getEntity();
if (Ctx && Ctx->isExternCContext()) {
-Diag(TemplateParams->getTemplateLoc(), diag::err_template_linkage)
-
https://github.com/a-tarasyuk edited
https://github.com/llvm/llvm-project/pull/129139
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/127336
>From 272385df25b791b50472b92e12157477d021a26f Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sat, 15 Feb 2025 18:19:44 +0200
Subject: [PATCH 1/8] [Clang] add -Wshift-bool warning to handle shifting of
boo
https://github.com/a-tarasyuk deleted
https://github.com/llvm/llvm-project/pull/127336
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -11247,6 +11247,12 @@ static void DiagnoseBadShiftValues(Sema& S, ExprResult
&LHS, ExprResult &RHS,
if (S.getLangOpts().OpenCL)
return;
+ if (Opc == BO_Shr &&
+ LHS.get()->IgnoreParenImpCasts()->getType()->isBooleanType()) {
+S.Diag(Loc, diag::warn_shift_bo
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/130339
>From bed2cb009ae2e560aa00f86b90c57d82f97bb435 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Fri, 7 Mar 2025 22:10:24 +0200
Subject: [PATCH 1/4] [Clang] add additional tests for -Wshift-bool
---
clang/te
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/127061
>From a76ee008bdb87655da465e21d09c840edecc2b1b Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Thu, 13 Feb 2025 15:24:09 +0200
Subject: [PATCH 1/2] [Clang] emit -Wunused-variable warning for unused
structur
@@ -0,0 +1,24 @@
+// RUN: %clang_cc1 -fsyntax-only -Wshift-bool -verify %s
+
+void t() {
+ int x = 10;
+ int y = 1;
+
+ int a = y << x;
+ int b = y >> x;
+
+ int c = 0 << x;
+ int d = 0 >> x;
+
+ int e = y << 1;
+ int f = y >> 1;
+
+ int g = y << -1; // expected-warning {
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/120896
>From 295df258043ef5a87ae603eedd308b863bad7b59 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sun, 22 Dec 2024 15:14:30 +0200
Subject: [PATCH 01/13] [Clang] allow restrict qualifier for array types with
po
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/127061
>From a76ee008bdb87655da465e21d09c840edecc2b1b Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Thu, 13 Feb 2025 15:24:09 +0200
Subject: [PATCH 1/2] [Clang] emit -Wunused-variable warning for unused
structur
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++2c -Wunused %s
a-tarasyuk wrote:
@Fznamznon I've updated. thanks
https://github.com/llvm/llvm-project/pull/127061
___
cfe-commits mailing list
cfe-comm
https://github.com/a-tarasyuk closed
https://github.com/llvm/llvm-project/pull/120896
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/127061
>From a76ee008bdb87655da465e21d09c840edecc2b1b Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Thu, 13 Feb 2025 15:24:09 +0200
Subject: [PATCH 1/2] [Clang] emit -Wunused-variable warning for unused
structur
https://github.com/a-tarasyuk edited
https://github.com/llvm/llvm-project/pull/123667
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -11246,6 +11246,12 @@ static void DiagnoseBadShiftValues(Sema& S, ExprResult
&LHS, ExprResult &RHS,
if (S.getLangOpts().OpenCL)
return;
+ if (LHS.get()->IgnoreParenImpCasts()->getType()->isBooleanType()) {
+S.Diag(Loc, diag::warn_shift_bool)
+<< (Opc ==
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/127061
>From a76ee008bdb87655da465e21d09c840edecc2b1b Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Thu, 13 Feb 2025 15:24:09 +0200
Subject: [PATCH 1/2] [Clang] emit -Wunused-variable warning for unused
structur
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/127336
>From 272385df25b791b50472b92e12157477d021a26f Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sat, 15 Feb 2025 18:19:44 +0200
Subject: [PATCH 1/6] [Clang] add -Wshift-bool warning to handle shifting of
boo
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fsyntax-only -Wshift-bool -verify %s
+
+void t() {
+ int x = 10;
+ bool y = true;
+
+ bool a = y >> x; // expected-warning {{right shifting a `bool`
implicitly converts it to 'int'}}
+ bool b = false >> x; // expected-warning {{right
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/127336
>From 272385df25b791b50472b92e12157477d021a26f Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sat, 15 Feb 2025 18:19:44 +0200
Subject: [PATCH 1/6] [Clang] add -Wshift-bool warning to handle shifting of
boo
https://github.com/a-tarasyuk created
https://github.com/llvm/llvm-project/pull/128246
Fixes #128210
>From 55a38b8d5c8864557f20f642a7202c6242aa3b83 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sat, 22 Feb 2025 01:01:41 +0200
Subject: [PATCH] [HLSL] add parentheses in assertion to eliminat
https://github.com/a-tarasyuk closed
https://github.com/llvm/llvm-project/pull/128246
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/127336
>From 272385df25b791b50472b92e12157477d021a26f Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sat, 15 Feb 2025 18:19:44 +0200
Subject: [PATCH 1/4] [Clang] add -Wshift-bool warning to handle shifting of
boo
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/127336
>From 272385df25b791b50472b92e12157477d021a26f Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sat, 15 Feb 2025 18:19:44 +0200
Subject: [PATCH 1/5] [Clang] add -Wshift-bool warning to handle shifting of
boo
@@ -11246,6 +11246,12 @@ static void DiagnoseBadShiftValues(Sema& S, ExprResult
&LHS, ExprResult &RHS,
if (S.getLangOpts().OpenCL)
return;
+ if (LHS.get()->IgnoreParenImpCasts()->getType()->isBooleanType()) {
+S.Diag(Loc, diag::warn_shift_bool)
+<< (Opc ==
https://github.com/a-tarasyuk edited
https://github.com/llvm/llvm-project/pull/127336
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/127336
>From 272385df25b791b50472b92e12157477d021a26f Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sat, 15 Feb 2025 18:19:44 +0200
Subject: [PATCH 1/5] [Clang] add -Wshift-bool warning to handle shifting of
boo
901 - 1000 of 1021 matches
Mail list logo