1 //===-- ns3.cpp ------------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
13 // Note: the following function must be before the using.
14 void test_lookup_before_using_directive()
16 // BP_before_using_directive
17 std::printf("before using directive: func() = %d\n", func()); // eval func(), exp: 1
20 void test_lookup_after_using_directive()
22 // BP_after_using_directive
23 //printf("func() = %d\n", func()); // eval func(), exp: error, amiguous
24 std::printf("after using directive: func2() = %d\n", func2()); // eval func2(), exp: 3
25 std::printf("after using directive: ::func() = %d\n", ::func()); // eval ::func(), exp: 1
26 std::printf("after using directive: B::func() = %d\n", B::func()); // eval B::func(), exp: 4