r346705 - Fix the 'fixit' for inline namespace replacement.
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 12 13:08:42 PST 2018
Author: erichkeane
Date: Mon Nov 12 13:08:41 2018
New Revision: 346705
URL: http://llvm.org/viewvc/llvm-project?rev=346705&view=rev
Log:
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
Modified:
cfe/trunk/lib/Parse/ParseDeclCXX.cpp
Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=346705&r1=346704&r2=346705&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Mon Nov 12 13:08:41 2018
@@ -178,7 +178,10 @@ Parser::DeclGroupPtrTy Parser::ParseName
} else {
std::string NamespaceFix;
for (const auto &ExtraNS : ExtraNSs) {
- NamespaceFix += " { namespace ";
+ NamespaceFix += " { ";
+ if (ExtraNS.InlineLoc.isValid())
+ NamespaceFix += "inline ";
+ NamespaceFix += "namespace ";
NamespaceFix += ExtraNS.Ident->getName();
}
More information about the cfe-commits
mailing list