diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-01-06 05:10:23 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-01-06 05:10:23 +0000 |
| commit | c7acfdfe9a6f4c5dc045ca6061b69080e01c89e4 (patch) | |
| tree | 79e853b3418abe5a1203463a416ef8cf60733ff3 /clang/test/SemaCXX/qualified-id-lookup.cpp | |
| parent | a8a3f73a47e7bf23e7b3f0f5dc098539d973ba81 (diff) | |
| download | bcm5719-llvm-c7acfdfe9a6f4c5dc045ca6061b69080e01c89e4.tar.gz bcm5719-llvm-c7acfdfe9a6f4c5dc045ca6061b69080e01c89e4.zip | |
Add QualifiedDeclRefExpr, which retains additional source-location
information for declarations that were referenced via a qualified-id,
e.g., N::C::value. We keep track of the location of the start of the
nested-name-specifier. Note that the difference between
QualifiedDeclRefExpr and DeclRefExpr does have an effect on the
semantics of function calls in two ways:
1) The use of a qualified-id instead of an unqualified-id suppresses
argument-dependent lookup
2) If the name refers to a virtual function, the qualified-id
version will call the function determined statically while the
unqualified-id version will call the function determined dynamically
(by looking up the appropriate function in the vtable).
Neither of these features is implemented yet, but we do print out
qualified names for QualifiedDeclRefExprs as part of the AST printing.
llvm-svn: 61789
Diffstat (limited to 'clang/test/SemaCXX/qualified-id-lookup.cpp')
| -rw-r--r-- | clang/test/SemaCXX/qualified-id-lookup.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/qualified-id-lookup.cpp b/clang/test/SemaCXX/qualified-id-lookup.cpp index 1321d734d98..0ef8e69107b 100644 --- a/clang/test/SemaCXX/qualified-id-lookup.cpp +++ b/clang/test/SemaCXX/qualified-id-lookup.cpp @@ -59,6 +59,7 @@ void test_f1(int i) { int &v1 = N::f1(); float &v2 = N::f1(i); int v3 = ::i1; + int v4 = N::f1::member; } typedef int f2_type; |

