Printing for using directives, e.g.,
using namespace std::debug;
Extended UsingDirectiveDecl to store the nested-name-specifier that
precedes the nominated namespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72614 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 0bf97f5..cd722fe 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -1711,8 +1711,12 @@
while (CommonAncestor && !CommonAncestor->Encloses(CurContext))
CommonAncestor = CommonAncestor->getParent();
- UDir = UsingDirectiveDecl::Create(Context, CurContext, UsingLoc,
- NamespcLoc, IdentLoc,
+ UDir = UsingDirectiveDecl::Create(Context,
+ CurContext, UsingLoc,
+ NamespcLoc,
+ SS.getRange(),
+ (NestedNameSpecifier *)SS.getScopeRep(),
+ IdentLoc,
cast<NamespaceDecl>(NS),
CommonAncestor);
PushUsingDirective(S, UDir);