diff options
author | Steven Moreland <smoreland@google.com> | 2020-09-11 01:29:45 +0000 |
---|---|---|
committer | Treehugger Robot <treehugger-gerrit@google.com> | 2020-09-16 19:56:14 +0000 |
commit | 2178081cd90ebcd77c867d52a8b0e15f0d4134cc (patch) | |
tree | 60121b57b0dfab00beb6ccd38826a05a0567daee /aidl_language_y.yy | |
parent | 40d398a0d28ad652afe1168d3abc7cd5231ae4de (diff) | |
download | aidl-2178081cd90ebcd77c867d52a8b0e15f0d4134cc.tar.gz |
Use AIDL_* errors over libbase logging.
This:
- gives us line numbers in source AIDL files reflecting errors
- makes it possible aidl_parser_fuzzer can detect when we return an
error but don't provide any output logging
Bug: N/A
Test: aidl_unittest
Change-Id: I0479fd8d87547c1f0b1be754f9b8f6865db3cbef
Diffstat (limited to 'aidl_language_y.yy')
-rw-r--r-- | aidl_language_y.yy | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/aidl_language_y.yy b/aidl_language_y.yy index f081a878..7a37e602 100644 --- a/aidl_language_y.yy +++ b/aidl_language_y.yy @@ -17,7 +17,7 @@ %{ #include "aidl_language.h" #include "parser.h" -#include "aidl_language_y-module.h" +#include "aidl_language_y.h" #include "logging.h" #include <android-base/parseint.h> #include <set> @@ -29,9 +29,9 @@ int yylex(yy::parser::semantic_type *, yy::parser::location_type *, void *); AidlLocation loc(const yy::parser::location_type& begin, const yy::parser::location_type& end) { - CHECK(begin.begin.filename == begin.end.filename); - CHECK(begin.end.filename == end.begin.filename); - CHECK(end.begin.filename == end.end.filename); + AIDL_FATAL_IF(begin.begin.filename != begin.end.filename, AIDL_LOCATION_HERE); + AIDL_FATAL_IF(begin.end.filename != end.begin.filename, AIDL_LOCATION_HERE); + AIDL_FATAL_IF(end.begin.filename != end.end.filename, AIDL_LOCATION_HERE); AidlLocation::Point begin_point { .line = begin.begin.line, .column = begin.begin.column, |