warning: import should introduce unique simple name

Importing two different types with the same simple name is not allowed.

- collision with other imports

  import q.Bar;
  import r.Bar; // error

- collision with top-level type decl's name

  import q.Bar; // error
  parcelable Bar { .. }

Bug: 190782365
Test: aidl_unittests
Test: m
Change-Id: I13c0bde3f710d8230c61c1f0bb9680ea32f980eb
diff --git a/aidl_language.h b/aidl_language.h
index deb530a..77c8d0a 100644
--- a/aidl_language.h
+++ b/aidl_language.h
@@ -1193,6 +1193,7 @@
   AidlImport& operator=(AidlImport&&) = delete;
 
   const std::string& GetNeededClass() const { return needed_class_; }
+  std::string SimpleName() const { return needed_class_.substr(needed_class_.rfind('.') + 1); }
   void TraverseChildren(std::function<void(const AidlNode&)>) const {}
   void DispatchVisit(AidlVisitor& v) const { v.Visit(*this); }