diff options
| author | Felka Chang <felkachang@google.com> | 2021-10-27 00:06:04 +0800 |
|---|---|---|
| committer | Felka Chang <felkachang@google.com> | 2021-10-29 03:09:55 +0800 |
| commit | 5cf069b2eac72abb31f7897388b7e97958394e83 (patch) | |
| tree | 5330d426c00dbbde88ee8769977b4a8c68b92207 /core/java/android/inputmethodservice/AbstractInputMethodService.java | |
| parent | 420aed221f26090c34247772fc72725500b83f3f (diff) | |
Fix bugprone-use-after-move in ResourceParser
This patch uses reinitialization to solve clang_tidy
bugprone-use-after-move warning in ResourceParser.
The local variables `comment` in functions is used to record comments
in XML. After calling std::move(comment), to use comment.clear() to
reinitialize the value of the variable `comment`.
Reference: https://clang.llvm.org/extra/clang-tidy/checks/\
bugprone-use-after-move.html
Test: export WITH_TIDY=1 ; \
rm -rf out/soong/.intermediates/frameworks/base/tools/aapt2* \
out/host/linux-x86/bin/aapt* \
out/host/windows-x86/bin/aapt* ;\
make aapt2
Bug: 150953574
Change-Id: I5658eaedf48e46fb5e7f12a510b83f490f9bc94b
Diffstat (limited to 'core/java/android/inputmethodservice/AbstractInputMethodService.java')
0 files changed, 0 insertions, 0 deletions
