diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-03-19 03:51:16 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-03-19 03:51:16 +0000 |
commit | 183539102563b85e9421d0fc5c3a650a20887840 (patch) | |
tree | 7a18d1af87575a34033cebf9778c66508d13eec9 /clang/test/SemaCXX/qualified-names-print.cpp | |
parent | 3b7b301a2462c9982192c41de7e11cbd804792a3 (diff) | |
download | bcm5719-llvm-183539102563b85e9421d0fc5c3a650a20887840.tar.gz bcm5719-llvm-183539102563b85e9421d0fc5c3a650a20887840.zip |
Generalize printing of nested-name-specifier sequences for use in both
QualifiedNameType and QualifiedDeclRefExpr. We now keep track of the
exact nested-name-specifier spelling for a QualifiedDeclRefExpr, and
use that spelling when printing ASTs. This fixes PR3493.
llvm-svn: 67283
Diffstat (limited to 'clang/test/SemaCXX/qualified-names-print.cpp')
-rw-r--r-- | clang/test/SemaCXX/qualified-names-print.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/qualified-names-print.cpp b/clang/test/SemaCXX/qualified-names-print.cpp new file mode 100644 index 00000000000..902655238ba --- /dev/null +++ b/clang/test/SemaCXX/qualified-names-print.cpp @@ -0,0 +1,15 @@ +// RUN: clang -ast-print %s 2>&1 | grep "N::M::X<INT>::value" +namespace N { + namespace M { + template<typename T> + struct X { + enum { value }; + }; + } +} + +typedef int INT; + +int test() { + return N::M::X<INT>::value; +} |