Skip to content

Commit

Permalink
Updates for clang-format-18
Browse files Browse the repository at this point in the history
  • Loading branch information
MikePopoloski committed Mar 16, 2024
1 parent 50a99bd commit 1b223c6
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions include/slang/ast/expressions/OperatorExpressions.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ class SLANG_EXPORT UnaryExpression : public Expression {

UnaryExpression(UnaryOperator op, const Type& type, Expression& operand,
SourceRange sourceRange) :
Expression(ExpressionKind::UnaryOp, type, sourceRange),
op(op), operand_(&operand) {}
Expression(ExpressionKind::UnaryOp, type, sourceRange), op(op), operand_(&operand) {}

const Expression& operand() const { return *operand_; }
Expression& operand() { return *operand_; }
Expand Down Expand Up @@ -61,8 +60,8 @@ class SLANG_EXPORT BinaryExpression : public Expression {

BinaryExpression(BinaryOperator op, const Type& type, Expression& left, Expression& right,
SourceRange sourceRange) :
Expression(ExpressionKind::BinaryOp, type, sourceRange),
op(op), left_(&left), right_(&right) {}
Expression(ExpressionKind::BinaryOp, type, sourceRange), op(op), left_(&left),
right_(&right) {}

const Expression& left() const { return *left_; }
Expression& left() { return *left_; }
Expand Down Expand Up @@ -109,8 +108,8 @@ class SLANG_EXPORT ConditionalExpression : public Expression {

ConditionalExpression(const Type& type, std::span<const Condition> conditions, Expression& left,
Expression& right, SourceRange sourceRange, bool isConst, bool isTrue) :
Expression(ExpressionKind::ConditionalOp, type, sourceRange),
conditions(conditions), left_(&left), right_(&right), isConst(isConst), isTrue(isTrue) {}
Expression(ExpressionKind::ConditionalOp, type, sourceRange), conditions(conditions),
left_(&left), right_(&right), isConst(isConst), isTrue(isTrue) {}

const Expression& left() const { return *left_; } // NOLINT
Expression& left() { return *left_; }
Expand Down Expand Up @@ -160,8 +159,8 @@ class SLANG_EXPORT InsideExpression : public Expression {
public:
InsideExpression(const Type& type, const Expression& left,
std::span<const Expression* const> rangeList, SourceRange sourceRange) :
Expression(ExpressionKind::Inside, type, sourceRange),
left_(&left), rangeList_(rangeList) {}
Expression(ExpressionKind::Inside, type, sourceRange), left_(&left), rangeList_(rangeList) {
}

const Expression& left() const { return *left_; }

Expand Down Expand Up @@ -194,8 +193,7 @@ class SLANG_EXPORT ConcatenationExpression : public Expression {
public:
ConcatenationExpression(const Type& type, std::span<const Expression* const> operands,
SourceRange sourceRange) :
Expression(ExpressionKind::Concatenation, type, sourceRange),
operands_(operands) {}
Expression(ExpressionKind::Concatenation, type, sourceRange), operands_(operands) {}

std::span<const Expression* const> operands() const { return operands_; }

Expand Down Expand Up @@ -229,8 +227,8 @@ class SLANG_EXPORT ReplicationExpression : public Expression {
public:
ReplicationExpression(const Type& type, const Expression& count, Expression& concat,
SourceRange sourceRange) :
Expression(ExpressionKind::Replication, type, sourceRange),
count_(&count), concat_(&concat) {}
Expression(ExpressionKind::Replication, type, sourceRange), count_(&count),
concat_(&concat) {}

const Expression& count() const { return *count_; }

Expand Down Expand Up @@ -270,8 +268,8 @@ class SLANG_EXPORT StreamingConcatenationExpression : public Expression {
StreamingConcatenationExpression(const Type& type, uint64_t sliceSize, uint64_t bitstreamWidth,
std::span<const StreamExpression> streams,
SourceRange sourceRange) :
Expression(ExpressionKind::Streaming, type, sourceRange),
streams_(streams), sliceSize(sliceSize), bitstreamWidth(bitstreamWidth) {}
Expression(ExpressionKind::Streaming, type, sourceRange), streams_(streams),
sliceSize(sliceSize), bitstreamWidth(bitstreamWidth) {}

bool isFixedSize() const;
uint64_t getBitstreamWidth() const { return bitstreamWidth; }
Expand Down Expand Up @@ -314,8 +312,7 @@ class SLANG_EXPORT ValueRangeExpression : public Expression {
public:
ValueRangeExpression(const Type& type, Expression& left, Expression& right,
SourceRange sourceRange) :
Expression(ExpressionKind::ValueRange, type, sourceRange),
left_(&left), right_(&right) {}
Expression(ExpressionKind::ValueRange, type, sourceRange), left_(&left), right_(&right) {}

const Expression& left() const { return *left_; }
Expression& left() { return *left_; }
Expand Down

0 comments on commit 1b223c6

Please sign in to comment.