This patch extends the removing using-namespace code action to remove
using-namespace decl that are present inside a namespace.
Goes over all the references that are declared in TargetNS and used in
ContainingNS. Removes the current qualifier and qualifies it with only
the TargetNS. No other qualifier is needed since it was legal to use
using namespace TargetNS inside ContainingNS. Therefore all target
references inside the ContainingNS can be qualified with just
TargetNS.
Limitations:
- The using decl must be present in TUDecl or directly under a NSDecl.
- Only references inside the DeclContext of using-decl are removed. Any references outside this DeclContext are retained as is which is incorrect.
NIT: could you add a short comment mentioning this is exactly the DeclContext of TargetDirective?