From 2178081cd90ebcd77c867d52a8b0e15f0d4134cc Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Fri, 11 Sep 2020 01:29:45 +0000 Subject: 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 --- aidl_language_y.yy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'aidl_language_y.yy') 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 #include @@ -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, -- cgit v1.2.3