commit | bb64200e166cbe8aaa80a339dba852b8275e7180 | [log] [tgz] |
---|---|---|
author | Alexander Kornienko <alexfh@google.com> | Wed Feb 08 14:56:16 2017 +0000 |
committer | Alexander Kornienko <alexfh@google.com> | Wed Feb 08 14:56:16 2017 +0000 |
tree | 3b06b052ad15380322349d7a63fce40ff3d435be | |
parent | 2933875cc25a59da995e37f7e95ae90c5b95f229 [diff] [blame] |
[clang-tidy] Supresses misc-move-constructor-init warning for const fields. Patch by CJ DiMeglio! Differential revision: https://reviews.llvm.org/D28973 llvm-svn: 294459
diff --git a/clang-tools-extra/clang-tidy/misc/MoveConstructorInitCheck.cpp b/clang-tools-extra/clang-tidy/misc/MoveConstructorInitCheck.cpp index 5d098722..081c439 100644 --- a/clang-tools-extra/clang-tidy/misc/MoveConstructorInitCheck.cpp +++ b/clang-tools-extra/clang-tidy/misc/MoveConstructorInitCheck.cpp
@@ -57,6 +57,9 @@ if (QT.isTriviallyCopyableType(*Result.Context)) return; + if (QT.isConstQualified()) + return; + const auto *RD = QT->getAsCXXRecordDecl(); if (RD && RD->isTriviallyCopyable()) return;