khuttun added a comment.

The checker reports 7 warnings on LLVM + Clang code bases, all on 
std::unique_ptr::release:

lib/Bitcode/Reader/BitReader.cpp:114:3

- release() called on moved-from unique_ptr
- no harm, just unnecessary

lib/ExecutionEngine/ExecutionEngine.cpp:149:7

- release() called before erasing unique_ptr from a container
- false positive?

lib/Target/AMDGPU/GCNIterativeScheduler.cpp:196:5

- release() called before assigning new pointer to unique_ptr
- false positive?

lib/AsmParser/LLParser.cpp:855:3

- get() + release() could be replaced with release()

tools/clang/lib/Lex/ModuleMap.cpp:791:3

- false positive?

tools/clang/tools/extra/clangd/Compiler.cpp:61:3

- get() + release() could potentially be replaced with release()?

unittests/Support/Casting.cpp:144:3

- release() called to avoid calling delete on a pointer to global object
- false positive?


https://reviews.llvm.org/D41655



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to