brintos

brintos / llvm-project-archived public Read only

0
0
Text · 578 B · 1a1ffc7 Raw
24 lines · cpp
1// RUN: %clang_cc1 -verify -std=c++20 -Wall %s2// RUN: cp %s %t3// RUN: %clang_cc1 -x c++ -std=c++20 -fixit %t4// RUN: %clang_cc1 -Wall -Werror -x c++ -std=c++20 %t5// RUN: cat %t | FileCheck %s6 7namespace std {8 9int &&move(auto &&a) { return a; }10 11int &&forward(auto &a) { return a; }12 13} // namespace std14 15using namespace std;16 17void f() {18  int i = 0;19  (void)move(i); // expected-warning {{unqualified call to 'std::move}}20  // CHECK: {{^}}  (void)std::move21  (void)forward(i); // expected-warning {{unqualified call to 'std::forward}}22  // CHECK: {{^}}  (void)std::forward23}24