[cfe-commits] r67962 - in /cfe/trunk: include/clang/AST/DeclCXX.h include/clang/AST/DeclNodes.def lib/AST/DeclCXX.cpp lib/Sema/SemaDeclCXX.cpp

Douglas Gregor dgregor at apple.com
Mon Mar 30 09:49:57 PDT 2009


On Mar 28, 2009, at 3:58 PM, Anders Carlsson wrote:

> Author: andersca
> Date: Sat Mar 28 17:58:02 2009
> New Revision: 67962
>
> URL: http://llvm.org/viewvc/llvm-project?rev=67962&view=rev
> Log:
> Create AST nodes for namespace aliases.
>
> Modified:
>    cfe/trunk/include/clang/AST/DeclCXX.h
>    cfe/trunk/include/clang/AST/DeclNodes.def
>    cfe/trunk/lib/AST/DeclCXX.cpp
>    cfe/trunk/lib/Sema/SemaDeclCXX.cpp
>
> Modified: cfe/trunk/include/clang/AST/DeclCXX.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=67962&r1=67961&r2=67962&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/include/clang/AST/DeclCXX.h (original)
> +++ cfe/trunk/include/clang/AST/DeclCXX.h Sat Mar 28 17:58:02 2009
> @@ -953,6 +953,46 @@
>   friend class DeclContext;
> };
>
> +class NamespaceAliasDecl : public NamedDecl {

Some documentation, please? With an example of C++ source code that  
would result in this declaration?

	- Doug

> +  SourceLocation AliasLoc;
> +
> +  /// IdentLoc - Location of namespace identifier.
> +  /// FIXME: We don't store location of scope specifier.
> +  SourceLocation IdentLoc;

The typical way to store this information now would be to store a  
SourceRange covering the nested-name-specifier along with a  
NestedNameSpecifier*.

	- Doug



More information about the cfe-commits mailing list