Author: Timm Baeder Date: 2026-06-17T08:00:10+02:00 New Revision: 75b7809248cca443085c1c3fb572ae38add4c500
URL: https://github.com/llvm/llvm-project/commit/75b7809248cca443085c1c3fb572ae38add4c500 DIFF: https://github.com/llvm/llvm-project/commit/75b7809248cca443085c1c3fb572ae38add4c500.diff LOG: [clang][bytecode][NFC] Consistently use `isBottomFrame()` (#204167) Instead of checking for `getDepth() == 0`. Added: Modified: clang/lib/AST/ByteCode/Interp.h Removed: ################################################################################ diff --git a/clang/lib/AST/ByteCode/Interp.h b/clang/lib/AST/ByteCode/Interp.h index ad807816aa904..0f9e585e19769 100644 --- a/clang/lib/AST/ByteCode/Interp.h +++ b/clang/lib/AST/ByteCode/Interp.h @@ -1836,7 +1836,7 @@ inline bool InitGlobalTempComp(InterpState &S, CodePtr OpPC, template <PrimType Name, class T = typename PrimConv<Name>::T> bool InitThisField(InterpState &S, CodePtr OpPC, uint32_t I) { - if (S.checkingPotentialConstantExpression() && S.Current->getDepth() == 0) + if (S.checkingPotentialConstantExpression() && S.Current->isBottomFrame()) return false; if (!CheckThis(S, OpPC)) return false; @@ -1853,7 +1853,7 @@ bool InitThisField(InterpState &S, CodePtr OpPC, uint32_t I) { template <PrimType Name, class T = typename PrimConv<Name>::T> bool InitThisFieldActivate(InterpState &S, CodePtr OpPC, uint32_t I) { - if (S.checkingPotentialConstantExpression() && S.Current->getDepth() == 0) + if (S.checkingPotentialConstantExpression() && S.Current->isBottomFrame()) return false; if (!CheckThis(S, OpPC)) return false; @@ -1872,7 +1872,7 @@ bool InitThisFieldActivate(InterpState &S, CodePtr OpPC, uint32_t I) { template <PrimType Name, class T = typename PrimConv<Name>::T> bool InitThisBitField(InterpState &S, CodePtr OpPC, uint32_t FieldOffset, uint32_t FieldBitWidth) { - if (S.checkingPotentialConstantExpression() && S.Current->getDepth() == 0) + if (S.checkingPotentialConstantExpression() && S.Current->isBottomFrame()) return false; if (!CheckThis(S, OpPC)) return false; @@ -1897,7 +1897,7 @@ bool InitThisBitField(InterpState &S, CodePtr OpPC, uint32_t FieldOffset, template <PrimType Name, class T = typename PrimConv<Name>::T> bool InitThisBitFieldActivate(InterpState &S, CodePtr OpPC, uint32_t FieldOffset, uint32_t FieldBitWidth) { - if (S.checkingPotentialConstantExpression() && S.Current->getDepth() == 0) + if (S.checkingPotentialConstantExpression() && S.Current->isBottomFrame()) return false; if (!CheckThis(S, OpPC)) return false; @@ -2093,7 +2093,7 @@ bool GetPtrDerivedPop(InterpState &S, CodePtr OpPC, uint32_t Off, bool NullOK, const Type *TargetType); inline bool GetPtrThisField(InterpState &S, CodePtr OpPC, uint32_t Off) { - if (S.checkingPotentialConstantExpression() && S.Current->getDepth() == 0) + if (S.checkingPotentialConstantExpression() && S.Current->isBottomFrame()) return false; if (!CheckThis(S, OpPC)) return false; _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
