diff options
author | Devin Moore <devinmoore@google.com> | 2020-03-25 14:03:35 -0700 |
---|---|---|
committer | Devin Moore <devinmoore@google.com> | 2020-03-30 22:23:46 +0000 |
commit | df93ebb1ba4185af82c703d002c02c63f2b26216 (patch) | |
tree | e96cf4bfbb671279047c87c8245ff676df513aad /aidl_language_y.yy | |
parent | fa31d227a7624c0faf5932724d94b397cb35de39 (diff) | |
download | aidl-df93ebb1ba4185af82c703d002c02c63f2b26216.tar.gz |
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
Diffstat (limited to 'aidl_language_y.yy')
-rw-r--r-- | aidl_language_y.yy | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |