File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
cpp/ql/test/library-tests/identifiers/qualified_names Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -59,3 +59,26 @@ namespace templates {
5959 return getMember (tc, typedefC ());
6060 }
6161}
62+
63+ namespace std {
64+ inline namespace cpp17 {
65+ void functionInTwoNamespaces (); // BUG: should also show up in `std`
66+ class classInTwoNameSpaces { // BUG: should also show up in `std`
67+ };
68+ inline namespace implementation {
69+ namespace ns {
70+ void functionInFourNamespaces (); // BUG: should also show up the outer namespaces
71+ }
72+ }
73+ }
74+ }
75+
76+ // This code demonstrates that `functionInFourNamespaces` is indeed visible in
77+ // four name spaces.
78+ using void_fptr = void (*)();
79+ void_fptr ptrs[] = {
80+ std::ns::functionInFourNamespaces,
81+ std::cpp17::ns::functionInFourNamespaces,
82+ std::implementation::ns::functionInFourNamespaces,
83+ std::cpp17::implementation::ns::functionInFourNamespaces,
84+ };
Original file line number Diff line number Diff line change 5252| qualifiedNames.cpp:53:12:53:12 | getMember | templates::getMember | templates | | getMember | (not global) |
5353| qualifiedNames.cpp:53:12:53:20 | getMember | templates::getMember | templates | | getMember | (not global) |
5454| qualifiedNames.cpp:57:8:57:10 | use | templates::use | templates | | use | (not global) |
55+ | qualifiedNames.cpp:65:10:65:32 | functionInTwoNamespaces | std::cpp17::functionInTwoNamespaces | std::cpp17 | | functionInTwoNamespaces | (not global) |
56+ | qualifiedNames.cpp:66:11:66:11 | operator= | std::cpp17::classInTwoNameSpaces::operator= | std::cpp17 | classInTwoNameSpaces | operator= | (not global) |
57+ | qualifiedNames.cpp:66:11:66:11 | operator= | std::cpp17::classInTwoNameSpaces::operator= | std::cpp17 | classInTwoNameSpaces | operator= | (not global) |
58+ | qualifiedNames.cpp:66:11:66:30 | classInTwoNameSpaces | std::cpp17::classInTwoNameSpaces | std::cpp17 | | classInTwoNameSpaces | (not global) |
59+ | qualifiedNames.cpp:70:14:70:37 | functionInFourNamespaces | std::cpp17::implementation::ns::functionInFourNamespaces | std::cpp17::implementation::ns | | functionInFourNamespaces | (not global) |
60+ | qualifiedNames.cpp:78:7:78:15 | void_fptr | void_fptr | | | void_fptr | void_fptr |
61+ | qualifiedNames.cpp:79:11:79:14 | ptrs | ptrs | | | ptrs | ptrs |
You can’t perform that action at this time.
0 commit comments