malcolm.parsons added a comment.

`{}` doesn't allow narrowing; can you check for that?



================
Comment at: clang-tidy/modernize/ReturnBracedInitListCheck.cpp:50
+  SourceLocation Loc = MatchedConstructExpr->getExprLoc();
+  if (Loc.isMacroID())
+    return;
----------------
Test?


================
Comment at: clang-tidy/modernize/ReturnBracedInitListCheck.cpp:56
+  const QualType constructType = MatchedConstructExpr->getType();
+  if (returnType != constructType)
+    return;
----------------
Test?


================
Comment at: clang-tidy/modernize/ReturnBracedInitListCheck.cpp:65
+  // Return if there is no explicit constructor call.
+  if (CallParensRange.isInvalid())
+    return;
----------------
Test?


================
Comment at: clang-tidy/modernize/ReturnBracedInitListCheck.cpp:68
+
+  Diag << FixItHint::CreateRemoval(MatchedConstructExpr->getLocStart());
+  Diag << FixItHint::CreateReplacement(
----------------
What happens for multi-token types like `vector<int>`?


Repository:
  rL LLVM

https://reviews.llvm.org/D28768



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to