dougsonos wrote:
> So it sounds like the act of adding an additional trailing object will slow
> down the performance regardless of whether we use the new trailing object?
I was confused by some comments on `FunctionProtoType` which have diverged from
the source, and thought that it was necess
dougsonos wrote:
> I’m probably just stating the obvious here, but seeing as existing code
> obviously does not make use of effects, for compiling it to become slower,
> that means that we’re probably unconditionally executing code somewhere
> irrespective of whether effects are present or not
AaronBallman wrote:
> Given that this is for a clang extension and not a conformance issue, I'm
> inclined to revert.
>
> It might make sense to do that, yeah. Either way, we should investigate
> what’s going on here. @AaronBallman wdyt?
Definitely worth investigating, unsure whether this is
Sirraide wrote:
> I was not expecting that. Hmm, I wonder what’s causing this.
I’m probably just stating the obvious here, but seeing as existing code
obviously does not make use of effects, for compiling it to become slower, that
means that we’re probably unconditionally executing code somewh
Sirraide wrote:
> This change has some compile-time impact
I was not expecting that. Hmm, I wonder what’s causing this.
> Given that this is for a clang extension and not a conformance issue, I'm
> inclined to revert.
It might make sense to do that, yeah. Either way, we should investigate wha
https://github.com/AaronBallman approved this pull request.
The only thing I think is missing is a release note in
`clang/docs/ReleaseNotes.rst` so users know about the new functionality,
otherwise this LGTM!
https://github.com/llvm/llvm-project/pull/84983
_
@@ -0,0 +1,141 @@
+// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fblocks -verify -x c -std=c23 %s
+
+#if !__has_attribute(nonblocking)
+#error "the 'nonblocking' attribute is not available"
+#endif
+
+// --- ATTRIBUTE SYNT
@@ -0,0 +1,141 @@
+// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fblocks -verify -x c -std=c23 %s
+
+#if !__has_attribute(nonblocking)
+#error "the 'nonblocking' attribute is not available"
+#endif
+
+// --- ATTRIBUTE SYNT
@@ -0,0 +1,141 @@
+// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fblocks -verify -x c -std=c23 %s
+
+#if !__has_attribute(nonblocking)
+#error "the 'nonblocking' attribute is not available"
+#endif
+
+// --- ATTRIBUTE SYNT
https://github.com/dougsonos edited
https://github.com/llvm/llvm-project/pull/84983
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,141 @@
+// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fblocks -verify -x c -std=c23 %s
+
+#if !__has_attribute(nonblocking)
+#error "the 'nonblocking' attribute is not available"
+#endif
+
+// --- ATTRIBUTE SYNT
@@ -0,0 +1,141 @@
+// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fblocks -verify -x c -std=c23 %s
+
+#if !__has_attribute(nonblocking)
+#error "the 'nonblocking' attribute is not available"
+#endif
+
+// --- ATTRIBUTE SYNT
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/84983
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,141 @@
+// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fblocks -verify -x c -std=c23 %s
+
+#if !__has_attribute(nonblocking)
+#error "the 'nonblocking' attribute is not available"
+#endif
+
+// --- ATTRIBUTE SYNT
@@ -0,0 +1,141 @@
+// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fblocks -verify -x c -std=c23 %s
+
+#if !__has_attribute(nonblocking)
+#error "the 'nonblocking' attribute is not available"
+#endif
+
+// --- ATTRIBUTE SYNT
@@ -0,0 +1,141 @@
+// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fblocks -verify -x c -std=c23 %s
+
+#if !__has_attribute(nonblocking)
+#error "the 'nonblocking' attribute is not available"
+#endif
+
+// --- ATTRIBUTE SYNT
@@ -0,0 +1,141 @@
+// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fblocks -verify -x c -std=c23 %s
+
+#if !__has_attribute(nonblocking)
+#error "the 'nonblocking' attribute is not available"
+#endif
+
+// --- ATTRIBUTE SYNT
https://github.com/dougsonos edited
https://github.com/llvm/llvm-project/pull/84983
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,141 @@
+// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fblocks -verify -x c -std=c23 %s
+
+#if !__has_attribute(nonblocking)
+#error "the 'nonblocking' attribute is not available"
+#endif
+
+// --- ATTRIBUTE SYNT
Endilll wrote:
Aaron is attending WG14 meeting that is happening this week, so you shouldn't
expect him until next week.
https://github.com/llvm/llvm-project/pull/84983
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
@@ -7525,25 +7525,21 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
std::optional
Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
- auto BadExpr = [&]() {
-Diag(CondExpr->getExprLoc(), diag::err_attribute_argument_type)
-
@@ -7525,25 +7525,21 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
std::optional
Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
- auto BadExpr = [&]() {
-Diag(CondExpr->getExprLoc(), diag::err_attribute_argument_type)
-
@@ -7525,25 +7525,21 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
std::optional
Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
- auto BadExpr = [&]() {
-Diag(CondExpr->getExprLoc(), diag::err_attribute_argument_type)
-
@@ -7525,25 +7525,21 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
std::optional
Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
- auto BadExpr = [&]() {
-Diag(CondExpr->getExprLoc(), diag::err_attribute_argument_type)
-
@@ -7525,25 +7525,21 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
std::optional
Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
- auto BadExpr = [&]() {
-Diag(CondExpr->getExprLoc(), diag::err_attribute_argument_type)
-
dougsonos wrote:
> @dougsonos Just merged a pr that diagnoses unexpanded parameter packs when an
> attribute is parsed, so could you double-check if that call to
> `DiagnoseUnexpandedParameterPack` is still necessary?
I just re-merged main to the branch and verified that the call to
`Diagnose
https://github.com/Sirraide approved this pull request.
One last minor comment, but other than that I think we’re good.
This is a comparatively large pr, so while it’s possible that I missed
something, I don’t think there is much to be gained from me staring at this for
any longer than I alre
@@ -7525,25 +7525,21 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
std::optional
Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
- auto BadExpr = [&]() {
-Diag(CondExpr->getExprLoc(), diag::err_attribute_argument_type)
-
https://github.com/Sirraide edited
https://github.com/llvm/llvm-project/pull/84983
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4640,6 +4647,306 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
describi
https://github.com/dougsonos edited
https://github.com/llvm/llvm-project/pull/84983
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dougsonos edited
https://github.com/llvm/llvm-project/pull/84983
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4640,6 +4647,306 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
describi
https://github.com/Sirraide edited
https://github.com/llvm/llvm-project/pull/84983
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7518,6 +7523,154 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
llvm_unreachable("unexpected attribute kind!");
}
+std::optional
+Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
+ auto BadExpr = [&]() {
+Diag(CondExpr->get
@@ -7518,6 +7523,154 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
llvm_unreachable("unexpected attribute kind!");
}
+std::optional
+Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
+ auto BadExpr = [&]() {
+Diag(CondExpr->get
https://github.com/Sirraide edited
https://github.com/llvm/llvm-project/pull/84983
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7518,6 +7523,154 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
llvm_unreachable("unexpected attribute kind!");
}
+std::optional
+Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
+ auto BadExpr = [&]() {
+Diag(CondExpr->get
@@ -4640,6 +4647,306 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
describi
@@ -7518,6 +7523,154 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
llvm_unreachable("unexpected attribute kind!");
}
+std::optional
+Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
+ auto BadExpr = [&]() {
+Diag(CondExpr->get
@@ -7518,6 +7523,154 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
llvm_unreachable("unexpected attribute kind!");
}
+std::optional
+Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
+ auto BadExpr = [&]() {
+Diag(CondExpr->get
@@ -7518,6 +7523,154 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
llvm_unreachable("unexpected attribute kind!");
}
+std::optional
+Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
+ auto BadExpr = [&]() {
+Diag(CondExpr->get
@@ -4780,42 +4781,38 @@ struct FunctionEffectWithCondition {
/// Return a textual description of the effect, and its condition, if any.
std::string description() const;
-
- friend bool operator<(const FunctionEffectWithCondition &LHS,
-const Functi
@@ -1870,6 +1870,28 @@ bool Sema::IsFunctionConversion(QualType FromType,
QualType ToType,
FromFn = QT->getAs();
Changed = true;
}
+
+// For C, when called from checkPointerTypesForAssignment,
+// we need not to alter FromFn, or else even an innocuous c
@@ -4640,6 +4647,306 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
describi
@@ -4640,6 +4647,306 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
describi
https://github.com/Sirraide edited
https://github.com/llvm/llvm-project/pull/84983
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4640,6 +4647,306 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
describi
https://github.com/Sirraide requested changes to this pull request.
A few more minor things, but I think this should mostly be done after this.
https://github.com/llvm/llvm-project/pull/84983
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
dougsonos wrote:
I've been through all the feedback again and believe I have addressed
everything.
https://github.com/llvm/llvm-project/pull/84983
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/
@@ -10510,6 +10512,8 @@ QualType ASTContext::mergeFunctionTypes(QualType lhs,
QualType rhs,
if (lproto->getMethodQuals() != rproto->getMethodQuals())
return {};
+// TODO: (nonblocking) Does anything need to be done with FunctionEffects?
+
dougso
@@ -7973,3 +7973,20 @@ requirement:
}
}];
}
+
+def NoLockNoAllocDocs : Documentation {
+ let Category = DocCatType;
+ let Content = [{
+The ``nolock`` and ``noalloc`` attributes can be attached to functions,
blocks,
+function pointers, lambdas, and member functions. The
@@ -4639,6 +4645,303 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
describi
@@ -4429,6 +4434,284 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+class Decl;
+class CXXMethodDecl;
+class FunctionTypeEffectsRef;
+class Functio
@@ -4429,6 +4433,210 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+class Decl;
+class CXXMethodDecl;
+class FunctionEffectSet;
+
+/// Represents a
@@ -17154,6 +17156,10 @@ ExprResult Sema::ActOnBlockStmtExpr(SourceLocation
CaretLoc,
BlockScopeInfo *BSI = cast(FunctionScopes.back());
BlockDecl *BD = BSI->TheDecl;
+ if (const auto FX = BD->getFunctionEffects()) {
+CheckAddCallableWithEffects(BD, FX);
+ }
---
@@ -1888,6 +1888,11 @@ ExprResult Sema::BuildCaptureInit(const Capture &Cap,
ExprResult Sema::ActOnLambdaExpr(SourceLocation StartLoc, Stmt *Body) {
LambdaScopeInfo LSI = *cast(FunctionScopes.back());
ActOnFinishFunctionBody(LSI.CallOperator, Body);
+
+ if (const auto FX =
@@ -4429,6 +4433,218 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+// TODO: Should FunctionEffect be located elsewhere, where Decl is not
+// forw
@@ -5016,3 +5024,254 @@ void AutoType::Profile(llvm::FoldingSetNodeID &ID,
const ASTContext &Context) {
Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(),
getTypeConstraintConcept(), getTypeConstraintArguments());
}
+
+FunctionEffect::FunctionE
@@ -3144,6 +3154,9 @@ class Sema final {
QualType T, TypeSourceInfo *TSInfo,
StorageClass SC);
+ /// Potentially add a FunctionDecl or BlockDecl to DeclsWithEffectsToVerify.
+ void CheckAddCallableWithEffects(const
@@ -352,6 +352,9 @@ let Class = FunctionProtoType in {
def : Property<"AArch64SMEAttributes", UInt32> {
let Read = [{ node->getAArch64SMEAttributes() }];
}
+ def : Property<"functionEffects", Array> {
+let Read = [{ node->getFunctionEffects().serializable() }];
+
@@ -4429,6 +4433,218 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+// TODO: Should FunctionEffect be located elsewhere, where Decl is not
+// forw
@@ -464,6 +466,16 @@ class ASTContext : public RefCountedBase {
/// This is the top-level (C++20) Named module we are building.
Module *CurrentCXXNamedModule = nullptr;
+ class FunctionEffectSetUniquing {
+llvm::DenseSet> Set;
+
+ public:
+FunctionEffectSet getUn
@@ -4912,3 +4922,279 @@ void AutoType::Profile(llvm::FoldingSetNodeID &ID,
const ASTContext &Context) {
Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(),
getTypeConstraintConcept(), getTypeConstraintArguments());
}
+
+FunctionEffect::~Function
@@ -7963,6 +7967,148 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
llvm_unreachable("unexpected attribute kind!");
}
+ExprResult Sema::ActOnEffectExpression(Expr *CondExpr, FunctionEffectMode
&Mode,
+ bool RequireC
@@ -7963,6 +7967,148 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
llvm_unreachable("unexpected attribute kind!");
}
+ExprResult Sema::ActOnEffectExpression(Expr *CondExpr, FunctionEffectMode
&Mode,
+ bool RequireC
https://github.com/dougsonos edited
https://github.com/llvm/llvm-project/pull/84983
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7963,6 +7967,148 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
llvm_unreachable("unexpected attribute kind!");
}
+ExprResult Sema::ActOnEffectExpression(Expr *CondExpr, FunctionEffectMode
&Mode,
+ bool RequireC
@@ -7963,6 +7967,148 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
llvm_unreachable("unexpected attribute kind!");
}
+ExprResult Sema::ActOnEffectExpression(Expr *CondExpr, FunctionEffectMode
&Mode,
+ bool RequireC
@@ -5028,3 +5050,376 @@ void AutoType::Profile(llvm::FoldingSetNodeID &ID,
const ASTContext &Context) {
Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(),
getTypeConstraintConcept(), getTypeConstraintArguments());
}
+
+FunctionEffect::Kind Func
@@ -5028,3 +5050,376 @@ void AutoType::Profile(llvm::FoldingSetNodeID &ID,
const ASTContext &Context) {
Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(),
getTypeConstraintConcept(), getTypeConstraintArguments());
}
+
+FunctionEffect::Kind Func
@@ -1870,6 +1870,28 @@ bool Sema::IsFunctionConversion(QualType FromType,
QualType ToType,
FromFn = QT->getAs();
Changed = true;
}
+
+// For C, when called from checkPointerTypesForAssignment,
+// we need not to alter FromFn, or else even an innocuous c
@@ -4639,6 +4645,303 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
describi
@@ -4639,6 +4645,303 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
describi
@@ -4639,6 +4645,303 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
describi
@@ -1435,6 +1435,38 @@ def CXX11NoReturn : InheritableAttr {
let Documentation = [CXX11NoReturnDocs];
}
+def NonBlocking : TypeAttr {
+ let Spellings = [CXX11<"clang", "nonblocking">,
AaronBallman wrote:
Present Aaron thanks you and Past Aaron apologized f
@@ -4639,6 +4645,303 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
describi
@@ -5028,3 +5060,263 @@ void AutoType::Profile(llvm::FoldingSetNodeID &ID,
const ASTContext &Context) {
Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(),
getTypeConstraintConcept(), getTypeConstraintArguments());
}
+
+FunctionEffect::Kind Func
@@ -5028,3 +5060,263 @@ void AutoType::Profile(llvm::FoldingSetNodeID &ID,
const ASTContext &Context) {
Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(),
getTypeConstraintConcept(), getTypeConstraintArguments());
}
+
+FunctionEffect::Kind Func
@@ -5028,3 +5060,263 @@ void AutoType::Profile(llvm::FoldingSetNodeID &ID,
const ASTContext &Context) {
Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(),
getTypeConstraintConcept(), getTypeConstraintArguments());
}
+
+FunctionEffect::Kind Func
@@ -1435,6 +1435,38 @@ def CXX11NoReturn : InheritableAttr {
let Documentation = [CXX11NoReturnDocs];
}
+def NonBlocking : TypeAttr {
+ let Spellings = [CXX11<"clang", "nonblocking">,
dougsonos wrote:
I've gotten rid of the "clang_" prefix on the GNU-style
@@ -4639,6 +4645,303 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
describi
@@ -395,6 +395,33 @@ bool Sema::checkStringLiteralArgumentAttr(const ParsedAttr
&AL, unsigned ArgNum,
return checkStringLiteralArgumentAttr(AL, ArgExpr, Str, ArgLocation);
}
+/// Check if the argument \p ArgNum of \p Attr is a compile-time constant
+/// integer (boolean) ex
@@ -4639,6 +4645,303 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
describi
@@ -395,6 +395,33 @@ bool Sema::checkStringLiteralArgumentAttr(const ParsedAttr
&AL, unsigned ArgNum,
return checkStringLiteralArgumentAttr(AL, ArgExpr, Str, ArgLocation);
}
+/// Check if the argument \p ArgNum of \p Attr is a compile-time constant
+/// integer (boolean) ex
@@ -661,6 +681,11 @@ ExprResult Sema::ImpCastExprToType(Expr *E, QualType Ty,
diagnoseNullableToNonnullConversion(Ty, E->getType(), E->getBeginLoc());
diagnoseZeroToNullptrConversion(Kind, E);
+ if (!isCast(CCK) && !E->isNullPointerConstant(
+ Con
@@ -4639,6 +4645,303 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
describi
@@ -7963,6 +7968,154 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
llvm_unreachable("unexpected attribute kind!");
}
+std::optional
+Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
+ auto BadExpr = [&]() {
+Diag(CondExpr->get
erichkeane wrote:
> Well assume attribute is a good example of where gcc and clang disagree and
> might cause issues. Gcc implemented the assume attribute just the same as the
> standard one. While clang implemented before standardization and now they
> differ and could cause issues. This is w
@@ -7963,6 +7968,154 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
llvm_unreachable("unexpected attribute kind!");
}
+std::optional
+Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
+ auto BadExpr = [&]() {
+Diag(CondExpr->get
pinskia wrote:
Well assume attribute is a good example of where gcc and clang disagree and
might cause issues. Gcc implemented the assume attribute just the same as the
standard one. While clang implemented before standardization and now they
differ and could cause issues. This is why I reques
@@ -1435,6 +1435,38 @@ def CXX11NoReturn : InheritableAttr {
let Documentation = [CXX11NoReturnDocs];
}
+def NonBlocking : TypeAttr {
+ let Spellings = [CXX11<"clang", "nonblocking">,
AaronBallman wrote:
Yeah, Present Aaron regrets Past Aaron's caution the
@@ -1435,6 +1435,38 @@ def CXX11NoReturn : InheritableAttr {
let Documentation = [CXX11NoReturnDocs];
}
+def NonBlocking : TypeAttr {
+ let Spellings = [CXX11<"clang", "nonblocking">,
erichkeane wrote:
I agree with Aaron here, doing that sort of prefix is
@@ -1435,6 +1435,38 @@ def CXX11NoReturn : InheritableAttr {
let Documentation = [CXX11NoReturnDocs];
}
+def NonBlocking : TypeAttr {
+ let Spellings = [CXX11<"clang", "nonblocking">,
AaronBallman wrote:
CC @erichkeane
`clang_builtin_alias` is the only a
@@ -1435,6 +1435,38 @@ def CXX11NoReturn : InheritableAttr {
let Documentation = [CXX11NoReturnDocs];
}
+def NonBlocking : TypeAttr {
+ let Spellings = [CXX11<"clang", "nonblocking">,
dougsonos wrote:
I don't really care either way, but there was a comment
@@ -7963,6 +7968,154 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
llvm_unreachable("unexpected attribute kind!");
}
+std::optional
+Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
+ auto BadExpr = [&]() {
+Diag(CondExpr->get
@@ -5028,3 +5060,263 @@ void AutoType::Profile(llvm::FoldingSetNodeID &ID,
const ASTContext &Context) {
Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(),
getTypeConstraintConcept(), getTypeConstraintArguments());
}
+
+FunctionEffect::Kind Func
@@ -7963,6 +7968,154 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
llvm_unreachable("unexpected attribute kind!");
}
+std::optional
+Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
+ auto BadExpr = [&]() {
+Diag(CondExpr->get
@@ -5028,3 +5060,263 @@ void AutoType::Profile(llvm::FoldingSetNodeID &ID,
const ASTContext &Context) {
Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(),
getTypeConstraintConcept(), getTypeConstraintArguments());
}
+
+FunctionEffect::Kind Func
@@ -4639,6 +4645,303 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
describi
1 - 100 of 290 matches
Mail list logo