[PATCH] D36075: [refactor] Initial support for refactoring action rules

Alexander Shaposhnikov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 18 10:04:10 PDT 2017


alexshap added inline comments.


================
Comment at: include/clang/Basic/DiagnosticOr.h:40
+  /// diagnostic.
+  DiagnosticOr(PartialDiagnosticAt Diagnostic) : HasDiagnostic(true) {
+    new (getDiagnosticStorage()) PartialDiagnosticAt(std::move(Diagnostic));
----------------
explicit ?


================
Comment at: include/clang/Basic/DiagnosticOr.h:49
+      OtherT &&Val,
+      typename std::enable_if<std::is_convertible<OtherT, T>::value>::type * =
+          nullptr)
----------------
 but probably it would be a bit cleaner to enable SFINAE via a template parameter (http://en.cppreference.com/w/cpp/types/enable_if , option #4) rather than via extra argument.


================
Comment at: include/clang/Tooling/Refactoring/RefactoringResult.h:27
+
+  RefactoringResult(AtomicChange Change) : Kind(AtomicChanges) {
+    Changes.push_back(std::move(Change));
----------------
explicit ?


Repository:
  rL LLVM

https://reviews.llvm.org/D36075





More information about the cfe-commits mailing list