aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/eval-cache.cc6
-rw-r--r--src/libexpr/nixexpr.cc8
-rw-r--r--src/libexpr/nixexpr.hh4
-rw-r--r--src/libexpr/parser/state.hh2
4 files changed, 14 insertions, 6 deletions
diff --git a/src/libexpr/eval-cache.cc b/src/libexpr/eval-cache.cc
index 83bfd4fb0..e7336c7e8 100644
--- a/src/libexpr/eval-cache.cc
+++ b/src/libexpr/eval-cache.cc
@@ -79,7 +79,7 @@ struct AttrDb
state->txn->commit();
state->txn.reset();
} catch (...) {
- ignoreException();
+ ignoreExceptionInDestructor();
}
}
@@ -90,7 +90,7 @@ struct AttrDb
try {
return fun();
} catch (SQLiteError &) {
- ignoreException();
+ ignoreExceptionExceptInterrupt();
failed = true;
return 0;
}
@@ -329,7 +329,7 @@ static std::shared_ptr<AttrDb> makeAttrDb(
try {
return std::make_shared<AttrDb>(cfg, fingerprint, symbols);
} catch (SQLiteError &) {
- ignoreException();
+ ignoreExceptionExceptInterrupt();
return nullptr;
}
}
diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc
index 68da254e2..4b659b71a 100644
--- a/src/libexpr/nixexpr.cc
+++ b/src/libexpr/nixexpr.cc
@@ -21,6 +21,14 @@ std::ostream & operator <<(std::ostream & str, const SymbolStr & symbol)
return printIdentifier(str, s);
}
+AttrName::AttrName(Symbol s) : symbol(s)
+{
+}
+
+AttrName::AttrName(std::unique_ptr<Expr> e) : expr(std::move(e))
+{
+}
+
void Expr::show(const SymbolTable & symbols, std::ostream & str) const
{
abort();
diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh
index d16281c39..4e857b321 100644
--- a/src/libexpr/nixexpr.hh
+++ b/src/libexpr/nixexpr.hh
@@ -30,8 +30,8 @@ struct AttrName
{
Symbol symbol;
std::unique_ptr<Expr> expr;
- AttrName(Symbol s) : symbol(s) {};
- AttrName(std::unique_ptr<Expr> e) : expr(std::move(e)) {};
+ AttrName(Symbol s);
+ AttrName(std::unique_ptr<Expr> e);
};
typedef std::vector<AttrName> AttrPath;
diff --git a/src/libexpr/parser/state.hh b/src/libexpr/parser/state.hh
index 1d57e2f5f..3b9b90b94 100644
--- a/src/libexpr/parser/state.hh
+++ b/src/libexpr/parser/state.hh
@@ -9,7 +9,7 @@ namespace nix::parser {
struct StringToken
{
std::string_view s;
- bool hasIndentation;
+ bool hasIndentation = false;
operator std::string_view() const { return s; }
};