From: Erich Keane Date: Mon, 12 Nov 2018 21:08:41 +0000 (+0000) Subject: Fix the 'fixit' for inline namespace replacement. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=01bad5891ee5124df4c21328f75bf22c6e0228bd;p=clang Fix the 'fixit' for inline namespace replacement. I'd neglected to add to the fixit for r346677. Richard Smith mentioned this in a review-after-commit, so fixing it here. Change-Id: I77e612be978d4eedda8d5bbd60b812b88f875cda git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346705 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index 85c972f410..d29ce240d9 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/lib/Parse/ParseDeclCXX.cpp @@ -178,7 +178,10 @@ Parser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, } else { std::string NamespaceFix; for (const auto &ExtraNS : ExtraNSs) { - NamespaceFix += " { namespace "; + NamespaceFix += " { "; + if (ExtraNS.InlineLoc.isValid()) + NamespaceFix += "inline "; + NamespaceFix += "namespace "; NamespaceFix += ExtraNS.Ident->getName(); }