Build RS API doc generator with Android.bp
The RS API header/document generator should be compiled with a proper
Android.bp rather than relying on a hardcoded clang version. This CL
updates both the generate.sh and provides an Android.bp for the generator.
Also fixed a segfault caused by an old bug from advancing an invalidated
list iterator. The segfault was caught by switching toolchain and C++
library versions.
In addition, fixed warnings caught by -Werror.
Test: m
Test: run generate.sh and inspect the generated documents
Bug: 66509928
Change-Id: Ibbbaaf65a0d1fc8ca37d357d077530d351d112f5
diff --git a/script_api/GenerateDocumentation.cpp b/script_api/GenerateDocumentation.cpp
index fde096b..94af311 100644
--- a/script_api/GenerateDocumentation.cpp
+++ b/script_api/GenerateDocumentation.cpp
@@ -50,7 +50,7 @@
// Output only the first two lines. Assuming there's no other HTML
// markups there
// TODO: escape/remove markups
- for (int i = 0; i < std::min(desc.size(), 2UL); ++i) {
+ for (unsigned int i = 0; i < std::min(desc.size(), 2UL); ++i) {
if (i) *file << " ";
*file << desc[i];
}