@@ -7867,15 +7865,16 @@ void Sema::checkUnusedDeclAttributes(Declarator &D) {
void Sema::DiagnoseUnknownAttribute(const ParsedAttr &AL) {
std::string NormalizedFullName = '\'' + AL.getNormalizedFullName() + '\'';
+ SourceRange NR = AL.getNormalizedRange();
@@ -7867,15 +7865,16 @@ void Sema::checkUnusedDeclAttributes(Declarator &D) {
void Sema::DiagnoseUnknownAttribute(const ParsedAttr &AL) {
std::string NormalizedFullName = '\'' + AL.getNormalizedFullName() + '\'';
+ SourceRange NR = AL.getNormalizedRange();
@@ -1842,8 +1842,7 @@ void Parser::ProhibitCXX11Attributes(ParsedAttributes
&Attrs,
continue;
if (AL.getKind() == ParsedAttr::UnknownAttribute) {
if (WarnOnUnknownAttrs)
-Diag(AL.getLoc(), diag::warn_unknown_attribute_ignored)
-<< AL << AL.g
@@ -672,12 +672,13 @@ static Attr *ProcessStmtAttribute(Sema &S, Stmt *St,
const ParsedAttr &A,
!(A.existsInTarget(S.Context.getTargetInfo()) ||
(S.Context.getLangOpts().SYCLIsDevice && Aux &&
A.existsInTarget(*Aux {
-S.Diag(A.getLoc(), A.isRegul
@@ -7867,15 +7865,16 @@ void Sema::checkUnusedDeclAttributes(Declarator &D) {
void Sema::DiagnoseUnknownAttribute(const ParsedAttr &AL) {
std::string NormalizedFullName = '\'' + AL.getNormalizedFullName() + '\'';
+ SourceRange NR = AL.getNormalizedRange();
https://github.com/a-tarasyuk edited
https://github.com/llvm/llvm-project/pull/141305
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7867,15 +7867,16 @@ void Sema::checkUnusedDeclAttributes(Declarator &D) {
void Sema::DiagnoseUnknownAttribute(const ParsedAttr &AL) {
std::string NormalizedFullName = '\'' + AL.getNormalizedFullName() + '\'';
+ SourceRange NR = AL.getNormalizedRange();
+ SourceLocation
@@ -0,0 +1,32 @@
+// RUN: %clang_cc1 -Wunknown-attributes -fsyntax-only -verify %s
+// RUN: %clang_cc1 -Wunknown-attributes -fsyntax-only
-fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
+
+[[gmu::deprected]] // expected-warning {{unknown attribute 'gmu::deprected'
ignored;
a-tarasyuk wrote:
@zwuis Thanks for the feedback. I've added additional tests to cover this case
https://github.com/llvm/llvm-project/pull/141305
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/141305
>From 2b84b21462a4e66b8681e165fcd24e3107612448 Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Sat, 24 May 2025 02:52:24 +0300
Subject: [PATCH 1/2] [Clang] add fix-it hints for unknown attributes
---
https://github.com/a-tarasyuk created
https://github.com/llvm/llvm-project/pull/141305
This patch adds fix-it hints for unknown attribute names when Clang suggests a
correction
>From 2b84b21462a4e66b8681e165fcd24e3107612448 Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Sat, 24 May 2
https://github.com/a-tarasyuk closed
https://github.com/llvm/llvm-project/pull/140629
___
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/140629
>From 5b8f0635fdddc87ea326a3b1b47191ab9bf23c0f Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Tue, 20 May 2025 00:38:43 +0300
Subject: [PATCH 1/4] [Clang] add typo correction for unknown attribute na
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/140629
>From 5b8f0635fdddc87ea326a3b1b47191ab9bf23c0f Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Tue, 20 May 2025 00:38:43 +0300
Subject: [PATCH 1/4] [Clang] add typo correction for unknown attribute na
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/140629
>From 5b8f0635fdddc87ea326a3b1b47191ab9bf23c0f Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Tue, 20 May 2025 00:38:43 +0300
Subject: [PATCH 1/3] [Clang] add typo correction for unknown attribute na
@@ -203,10 +221,47 @@ unsigned
AttributeCommonInfo::calculateAttributeSpellingListIndex() const {
// attribute spell list index matching code.
auto Syntax = static_cast(getSyntax());
StringRef ScopeName = normalizeAttrScopeName(getScopeName(), Syntax);
- StringRef Name
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/140629
>From 5b8f0635fdddc87ea326a3b1b47191ab9bf23c0f Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Tue, 20 May 2025 00:38:43 +0300
Subject: [PATCH 1/2] [Clang] add typo correction for unknown attribute na
https://github.com/a-tarasyuk created
https://github.com/llvm/llvm-project/pull/140629
This patch enhances Clang's diagnosis for unknown attributes by providing typo
correction suggestions for known attributes.
```cpp
[[gmu::deprected]] // expected-warning {{unknown attribute 'gmu::deprected'
a-tarasyuk wrote:
> I question if -Wloop-analysis should be completely rewritten using dataflow
> analysis, rather than AST based matching.
should changes inside functions be handled in the following cases?
https://github.com/llvm/llvm-project/blob/db0f754c5af8e6c96770533520bf8b17fc0dc977/clan
https://github.com/a-tarasyuk closed
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
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
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
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
a-tarasyuk wrote:
> So I don't believe this is correct either. We want it to always say the
> namespace. So clang::unknown will diagnose as unknown attribute
> 'clang::unknown' ignored
@erichkeane @AaronBallman Thanks for the feedback. I've made changes to include
the _scope_ in the diagnost
https://github.com/a-tarasyuk deleted
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
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] [Clang] diagnose unknown attribute namespaces
---
clang
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
@@ -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
@@ -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 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
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 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
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/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 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/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 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
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
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
@@ -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/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/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
@@ -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/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 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 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
@@ -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 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
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 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
@@ -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:
@erichkeane, thanks for the feedb
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 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
@@ -299,3 +299,38 @@ void test10() {
for (auto[i, j, k] = arr; i < a; ++i) { }
for (auto[i, j, k] = arr; i < a; ++arr[0]) { }
};
+
+namespace GH132038 {
+extern void foo(int);
+void test1() {
+ int a = 0;
+ auto incr_a = [&a]() { ++a; };
+
+ for (int b = 10; a <= b; incr
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/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
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
@@ -299,3 +299,38 @@ void test10() {
for (auto[i, j, k] = arr; i < a; ++i) { }
for (auto[i, j, k] = arr; i < a; ++arr[0]) { }
};
+
+namespace GH132038 {
+extern void foo(int);
+void test1() {
+ int a = 0;
+ auto incr_a = [&a]() { ++a; };
+
+ for (int b = 10; a <= b; incr
@@ -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
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/135573
>From b88f9364679db1d85b03f7552f5ed79949b0b775 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
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 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 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 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 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/135573
>From 30a626ee59fbdf96d055b13fe316ff2a8417c93b Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Tue, 15 Apr 2025 01:07: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 1bd4c4727596ad6255dd867fd3f2c9386b911bb5 Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Tue, 15 Apr 2025 01:07: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 213a2377387d8fc032741e4f4ddf50f88fccaca5 Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Tue, 15 Apr 2025 01:07: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 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 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 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 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/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/134617
>From 64210203803f7ba9deec06d467ee570bff761108 Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk
Date: Sun, 6 Apr 2025 00:17:38 +0300
Subject: [PATCH] [Clang] add ext warning for missing return in 'main' for
https://github.com/a-tarasyuk closed
https://github.com/llvm/llvm-project/pull/134617
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1031,6 +1031,8 @@ def err_mainlike_template_decl : Error<"%0 cannot be a
template">;
def err_main_returns_nonint : Error<"'main' must return 'int'">;
def ext_main_returns_nonint : ExtWarn<"return type of 'main' is not 'int'">,
InGroup;
+def ext_main_no_return : Extensi
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/5] [Clang] add ext warning for missing return in 'main'
@@ -16232,7 +16232,9 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt
*Body,
// If the function implicitly returns zero (like 'main') or is naked,
// don't complain about missing return statements.
- if (FD->hasImplicitReturnZero() || FD->hasAttr())
+
https://github.com/a-tarasyuk edited
https://github.com/llvm/llvm-project/pull/134617
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,6 @@
+/* RUN: %clang_cc1 -std=c89 -fsyntax-only -verify -pedantic
-Wno-strict-prototypes %s
a-tarasyuk wrote:
@AaronBallman I've added additonal tests
https://github.com/llvm/llvm-project/pull/134617
___
cf
@@ -16232,7 +16232,9 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt
*Body,
// If the function implicitly returns zero (like 'main') or is naked,
// don't complain about missing return statements.
- if (FD->hasImplicitReturnZero() || FD->hasAttr())
+
@@ -16232,7 +16232,9 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt
*Body,
// If the function implicitly returns zero (like 'main') or is naked,
// don't complain about missing return statements.
- if (FD->hasImplicitReturnZero() || FD->hasAttr())
+
https://github.com/a-tarasyuk created
https://github.com/llvm/llvm-project/pull/134617
Fixes #21650
---
Clang currently inserts an implicit `return 0;` in `main()` when compiling in
`C89` mode, even though the `C89` standard doesn't require this behavior. This
patch changes that behavior b
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 closed
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
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
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/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/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:
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
1 - 100 of 1026 matches
Mail list logo