mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 381032 - NameWriter extended for fully qualified names.
Extended the NameWriter for allowing ASTWriter to write fully qualified names correctly with a leading scope (::). Added one simple test to verify this functionality. Cosmetic fix: Formatting adapted to environment and removed superfluous trailing tabs. Change-Id: I7eec92666d49a93b47a1906a75169dd42ba41eb1 Reviewed-on: https://git.eclipse.org/r/6170 Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com> IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com> Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
This commit is contained in:
parent
c7438e0708
commit
6f95407bd5
2 changed files with 7 additions and 0 deletions
|
@ -6,6 +6,10 @@ int Hallo;
|
|||
//%CPP
|
||||
int TestClass::Hallo;
|
||||
|
||||
//!FullyQualifiedName
|
||||
//%CPP
|
||||
int ::name;
|
||||
|
||||
//!OperatorName
|
||||
//%CPP
|
||||
class Foo
|
||||
|
|
|
@ -118,6 +118,9 @@ public class NameWriter extends NodeWriter {
|
|||
}
|
||||
|
||||
private void writeQualifiedName(ICPPASTQualifiedName qname) {
|
||||
if (qname.isFullyQualified()) {
|
||||
scribe.print(COLON_COLON);
|
||||
}
|
||||
IASTName[] nodes = qname.getNames();
|
||||
for (int i = 0; i < nodes.length; ++i) {
|
||||
nodes[i].accept(visitor);
|
||||
|
|
Loading…
Add table
Reference in a new issue