Correctly print the type in modernize-make-unique.
Summary: Take into account the current LangOptions the check has to add back the template argument.
Reviewers: klimek
Subscribers: alexfh, cfe-commits
Differential Revision: http://reviews.llvm.org/D13983
llvm-svn: 251013
diff --git a/clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.cpp b/clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.cpp
index 9817797..b7c630c 100644
--- a/clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.cpp
@@ -79,8 +79,8 @@
// If the template argument is missing (because it is part of the alias)
// we have to add it back.
ConstructCallEnd = ConstructCallStart.getLocWithOffset(ExprStr.size());
- Diag << FixItHint::CreateInsertion(ConstructCallEnd,
- "<" + Type->getAsString() + ">");
+ Diag << FixItHint::CreateInsertion(
+ ConstructCallEnd, "<" + Type->getAsString(getLangOpts()) + ">");
} else {
ConstructCallEnd = ConstructCallStart.getLocWithOffset(LAngle);
}