Skip to content

Commit

Permalink
vfvalue.h: reduced size of booleans
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Sep 20, 2024
1 parent 4b68e2f commit f1a86d7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/vfvalue.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,22 +267,26 @@ namespace ValueFlow
Bound bound = Bound::Point;

/** value relies on safe checking */
bool safe{};
bool safe : 1;

/** Conditional value */
bool conditional{};
bool conditional : 1;

/** Value is is from an expanded macro */
bool macro{};
bool macro : 1;

/** Is this value passed as default parameter to the function? */
bool defaultArg{};
bool defaultArg : 1;

long long : 4; // padding

/** kind of moved */
enum class MoveKind : std::uint8_t { NonMovedVariable, MovedVariable, ForwardedVariable } moveKind = MoveKind::NonMovedVariable;

enum class LifetimeScope : std::uint8_t { Local, Argument, SubFunction, ThisPointer, ThisValue } lifetimeScope = LifetimeScope::Local;

long long : 24; // padding

/** int value (or sometimes bool value?) */
long long intvalue{};

Expand Down

0 comments on commit f1a86d7

Please sign in to comment.