Browse Source

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
Erich Keane 6 năm trước cách đây
mục cha
commit
01bad5891e
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      lib/Parse/ParseDeclCXX.cpp

+ 4 - 1
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();
       }