blob: 115ddf3e02d09de1eddb1c925b5cc75f1db5d658 [file] [log] [blame]
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -Wunused-value %s
// expected-no-diagnostics
void f() __attribute__((const));
namespace PR18571 {
// Unevaluated contexts should not trigger unused result warnings.
template <typename T>
auto foo(T) -> decltype(f(), bool()) { // Should not warn.
return true;
}
void g() {
foo(1);
}
}