Merge "Change const char* to std::string"
diff --git a/EnumType.cpp b/EnumType.cpp
index 9f483cc..16de94b 100644
--- a/EnumType.cpp
+++ b/EnumType.cpp
@@ -324,7 +324,12 @@
elementCount += type->mValues.size();
}
- out << "template<> constexpr std::array<" << getCppStackType() << ", " << elementCount
+ // TODO(pcc): Remove the pragmas once all users of the hidl headers have
+ // been moved to C++17.
+ out << "#pragma clang diagnostic push\n";
+ out << "#pragma clang diagnostic ignored \"-Wc++17-extensions\"\n";
+
+ out << "template<> inline constexpr std::array<" << getCppStackType() << ", " << elementCount
<< "> hidl_enum_values<" << getCppStackType() << "> = ";
out.block([&] {
auto enumerators = typeChain();
@@ -335,6 +340,8 @@
}
}
}) << ";\n";
+
+ out << "#pragma clang diagnostic pop\n";
}
void EnumType::emitEnumBitwiseOperator(
diff --git a/utils/FqInstance.cpp b/utils/FqInstance.cpp
index c0793f7..3404356 100644
--- a/utils/FqInstance.cpp
+++ b/utils/FqInstance.cpp
@@ -62,6 +62,10 @@
return !mInstance.empty();
}
+const FQName& FqInstance::getFqName() const {
+ return mFqName;
+}
+
bool FqInstance::isValid() const {
bool hasPkg = hasPackage();
bool hasVer = hasVersion();
diff --git a/utils/include/hidl-util/FqInstance.h b/utils/include/hidl-util/FqInstance.h
index 982bae0..77f7116 100644
--- a/utils/include/hidl-util/FqInstance.h
+++ b/utils/include/hidl-util/FqInstance.h
@@ -42,6 +42,7 @@
std::pair<size_t, size_t> getVersion() const;
const std::string& getInterface() const;
const std::string& getInstance() const;
+ const FQName& getFqName() const;
bool hasPackage() const;
bool hasVersion() const;