Avoid name conflicts in the generated C++ proxy code when arguments and results
share the same name, as in a method declaration
sendVec(vec<uint8_t> data) generates (vec<uint8_t> data);
Bug: 30778622
Test: hidl_test, hidl_test_java
Change-Id: I06a12025363b3ca10cb0d548c610c57bdf88af92
diff --git a/AST.h b/AST.h
index 7aa2ea9..2d64972 100644
--- a/AST.h
+++ b/AST.h
@@ -199,7 +199,9 @@
status_t generatePassthroughSource(Formatter &out) const;
void declareCppReaderLocals(
- Formatter &out, const std::vector<TypedVar *> &arg) const;
+ Formatter &out,
+ const std::vector<TypedVar *> &arg,
+ bool forResults) const;
void emitCppReaderWriter(
Formatter &out,
@@ -207,7 +209,8 @@
bool parcelObjIsPointer,
const TypedVar *arg,
bool isReader,
- Type::ErrorMode mode) const;
+ Type::ErrorMode mode,
+ bool addPrefixToName) const;
void emitJavaReaderWriter(
Formatter &out,