Warnings can be promoted to errors.
But that shouldn't prevent us from getting the dependencies!
Differential Revision: https://reviews.llvm.org/D64149
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365065
91177308-0d34-0410-b5e6-
96231b3b80d8
--- /dev/null
+[
+{
+ "directory": "DIR",
+ "command": "clang -E DIR/no-werror.cpp -IInputs -std=c++17 -Weverything -Werror",
+ "file": "DIR/no-werror.cpp"
+}
+]
--- /dev/null
+#define MACRO 201411
--- /dev/null
+// RUN: rm -rf %t.dir
+// RUN: rm -rf %t.cdb
+// RUN: mkdir -p %t.dir
+// RUN: cp %s %t.dir/no-werror.cpp
+// RUN: mkdir %t.dir/Inputs
+// RUN: cp %S/Inputs/sys-header.h %t.dir/Inputs/sys-header.h
+// RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/no-werror.json > %t.cdb
+//
+// RUN: clang-scan-deps -compilation-database %t.cdb -j 1 | FileCheck %s
+
+#define MACRO 201411L
+
+#include "sys-header.h"
+
+// CHECK: no-werror.cpp
+// CHECK-NEXT: Inputs{{/|\\}}sys-header.h
AdjustedArgs.push_back("-Eonly");
AdjustedArgs.push_back("-Xclang");
AdjustedArgs.push_back("-sys-header-deps");
+ AdjustedArgs.push_back("-Wno-error");
return AdjustedArgs;
});