[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / SemaCXX / unqualified-std-call-fixits.cpp
blob1a1ffc7ba2e82248912840dc2b88d5b065a1f92e
1 // RUN: %clang_cc1 -verify -std=c++20 -Wall %s
2 // RUN: cp %s %t
3 // RUN: %clang_cc1 -x c++ -std=c++20 -fixit %t
4 // RUN: %clang_cc1 -Wall -Werror -x c++ -std=c++20 %t
5 // RUN: cat %t | FileCheck %s
7 namespace std {
9 int &&move(auto &&a) { return a; }
11 int &&forward(auto &a) { return a; }
13 } // namespace std
15 using namespace std;
17 void f() {
18 int i = 0;
19 (void)move(i); // expected-warning {{unqualified call to 'std::move}}
20 // CHECK: {{^}} (void)std::move
21 (void)forward(i); // expected-warning {{unqualified call to 'std::forward}}
22 // CHECK: {{^}} (void)std::forward