commit | 9d3cbe2954705c3ac1d2f4f0ba389155c271758c | [log] [tgz] |
---|---|---|
author | Jooyung Han <jooyung@google.com> | Mon Dec 28 03:02:08 2020 +0900 |
committer | Jooyung Han <jooyung@google.com> | Tue Jan 05 23:50:57 2021 +0000 |
tree | f5bfc41da17fcca715fb104cc54090093984c15d | |
parent | b3cd63f83187dd773a8033d001ea06e975dfc9da [diff] |
refactor: remove AidlConstantReference::SetRefType A constant reference is composed of <type>.<field>. But when <type> is missing, <field> is looked up from the defining type (the current scope). e.g. enum Enum { A = 0, B = A }; // the second "A" refers to "Enum.A" Previously, when <type> is missing, we create AidlTypeSpecifer for the current scope type and set it as AidlConstantReference's type. However, the purpose of AidlTypeSpecifier is to resolve it to a AidlDefinedType to look up <field> from it. In the above example, AidlTypeSpecifier("Enum") is created and resolved to "Enum" type. Because we already know the scope type, creating AidlTypeSpecifier and resolve it again is meaningless. When traversing AST, these manually created nodes should be skipped with additional flags. (e.g. user_defined_xxx). Let's avoid creating AST nodes manually. Bug: none Test: m aidl_unittests Change-Id: I3965e571875c6b6a1c7c237f0b4628d362958d46
Documentation for this project is currently maintained here:
https://source.android.com/devices/architecture/aidl/overview