erichkeane wrote:
> @AaronBallman, @erichkeane I have addressed comments in the PR, could you
> please revisit this PR? Thank you!
I'm still away at the WG21 meeting, but I've got this on my list of things to
review when I return.
https://github.com/llvm/llvm-project/pull/70762
__
@@ -229,6 +230,9 @@ class Parser : public CodeCompletionHandler {
/// Parsing OpenMP directive mode.
bool OpenMPDirectiveParsing = false;
+ /// Parsing OpenACC directive mode.
+ bool OpenACCDirectiveParsing = false;
erichkeane wrote:
Its currently being
@@ -0,0 +1,14 @@
+// RUN: %clang -S -### -fopenacc %s 2>&1 | FileCheck %s
--check-prefix=CHECK-DRIVER
+// CHECK-DRIVER: "-cc1" {{.*}} "-fopenacc"
+
+// RUN: %clang -S -### -fopenacc -fexperimental-openacc-macro-override=202211
%s 2>&1 | FileCheck %s --check-prefix=CHECK-MACRO-OV
@@ -369,9 +369,39 @@ void test_unexpanded_exprs(Types ...values) {
void f(int arg = values); // expected-error{{default argument contains
unexpanded parameter pack 'values'}}
}
-// Test unexpanded parameter packs in partial specializations.
-template
-struct TestUnexpandedD
@@ -4297,3 +4297,19 @@ def PreferredType: InheritableAttr {
let Args = [TypeArgument<"Type", 1>];
let Documentation = [PreferredTypeDocumentation];
}
+
+def CodeAlign: StmtAttr {
+ let Spellings = [Clang<"code_align">];
+ let Subjects = SubjectList<[ForStmt, CXXForRangeSt
@@ -10025,6 +10025,11 @@ def err_duplicate_case_differing_expr : Error<
def warn_case_empty_range : Warning<"empty case range specified">;
def warn_missing_case_for_condition :
Warning<"no case matching constant switch condition '%0'">;
+def err_loop_attr_duplication : Error<
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/72015
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane commented:
This needs attribute documentation and a release note.
Additionally, I think we should prohibit using this in Microsoft mode (that is,
diagnose that) rather than having it be a no-op. We can enable it in the
future, but if we permit it, folks will assu
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/71148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3635,6 +3635,13 @@ def MSStruct : InheritableAttr {
let SimpleHandler = 1;
}
+def GCCStruct : InheritableAttr {
+ let Spellings = [GCC<"gcc_struct">];
+ let Subjects = SubjectList<[Record]>;
+ let Documentation = [Undocumented];
erichkeane wrote:
Doc
@@ -7337,6 +7337,27 @@ static void handleDeclspecThreadAttr(Sema &S, Decl *D,
const ParsedAttr &AL) {
D->addAttr(::new (S.Context) ThreadAttr(S.Context, AL));
}
+static void handleMSConstexprAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
+ if (!S.getLangOpts().isCompatible
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/71300
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane commented:
I think this is pretty close, I think skipping on constructors for now is
acceptable. However, i think we should enable the test, and record the
diagnostic to ensure we show it is invalid for now (along with better showing
the TODO).
https://github.co
@@ -229,6 +230,9 @@ class Parser : public CodeCompletionHandler {
/// Parsing OpenMP directive mode.
bool OpenMPDirectiveParsing = false;
+ /// Parsing OpenACC directive mode.
+ bool OpenACCDirectiveParsing = false;
erichkeane wrote:
Ah, I see. As it i
@@ -1349,6 +1349,19 @@ def fno_hip_emit_relocatable : Flag<["-"],
"fno-hip-emit-relocatable">,
HelpText<"Do not override toolchain to compile HIP source to relocatable">;
}
+// Clang specific/exclusive options for OpenACC.
+def openacc_macro_override
erichk
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/70234
>From b3d64b3f744ccb37e334e3aae8d6874cd8391c56 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Mon, 23 Oct 2023 11:09:11 -0700
Subject: [PATCH 1/7] [OpenACC] Initial commit for OpenACC Support
This is the ini
@@ -4001,6 +4008,14 @@ bool CompilerInvocation::ParseLangArgs(LangOptions
&Opts, ArgList &Args,
(T.isNVPTX() || T.isAMDGCN()) &&
Args.hasArg(options::OPT_fopenmp_cuda_mode);
+ // OpenACC Configuration.
+ if (Args.hasArg(option
@@ -3633,6 +3633,22 @@ static void RenderHLSLOptions(const ArgList &Args,
ArgStringList &CmdArgs,
CmdArgs.push_back("-finclude-default-header");
}
+static void RenderOpenACCOptions(const Driver &D, const ArgList &Args,
+ ArgStringList &CmdA
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/70234
>From b3d64b3f744ccb37e334e3aae8d6874cd8391c56 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Mon, 23 Oct 2023 11:09:11 -0700
Subject: [PATCH 1/8] [OpenACC] Initial commit for OpenACC Support
This is the ini
https://github.com/erichkeane commented:
This seems fine to me, but I think @efriedma-quic /the weak ODR discussion
needs to be finalized before this can be accepted.
https://github.com/llvm/llvm-project/pull/71706
___
cfe-commits mailing list
cfe-com
@@ -7337,6 +7337,27 @@ static void handleDeclspecThreadAttr(Sema &S, Decl *D,
const ParsedAttr &AL) {
D->addAttr(::new (S.Context) ThreadAttr(S.Context, AL));
}
+static void handleMSConstexprAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
+ if (!S.getLangOpts().isCompatible
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -fms-compatibility -fms-compatibility-version=19.33
-std=c++20 -verify %s
+// expected-no-diagnostics
+
+[[msvc::constexpr]] int log2(int x) { [[msvc::constexpr]] return x > 1 ? 1 +
log2(x / 2) : 0; }
+constexpr bool test_log2() { [[msvc::con
@@ -334,11 +334,12 @@ CodeAlignAttr *Sema::BuildCodeAlignAttr(const
AttributeCommonInfo &CI,
// This attribute requires an integer argument which is a constant power of
// two between 1 and 4096 inclusive.
int AlignValue = ArgVal.getSExtValue();
-if (AlignValue
@@ -322,6 +322,66 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const
ParsedAttr &A,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
+Expr *E) {
+ if
@@ -322,6 +322,66 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const
ParsedAttr &A,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
+Expr *E) {
+ if
@@ -0,0 +1,126 @@
+// RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local -x c %s
+// RUN: %clang_cc1 -fsyntax-only -verify=expected,cpp-local -pedantic -x c++
-std=c++11 %s
+
+void foo() {
+ int i;
+ int a[10], b[10];
+
+ [[clang::code_align(8)]]
+ for (i = 0; i < 10; ++i
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/71148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane commented:
Docs need work, code is fine from what I can tell, but @efriedma-quic or
@rjmccall need to take a look at the ABI components.
https://github.com/llvm/llvm-project/pull/71148
___
cfe-commits mailing list
cfe-com
@@ -302,6 +302,11 @@ Attribute Changes in Clang
to reduce the size of the destroy functions for coroutines which are known to
be destroyed after having reached the final suspend point.
+- On targets with C++ ABI other than Microsoft, Clang now supports
+ ``[[gnu:gcc_struc
@@ -302,6 +302,11 @@ Attribute Changes in Clang
to reduce the size of the destroy functions for coroutines which are known to
be destroyed after having reached the final suspend point.
+- On targets with C++ ABI other than Microsoft, Clang now supports
eri
@@ -998,6 +998,9 @@ def warn_npot_ms_struct : Warning<
"data types with sizes that aren't a power of two">,
DefaultError, InGroup;
+def err_itanium_layout_unimplemented : Error<
+ "sorry, Itanium-compatible layout is unimplemented for the current C++ ABI">;
--
@@ -0,0 +1,126 @@
+// RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local -x c %s
+// RUN: %clang_cc1 -fsyntax-only -verify=expected,cpp-local -pedantic -x c++
-std=c++11 %s
+
+void foo() {
+ int i;
+ int a[10], b[10];
+
+ [[clang::code_align(8)]]
+ for (i = 0; i < 10; ++i
@@ -298,7 +367,18 @@ void Parser::ParseOpenACCDirective() {
T.consumeClose();
break;
}
+case OpenACCDirectiveKind::Cache:
+ ParseOpenACCCacheVarList();
+ // The ParseOpenACCCacheVarList function manages to recover from
failures,
+ // so we
@@ -298,7 +367,18 @@ void Parser::ParseOpenACCDirective() {
T.consumeClose();
break;
}
+case OpenACCDirectiveKind::Cache:
+ ParseOpenACCCacheVarList();
+ // The ParseOpenACCCacheVarList function manages to recover from
failures,
+ // so we
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/74324
>From 31fe05335fce5f7c593e4c3f3595c548cf54bba0 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Wed, 29 Nov 2023 11:12:02 -0800
Subject: [PATCH 1/2] [OpenACC] Implement 'cache' construct parsing
The 'cache' co
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() {
return getActions().CorrectDelayedTyposInExpr(Res);
}
+void Parser::ParseOpenACCCacheVar() {
+ ExprResult ArrayName = ParseOpenACCIDExpression();
+ // FIXME: Pass this to Sema.
+ (void)ArrayName;
+
+ //
@@ -237,19 +240,18 @@ void ParseOpenACCClauseList(Parser &P) {
} // namespace
-// Routine has an optional paren-wrapped name of a function in the local scope.
-// We parse the name, emitting any diagnostics
-ExprResult Parser::ParseOpenACCRoutineName() {
-
+ExprResult Parser:
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() {
return getActions().CorrectDelayedTyposInExpr(Res);
}
+void Parser::ParseOpenACCCacheVar() {
+ ExprResult ArrayName = ParseOpenACCIDExpression();
+ // FIXME: Pass this to Sema.
+ (void)ArrayName;
+
+ //
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/74324
>From 31fe05335fce5f7c593e4c3f3595c548cf54bba0 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Wed, 29 Nov 2023 11:12:02 -0800
Subject: [PATCH 1/3] [OpenACC] Implement 'cache' construct parsing
The 'cache' co
@@ -1714,6 +1714,8 @@ class ConstraintRefersToContainingTemplateChecker
// Friend, likely because it was referred to without its template arguments.
void CheckIfContainingRecord(const CXXRecordDecl *CheckingRD) {
CheckingRD = CheckingRD->getMostRecentDecl();
+if (!C
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/74265
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4077,6 +4084,7 @@ Sema::SubstExpr(Expr *E, const
MultiLevelTemplateArgumentList &TemplateArgs) {
TemplateInstantiator Instantiator(*this, TemplateArgs,
SourceLocation(),
DeclarationName());
+ Instan
@@ -504,3 +504,24 @@ struct bar {
bar x;
} // namespace GH61763
+
+namespace GH74314 {
+template constexpr bool is_same_v = __is_same(T, U);
+template constexpr bool is_not_same_v = !__is_same(T, U);
+
+template
+concept something_interesting = requires {
+ true;
+
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/74324
>From 31fe05335fce5f7c593e4c3f3595c548cf54bba0 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Wed, 29 Nov 2023 11:12:02 -0800
Subject: [PATCH 1/4] [OpenACC] Implement 'cache' construct parsing
The 'cache' co
@@ -4077,6 +4084,7 @@ Sema::SubstExpr(Expr *E, const
MultiLevelTemplateArgumentList &TemplateArgs) {
TemplateInstantiator Instantiator(*this, TemplateArgs,
SourceLocation(),
DeclarationName());
+ Instan
@@ -4077,6 +4084,7 @@ Sema::SubstExpr(Expr *E, const
MultiLevelTemplateArgumentList &TemplateArgs) {
TemplateInstantiator Instantiator(*this, TemplateArgs,
SourceLocation(),
DeclarationName());
+ Instan
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() {
return getActions().CorrectDelayedTyposInExpr(Res);
}
+void Parser::ParseOpenACCCacheVar() {
+ ExprResult ArrayName = ParseOpenACCIDExpression();
+ // FIXME: Pass this to Sema.
+ (void)ArrayName;
+
+ //
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/74324
>From 31fe05335fce5f7c593e4c3f3595c548cf54bba0 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Wed, 29 Nov 2023 11:12:02 -0800
Subject: [PATCH 1/5] [OpenACC] Implement 'cache' construct parsing
The 'cache' co
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/74324
>From 31fe05335fce5f7c593e4c3f3595c548cf54bba0 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Wed, 29 Nov 2023 11:12:02 -0800
Subject: [PATCH 1/6] [OpenACC] Implement 'cache' construct parsing
The 'cache' co
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/74324
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,34 @@
+// RUN: %clang_cc1 -std=c++20 -verify %s
+
+template
+concept C = true;
+
+class non_temp {
+template T>
+friend void f();
+
+non_temp();
+};
+
+template T>
+void f() {
+auto v = non_temp();
+}
+
+template
+class temp {
+template T>
+frien
Timm =?utf-8?q?Bäder?= ,
Timm =?utf-8?q?Bäder?= ,
Timm =?utf-8?q?Bäder?= ,
Timm =?utf-8?q?Bäder?= ,
Timm =?utf-8?q?Bäder?=
Message-ID:
In-Reply-To:
@@ -8938,6 +8957,11 @@ static void processTypeAttrs(TypeProcessingState &state,
QualType &type,
attr.setUsedAsTypeAttr();
Timm =?utf-8?q?Bäder?= ,
Timm =?utf-8?q?Bäder?= ,
Timm =?utf-8?q?Bäder?= ,
Timm =?utf-8?q?Bäder?= ,
Timm =?utf-8?q?Bäder?=
Message-ID:
In-Reply-To:
@@ -3341,7 +3341,7 @@ def RequiresCapability : InheritableAttr {
let TemplateDependent = 1;
let ParseArgumentsAsUnevaluated
Timm =?utf-8?q?Bäder?= ,
Timm =?utf-8?q?Bäder?= ,
Timm =?utf-8?q?Bäder?= ,
Timm =?utf-8?q?Bäder?= ,
Timm =?utf-8?q?Bäder?=
Message-ID:
In-Reply-To:
@@ -3341,7 +3341,7 @@ def RequiresCapability : InheritableAttr {
let TemplateDependent = 1;
let ParseArgumentsAsUnevaluated
erichkeane wrote:
> This started to give errors to code previously considere valid with
> "out-of-line definition of X differs from that in". Don't have a repro yet.
Please provide one as soon as you can! In the meantime, we should probably
revert @Fznamznon
https://github.com/llvm/llvm-proj
https://github.com/erichkeane approved this pull request.
I think this is a very positive change, and see nothing besides Aaron's nit to
comment on. Thanks!
https://github.com/llvm/llvm-project/pull/71264
___
cfe-commits mailing list
cfe-commits@list
@@ -2884,6 +2884,12 @@ def warn_cxx11_compat_constexpr_body_multiple_return :
Warning<
InGroup, DefaultIgnore;
def note_constexpr_body_previous_return : Note<
"previous return statement is here">;
+def err_ms_constexpr_not_distinct : Error<
+ "[[msvc::constexpr]] cannot b
@@ -217,6 +217,8 @@ C23 Feature Support
Non-comprehensive list of changes in this release
-
+- The default value of `_MSC_VER` was raised from 1920 to 1933.
+ MSVC 19.33 added undocumented attribute ``[[msvc::constexpr]]``.
@@ -2884,6 +2884,12 @@ def warn_cxx11_compat_constexpr_body_multiple_return :
Warning<
InGroup, DefaultIgnore;
def note_constexpr_body_previous_return : Note<
"previous return statement is here">;
+def err_ms_constexpr_not_distinct : Error<
+ "[[msvc::constexpr]] cannot b
@@ -3612,6 +3612,22 @@ an error:
}];
}
+def MSConstexprDocs : Documentation {
+ let Category = DocCatStmt;
+ let Content = [{
+The ``[[msvc::constexpr]]`` attribute can be applied only to a function
+definition or a ``return`` statement. It does not impact function declarati
@@ -2884,6 +2884,12 @@ def warn_cxx11_compat_constexpr_body_multiple_return :
Warning<
InGroup, DefaultIgnore;
def note_constexpr_body_previous_return : Note<
"previous return statement is here">;
+def err_ms_constexpr_not_distinct : Error<
+ "[[msvc::constexpr]] cannot b
@@ -2884,6 +2884,12 @@ def warn_cxx11_compat_constexpr_body_multiple_return :
Warning<
InGroup, DefaultIgnore;
def note_constexpr_body_previous_return : Note<
"previous return statement is here">;
+def err_ms_constexpr_not_distinct : Error<
+ "[[msvc::constexpr]] cannot b
https://github.com/erichkeane created
https://github.com/llvm/llvm-project/pull/74752
The 'wait' construct comes in two forms: one with no parens, the second with a
'wait-argument'. This implements both forms for constructs.
Additionally, the 'wait-argument' parsing is split into its own funct
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/74752
>From 8b7d70d55395d9a75968deeac8a13d88aae62a00 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Thu, 7 Dec 2023 08:55:46 -0800
Subject: [PATCH 1/2] [OpenACC] Implement 'wait' construct parsing
The 'wait' const
@@ -251,6 +254,67 @@ void ParseOpenACCClauseList(Parser &P) {
} // namespace
+/// OpenACC 3.3, section 2.16:
+/// In this section and throughout the specification, the term wait-argument
+/// means:
+/// [ devnum : int-expr : ] [ queues : ] async-argument-list
+bool Parser::P
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/74752
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -235,6 +235,7 @@ Non-comprehensive list of changes in this release
except that it returns the size of a type ignoring tail padding.
* ``__builtin_classify_type()`` now classifies ``_BitInt`` values as the
return value ``18``
and vector types as return value ``19``, to m
@@ -3657,6 +3657,21 @@ an error:
}];
}
+def MSConstexprDocs : Documentation {
+ let Category = DocCatStmt;
+ let Content = [{
+The ``[[msvc::constexpr]]`` attribute can be applied only to a function
+definition or a ``return`` statement. It does not impact function declarati
@@ -2884,6 +2884,12 @@ def warn_cxx11_compat_constexpr_body_multiple_return :
Warning<
InGroup, DefaultIgnore;
def note_constexpr_body_previous_return : Note<
"previous return statement is here">;
+def err_ms_constexpr_not_distinct : Error<
+ "[[msvc::constexpr]] cannot b
erichkeane wrote:
Also, please don't 'force-push', just push an additional commit to your review.
It erases history and makes reviewing it about 3x harder since history/context
gets lost.
https://github.com/llvm/llvm-project/pull/71300
___
cfe-commi
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/71300
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
This comes down to a question of 'why' from me? Typically we add builtins like
this because libc++ need them, or libc/libstdc++ use them. In this case, I
don't see any evidence of anyone really needing it.
While GCC supports it, I don't really see value here?
Also, this is
erichkeane wrote:
Please don't force push... it makes these 100x more difficult to review. ALso,
it seems that the latest push has broken quite a lot, according to the build
bots.
https://github.com/llvm/llvm-project/pull/70976
___
cfe-commits maili
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/72863
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane created
https://github.com/llvm/llvm-project/pull/75052
As we've now finished parsing the constructs, we're moving onto implementing
'clause' parsing. While some are complicated and require their own patch, the
handful added here are simple to parse (that is,
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/75052
>From 0bcee977f95f87a5ccf7bc53d6cd0a5d9521d963 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Fri, 8 Dec 2023 09:18:40 -0800
Subject: [PATCH 1/2] [OpenACC] Add 'clause' parsing infrastructure plus a few
clau
erichkeane wrote:
Can you point out the diff from the previous patch?
https://github.com/llvm/llvm-project/pull/75069
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3990,9 +3991,16 @@ QualType Sema::CheckTemplateIdType(TemplateName Name,
if (Inst.isInvalid())
return QualType();
-CanonType = SubstType(Pattern->getUnderlyingType(),
- TemplateArgLists, AliasTemplate->getLocation(),
-
@@ -322,6 +322,81 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const
ParsedAttr &A,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
+Expr *E) {
+ if
@@ -322,6 +322,81 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const
ParsedAttr &A,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
+Expr *E) {
+ if
@@ -322,6 +322,79 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const
ParsedAttr &A,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
+Expr *E) {
+ if
@@ -322,6 +322,90 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const
ParsedAttr &A,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
+Expr *E) {
+ if
@@ -322,6 +322,90 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const
ParsedAttr &A,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
+Expr *E) {
+ if
@@ -296,10 +296,16 @@ bool CodeGen::isEmptyRecord(ASTContext &Context, QualType
T, bool AllowArrays,
return false;
// If this is a C++ record, check the bases first.
- if (const CXXRecordDecl *CXXRD = dyn_cast(RD))
+ if (const CXXRecordDecl *CXXRD = dyn_cast(RD)) {
@@ -322,6 +322,90 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const
ParsedAttr &A,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
+Expr *E) {
+ if
@@ -322,6 +322,90 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const
ParsedAttr &A,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
+Expr *E) {
+ if
@@ -322,6 +322,71 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const
ParsedAttr &A,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
+Expr *E) {
+ if
@@ -322,6 +322,71 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const
ParsedAttr &A,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
+Expr *E) {
+ if
@@ -322,6 +322,71 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const
ParsedAttr &A,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
+Expr *E) {
+ if
@@ -359,16 +359,34 @@ static Attr *handleCodeAlignAttr(Sema &S, Stmt *St, const
ParsedAttr &A) {
static void
CheckForDuplicateCodeAlignAttrs(Sema &S,
const SmallVectorImpl &Attrs) {
- const Attr *A = nullptr;
- for (const auto *I : Attrs) {
-
@@ -322,6 +322,61 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const
ParsedAttr &A,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
+Expr *E) {
+ if
@@ -322,6 +322,71 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const
ParsedAttr &A,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
+Expr *E) {
+ if
@@ -322,6 +322,71 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const
ParsedAttr &A,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
+Expr *E) {
+ if
@@ -322,6 +322,59 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const
ParsedAttr &A,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
+Expr *E) {
+ if
@@ -322,6 +322,59 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const
ParsedAttr &A,
return ::new (S.Context) UnlikelyAttr(S.Context, A);
}
+CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI,
+Expr *E) {
+ if
@@ -0,0 +1,33 @@
+// RUN: %clang_cc1 -verify -fsyntax-only %s
erichkeane wrote:
Typically we find a similar test file and put it there, just wrapped in a
namespace for the github issue.
https://github.com/llvm/llvm-project/pull/72346
___
https://github.com/erichkeane commented:
I don't have a great feel if this is the right fix, but if it doesn't break
anything in the tests, and does fix something, this is likely acceptable for
now.
This DOES need a release note, and as Shafik says: this should likely be placed
in an existing
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/70234
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane created
https://github.com/llvm/llvm-project/pull/72661
As the first real parsing effort for the OpenACC implementation effort, this
implements the parsing for construct/directive names. This does not do any
semantic analysis, nor any parsing for the parens for af
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/72661
>From 01fc81b37ad744a265f712b26fd6c3a85430c719 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Fri, 17 Nov 2023 06:29:35 -0800
Subject: [PATCH 1/2] [OpenACC] Implement initial parsing for
Construct/Directive
301 - 400 of 4874 matches
Mail list logo