about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/parser.hh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libexpr/parser.hh')
-rw-r--r--third_party/nix/src/libexpr/parser.hh11
1 files changed, 11 insertions, 0 deletions
diff --git a/third_party/nix/src/libexpr/parser.hh b/third_party/nix/src/libexpr/parser.hh
index 7592e3f82ce6..7b8f95573176 100644
--- a/third_party/nix/src/libexpr/parser.hh
+++ b/third_party/nix/src/libexpr/parser.hh
@@ -34,6 +34,15 @@ struct ParseData : public gc {
         sLetBody(symbols.Create("<let-body>")){};
 };
 
+// Clang fails to identify these functions as used, probably because
+// of some interaction between the lexer/parser codegen and something
+// else.
+//
+// To avoid warnings for that we disable -Wunused-function in this block.
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+
 // TODO(tazjin): move dupAttr to anonymous namespace
 static void dupAttr(const AttrPath& attrPath, const Pos& pos,
                     const Pos& prevPos) {
@@ -85,4 +94,6 @@ static Expr* unescapeStr(SymbolTable& symbols, const char* s, size_t length) {
   return new ExprString(symbols.Create(t));
 }
 
+#pragma clang diagnostic pop  // re-enable -Wunused-function
+
 }  // namespace nix