Mercurial > hg > CbC > CbC_llvm
view clang/test/PCH/cxx11-user-defined-literals.cpp @ 266:00f31e85ec16 default tip
Added tag current for changeset 31d058e83c98
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 14 Oct 2023 10:13:55 +0900 |
parents | 2e18cbf3894f |
children |
line wrap: on
line source
// RUN: %clang_cc1 -pedantic-errors -std=c++11 -emit-pch %s -o %t // RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t -verify %s // RUN: %clang_cc1 -pedantic-errors -std=c++11 -emit-pch -fpch-instantiate-templates %s -o %t // RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t -verify %s #ifndef HEADER_INCLUDED #define HEADER_INCLUDED using size_t = decltype(sizeof(int)); int operator"" _foo(const char *p, size_t); template<typename T> auto f(T t) -> decltype(t + ""_foo) { return 0; } #else int j = ""_foo; int k = f(0); int *l = f(&k); struct S {}; int m = f(S()); // expected-error {{no matching}} // expected-note@14 {{substitution failure}} #endif