summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.cpp
diff options
context:
space:
mode:
authorAngel Garcia Gomez <angelgarcia@google.com>2015-10-22 13:20:49 +0000
committerAngel Garcia Gomez <angelgarcia@google.com>2015-10-22 13:20:49 +0000
commit37ab7fda4c2f2c28ac8a46867fcda3ddf5cbd44e (patch)
treea6f3dd01e14c46d6b311e7273576a1e51e0357d0 /clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.cpp
parent1d88d6f28998c6fe387b4208c2bbd77f29108914 (diff)
downloadbcm5719-llvm-37ab7fda4c2f2c28ac8a46867fcda3ddf5cbd44e.tar.gz
bcm5719-llvm-37ab7fda4c2f2c28ac8a46867fcda3ddf5cbd44e.zip
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
Diffstat (limited to 'clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.cpp b/clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.cpp
index 98177975eaa..b7c630c87b5 100644
--- a/clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.cpp
@@ -79,8 +79,8 @@ void MakeUniqueCheck::check(const MatchFinder::MatchResult &Result) {
// 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);
}
OpenPOWER on IntegriCloud