aboutsummaryrefslogtreecommitdiff
path: root/find.h
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2017-02-22 15:38:33 -0800
committerDan Willemsen <dwillemsen@google.com>2017-02-22 22:42:02 -0800
commit692e64ebf83bc87baca6e3c90c3d0b2849655d75 (patch)
tree1b666b46ac573692d5031690650a533c64a5d903 /find.h
parente41c7556c22bda359c2b97cd98d59082110add95 (diff)
downloadkati-692e64ebf83bc87baca6e3c90c3d0b2849655d75.tar.gz
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.
Diffstat (limited to 'find.h')
-rw-r--r--find.h3
1 files changed, 2 insertions, 1 deletions
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 @@ class FindEmulator {
virtual ~FindEmulator() = default;
virtual bool HandleFind(const string& cmd, const FindCommand& fc,
- string* out) = 0;
+ const Loc& loc, string* out) = 0;
static FindEmulator* Get();