1// RUN: %clang_cc1 -pedantic-errors -std=c++11 -emit-pch %s -o %t
2// RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t -verify %s
3
4#ifndef HEADER_INCLUDED
5
6#define HEADER_INCLUDED
7
8using size_t = decltype(sizeof(int));
9int operator"" _foo(const char *p, size_t);
10
11template<typename T> auto f(T t) -> decltype(t + ""_foo) { return 0; }
12
13#else
14
15int j = ""_foo;
16int k = f(0);
17int *l = f(&k);
18struct S {};
19int m = f(S()); // expected-error {{no matching}}
20                // expected-note@11 {{substitution failure}}
21
22#endif
23