vladimir.plyashkun added inline comments.
================ Comment at: unittests/clang-apply-replacements/ApplyReplacementsTest.cpp:18 + +static tooling::Diagnostic makeDiagnostic(const StringRef DiagnosticName, + DiagnosticMessage &Message, ---------------- alexfh wrote: > I'd remove `const` from `DiagnosticName`, since a StringRef doesn't allow to > modify the string it points to (and marking by value arguments `const` is not > common in LLVM). However, `Message` and `Replacements` allow to modify the > referenced objects and thus should be marked `const`. > > Also consider inlining this method, it doesn't buy you much. Same for here. Constructor for `Diagnostic` class requires non-const references for `Message` and `Replacements` arguments. So, it's invalid to mark them as `const`. 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