alexfh added inline comments.

================
Comment at: clang-tidy/readability/RedundantStringInitCheck.cpp:26
@@ +25,3 @@
+void RedundantStringInitCheck::registerMatchers(
+    ast_matchers::MatchFinder *Finder) {
+  if (!getLangOpts().CPlusPlus)
----------------
nit: `ast_matchers::` can be omitted.

================
Comment at: clang-tidy/readability/RedundantStringInitCheck.cpp:54
@@ +53,3 @@
+void RedundantStringInitCheck::check(
+    const ast_matchers::MatchFinder::MatchResult &Result) {
+  const auto *CtorExpr = Result.Nodes.getNodeAs<Expr>("expr");
----------------
ditto

================
Comment at: test/clang-tidy/readability-redundant-string-init.cpp:1
@@ +1,2 @@
+// RUN: %check_clang_tidy %s readability-redundant-string-init %t
+
----------------
Please add test cases with:
  * a template with multiple instantiations
  * macros, something along the lines of:
```
       #define M(x) x
       M({ std::string a = ""; })
       #define M2 { std::string b = ""; }
       M2;
       M2;
```


http://reviews.llvm.org/D17586



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

Reply via email to