@@ -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
erichkeane wrote:
> Both 1 and 2 seems like good options @hokein @erichkeane (especially 1 is
> probably something we should try to do)
I like 1, but not really 2, I think we should wait for this to be reasonably
complete before merging it, particularly this close to the release. I'd
probabl
@@ -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/erichkeane closed
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
erichkeane wrote:
> @erichkeane this is still doing lexing things in Sema, I was actually
> wondering if you had suggestions :D
Ah, i thought I'd mentioned on this before. Yeah, I very much would expect all
of the work this is doing to be possible in the parser. Sema shouldn't be
setting ra
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/121577
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3591,15 +3591,20 @@ static void handleInitPriorityAttr(Sema &S, Decl *D,
const ParsedAttr &AL) {
return;
}
+ if (prioritynum < 0 || prioritynum > 65535) {
+S.Diag(AL.getLoc(), diag::err_attribute_argument_out_of_range)
+<< E->getSourceRange() << AL << 0
@@ -3591,15 +3591,20 @@ static void handleInitPriorityAttr(Sema &S, Decl *D,
const ParsedAttr &AL) {
return;
}
+ if (prioritynum < 0 || prioritynum > 65535) {
erichkeane wrote:
checking `<0` is silly, it is an unsigned argument.
https://github.com/l
https://github.com/erichkeane commented:
2 nits, else this is on the right track.
https://github.com/llvm/llvm-project/pull/121577
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/123209
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
Hmm... This isn't really my area of expertise, but I consider those types of
warnings valuable. While it isn't technically 'unreachable', it IS by intent of
the code. Is there perhaps some sort of annotation on the struct we have that
we could skip this assumption on instead
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/122505
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
> LGTM with a minor nit on the documentation, but I think this is a great new
> feature for the diagnostics engine. Thank you for it!
>
> btw, if you happen to have a list of diagnostics that could benefit from
> switching to use it, that sure seems like Good First Issue terr
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/122505
>From 4fbfdc801f6f296a8021f8efaea3a0da887f276f Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Thu, 9 Jan 2025 10:47:59 -0800
Subject: [PATCH 1/3] Add 'enum_select' diagnostic selection to clang.
This causes
erichkeane wrote:
> Should we deprecate it in 20, remove in 21? _almost_ is not 0
> https://github.com/search?q=__is_referenceable%28&type=code
Eh, it is pretty effectively 0. If you subtract ones that are wrapped in '#if
0' or part of libcxx, the first two pages have like 3 entries on them.
https://github.com/erichkeane approved this pull request.
Seems fine, though please apply Corentin's suggestions.
https://github.com/llvm/llvm-project/pull/123022
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/ma
@@ -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
@@ -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
@@ -886,6 +909,11 @@ struct DiagTextDocPrinter :
DiagTextVisitor {
makeRowSeparator(RST[I]);
}
+ void VisitEnumSelect(EnumSelectPiece *P) {
+// For now, document this as if it were a 'select'.
erichkeane wrote:
I don't think so? Actually, the '
@@ -0,0 +1,16 @@
+// RUN: clang-tblgen --gen-clang-diags-enums -I%S %s 2>&1 | FileCheck %s
+include "DiagnosticBase.inc"
+
+def DupeNames1 : Error<"%enum_select{}0">;
+def DupeNames2 : Error<"%enum_select{}0">;
+// CHECK: error: Duplicate enumeration name 'DupeName'
+// CHECK-NEXT
erichkeane wrote:
> Yes, but the point is: these names aren't reserved but the pain can still
> happen. e.g., `cdecl` is not a reserved identifier, but re-defining its
> meaning can still break code in ways that could have better diagnostics:
> https://godbolt.org/z/vTfWPsYj9. Though, I suppo
https://github.com/erichkeane approved this pull request.
I'm good here. Please let others make sure they are as well though.
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
erichkeane wrote:
As far as the CFE is concerned, we're OK with this. Though note, I anticipate
quite a bit of push back as libraries discover this warning, though most should
change their code instead, so I don't anticipate a good reason to revert.
https://github.com/llvm/llvm-project/pull/
erichkeane wrote:
> > > Oh, I see, you're suggesting we remove the `getStdNamespace` check from
> > > this PR. Yeah, I think that's reasonable.
> >
> >
> > Yep, that is my suggestion, sorry I was insufficiently clear.
> > > But I'd somewhat question whether this PR and warning really has anyth
erichkeane wrote:
> Oh, I see, you're suggesting we remove the `getStdNamespace` check from this
> PR. Yeah, I think that's reasonable.
Yep, that is my suggestion, sorry I was insufficiently clear.
> But I'd somewhat question whether this PR and warning really has anything to
> do with the at
@@ -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<
-
https://github.com/erichkeane edited
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
@@ -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<
-
https://github.com/erichkeane commented:
1 nit, else LGTM once @cor3ntin is happy.
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
@@ -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;
erichkeane
erichkeane 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://gi
@@ -1965,3 +1965,52 @@ CXXFoldExpr::CXXFoldExpr(QualType T,
UnresolvedLookupExpr *Callee,
SubExprs[SubExpr::RHS] = RHS;
setDependence(computeDependence(this));
}
+
+ResolvedUnexpandedPackExpr::ResolvedUnexpandedPackExpr(SourceLocation BL,
+
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext {
}
};
+/// Represents a partial function definition.
+///
+/// An outlined function declaration contains the parameters and body of
+/// a function independent of other function definition concerns suc
@@ -0,0 +1,92 @@
+//===- StmtSYCL.h - Classes for SYCL kernel calls ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -1793,6 +1794,16 @@ void ASTDeclReader::VisitBlockDecl(BlockDecl *BD) {
BD->setCaptures(Reader.getContext(), captures, capturesCXXThis);
}
+void ASTDeclReader::VisitOutlinedFunctionDecl(OutlinedFunctionDecl *D) {
+ // NumParams is deserialized by OutlinedFunctionDecl::Cr
https://github.com/erichkeane created
https://github.com/llvm/llvm-project/pull/122505
This causes us to generate an enum to go along with the select diagnostic,
which allows for clearer diagnostic error emit lines.
The syntax for this is:
%enum_select{%OptionalEnumeratorName{Text}|{Text2}}0
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext {
}
};
+/// Represents a partial function definition.
+///
+/// An outlined function declaration contains the parameters and body of
+/// a function independent of other function definition concerns suc
@@ -451,9 +452,9 @@ class ASTDeclReader : public DeclVisitor {
void VisitOMPDeclareMapperDecl(OMPDeclareMapperDecl *D);
void VisitOMPRequiresDecl(OMPRequiresDecl *D);
void VisitOMPCapturedExprDecl(OMPCapturedExprDecl *D);
- };
erichkeane wrote:
Unrelate
@@ -451,9 +452,9 @@ class ASTDeclReader : public DeclVisitor {
void VisitOMPDeclareMapperDecl(OMPDeclareMapperDecl *D);
void VisitOMPRequiresDecl(OMPRequiresDecl *D);
void VisitOMPCapturedExprDecl(OMPCapturedExprDecl *D);
- };
+};
- } // namespace clang
--
@@ -0,0 +1,92 @@
+//===- StmtSYCL.h - Classes for SYCL kernel calls ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -1376,6 +1377,16 @@ void ASTDeclWriter::VisitBlockDecl(BlockDecl *D) {
Code = serialization::DECL_BLOCK;
}
+void ASTDeclWriter::VisitOutlinedFunctionDecl(OutlinedFunctionDecl *D) {
+ Record.push_back(D->getNumParams());
+ VisitDecl(D);
+ Record.push_back(D->isNothrow()
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext {
}
};
+/// Represents a partial function definition.
+///
+/// An outlined function declaration contains the parameters and body of
+/// a function independent of other function definition concerns suc
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext {
}
};
+/// Represents a partial function definition.
+///
+/// An outlined function declaration contains the parameters and body of
+/// a function independent of other function definition concerns suc
@@ -12726,11 +12726,15 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) {
// Likewise, variables with tuple-like bindings are required if their
// bindings have side-effects.
- if (const auto *DD = dyn_cast(VD))
-for (const auto *BD : DD->bindings())
- if (co
https://github.com/erichkeane approved this pull request.
C++ side looks fine. Python looks innocuous enough, but I don't know it well
enough to confidently review it.
https://github.com/llvm/llvm-project/pull/122386
___
cfe-commits mailing list
cfe-c
@@ -27,6 +27,33 @@ unsigned clang_isVirtualBase(CXCursor C) {
return B->isVirtual();
}
+unsigned clang_visitCXXBaseClasses(CXType PT, CXFieldVisitor visitor,
+ CXClientData client_data) {
+ CXCursor PC = clang_getTypeDeclaration(PT);
+ if
https://github.com/erichkeane approved this pull request.
No idea what is going on with the python, but only 1 possible nit in the C++
https://github.com/llvm/llvm-project/pull/120300
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://list
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/120300
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
This must have crossed in the air, we are now rejecting std attributes spelled
there. See
https://github.com/llvm/llvm-project/commit/1a73654b3212b623ac21b9deb3aeaadc6906b7e4
https://github.com/llvm/llvm-project/pull/120327
___
cfe
https://github.com/erichkeane approved this pull request.
I think this is fine now.
https://github.com/llvm/llvm-project/pull/120327
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3423,6 +3425,30 @@ VarDecl *BindingDecl::getHoldingVar() const {
return VD;
}
+void DecompositionDecl::VisitHoldingVars(
+llvm::function_ref F) const {
+ VisitBindings([&](BindingDecl *BD) {
+if (VarDecl *VD = BD->getHoldingVar())
+ F(VD);
+ });
+}
+
+void
@@ -2202,6 +2202,17 @@ void
ASTStmtWriter::VisitPackIndexingExpr(PackIndexingExpr *E) {
Code = serialization::EXPR_PACK_INDEXING;
}
+void ASTStmtWriter::VisitResolvedUnexpandedPackExpr(
erichkeane wrote:
DID you see my comment on how to test these? I made
erichkeane wrote:
That seems like a heavy hand. Should we instead be checking the 'unevaluated
context' state to see whether we should be emitting stuff? I can't imagine
that anything from an unevaluated context should ever be emitted.
https://github.com/llvm/llvm-project/pull/102857
___
https://github.com/erichkeane commented:
Most of this looks good, a handful of small concerns/changes I want, else
pretty good.
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm
@@ -1965,3 +1965,52 @@ CXXFoldExpr::CXXFoldExpr(QualType T,
UnresolvedLookupExpr *Callee,
SubExprs[SubExpr::RHS] = RHS;
setDependence(computeDependence(this));
}
+
+ResolvedUnexpandedPackExpr::ResolvedUnexpandedPackExpr(SourceLocation BL,
+
@@ -12726,11 +12726,15 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) {
// Likewise, variables with tuple-like bindings are required if their
// bindings have side-effects.
- if (const auto *DD = dyn_cast(VD))
-for (const auto *BD : DD->bindings())
- if (co
@@ -2556,6 +2558,15 @@ void StmtPrinter::VisitPackIndexingExpr(PackIndexingExpr
*E) {
OS << "]";
}
+void StmtPrinter::VisitResolvedUnexpandedPackExpr(
+ResolvedUnexpandedPackExpr *E) {
+ OS << "getExprs() + E->getNumExprs(),
erichkeane
@@ -3423,6 +3425,30 @@ VarDecl *BindingDecl::getHoldingVar() const {
return VD;
}
+void DecompositionDecl::VisitHoldingVars(
erichkeane wrote:
Rather than both of these functions, I'd prefer we have some sort of iterators
that allow standard iteration over
@@ -2484,6 +2488,14 @@ TemplateInstantiator::TransformDeclRefExpr(DeclRefExpr
*E) {
if (PD->isParameterPack())
return TransformFunctionParmPackRefExpr(E, PD);
+ if (BindingDecl *BD = dyn_cast(D); BD && BD->isParameterPack())
{
+BD = cast(TransformDecl(BD->getL
@@ -4167,6 +4165,8 @@ class BindingDecl : public ValueDecl {
/// Set the decomposed variable for this BindingDecl.
void setDecomposedDecl(ValueDecl *Decomposed) { Decomp = Decomposed; }
+ VarDecl *getHoldingVar() const;
erichkeane wrote:
Can we get the c
@@ -5321,6 +5321,58 @@ class BuiltinBitCastExpr final
}
};
+// Represents an unexpanded pack where the list of expressions are
+// known. These are used when structured bindings introduce a pack.
+class ResolvedUnexpandedPackExpr final
+: public Expr,
+ private llvm
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -15991,6 +15991,13 @@
TreeTransform::TransformFunctionParmPackExpr(FunctionParmPackExpr *E) {
return E;
}
+template
+ExprResult TreeTransform::TransformResolvedUnexpandedPackExpr(
+ResolvedUnexpandedPackExpr *E) {
+ // Default behavior is to do nothing with this tr
@@ -5321,6 +5321,58 @@ class BuiltinBitCastExpr final
}
};
+// Represents an unexpanded pack where the list of expressions are
+// known. These are used when structured bindings introduce a pack.
+class ResolvedUnexpandedPackExpr final
+: public Expr,
+ private llvm
erichkeane wrote:
> > Is kinda wrong, it should be in the instantiation of that function...
>
> @erichkeane I don’t quite understand: the CWG issue itself requires us to
> check the constraint before substituting into the function during template
> argument deduction. So it shouldn’t live in a
https://github.com/erichkeane approved this pull request.
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
@@ -839,6 +839,12 @@ def BuiltinAssumeAligned : Builtin {
let Prototype = "void*(void const*, size_t, ...)";
}
+def BuiltinAssumeDereferenceable : Builtin {
+ let Spellings = ["__builtin_assume_dereferenceable"];
+ let Attributes = [NoThrow, Const, Constexpr];
erichkeane wrote:
> I am afraid this will break all existing CUDA/HIP programs since they expect
> to be able to parse the builtins for both host and device targets.
>
> In the spirit of single source, the compiler sees the entire code for all
> targets, including host target and all device ta
erichkeane wrote:
Oof, hrmph. It seems to me that we just have to be slightly more aggressive at
making sure we instantiate stuff I think.
This sentence:
`In this case, the lambda resides within the function declaration
compare_three_way_result_t<_Tp, _Up> operator<=>(_Tp, _Up), which remains
@@ -2761,6 +2761,41 @@ etc.).
Query for this feature with
``__has_builtin(__builtin_assume_separate_storage)``.
+``__builtin_assume_dereferenceable``
+-
+
+``__builtin_assume_derefernceable`` is used to provide the optimizer with the
-
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/121789
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
1 more question on the semantics + a typo, but the code LGTM.
https://github.com/llvm/llvm-project/pull/121789
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-
@@ -2761,6 +2761,41 @@ etc.).
Query for this feature with
``__has_builtin(__builtin_assume_separate_storage)``.
+``__builtin_assume_dereferenceable``
+-
+
+``__builtin_assume_derefernceable`` is used to provide the optimizer with the
+know
@@ -2761,6 +2761,41 @@ etc.).
Query for this feature with
``__has_builtin(__builtin_assume_separate_storage)``.
+``__builtin_assume_dereferenceable``
+-
+
+``__builtin_assume_derefernceable`` is used to provide the optimizer with the
+know
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/106321
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -186,4 +218,206 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr
*E, bool CountInBytes,
return false;
}
+static void EmitIncompleteCountedByPointeeNotes(Sema &S,
+const CountAttributedType
*CATy,
+
=?utf-8?q?F=C3=A9lix?= Cloutier ,
=?utf-8?q?F=C3=A9lix?= Cloutier ,
=?utf-8?q?F=C3=A9lix?= Cloutier ,
=?utf-8?q?F=C3=A9lix?= Cloutier
Message-ID:
In-Reply-To:
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/116708
___
erichkeane wrote:
> I don't think it makes any sense for `__has_builtin` to return true when the
> target does not in-fact have the builtin. Most of the time this is used to
> guard target specific code, which will then be wrong if it's compiled on the
> device. Realistically the solution that
erichkeane wrote:
I think I wrote the original patch. The point for allowing the 'aux' target to
enable a builtin that is not supported on the 'default' target is for languages
where 2-pass compilation is necessary for device/host, and the 'aux' target is
used to capture that this is a 2-pass
erichkeane wrote:
I think I'm reasonably OK with this, though @Sirraide has a 'requested
changes', so he should do the final approval.
https://github.com/llvm/llvm-project/pull/106321
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lis
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier
Message-ID:
In-Reply-To:
erichkeane wrote:
> As an update, I've been adding more tests and I found that I can make
> improvements with follow-up work. Since these aren't stability problems or
> false positives, and we think the change i
=?utf-8?q?André?= Brand
Message-ID:
In-Reply-To:
erichkeane wrote:
> @erichkeane I am not sure what you mean. As I pointed out earlier, the
> examples @cor3ntin brought up actually conform to the standard as in
> [[temp.spec.general]](https://wg21.link/temp.spec#temp.inst-3):
>
> > The impl
@@ -2761,6 +2761,41 @@ etc.).
Query for this feature with
``__has_builtin(__builtin_assume_separate_storage)``.
+``__builtin_assume_dereferenceable``
+-
+
+``__builtin_assume_derefernceable`` is used to provide the optimizer with the
+know
@@ -3726,6 +3726,16 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl
GD, unsigned BuiltinID,
AlignmentCI, OffsetValue);
return RValue::get(PtrValue);
}
+ case Builtin::BI__builtin_assume_dereferenceable: {
+const Expr *Ptr = E-
@@ -2761,6 +2761,41 @@ etc.).
Query for this feature with
``__has_builtin(__builtin_assume_separate_storage)``.
+``__builtin_assume_dereferenceable``
+-
+
+``__builtin_assume_derefernceable`` is used to provide the optimizer with the
+know
=?utf-8?q?André?= Brand
Message-ID:
In-Reply-To:
erichkeane wrote:
> > Thanks for the PR. Can you update the commit message to be more descriptive?
> > I'm not sure the fix is sufficient.
> > I think most of the checks done in `ActOnEnumBody` should be (re) performed
> > on instantiation.
> >
@@ -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;
erichkeane
@@ -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;
erichkeane
erichkeane 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
Yep, that looks to be exactly the case! I'd be interested to see if @ldionne
would be
@@ -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;
erichkeane
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier
Message-ID:
In-Reply-To:
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/116708
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier
Message-ID:
In-Reply-To:
@@ -595,6 +595,97 @@ ArgType::matchesType(ASTContext &C, QualType argTy) const {
llvm_unreachable("Invalid ArgType Kind!");
}
+static analyze_format_string::ArgType::MatchKind
+integerTypeMat
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier
Message-ID:
In-Reply-To:
https://github.com/erichkeane approved this pull request.
I did as deep of a look-through as I could, though this is obviously a big
patch. I didn't come up with any real comments, so everythign looks alright to
https://github.com/erichkeane approved this pull request.
I have a bit of a concern that the template cases are going to be REALLY noisy,
but we can deal with restricting individual use cases to a separate
warning-group in the future if need-be.
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;
erichkeane
@@ -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::
@@ -1550,6 +1550,8 @@ NamedDecl *Sema::ActOnNonTypeTemplateParameter(Scope *S,
Declarator &D,
IdResolver.AddDecl(Param);
}
+ ProcessDeclAttributes(S, Param, D);
erichkeane wrote:
Still want Aaron to check on this.
https://github.com/llvm/llvm-project
@@ -15978,6 +15988,24 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt
*Body,
CheckCoroutineWrapper(FD);
}
+ // Diagnose invalid SYCL kernel entry point function declarations.
+ if (FD && !FD->isInvalidDecl() && !FD->isTemplated() &&
+ FD->hasAttr()) {
+
erichkeane wrote:
As a quick note, the best way to check serialization/deserialization is a PCH
/restore test. I did a bunch in `SemaOpenACC` that you can use as an example
(see a bunch ending with `-ast` in the name). Basically, you just do the right
command-line incantation, plus a #ifdef
1 - 100 of 1929 matches
Mail list logo