[PATCH] D40937: [clang-tidy] Infinite loop checker

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 7 05:23:32 PST 2017


martong added inline comments.


================
Comment at: clang-tidy/misc/InfiniteLoopCheck.cpp:105
+  return llvm::make_unique<ExprSequence>(
+      *(new ExprSequence(TheCFG.get(), &ASTCtx)));
+}
----------------
`make_unique` is a forwarding function, therefore there is no need to create an object and then move it. Instead you can simply forward the arguments to the constructor:
`return llvm::make_unique<ExprSequence>(TheCFG.get(), &ASTCtx)`


https://reviews.llvm.org/D40937





More information about the cfe-commits mailing list