[clang-tools-extra] r244596 - Default initialize from explicitly constructed object.
Manuel Klimek via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 11 05:13:15 PDT 2015
Author: klimek
Date: Tue Aug 11 07:13:15 2015
New Revision: 244596
URL: http://llvm.org/viewvc/llvm-project?rev=244596&view=rev
Log:
Default initialize from explicitly constructed object.
Modified:
clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h
Modified: clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h?rev=244596&r1=244595&r2=244596&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h (original)
+++ clang-tools-extra/trunk/unittests/clang-tidy/ClangTidyTest.h Tue Aug 11 07:13:15 2015
@@ -48,7 +48,8 @@ runCheckOnCode(StringRef Code, std::vect
const Twine &Filename = "input.cc",
ArrayRef<std::string> ExtraArgs = None,
const ClangTidyOptions &ExtraOptions = ClangTidyOptions(),
- std::map<StringRef, StringRef> PathsToContent = {}) {
+ std::map<StringRef, StringRef> PathsToContent =
+ std::map<StringRef, StringRef>()) {
ClangTidyOptions Options = ExtraOptions;
Options.Checks = "*";
ClangTidyContext Context(llvm::make_unique<DefaultOptionsProvider>(
@@ -70,7 +71,7 @@ runCheckOnCode(StringRef Code, std::vect
tooling::ToolInvocation Invocation(
ArgCXX11, new TestClangTidyAction(Check, Finder, Context), Files.get());
Invocation.mapVirtualFile(Filename.str(), Code);
- for (const auto & FileContent : PathsToContent) {
+ for (const auto &FileContent : PathsToContent) {
Invocation.mapVirtualFile(Twine("include/" + FileContent.first).str(),
FileContent.second);
}
More information about the cfe-commits
mailing list