[PATCH] D55307: [analyzer] MoveChecker Pt.6: Suppress the warning for the few move-safe STL classes.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 5 10:44:19 PST 2018


NoQ updated this revision to Diff 176856.
NoQ marked an inline comment as done.
NoQ added a comment.

Convert the pointer to a reference.

In D55307#1320434 <https://reviews.llvm.org/D55307#1320434>, @Szelethus wrote:

> > Had to pass the checker into the visitor and make some methods non-static because globals with constructors are discouraged.
>
> How about making the set `constexpr`?


Mmm, i don't think it works this way, even `std::set` can't be made `constexpr` yet as of C++17, let alone an LLVM custom collection. It should be possible to make a `constexpr` array, but we'll lose the presumably-faster lookup this way, so not really worth it; the cost is minimal anyway.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55307/new/

https://reviews.llvm.org/D55307

Files:
  lib/StaticAnalyzer/Checkers/MoveChecker.cpp
  test/Analysis/Inputs/system-header-simulator-cxx.h
  test/Analysis/diagnostics/explicit-suppression.cpp
  test/Analysis/use-after-move.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55307.176856.patch
Type: text/x-patch
Size: 9896 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181205/d1faeeff/attachment.bin>


More information about the cfe-commits mailing list