================ @@ -1585,6 +1590,20 @@ class VarDecl : public DeclaratorDecl, public Redeclarable<VarDecl> { NonParmVarDeclBits.IsCXXCondDecl = true; } + /// Determine whether this variable is the compiler-generated '__range' + /// variable used to hold the range expression in a C++11 and later for-range + /// statement. + bool isCXXForRangeImplicitVar() const { + return isa<ParmVarDecl>(this) ? false + : NonParmVarDeclBits.IsCXXForRangeImplicitVar; + } + + void setCXXForRangeImplicitVar(bool FRV) { + assert(!isa<ParmVarDecl>(this) && + "Cannot set IsCXXForRangeRangeVar on ParmVarDecl"); ---------------- mrcvtl wrote:
Also here should be `Cannot set IsCXXForRangeRangeVar...`. https://github.com/llvm/llvm-project/pull/145164 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits