Pull up IsUserDefined()
IsUserDefined() is an AidlNode with AIDL_LOCATION_HERE. These nodes are
skipped from lint/dump.
Bug: 218912230
Test: aidl_integration_test
Change-Id: Ic72fa2d0570b5d4b98f7a7cc05d114d7f294f7df
diff --git a/aidl_language.h b/aidl_language.h
index c73618f..1e52625 100644
--- a/aidl_language.h
+++ b/aidl_language.h
@@ -165,6 +165,7 @@
static void ClearUnvisitedNodes();
static const std::vector<AidlLocation>& GetLocationsOfUnvisitedNodes();
void MarkVisited() const;
+ bool IsUserDefined() const { return !GetLocation().IsInternal(); }
private:
std::string PrintLine() const;
@@ -854,8 +855,7 @@
AidlMethod(const AidlLocation& location, bool oneway, AidlTypeSpecifier* type, const string& name,
vector<unique_ptr<AidlArgument>>* args, const Comments& comments);
AidlMethod(const AidlLocation& location, bool oneway, AidlTypeSpecifier* type, const string& name,
- vector<unique_ptr<AidlArgument>>* args, const Comments& comments, int id,
- bool is_user_defined = true);
+ vector<unique_ptr<AidlArgument>>* args, const Comments& comments, int id);
virtual ~AidlMethod() = default;
// non-copyable, non-movable
@@ -877,8 +877,6 @@
int GetId() const { return id_; }
void SetId(unsigned id) { id_ = id; }
- bool IsUserDefined() const { return is_user_defined_; }
-
const std::vector<std::unique_ptr<AidlArgument>>& GetArguments() const {
return arguments_;
}
@@ -920,7 +918,6 @@
std::vector<const AidlArgument*> out_arguments_;
bool has_id_;
int id_;
- bool is_user_defined_ = true;
};
// AidlDefinedType represents either an interface, parcelable, or enum that is