Thanks Dimitry Andric for the report and fix!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292032
91177308-0d34-0410-b5e6-
96231b3b80d8
// Create phony targets if requested.
if (PhonyTarget && !Files.empty()) {
// Skip the first entry, this is always the input file itself.
- for (StringRef File : Files) {
+ for (auto I = Files.begin() + 1, E = Files.end(); I != E; ++I) {
OS << '\n';
- PrintFilename(OS, File, OutputFormat);
+ PrintFilename(OS, *I, OutputFormat);
OS << ":\n";
}
}
// RUN: FileCheck -check-prefix=TEST5 %s < %t.d
// TEST5: foo $$(bar) b az qu\ ux \ space:
+// Test self dependency, PR31644
+
+// RUN: %clang -E -MD -MP -MF %t.d %s
+// RUN: FileCheck -check-prefix=TEST6 %s < %t.d
+// TEST6: dependencies-and-pp.c
+// TEST6-NOT: dependencies-and-pp.c:
+
// TODO: Test default target without quoting
// TODO: Test default target with quoting