about the namespace

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

about the namespace

Nai XIA
Hi,I apologize if it is a stupid question.
It seems that the style of using namespace in LLVM confuses my "source
insight" and my ctags for correctly finding the implementation of a class
member. For example, the implementation of members of Instruction class is
written like this.

----------------
... ...
using namespace llvm;
Instruction::Instruction(...);
... ...
----------------

It seems that both sourceInsight and ctags trend to consider
Instruction::Instruction(...) as "::Instruction::Instruction(...)"
instead of "llvm::Instruction::Instruction(...)".

So I am just curious about that why the code is not written like this:

---------------
namespace llvm {

Instruction::Instruction(...);
... ...
}
---------------

Is there any reason for choosing the former style?


--
Regards,
Nai
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: about the namespace

Chris Lattner
On Thu, 1 Jun 2006, Nai Xia wrote:
> Is there any reason for choosing the former style?

No reason, other that it is more concise and clean.  You should file a bug
against those tools.

-Chris

--
http://nondot.org/sabre/
http://llvm.org/
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev