[clang-tidy] ignore NRVO const variables in performance-no-automatic-move.
In the following code: ```cc struct Obj { Obj(); Obj(const Obj &); Obj(Obj &&); virtual ~Obj(); }; Obj ConstNrvo() { const Obj obj; return obj; } ``` performance-no-automatic-move warns about the constness of `obj`. However, NRVO is applied to `obj`, so the `const` should have no effect on performance. This change modifies the matcher to exclude NRVO variables. #clang-tidy Reviewed By: courbet, PiotrZSL Differential Revision: https://reviews.llvm.org/D147419
Loading
Please sign in to comment