Skip to content

Commit be88fdc

Browse files
committed
Fix clang warnings
1 parent 5d50c96 commit be88fdc

File tree

5 files changed

+37
-37
lines changed

5 files changed

+37
-37
lines changed

src/ast.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ namespace Sass {
495495
ADD_PROPERTY(bool, group_end)
496496
public:
497497
Bubble(ParserState pstate, Statement_Obj n, Statement_Obj g = {}, size_t t = 0);
498-
bool bubbles();
498+
bool bubbles() override;
499499
ATTACH_AST_OPERATIONS(Bubble)
500500
ATTACH_CRTP_PERFORM_METHODS()
501501
};
@@ -806,7 +806,7 @@ namespace Sass {
806806
public:
807807
Unary_Expression(ParserState pstate, Type t, Expression_Obj o);
808808
const std::string type_name();
809-
virtual bool operator==(const Expression& rhs) const;
809+
virtual bool operator==(const Expression& rhs) const override;
810810
size_t hash() const override;
811811
ATTACH_AST_OPERATIONS(Unary_Expression)
812812
ATTACH_CRTP_PERFORM_METHODS()
@@ -898,7 +898,7 @@ namespace Sass {
898898
ADD_PROPERTY(At_Root_Query_Obj, expression)
899899
public:
900900
At_Root_Block(ParserState pstate, Block_Obj b = {}, At_Root_Query_Obj e = {});
901-
bool bubbles();
901+
bool bubbles() override;
902902
bool exclude_node(Statement_Obj s);
903903
ATTACH_AST_OPERATIONS(At_Root_Block)
904904
ATTACH_CRTP_PERFORM_METHODS()
@@ -926,7 +926,7 @@ namespace Sass {
926926
ADD_PROPERTY(bool, has_optional_parameters)
927927
ADD_PROPERTY(bool, has_rest_parameter)
928928
protected:
929-
void adjust_after_pushing(Parameter_Obj p);
929+
void adjust_after_pushing(Parameter_Obj p) override;
930930
public:
931931
Parameters(ParserState pstate);
932932
ATTACH_AST_OPERATIONS(Parameters)

src/ast_selectors.hpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ namespace Sass {
134134
virtual ~Simple_Selector() = 0;
135135
virtual Compound_Selector_Ptr unify_with(Compound_Selector_Ptr);
136136

137-
virtual bool has_parent_ref() const;
138-
virtual bool has_real_parent_ref() const ;
137+
virtual bool has_parent_ref() const override;
138+
virtual bool has_real_parent_ref() const override;
139139
virtual bool is_pseudo_element() const;
140140
virtual bool is_superselector_of(Compound_Selector_Ptr_Const sub) const;
141141

@@ -169,10 +169,10 @@ namespace Sass {
169169
public:
170170
Parent_Selector(ParserState pstate, bool r = true);
171171

172-
virtual bool has_parent_ref() const;
173-
virtual bool has_real_parent_ref() const;
172+
virtual bool has_parent_ref() const override;
173+
virtual bool has_real_parent_ref() const override;
174174

175-
virtual unsigned long specificity() const;
175+
virtual unsigned long specificity() const override;
176176
int unification_order() const override
177177
{
178178
throw std::runtime_error("unification_order for Parent_Selector is undefined");
@@ -200,10 +200,10 @@ namespace Sass {
200200
return Constants::UnificationOrder_Placeholder;
201201
}
202202
virtual ~Placeholder_Selector() {};
203-
virtual unsigned long specificity() const;
204-
virtual bool has_placeholder();
205-
bool operator<(const Simple_Selector& rhs) const;
206-
bool operator==(const Simple_Selector& rhs) const;
203+
virtual unsigned long specificity() const override;
204+
virtual bool has_placeholder() override;
205+
bool operator<(const Simple_Selector& rhs) const override;
206+
bool operator==(const Simple_Selector& rhs) const override;
207207
bool operator<(const Placeholder_Selector& rhs) const;
208208
bool operator==(const Placeholder_Selector& rhs) const;
209209
ATTACH_AST_OPERATIONS(Placeholder_Selector)
@@ -216,7 +216,7 @@ namespace Sass {
216216
class Type_Selector final : public Simple_Selector {
217217
public:
218218
Type_Selector(ParserState pstate, std::string n);
219-
virtual unsigned long specificity() const;
219+
virtual unsigned long specificity() const override;
220220
int unification_order() const override
221221
{
222222
return Constants::UnificationOrder_Element;
@@ -237,7 +237,7 @@ namespace Sass {
237237
class Class_Selector final : public Simple_Selector {
238238
public:
239239
Class_Selector(ParserState pstate, std::string n);
240-
virtual unsigned long specificity() const;
240+
virtual unsigned long specificity() const override;
241241
int unification_order() const override
242242
{
243243
return Constants::UnificationOrder_Class;
@@ -257,7 +257,7 @@ namespace Sass {
257257
class Id_Selector final : public Simple_Selector {
258258
public:
259259
Id_Selector(ParserState pstate, std::string n);
260-
virtual unsigned long specificity() const;
260+
virtual unsigned long specificity() const override;
261261
int unification_order() const override
262262
{
263263
return Constants::UnificationOrder_Id;
@@ -282,7 +282,7 @@ namespace Sass {
282282
public:
283283
Attribute_Selector(ParserState pstate, std::string n, std::string m, String_Obj v, char o = 0);
284284
size_t hash() const override;
285-
virtual unsigned long specificity() const;
285+
virtual unsigned long specificity() const override;
286286
int unification_order() const override
287287
{
288288
return Constants::UnificationOrder_Attribute;
@@ -315,9 +315,9 @@ namespace Sass {
315315
ADD_PROPERTY(String_Obj, expression)
316316
public:
317317
Pseudo_Selector(ParserState pstate, std::string n, String_Obj expr = {});
318-
virtual bool is_pseudo_element() const;
318+
virtual bool is_pseudo_element() const override;
319319
size_t hash() const override;
320-
virtual unsigned long specificity() const;
320+
virtual unsigned long specificity() const override;
321321
int unification_order() const override
322322
{
323323
if (is_pseudo_element())
@@ -478,8 +478,8 @@ namespace Sass {
478478
void set_innermost(Complex_Selector_Obj, Combinator);
479479

480480
size_t hash() const override;
481-
virtual unsigned long specificity() const;
482-
virtual void set_media_block(Media_Block_Ptr mb);
481+
virtual unsigned long specificity() const override;
482+
virtual void set_media_block(Media_Block_Ptr mb) override;
483483
virtual bool has_placeholder();
484484
int unification_order() const override
485485
{
@@ -532,8 +532,8 @@ namespace Sass {
532532
Selector_List_Obj eval(Eval& eval);
533533

534534
size_t hash() const override;
535-
virtual unsigned long specificity() const;
536-
virtual void set_media_block(Media_Block_Ptr mb);
535+
virtual unsigned long specificity() const override;
536+
virtual void set_media_block(Media_Block_Ptr mb) override;
537537
virtual bool has_placeholder();
538538
int unification_order() const override
539539
{

src/ast_supports.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ namespace Sass {
4040
ADD_PROPERTY(Supports_Condition_Obj, condition)
4141
public:
4242
Supports_Block(ParserState pstate, Supports_Condition_Obj condition, Block_Obj block = {});
43-
bool bubbles();
43+
bool bubbles() override;
4444
ATTACH_AST_OPERATIONS(Supports_Block)
4545
ATTACH_CRTP_PERFORM_METHODS()
4646
};
@@ -68,7 +68,7 @@ namespace Sass {
6868
ADD_PROPERTY(Operand, operand);
6969
public:
7070
Supports_Operator(ParserState pstate, Supports_Condition_Obj l, Supports_Condition_Obj r, Operand o);
71-
virtual bool needs_parens(Supports_Condition_Obj cond) const;
71+
virtual bool needs_parens(Supports_Condition_Obj cond) const override;
7272
ATTACH_AST_OPERATIONS(Supports_Operator)
7373
ATTACH_CRTP_PERFORM_METHODS()
7474
};
@@ -81,7 +81,7 @@ namespace Sass {
8181
ADD_PROPERTY(Supports_Condition_Obj, condition);
8282
public:
8383
Supports_Negation(ParserState pstate, Supports_Condition_Obj c);
84-
virtual bool needs_parens(Supports_Condition_Obj cond) const;
84+
virtual bool needs_parens(Supports_Condition_Obj cond) const override;
8585
ATTACH_AST_OPERATIONS(Supports_Negation)
8686
ATTACH_CRTP_PERFORM_METHODS()
8787
};
@@ -95,7 +95,7 @@ namespace Sass {
9595
ADD_PROPERTY(Expression_Obj, value);
9696
public:
9797
Supports_Declaration(ParserState pstate, Expression_Obj f, Expression_Obj v);
98-
virtual bool needs_parens(Supports_Condition_Obj cond) const;
98+
virtual bool needs_parens(Supports_Condition_Obj cond) const override;
9999
ATTACH_AST_OPERATIONS(Supports_Declaration)
100100
ATTACH_CRTP_PERFORM_METHODS()
101101
};
@@ -108,11 +108,11 @@ namespace Sass {
108108
ADD_PROPERTY(Expression_Obj, value);
109109
public:
110110
Supports_Interpolation(ParserState pstate, Expression_Obj v);
111-
virtual bool needs_parens(Supports_Condition_Obj cond) const;
111+
virtual bool needs_parens(Supports_Condition_Obj cond) const override;
112112
ATTACH_AST_OPERATIONS(Supports_Interpolation)
113113
ATTACH_CRTP_PERFORM_METHODS()
114114
};
115115

116116
}
117117

118-
#endif
118+
#endif

src/ast_values.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ namespace Sass {
361361
return false;
362362
}
363363

364-
size_t Variable::hash()
364+
size_t Variable::hash() const
365365
{
366366
return std::hash<std::string>()(name());
367367
}
@@ -809,4 +809,4 @@ namespace Sass {
809809
/////////////////////////////////////////////////////////////////////////
810810
/////////////////////////////////////////////////////////////////////////
811811

812-
}
812+
}

src/ast_values.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ namespace Sass {
7979

8080
virtual size_t hash() const override;
8181
virtual size_t size() const;
82-
virtual void set_delayed(bool delayed);
82+
virtual void set_delayed(bool delayed) override;
8383
virtual bool operator== (const Expression& rhs) const override;
8484

8585
ATTACH_AST_OPERATIONS(List)
@@ -131,7 +131,7 @@ namespace Sass {
131131

132132
virtual bool operator==(const Expression& rhs) const override;
133133

134-
virtual size_t hash() const;
134+
virtual size_t hash() const override;
135135
enum Sass_OP optype() const { return op_.operand; }
136136
ATTACH_AST_OPERATIONS(Binary_Expression)
137137
ATTACH_CRTP_PERFORM_METHODS()
@@ -196,8 +196,8 @@ namespace Sass {
196196
ADD_CONSTREF(std::string, name)
197197
public:
198198
Variable(ParserState pstate, std::string n);
199-
virtual bool operator==(const Expression& rhs) const;
200-
virtual size_t hash();
199+
virtual bool operator==(const Expression& rhs) const override;
200+
virtual size_t hash() const override;
201201
ATTACH_AST_OPERATIONS(Variable)
202202
ATTACH_CRTP_PERFORM_METHODS()
203203
};
@@ -292,7 +292,7 @@ namespace Sass {
292292
Boolean(ParserState pstate, bool val);
293293
operator bool() override { return value_; }
294294

295-
std::string type() const { return "bool"; }
295+
std::string type() const override { return "bool"; }
296296
static std::string type_name() { return "bool"; }
297297

298298
size_t hash() const override;
@@ -343,7 +343,7 @@ namespace Sass {
343343
bool has_interpolants();
344344
void rtrim() override;
345345
size_t hash() const override;
346-
virtual void set_delayed(bool delayed);
346+
virtual void set_delayed(bool delayed) override;
347347

348348
bool operator==(const Expression& rhs) const override;
349349
ATTACH_AST_OPERATIONS(String_Schema)

0 commit comments

Comments
 (0)