1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

Fix some clang-tidy warnings

(cherry picked from commit c0ad5d36c4)
This commit is contained in:
Eelco Dolstra 2025-04-07 17:55:20 +02:00 committed by Mergify
parent 467a1df842
commit 85902fad58

View file

@ -65,7 +65,7 @@ struct DocComment {
struct AttrName struct AttrName
{ {
Symbol symbol; Symbol symbol;
Expr * expr; Expr * expr = nullptr;
AttrName(Symbol s) : symbol(s) {}; AttrName(Symbol s) : symbol(s) {};
AttrName(Expr * e) : expr(e) {}; AttrName(Expr * e) : expr(e) {};
}; };
@ -159,7 +159,7 @@ struct ExprVar : Expr
`nullptr`: Not from a `with`. `nullptr`: Not from a `with`.
Valid pointer: the nearest, innermost `with` expression to query first. */ Valid pointer: the nearest, innermost `with` expression to query first. */
ExprWith * fromWith; ExprWith * fromWith = nullptr;
/* In the former case, the value is obtained by going `level` /* In the former case, the value is obtained by going `level`
levels up from the current environment and getting the levels up from the current environment and getting the
@ -167,7 +167,7 @@ struct ExprVar : Expr
value is obtained by getting the attribute named `name` from value is obtained by getting the attribute named `name` from
the set stored in the environment that is `level` levels up the set stored in the environment that is `level` levels up
from the current one.*/ from the current one.*/
Level level; Level level = 0;
Displacement displ = 0; Displacement displ = 0;
ExprVar(Symbol name) : name(name) { }; ExprVar(Symbol name) : name(name) { };