Loading tools/aapt2/ResourceParser.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -445,6 +445,7 @@ bool ResourceParser::ParseResources(xml::XmlPullParser* parser) { ParsedResource parsed_resource; parsed_resource.config = config_; parsed_resource.source = source_.WithLine(parser->line_number()); // NOLINTNEXTLINE(bugprone-use-after-move) move+reset comment parsed_resource.comment = std::move(comment); if (options_.visibility) { parsed_resource.visibility_level = options_.visibility.value(); Loading Loading @@ -977,6 +978,7 @@ bool ResourceParser::ParsePublicGroup(xml::XmlPullParser* parser, ParsedResource child_resource.name.type = *parsed_type; child_resource.name.entry = maybe_name.value().to_string(); child_resource.id = next_id; // NOLINTNEXTLINE(bugprone-use-after-move) move+reset comment child_resource.comment = std::move(comment); child_resource.source = item_source; child_resource.visibility_level = Visibility::Level::kPublic; Loading Loading @@ -1703,6 +1705,7 @@ bool ResourceParser::ParseDeclareStyleable(xml::XmlPullParser* parser, ParsedResource child_resource; child_resource.name = child_ref.name.value(); child_resource.source = item_source; // NOLINTNEXTLINE(bugprone-use-after-move) move+reset comment child_resource.comment = std::move(comment); if (options_.visibility) { child_resource.visibility_level = options_.visibility.value(); Loading tools/aapt2/util/BigBuffer_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ TEST(BigBufferTest, AppendAndMoveBlock) { *b1 = 44; buffer.AppendBuffer(std::move(buffer2)); EXPECT_EQ(0u, buffer2.size()); EXPECT_EQ(0u, buffer2.size()); // NOLINT EXPECT_EQ(buffer2.begin(), buffer2.end()); } Loading tools/aapt2/xml/XmlDom.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -305,6 +305,8 @@ std::unique_ptr<XmlResource> Inflate(const void* data, size_t len, std::string* if (pending_element == nullptr) { pending_element = util::make_unique<Element>(); } // pending_element is not nullptr // NOLINTNEXTLINE(bugprone-use-after-move) pending_element->namespace_decls.push_back(std::move(decl)); break; } Loading Loading
tools/aapt2/ResourceParser.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -445,6 +445,7 @@ bool ResourceParser::ParseResources(xml::XmlPullParser* parser) { ParsedResource parsed_resource; parsed_resource.config = config_; parsed_resource.source = source_.WithLine(parser->line_number()); // NOLINTNEXTLINE(bugprone-use-after-move) move+reset comment parsed_resource.comment = std::move(comment); if (options_.visibility) { parsed_resource.visibility_level = options_.visibility.value(); Loading Loading @@ -977,6 +978,7 @@ bool ResourceParser::ParsePublicGroup(xml::XmlPullParser* parser, ParsedResource child_resource.name.type = *parsed_type; child_resource.name.entry = maybe_name.value().to_string(); child_resource.id = next_id; // NOLINTNEXTLINE(bugprone-use-after-move) move+reset comment child_resource.comment = std::move(comment); child_resource.source = item_source; child_resource.visibility_level = Visibility::Level::kPublic; Loading Loading @@ -1703,6 +1705,7 @@ bool ResourceParser::ParseDeclareStyleable(xml::XmlPullParser* parser, ParsedResource child_resource; child_resource.name = child_ref.name.value(); child_resource.source = item_source; // NOLINTNEXTLINE(bugprone-use-after-move) move+reset comment child_resource.comment = std::move(comment); if (options_.visibility) { child_resource.visibility_level = options_.visibility.value(); Loading
tools/aapt2/util/BigBuffer_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ TEST(BigBufferTest, AppendAndMoveBlock) { *b1 = 44; buffer.AppendBuffer(std::move(buffer2)); EXPECT_EQ(0u, buffer2.size()); EXPECT_EQ(0u, buffer2.size()); // NOLINT EXPECT_EQ(buffer2.begin(), buffer2.end()); } Loading
tools/aapt2/xml/XmlDom.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -305,6 +305,8 @@ std::unique_ptr<XmlResource> Inflate(const void* data, size_t len, std::string* if (pending_element == nullptr) { pending_element = util::make_unique<Element>(); } // pending_element is not nullptr // NOLINTNEXTLINE(bugprone-use-after-move) pending_element->namespace_decls.push_back(std::move(decl)); break; } Loading