blob: 115ddf3e02d09de1eddb1c925b5cc75f1db5d658 [file] [log] [blame]
Aaron Ballman78ecb872014-10-16 20:13:28 +00001// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -Wunused-value %s
2// expected-no-diagnostics
3
4void f() __attribute__((const));
5
6namespace PR18571 {
7// Unevaluated contexts should not trigger unused result warnings.
8template <typename T>
9auto foo(T) -> decltype(f(), bool()) { // Should not warn.
10 return true;
11}
12
13void g() {
14 foo(1);
15}
16}