diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-11-09 02:13:45 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-11-09 02:13:45 +0000 |
commit | 6ef920976a86aa710ccfeeeb7e14e9b38aef5007 (patch) | |
tree | 1d8e4c04fc498617bed8d91e296d4f0dae0f77b8 /lib/Sema/SemaCodeComplete.cpp | |
parent | 3d75ca836205856077c18e30e9447accbd85f751 (diff) |
Introduce proper spacing after the Objective-C parameter qualifiers
(bycopy, inout, etc.). Fixes <rdar://problem/10402900>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144157 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
-rw-r--r-- | lib/Sema/SemaCodeComplete.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index 2bff705060..3d2d0930d8 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/lib/Sema/SemaCodeComplete.cpp @@ -1998,25 +1998,20 @@ static void MaybeAddSentinel(ASTContext &Context, NamedDecl *FunctionOrMethod, } } -static void appendWithSpace(std::string &Result, StringRef Text) { - if (!Result.empty()) - Result += ' '; - Result += Text.str(); -} static std::string formatObjCParamQualifiers(unsigned ObjCQuals) { std::string Result; if (ObjCQuals & Decl::OBJC_TQ_In) - appendWithSpace(Result, "in"); + Result += "in "; else if (ObjCQuals & Decl::OBJC_TQ_Inout) - appendWithSpace(Result, "inout"); + Result += "inout "; else if (ObjCQuals & Decl::OBJC_TQ_Out) - appendWithSpace(Result, "out"); + Result += "out "; if (ObjCQuals & Decl::OBJC_TQ_Bycopy) - appendWithSpace(Result, "bycopy"); + Result += "bycopy "; else if (ObjCQuals & Decl::OBJC_TQ_Byref) - appendWithSpace(Result, "byref"); + Result += "byref "; if (ObjCQuals & Decl::OBJC_TQ_Oneway) - appendWithSpace(Result, "oneway"); + Result += "oneway "; return Result; } |