brintos

brintos / llvm-project-archived public Read only

0
0
Text · 438 B · 8ff2396 Raw
21 lines · cpp
1// RUN: %clang_cc1 -std=c++11 -verify %s -Wno-tautological-compare2 3struct A{};4 5template <typename T>6void f(int i, float f, bool b, char c, int* pi, A* pa, T* pt) {7  (void)+i;8  (void)-i;9  (void)+f;10  (void)-f;11  (void)+b;12  (void)-b;13  (void)+c;14  (void)-c;15 16  (void)-pi; // expected-error {{invalid argument type}}17  (void)-pa; // expected-error {{invalid argument type}}18  (void)-pt; // expected-error {{invalid argument type}}19}20 21