From df93ebb1ba4185af82c703d002c02c63f2b26216 Mon Sep 17 00:00:00 2001 From: Devin Moore Date: Wed, 25 Mar 2020 14:03:35 -0700 Subject: Changing enum autofill to use aidl file location instead of cpp This location is printed when there are any issues with the aidl node. In this case, when implicitly starting enumerators from 0 or implicitly adding 1 to the next enumerator, we are now using the location of that enumerator in the .aidl files instead of the .cpp file. This is intended to give more useful information to the user. Added a check to make sure we don't output internal file locations. Test: atest aidl_unittests aidl_integration_test Change-Id: I0b2b7a18e69c313668aea395a2a02a77ae27dfc1 --- aidl_language_y.yy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'aidl_language_y.yy') diff --git a/aidl_language_y.yy b/aidl_language_y.yy index 67a7b11b..3a1fda93 100644 --- a/aidl_language_y.yy +++ b/aidl_language_y.yy @@ -39,7 +39,7 @@ AidlLocation loc(const yy::parser::location_type& begin, const yy::parser::locat .line = end.end.line, .column = end.end.column, }; - return AidlLocation(*begin.begin.filename, begin_point, end_point); + return AidlLocation(*begin.begin.filename, begin_point, end_point, AidlLocation::Source::EXTERNAL); } AidlLocation loc(const yy::parser::location_type& l) { -- cgit v1.2.3