alexfh added a comment.

A few more nits.



================
Comment at: unittests/Tooling/DiagnosticsYamlTest.cpp:39
+
+  StringMap<Replacements> Fix1{
+    { "path/to/source.cpp", Replacements(Replacement("path/to/source.cpp", 100,
----------------
The assignment form of initialization is clearer for containers (and actually 
any type for which the initialization means "this variable is whatever is on 
the right side of the assignment" as opposed to "this variable is initialized 
by a constructor call taking these parameters").


================
Comment at: unittests/Tooling/DiagnosticsYamlTest.cpp:60
+
+  EXPECT_STREQ("---\n"
+    "MainSourceFile:  path/to/source.cpp\n"
----------------
Why not EXPECT_EQ (and remove `.c_str()` from the second argument)?


================
Comment at: unittests/clang-apply-replacements/ApplyReplacementsTest.cpp:27
+  TU.MainSourceFile = MainSourceFile;
+  TU.Diagnostics.push_back(Diagnostic(DiagnosticName, Message, Replacements, 
{}, 
+                                      Diagnostic::Warning, BuildDirectory));
----------------
I believe, this can be expressed a bit less verbosely, e.g. `TUs.push_back({ 
MainSourceFile, {Diagnostic(...)}});`.


Repository:
  rL LLVM

https://reviews.llvm.org/D34404



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

Reply via email to