Douglas Gregor | 94619c8 | 2011-08-24 19:03:07 +0000 | [diff] [blame] | 1 | |
| 2 | void test(int i, float f) { |
| 3 | // unqualified lookup |
| 4 | f0(&i); |
| 5 | f0(&f); |
| 6 | |
| 7 | // qualified lookup into the translation unit |
| 8 | ::f0(&i); |
| 9 | ::f0(&f); |
| 10 | } |
| 11 | |
Douglas Gregor | 1257f97 | 2011-08-24 21:27:34 +0000 | [diff] [blame^] | 12 | // RUN: %clang_cc1 -emit-pch -x c++ -o %t_lookup_left.h.pch %S/Inputs/lookup_left.hpp |
| 13 | // RUN: %clang_cc1 -emit-pch -x c++ -o %t_lookup_right.h.pch %S/Inputs/lookup_right.hpp |
| 14 | // RUN: %clang_cc1 -x c++ -import-module %t_lookup_left.h.pch -import-module %t_lookup_right.h.pch -verify %s |
| 15 | // RUN: %clang_cc1 -ast-print -x c++ -import-module %t_lookup_left.h.pch -import-module %t_lookup_right.h.pch %s | FileCheck -check-prefix=CHECK-PRINT %s |
| 16 | |
| 17 | // CHECK-PRINT: int *f0(int *); |
| 18 | // CHECK-PRINT: float *f0(float *); |
| 19 | // CHECK-PRINT: void test(int i, float f) |
| 20 | |