[PATCH] D65104: [clang-tidy] Add FixItHint for performance-noexcept-move-constructor

Zinovy Nis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 23 23:30:29 PDT 2019


zinovy.nis marked an inline comment as done.
zinovy.nis added inline comments.


================
Comment at: clang-tidy/performance/NoexceptMoveConstructorCheck.cpp:57
+      assert(Decl->getNumParams() > 0);
+      SourceLocation NoexceptLoc = Decl->getParamDecl(Decl->getNumParams() - 1)
+                                       ->getSourceRange()
----------------
aaron.ballman wrote:
> Does `getParamDecl()->getEndLoc()` not give the correct answer?
Unfortunately not. In that case 

`C_1(C_1&& a) :C_1(5) {}` turns into `C_1(C_1&& a noexcept) :C_1(5) {}`. instead of `C_1(C_1&& a) noexcept :C_1(5) {}`


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

https://reviews.llvm.org/D65104





More information about the cfe-commits mailing list