Introduce a "-fixit" mode to clang-cc that applies code-modification hints.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68268 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index c2928dc..feb127b 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -1309,7 +1309,7 @@
if (Context.getCanonicalType(ParamType).getUnqualifiedType() == ClassTy) {
SourceLocation ParamLoc = Constructor->getParamDecl(0)->getLocation();
Diag(ParamLoc, diag::err_constructor_byvalue_arg)
- << CodeModificationHint::CreateInsertion(ParamLoc, "const &");
+ << CodeModificationHint::CreateInsertion(ParamLoc, " const &");
Invalid = true;
}
}