Fix clang build failure

Apparently opinion is divided on whether [[noreturn]] is allowed on a
lambda: http://stackoverflow.com/questions/26888805/how-to-declare-a-lambdas-operator-as-noreturn

http://hydra.nixos.org/build/36462100
This commit is contained in:
Eelco Dolstra 2016-05-31 13:23:54 +02:00
parent 759ac27f28
commit 10f3a2e5f2
2 changed files with 4 additions and 1 deletions

View file

@ -99,6 +99,8 @@ let
doInstallCheck = true; doInstallCheck = true;
installCheckFlags = "sysconfdir=$(out)/etc"; installCheckFlags = "sysconfdir=$(out)/etc";
stdenv = clangStdenv;
}); });

View file

@ -5,7 +5,7 @@ namespace nix {
NarInfo::NarInfo(const std::string & s, const std::string & whence) NarInfo::NarInfo(const std::string & s, const std::string & whence)
{ {
auto corrupt = [&]() [[noreturn]] { auto corrupt = [&]() {
throw Error("NAR info file %1% is corrupt"); throw Error("NAR info file %1% is corrupt");
}; };
@ -14,6 +14,7 @@ NarInfo::NarInfo(const std::string & s, const std::string & whence)
return parseHash(s); return parseHash(s);
} catch (BadHash &) { } catch (BadHash &) {
corrupt(); corrupt();
return Hash(); // never reached
} }
}; };