https://github.com/jerinphilip updated
https://github.com/llvm/llvm-project/pull/65638
>From 947d4b418eb5b30f76ff262b1a19150aac10b9cc Mon Sep 17 00:00:00 2001
From: Jerin Philip
Date: Sat, 19 Aug 2023 16:43:53 +0530
Subject: [PATCH] [clang] Improve _Alignas on declaration diagnostic
Adds
https://github.com/jerinphilip updated
https://github.com/llvm/llvm-project/pull/65638
>From 323e569956150d46b5299129edc2db8b39c9113b Mon Sep 17 00:00:00 2001
From: Jerin Philip
Date: Sat, 19 Aug 2023 16:43:53 +0530
Subject: [PATCH] [clang] Improve _Alignas on declaration diagnostic
Adds
@@ -192,6 +192,13 @@ class AttributeCommonInfo {
bool isC23Attribute() const { return SyntaxUsed == AS_C23; }
+ bool isAlignas() const {
+// In the current state of code, IsAlignas is only configured to return
jerinphilip wrote:
This refers to the
jerinphilip wrote:
I have rebased the PR with main (which appears to fix the formatting workflow).
For the time being, I have left the C23 test using `alignas` in with the active
error message and a `FIXME`.
I've altered the state of this PR to be close to
https://github.com/jerinphilip updated
https://github.com/llvm/llvm-project/pull/65638
>From 919be6b69cf12e5d9dd9f74a4570ea0a87c9a265 Mon Sep 17 00:00:00 2001
From: Jerin Philip
Date: Sat, 19 Aug 2023 16:43:53 +0530
Subject: [PATCH] [clang] Improve _Alignas on declaration diagnostic
Adds
https://github.com/jerinphilip updated
https://github.com/llvm/llvm-project/pull/65638
>From 74b62efe15496e0024271fe93418f0963c8aedd0 Mon Sep 17 00:00:00 2001
From: Jerin Philip
Date: Sat, 19 Aug 2023 16:43:53 +0530
Subject: [PATCH] [clang] Improve _Alignas on declaration diagnostic
Adds
https://github.com/jerinphilip edited
https://github.com/llvm/llvm-project/pull/65638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jerinphilip updated
https://github.com/llvm/llvm-project/pull/65638
>From cce937359c918246cdf515045808e8868b1944d4 Mon Sep 17 00:00:00 2001
From: Jerin Philip
Date: Sat, 19 Aug 2023 16:43:53 +0530
Subject: [PATCH] [clang] Improve _Alignas on declaration diagnostic
Adds
https://github.com/jerinphilip updated
https://github.com/llvm/llvm-project/pull/65638
>From 941af68ab8dad68ed8df65f6e0559476f137bfe2 Mon Sep 17 00:00:00 2001
From: Jerin Philip
Date: Sat, 19 Aug 2023 16:43:53 +0530
Subject: [PATCH 01/18] Fix `Form` to recognize `_Alignas` in addition to
https://github.com/jerinphilip updated
https://github.com/llvm/llvm-project/pull/65638
>From 941af68ab8dad68ed8df65f6e0559476f137bfe2 Mon Sep 17 00:00:00 2001
From: Jerin Philip
Date: Sat, 19 Aug 2023 16:43:53 +0530
Subject: [PATCH 01/14] Fix `Form` to recognize `_Alignas` in addition to
@@ -94,7 +94,7 @@ class AttributeCommonInfo {
IsRegularKeywordAttribute(IsRegularKeywordAttribute) {}
constexpr Form(tok::TokenKind Tok)
: SyntaxUsed(AS_Keyword), SpellingIndex(SpellingNotCalculated),
- IsAlignas(Tok == tok::kw_alignas),
+
https://github.com/jerinphilip edited
https://github.com/llvm/llvm-project/pull/65638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jerinphilip edited
https://github.com/llvm/llvm-project/pull/65638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jerinphilip edited
https://github.com/llvm/llvm-project/pull/65638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jerinphilip edited
https://github.com/llvm/llvm-project/pull/65638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jerinphilip edited
https://github.com/llvm/llvm-project/pull/65638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jerinphilip edited
https://github.com/llvm/llvm-project/pull/65638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jerinphilip edited
https://github.com/llvm/llvm-project/pull/65638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -94,7 +94,7 @@ class AttributeCommonInfo {
IsRegularKeywordAttribute(IsRegularKeywordAttribute) {}
constexpr Form(tok::TokenKind Tok)
: SyntaxUsed(AS_Keyword), SpellingIndex(SpellingNotCalculated),
- IsAlignas(Tok == tok::kw_alignas),
+
@@ -94,7 +94,7 @@ class AttributeCommonInfo {
IsRegularKeywordAttribute(IsRegularKeywordAttribute) {}
constexpr Form(tok::TokenKind Tok)
: SyntaxUsed(AS_Keyword), SpellingIndex(SpellingNotCalculated),
- IsAlignas(Tok == tok::kw_alignas),
+
@@ -186,14 +186,14 @@ class AttributeCommonInfo {
bool isGNUScope() const;
bool isClangScope() const;
- bool isCXX11Attribute() const { return SyntaxUsed == AS_CXX11 || IsAlignas; }
-
+ bool isAlignas() const { return IsAlignas; }
+ bool isCXX11Attribute() const {
https://github.com/jerinphilip edited
https://github.com/llvm/llvm-project/pull/65638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -186,14 +186,14 @@ class AttributeCommonInfo {
bool isGNUScope() const;
bool isClangScope() const;
- bool isCXX11Attribute() const { return SyntaxUsed == AS_CXX11 || IsAlignas; }
-
+ bool isAlignas() const { return IsAlignas; }
+ bool isCXX11Attribute() const {
https://github.com/jerinphilip edited
https://github.com/llvm/llvm-project/pull/65638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jerinphilip edited
https://github.com/llvm/llvm-project/pull/65638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jerinphilip edited
https://github.com/llvm/llvm-project/pull/65638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -verify %s
+// RUN: not %clang_cc1 -std=c99 -pedantic -fsyntax-only %s 2>&1 | FileCheck
-check-prefix=CHECK-EXT %s
+
+_Alignas(int) struct c1; // expected-warning {{attribute '_Alignas' before
"struct" is ignored}}
https://github.com/jerinphilip updated
https://github.com/llvm/llvm-project/pull/65638
>From 941af68ab8dad68ed8df65f6e0559476f137bfe2 Mon Sep 17 00:00:00 2001
From: Jerin Philip
Date: Sat, 19 Aug 2023 16:43:53 +0530
Subject: [PATCH 01/11] Fix `Form` to recognize `_Alignas` in addition to
https://github.com/jerinphilip updated
https://github.com/llvm/llvm-project/pull/65638
>From 941af68ab8dad68ed8df65f6e0559476f137bfe2 Mon Sep 17 00:00:00 2001
From: Jerin Philip
Date: Sat, 19 Aug 2023 16:43:53 +0530
Subject: [PATCH 01/10] Fix `Form` to recognize `_Alignas` in addition to
https://github.com/jerinphilip updated
https://github.com/llvm/llvm-project/pull/65638
>From 941af68ab8dad68ed8df65f6e0559476f137bfe2 Mon Sep 17 00:00:00 2001
From: Jerin Philip
Date: Sat, 19 Aug 2023 16:43:53 +0530
Subject: [PATCH 1/7] Fix `Form` to recognize `_Alignas` in addition to
https://github.com/jerinphilip edited
https://github.com/llvm/llvm-project/pull/65638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -186,14 +186,14 @@ class AttributeCommonInfo {
bool isGNUScope() const;
bool isClangScope() const;
- bool isCXX11Attribute() const { return SyntaxUsed == AS_CXX11 || IsAlignas; }
-
+ bool isAlignas() const { return IsAlignas; }
+ bool isCXX11Attribute() const {
https://github.com/jerinphilip review_requested
https://github.com/llvm/llvm-project/pull/65638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jerinphilip created
https://github.com/llvm/llvm-project/pull/65638:
Fixes https://github.com/llvm/llvm-project/issues/58637.
Additionally accounts for `_AlignAs` when constructing Attribute Form. This
breaks a few tests because `IsAlignAs` is coupled with `CXX11Attribute`.
34 matches
Mail list logo