| // RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s |
| (T())x; // expected-error {{cast from 'int' to 'T ()'}} |
| (T())+x; // expected-error {{cast from 'int' to 'T ()'}} |
| (T())*px; // expected-error {{cast from 'int' to 'T ()'}} |
| // Make sure stuff inside the parens are parsed only once (only one warning). |
| x = (PT()[(int){1}]); // expected-warning {{compound literals}} |
| // Special case: empty parens is a call, not an expression |
| struct S{int operator()();}; |
| // FIXME: Special case: "++" is postfix here, not prefix |
| // Make sure we do tentative parsing correctly in conditions. |
| struct rec { rec(int); }; |
| struct rec { rec(int); }; |
| struct rec { rec(int); }; |
| template <class T> result(T); |
| if (result((cls::type) i).check()) |
| if (result((ns::type) i).check()) |
| if (result((::type) i).check()) |
| if (result((cls::rec) i).check()) |
| if (result((ns::rec) i).check()) |
| if (result((::rec) i).check()) |