Pass a Loc into FindEmulator for better warnings
Before this change, we'd only get a warning from FindEmulator, with no
idea which makefile caused it:
FindEmulator: find: `tests': No such file or directory
With this change, we'll get a better idea of which line triggered that
problem:
cts/tests/tests/content/Android.mk:43: FindEmulator: find: `test': No such file or directory
And it will be colorized like any other location-based warning with the
previous patch if --color_warnings is turned on.
diff --git a/find.h b/find.h
index 1eee1e6..9af261a 100644
--- a/find.h
+++ b/find.h
@@ -20,6 +20,7 @@
#include <unordered_set>
#include <vector>
+#include "loc.h"
#include "string_piece.h"
using namespace std;
@@ -62,7 +63,7 @@
virtual ~FindEmulator() = default;
virtual bool HandleFind(const string& cmd, const FindCommand& fc,
- string* out) = 0;
+ const Loc& loc, string* out) = 0;
static FindEmulator* Get();