mirror of
https://github.com/NixOS/nix
synced 2025-07-02 13:31:48 +02:00
Merge pull request #12071 from Mic92/clang-tidy
Prepare nix to run with clang-tidy
This commit is contained in:
commit
3f3feae33e
23 changed files with 75 additions and 24 deletions
|
@ -1,5 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
// inluding the generated headers twice leads to errors
|
||||
#ifndef BISON_HEADER
|
||||
# include "lexer-tab.hh"
|
||||
# include "parser-tab.hh"
|
||||
#endif
|
||||
|
||||
namespace nix::lexer::internal {
|
||||
|
||||
void initLoc(YYLTYPE * loc);
|
||||
|
|
|
@ -168,7 +168,7 @@ struct ExprVar : Expr
|
|||
the set stored in the environment that is `level` levels up
|
||||
from the current one.*/
|
||||
Level level;
|
||||
Displacement displ;
|
||||
Displacement displ = 0;
|
||||
|
||||
ExprVar(Symbol name) : name(name) { };
|
||||
ExprVar(const PosIdx & pos, Symbol name) : pos(pos), name(name) { };
|
||||
|
@ -242,7 +242,7 @@ struct ExprAttrs : Expr
|
|||
Kind kind;
|
||||
Expr * e;
|
||||
PosIdx pos;
|
||||
Displacement displ; // displacement
|
||||
Displacement displ = 0; // displacement
|
||||
AttrDef(Expr * e, const PosIdx & pos, Kind kind = Kind::Plain)
|
||||
: kind(kind), e(e), pos(pos) { };
|
||||
AttrDef() { };
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <limits>
|
||||
#include <stddef.h>
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue