@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const
SourceLocation &Loc,
}
}
+template
+inline static bool HasAttribute(const QualType &T) {
a-tarasyuk wrote:
@AaronBallman thanks for the detailed feedback. I've updated the tests to cover
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/120734
>From 55fb96c1673911f30721c2a53bea32e7e4b5dc6e Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Fri, 20 Dec 2024 15:32:55 +0200
Subject: [PATCH 1/2] [Clang] handle [[warn_unused]] attribute for unused
privat
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/106036
>From ef0f3551dbb3ce61c57a5ad044d86b504c7742e0 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Tue, 10 Sep 2024 02:35:43 +0300
Subject: [PATCH 1/7] [Clang] restrict use of attribute names reserved by the
C+
@@ -179,13 +179,15 @@ static bool isLanguageDefinedBuiltin(const SourceManager
&SourceMgr,
static bool isReservedCXXAttributeName(Preprocessor &PP, IdentifierInfo *II) {
const LangOptions &Lang = PP.getLangOpts();
if (Lang.CPlusPlus &&
- hasAttribute(AttributeCommonIn
@@ -61,14 +62,23 @@ int clang::hasAttribute(AttributeCommonInfo::Syntax Syntax,
if (res)
return res;
- // Check if any plugin provides this attribute.
- for (auto &Ptr : getAttributePluginInstances())
-if (Ptr->hasSpelling(Syntax, Name))
- return 1;
+ if (Che
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/106036
>From ef0f3551dbb3ce61c57a5ad044d86b504c7742e0 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Tue, 10 Sep 2024 02:35:43 +0300
Subject: [PATCH 1/7] [Clang] restrict use of attribute names reserved by the
C+
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/106036
>From ef0f3551dbb3ce61c57a5ad044d86b504c7742e0 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Tue, 10 Sep 2024 02:35:43 +0300
Subject: [PATCH 1/6] [Clang] restrict use of attribute names reserved by the
C+
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/106036
>From ef0f3551dbb3ce61c57a5ad044d86b504c7742e0 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Tue, 10 Sep 2024 02:35:43 +0300
Subject: [PATCH 1/5] [Clang] restrict use of attribute names reserved by the
C+
a-tarasyuk wrote:
@AaronBallman could you review these changes? thanks
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
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const
SourceLocation &Loc,
}
}
+template
+inline static bool HasAttribute(const QualType &T) {
a-tarasyuk wrote:
@AaronBallman could you take a look at this issue? thanks
https://github.com/llv
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] [Clang] allow restrict qualifier for array types with pointer
@@ -173,6 +176,20 @@ static bool isLanguageDefinedBuiltin(const SourceManager
&SourceMgr,
return false;
}
+static bool isReservedCXXAttributeName(Preprocessor &PP, IdentifierInfo *II) {
+ const LangOptions &Lang = PP.getLangOpts();
+ if (Lang.CPlusPlus &&
+ hasAttrib
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/106036
>From ef0f3551dbb3ce61c57a5ad044d86b504c7742e0 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Tue, 10 Sep 2024 02:35:43 +0300
Subject: [PATCH 1/4] [Clang] restrict use of attribute names reserved by the
C+
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/121419
>From 3f6b1d68978857035a972f49b1cfd9d9d0151be9 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 1 Jan 2025 01:47:17 +0200
Subject: [PATCH 1/6] [Clang] emit -Wignored-qualifiers diagnostic for
cv-qualifi
a-tarasyuk wrote:
@ldionne could you take a look at the latest changes? thanks
https://github.com/llvm/llvm-project/pull/121419
___
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/106036
>From ef0f3551dbb3ce61c57a5ad044d86b504c7742e0 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Tue, 10 Sep 2024 02:35:43 +0300
Subject: [PATCH 1/3] [Clang] restrict use of attribute names reserved by the
C+
a-tarasyuk wrote:
@ldionne could you take a look at the latest changes? thanks
https://github.com/llvm/llvm-project/pull/121419
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
a-tarasyuk wrote:
@ldionne could you take a look at the latest changes? thanks
https://github.com/llvm/llvm-project/pull/121419
___
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/121419
>From 3f6b1d68978857035a972f49b1cfd9d9d0151be9 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 1 Jan 2025 01:47:17 +0200
Subject: [PATCH 1/6] [Clang] emit -Wignored-qualifiers diagnostic for
cv-qualifi
a-tarasyuk wrote:
@AaronBallman @erichkeane I’ve switched back to the version without the std
check. should the diagnostic group be changed?
https://github.com/llvm/llvm-project/pull/106036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https
a-tarasyuk wrote:
@AaronBallman @erichkeane I’ve switched back to the version without the std
check. should the diagnostic group be changed?
https://github.com/llvm/llvm-project/pull/106036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
https://github.com/a-tarasyuk ready_for_review
https://github.com/llvm/llvm-project/pull/106036
___
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/121419
>From 3f6b1d68978857035a972f49b1cfd9d9d0151be9 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 1 Jan 2025 01:47:17 +0200
Subject: [PATCH 1/6] [Clang] emit -Wignored-qualifiers diagnostic for
cv-qualifi
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/121419
>From 3f6b1d68978857035a972f49b1cfd9d9d0151be9 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 1 Jan 2025 01:47:17 +0200
Subject: [PATCH 1/6] [Clang] emit -Wignored-qualifiers diagnostic for
cv-qualifi
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/121419
>From 3f6b1d68978857035a972f49b1cfd9d9d0151be9 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 1 Jan 2025 01:47:17 +0200
Subject: [PATCH 1/5] [Clang] emit -Wignored-qualifiers diagnostic for
cv-qualifi
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/121419
>From 3f6b1d68978857035a972f49b1cfd9d9d0151be9 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 1 Jan 2025 01:47:17 +0200
Subject: [PATCH 1/4] [Clang] emit -Wignored-qualifiers diagnostic for
cv-qualifi
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/122621
>From b2c656afdf99eff52d019b68fcbbc6ce4bbdd7d3 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sun, 12 Jan 2025 00:51:47 +0200
Subject: [PATCH 1/8] [Clang] disallow the use of asterisks preceding
constructo
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/122621
>From b2c656afdf99eff52d019b68fcbbc6ce4bbdd7d3 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sun, 12 Jan 2025 00:51:47 +0200
Subject: [PATCH 1/8] [Clang] disallow the use of asterisks preceding
constructo
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/122621
>From b2c656afdf99eff52d019b68fcbbc6ce4bbdd7d3 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sun, 12 Jan 2025 00:51:47 +0200
Subject: [PATCH 1/7] [Clang] disallow the use of asterisks preceding
constructo
@@ -2223,6 +2225,8 @@ def err_destructor_not_member : Error<
def err_destructor_cannot_be : Error<"destructor cannot be declared '%0'">;
def err_invalid_qualified_destructor : Error<
"'%0' qualifier is not allowed on a destructor">;
+def err_invalid_destructor_decl : Error<
-
@@ -96,3 +96,49 @@ namespace PR38286 {
template struct C; // expected-note {{non-type declaration found}}
template C::~C() {} // expected-error {{identifier 'C' after
'~' in destructor name does not name a type}}
}
+
+namespace GH121706 {
a-tarasyuk wrote:
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/122621
>From b2c656afdf99eff52d019b68fcbbc6ce4bbdd7d3 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sun, 12 Jan 2025 00:51:47 +0200
Subject: [PATCH 1/7] [Clang] disallow the use of asterisks preceding
constructo
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/122621
>From b2c656afdf99eff52d019b68fcbbc6ce4bbdd7d3 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sun, 12 Jan 2025 00:51:47 +0200
Subject: [PATCH 1/6] [Clang] disallow the use of asterisks preceding
constructo
@@ -10757,6 +10757,17 @@ static void checkMethodTypeQualifiers(Sema &S,
Declarator &D, unsigned DiagID) {
}
}
+static void checkMethodPointerType(Sema &S, Declarator &D, unsigned DiagID) {
+ if (D.getNumTypeObjects() > 0) {
+DeclaratorChunk &Chunk = D.getTypeObject(D.g
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/122621
>From b2c656afdf99eff52d019b68fcbbc6ce4bbdd7d3 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sun, 12 Jan 2025 00:51:47 +0200
Subject: [PATCH 1/4] [Clang] disallow the use of asterisks preceding
constructo
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/121419
>From 3f6b1d68978857035a972f49b1cfd9d9d0151be9 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 1 Jan 2025 01:47:17 +0200
Subject: [PATCH 1/3] [Clang] emit -Wignored-qualifiers diagnostic for
cv-qualifi
a-tarasyuk wrote:
@erichkeane @ldionne should the `libcxx` tests
([common_reference.compile.pass.cpp](https://github.com/llvm/llvm-project/blob/main/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_reference.compile.pass.cpp),
[apply_extended_types.pass.cpp](https://github.com
https://github.com/a-tarasyuk deleted
https://github.com/llvm/llvm-project/pull/122621
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -10757,6 +10757,17 @@ static void checkMethodTypeQualifiers(Sema &S,
Declarator &D, unsigned DiagID) {
}
}
+static void checkMethodPointerType(Sema &S, Declarator &D, unsigned DiagID) {
+ if (D.getNumTypeObjects() > 0) {
+DeclaratorChunk &Chunk = D.getTypeObject(D.g
@@ -10757,6 +10757,17 @@ static void checkMethodTypeQualifiers(Sema &S,
Declarator &D, unsigned DiagID) {
}
}
+static void checkMethodPointerType(Sema &S, Declarator &D, unsigned DiagID) {
+ if (D.getNumTypeObjects() > 0) {
+DeclaratorChunk &Chunk = D.getTypeObject(D.g
@@ -10757,6 +10757,17 @@ static void checkMethodTypeQualifiers(Sema &S,
Declarator &D, unsigned DiagID) {
}
}
+static void checkMethodPointerType(Sema &S, Declarator &D, unsigned DiagID) {
+ if (D.getNumTypeObjects() > 0) {
+DeclaratorChunk &Chunk = D.getTypeObject(D.g
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/122621
>From b2c656afdf99eff52d019b68fcbbc6ce4bbdd7d3 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sun, 12 Jan 2025 00:51:47 +0200
Subject: [PATCH 1/2] [Clang] disallow the use of asterisks preceding
constructo
https://github.com/a-tarasyuk created
https://github.com/llvm/llvm-project/pull/122621
Fixes #121706
>From b2c656afdf99eff52d019b68fcbbc6ce4bbdd7d3 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sun, 12 Jan 2025 00:51:47 +0200
Subject: [PATCH] [Clang] disallow the use of asterisks preceding
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/106036
>From d4b07c7ff65ca64a5a434818ce09ecd289401340 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Tue, 10 Sep 2024 02:35:43 +0300
Subject: [PATCH 1/6] [Clang] restrict use of attribute names reserved by the
C+
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] [Clang] allow restrict qualifier for array types with pointer
https://github.com/a-tarasyuk deleted
https://github.com/llvm/llvm-project/pull/121614
___
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/121614
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -81,7 +81,7 @@ Parser::DeclGroupPtrTy
Parser::ParseNamespace(DeclaratorContext Context,
ParsedAttributes attrs(AttrFactory);
- auto ReadAttributes = [&] {
+ auto ReadAttributes = [&](bool TrailingAttrs) {
a-tarasyuk wrote:
@erichkeane @AaronBallman c
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/121614
>From b8f6ffc0a98a0d3ac55fba4e6ee680f1edea4571 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sat, 4 Jan 2025 02:24:26 +0200
Subject: [PATCH 1/4] [Clang] disallow attributes after namespace identifier
---
@@ -100,7 +103,7 @@ Parser::DeclGroupPtrTy
Parser::ParseNamespace(DeclaratorContext Context,
} while (MoreToParse);
};
- ReadAttributes();
+ ReadAttributes(/*TrailingAttrs*/ false);
a-tarasyuk wrote:
@cor3ntin is it acceptable to use `DiagnoseAndSkip
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/121614
>From b8f6ffc0a98a0d3ac55fba4e6ee680f1edea4571 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sat, 4 Jan 2025 02:24:26 +0200
Subject: [PATCH 1/4] [Clang] disallow attributes after namespace identifier
---
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/121614
>From b8f6ffc0a98a0d3ac55fba4e6ee680f1edea4571 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sat, 4 Jan 2025 02:24:26 +0200
Subject: [PATCH 1/3] [Clang] disallow attributes after namespace identifier
---
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/121614
>From b8f6ffc0a98a0d3ac55fba4e6ee680f1edea4571 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sat, 4 Jan 2025 02:24:26 +0200
Subject: [PATCH 1/4] [Clang] disallow attributes after namespace identifier
---
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/121614
>From b8f6ffc0a98a0d3ac55fba4e6ee680f1edea4571 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sat, 4 Jan 2025 02:24:26 +0200
Subject: [PATCH 1/3] [Clang] disallow attributes after namespace identifier
---
@@ -100,7 +103,7 @@ Parser::DeclGroupPtrTy
Parser::ParseNamespace(DeclaratorContext Context,
} while (MoreToParse);
};
- ReadAttributes();
+ ReadAttributes(/*TrailingAttrs*/ false);
a-tarasyuk wrote:
@cor3ntin thanks for the review. I've changed para
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/121614
>From b8f6ffc0a98a0d3ac55fba4e6ee680f1edea4571 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sat, 4 Jan 2025 02:24:26 +0200
Subject: [PATCH 1/2] [Clang] disallow attributes after namespace identifier
---
https://github.com/a-tarasyuk created
https://github.com/llvm/llvm-project/pull/121614
Fixes #121407
>From b8f6ffc0a98a0d3ac55fba4e6ee680f1edea4571 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Sat, 4 Jan 2025 02:24:26 +0200
Subject: [PATCH] [Clang] disallow attributes after namespace ident
@@ -179,6 +179,8 @@ def err_opencl_unknown_type_specifier : Error<
def warn_unknown_attribute_ignored : Warning<
"unknown attribute %0 ignored">, InGroup;
+def ext_unknown_attribute_ignored : Extension<
+ "unknown attribute %0 ignored">, InGroup;
a-tarasyuk
a-tarasyuk wrote:
> ...that the template cases are going to be REALLY noisy
@erichkeane It looks like that's why I have two failed tests from
`llvm-libc++-shared-cfg-in` due to the use of qualifiers
https://github.com/llvm/llvm-project/pull/121419
__
@@ -179,6 +179,8 @@ def err_opencl_unknown_type_specifier : Error<
def warn_unknown_attribute_ignored : Warning<
"unknown attribute %0 ignored">, InGroup;
+def ext_unknown_attribute_ignored : Extension<
+ "unknown attribute %0 ignored">, InGroup;
a-tarasyuk
@@ -179,6 +179,8 @@ def err_opencl_unknown_type_specifier : Error<
def warn_unknown_attribute_ignored : Warning<
"unknown attribute %0 ignored">, InGroup;
+def ext_unknown_attribute_ignored : Extension<
+ "unknown attribute %0 ignored">, InGroup;
a-tarasyuk
@@ -166,7 +166,8 @@ getScopeFromNormalizedScopeName(StringRef ScopeName) {
.Case("hlsl", AttributeCommonInfo::Scope::HLSL)
.Case("msvc", AttributeCommonInfo::Scope::MSVC)
.Case("omp", AttributeCommonInfo::Scope::OMP)
- .Case("riscv", AttributeCommonInfo::
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/120925
>From bce88b1bb464438828fc177c978ad2b99957530f Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Mon, 23 Dec 2024 02:35:07 +0200
Subject: [PATCH 1/3] [Clang] raise extension warning for unknown namespaced
att
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 %s -std=c++11 -Wignored-qualifiers -verify
+
+class A { };
+
+typedef const A A_Const;
+class B : public A_Const { }; // expected-warning {{'const' qualifier on base
class type 'A_Const' (aka 'const A') have no effect}} \
+
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/121419
>From 3f6b1d68978857035a972f49b1cfd9d9d0151be9 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 1 Jan 2025 01:47:17 +0200
Subject: [PATCH 1/3] [Clang] emit -Wignored-qualifiers diagnostic for
cv-qualifi
@@ -2655,6 +2655,15 @@ CXXBaseSpecifier *Sema::CheckBaseSpecifier(CXXRecordDecl
*Class,
return nullptr;
}
+if (BaseType.hasQualifiers() && !isa(BaseType))
{
+ auto Quals =
a-tarasyuk wrote:
thanks for the feedback. I've updated it to use
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/121419
>From 3f6b1d68978857035a972f49b1cfd9d9d0151be9 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 1 Jan 2025 01:47:17 +0200
Subject: [PATCH 1/2] [Clang] emit -Wignored-qualifiers diagnostic for
cv-qualifi
https://github.com/a-tarasyuk closed
https://github.com/llvm/llvm-project/pull/118566
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
a-tarasyuk wrote:
> I’m fine with continuing the discussion in the GitHub issue
Ok, let's move the discussion to the issue, and I'll delete the PR. From there,
we can summarize all the concerns to proceed with a decision on this proposal.
I think it would be useful to add comments or update th
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/118566
>From 75da343b0bd6e3b0f3219b349f6be4c882947820 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 4 Dec 2024 02:24:12 +0200
Subject: [PATCH 1/6] [clang-format] extend clang-format directive with options
t
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 %s -std=c++11 -Wignored-qualifiers -verify
+
+class A { };
+
+typedef const A A_Const;
+class B : public A_Const { }; // expected-warning {{'const' qualifier on base
class type 'A_Const' (aka 'const A') have no effect}} \
+
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/121419
>From 3f6b1d68978857035a972f49b1cfd9d9d0151be9 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 1 Jan 2025 01:47:17 +0200
Subject: [PATCH] [Clang] emit -Wignored-qualifiers diagnostic for cv-qualified
b
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/121419
>From 902d4f0817f46cc746a23569628b654c0c247601 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 1 Jan 2025 01:47:17 +0200
Subject: [PATCH] [Clang] emit -Wignored-qualifiers diagnostic for cv-qualified
b
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/121419
>From f3b5fc2a32fe2da301779048e3afbbeb7af8cb3c Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 1 Jan 2025 01:47:17 +0200
Subject: [PATCH] [Clang] emit -Wignored-qualifiers diagnostic for cv-qualified
b
https://github.com/a-tarasyuk created
https://github.com/llvm/llvm-project/pull/121419
Fixes #55474
>From a9fdfac9f8655b8def5f99adde75bb5f2176057a Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 1 Jan 2025 01:47:17 +0200
Subject: [PATCH] [Clang] emit -Wignored-qualifiers diagnostic for
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/118566
>From 75da343b0bd6e3b0f3219b349f6be4c882947820 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 4 Dec 2024 02:24:12 +0200
Subject: [PATCH 1/6] [clang-format] extend clang-format directive with options
t
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/118566
>From 75da343b0bd6e3b0f3219b349f6be4c882947820 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 4 Dec 2024 02:24:12 +0200
Subject: [PATCH 1/5] [clang-format] extend clang-format directive with options
t
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const
SourceLocation &Loc,
}
}
+template
+inline static bool HasAttribute(const QualType &T) {
a-tarasyuk wrote:
@erichkeane The main concern in the issue description is that the private field
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/106036
>From d4b07c7ff65ca64a5a434818ce09ecd289401340 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Tue, 10 Sep 2024 02:35:43 +0300
Subject: [PATCH 1/6] [Clang] restrict use of attribute names reserved by the
C+
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/106036
>From d4b07c7ff65ca64a5a434818ce09ecd289401340 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Tue, 10 Sep 2024 02:35:43 +0300
Subject: [PATCH 1/5] [Clang] restrict use of attribute names reserved by the
C+
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/106036
>From d4b07c7ff65ca64a5a434818ce09ecd289401340 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Tue, 10 Sep 2024 02:35:43 +0300
Subject: [PATCH 1/4] [Clang] restrict use of attribute names reserved by the
C+
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/106036
>From d4b07c7ff65ca64a5a434818ce09ecd289401340 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Tue, 10 Sep 2024 02:35:43 +0300
Subject: [PATCH 1/3] [Clang] restrict use of attribute names reserved by the
C+
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/106036
>From d4b07c7ff65ca64a5a434818ce09ecd289401340 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Tue, 10 Sep 2024 02:35:43 +0300
Subject: [PATCH 1/2] [Clang] restrict use of attribute names reserved by the
C+
https://github.com/a-tarasyuk converted_to_draft
https://github.com/llvm/llvm-project/pull/106036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
a-tarasyuk wrote:
> If we were to add // clang-format off-next-line, would "next line" mean the
> next physical or logical/unwrapped line?
I would expect it to apply only to the physical line, similar to how other
formatters work. However, the main concern doesn’t seem to be about its
behavio
a-tarasyuk wrote:
@namandixit it is possible. I'm not confident about the new option.,
@AaronBallman @erichkeane - should _unknown namespaced attributes_ be
separated by the new option?
https://github.com/llvm/llvm-project/pull/120925
___
cfe-commit
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/120925
>From bce88b1bb464438828fc177c978ad2b99957530f Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Mon, 23 Dec 2024 02:35:07 +0200
Subject: [PATCH 1/2] [Clang] raise extension warning for unknown namespaced
att
https://github.com/a-tarasyuk created
https://github.com/llvm/llvm-project/pull/120925
Fixes #120875
>From bce88b1bb464438828fc177c978ad2b99957530f Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Mon, 23 Dec 2024 02:35:07 +0200
Subject: [PATCH] [Clang] raise extension warning for unknown nam
https://github.com/a-tarasyuk created
https://github.com/llvm/llvm-project/pull/120896
Fixes #92847
---
> Types other than pointer types whose referenced type is an object type and
> (possibly multi-dimensional) array types with such pointer types as element
> type shall not be restrict-qual
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const
SourceLocation &Loc,
}
}
+template
+inline static bool HasAttribute(const QualType &T) {
+ if (const TagDecl *TD = T->getAsTagDecl())
+return TD->hasAttr();
+ if (const TypedefType *TDT = T->getAs())
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const
SourceLocation &Loc,
}
}
+template
+inline static bool HasAttribute(const QualType &T) {
+ if (const TagDecl *TD = T->getAsTagDecl())
+return TD->hasAttr();
+ if (const TypedefType *TDT = T->getAs())
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const
SourceLocation &Loc,
}
}
+template
+inline static bool HasAttribute(const QualType &T) {
+ if (const TagDecl *TD = T->getAsTagDecl())
+return TD->hasAttr();
+ if (const TypedefType *TDT = T->getAs())
https://github.com/a-tarasyuk edited
https://github.com/llvm/llvm-project/pull/120734
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const
SourceLocation &Loc,
}
}
+template
+inline static bool HasAttribute(const QualType &T) {
a-tarasyuk wrote:
@erichkeane Thanks for the detailed feedback. I just extracted this helper
https
https://github.com/a-tarasyuk deleted
https://github.com/llvm/llvm-project/pull/120734
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const
SourceLocation &Loc,
}
}
+template
+inline static bool HasAttribute(const QualType &T) {
a-tarasyuk wrote:
@erichkeane Thanks for the detailed feedback. I just extracted this helper
https
https://github.com/a-tarasyuk created
https://github.com/llvm/llvm-project/pull/120734
Fixes #62472
>From 55fb96c1673911f30721c2a53bea32e7e4b5dc6e Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Fri, 20 Dec 2024 15:32:55 +0200
Subject: [PATCH] [Clang] handle [[warn_unused]] attribute for unus
@@ -144,7 +144,8 @@ void DefinitionBlockSeparator::separateBlocks(
return false;
if (const auto *Tok = OperateLine->First;
- Tok->is(tok::comment) && !isClangFormatOn(Tok->TokenText)) {
+ Tok->is(tok::comment) && parseClangFormatDirective(Tok->T
https://github.com/a-tarasyuk updated
https://github.com/llvm/llvm-project/pull/118566
>From 75da343b0bd6e3b0f3219b349f6be4c882947820 Mon Sep 17 00:00:00 2001
From: Oleksandr T
Date: Wed, 4 Dec 2024 02:24:12 +0200
Subject: [PATCH 1/5] [clang-format] extend clang-format directive with options
t
https://github.com/a-tarasyuk closed
https://github.com/llvm/llvm-project/pull/115487
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 781 matches
Mail list logo