Changeset 4432b52 for src/ResolvExpr/ResolvMode.h
- Timestamp:
- Nov 27, 2020, 9:08:28 AM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 4f0c520
- Parents:
- 1f9a4d0 (diff), e3282fe (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/ResolvMode.h
r1f9a4d0 r4432b52 22 22 const bool prune; ///< Prune alternatives to min-cost per return type? [true] 23 23 const bool failFast; ///< Fail on no resulting alternatives? [true] 24 const bool satisfyAssns; ///< Satisfy assertions? [false]25 24 26 25 private: 27 constexpr ResolvMode(bool a, bool p, bool ff , bool sa)28 : adjust(a), prune(p), failFast(ff) , satisfyAssns(sa){}26 constexpr ResolvMode(bool a, bool p, bool ff) 27 : adjust(a), prune(p), failFast(ff) {} 29 28 30 29 public: 31 30 /// Default settings 32 constexpr ResolvMode() : adjust(false), prune(true), failFast(true) , satisfyAssns(false){}31 constexpr ResolvMode() : adjust(false), prune(true), failFast(true) {} 33 32 34 33 /// With adjust flag set; turns array and function types into equivalent pointers 35 static constexpr ResolvMode withAdjustment() { return { true, true, true , false}; }34 static constexpr ResolvMode withAdjustment() { return { true, true, true }; } 36 35 37 36 /// With adjust flag set but prune unset; pruning ensures there is at least one alternative 38 37 /// per result type 39 static constexpr ResolvMode withoutPrune() { return { true, false, true , false}; }38 static constexpr ResolvMode withoutPrune() { return { true, false, true }; } 40 39 41 40 /// With adjust and prune flags set but failFast unset; failFast ensures there is at least 42 41 /// one resulting alternative 43 static constexpr ResolvMode withoutFailFast() { return { true, true, false , false}; }42 static constexpr ResolvMode withoutFailFast() { return { true, true, false }; } 44 43 45 44 /// The same mode, but with satisfyAssns turned on; for top-level calls 46 ResolvMode atTopLevel() const { return { adjust, prune, failFast, true}; }45 ResolvMode atTopLevel() const { return { adjust, true, failFast }; } 47 46 }; 48 47 } // namespace ResolvExpr
Note: See TracChangeset
for help on using the changeset viewer.