From c7acfdfe9a6f4c5dc045ca6061b69080e01c89e4 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 6 Jan 2009 05:10:23 +0000 Subject: 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 --- clang/test/SemaCXX/qualified-id-lookup.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/test') 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; -- cgit v1.2.3