Skip to content
Prev Previous commit
Next Next commit
Manually re-apply some of the changes from main branch
  • Loading branch information
Endilll committed Mar 5, 2024
commit 2c4ddd77c175f4a4c5278bb8f0625cacdb4383a5
15 changes: 9 additions & 6 deletions clang/include/clang/Sema/Sema.h
Original file line number Diff line number Diff line change
Expand Up @@ -2150,11 +2150,7 @@ class Sema final {
VariadicDoesNotApply
};

/// Determine if type T is a valid subject for a nonnull and similar
/// attributes. By default, we look through references (the behavior used by
/// nonnull), but if the second parameter is true, then we treat a reference
/// type as valid.
bool isValidPointerAttrType(QualType T, bool RefOkay = false);
bool IsLayoutCompatible(QualType T1, QualType T2) const;

private:
void CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr,
Expand Down Expand Up @@ -10410,7 +10406,9 @@ class Sema final {
if (FD) {
FD->setWillHaveBody(true);
S.ExprEvalContexts.back().InImmediateFunctionContext =
FD->isImmediateFunction();
FD->isImmediateFunction() ||
S.ExprEvalContexts[S.ExprEvalContexts.size() - 2]
.isConstantEvaluated();
S.ExprEvalContexts.back().InImmediateEscalatingFunctionContext =
S.getLangOpts().CPlusPlus20 && FD->isImmediateEscalating();
} else
Expand Down Expand Up @@ -13297,6 +13295,11 @@ class Sema final {
SourceLocation IdentLoc, SourceLocation LBrace);
void ActOnFinishHLSLBuffer(Decl *Dcl, SourceLocation RBrace);

bool CheckHLSLBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall);

bool SemaBuiltinVectorMath(CallExpr *TheCall, QualType &Res);
bool SemaBuiltinVectorToScalarMath(CallExpr *TheCall);

///@}

//
Expand Down