llvm-for-llvmta/tools/clang/test/SemaCXX/parentheses.cpp

9 lines
244 B
C++
Raw Normal View History

2022-04-25 13:02:35 +02:00
// RUN: %clang_cc1 -verify -Wlogical-op-parentheses %s
// PR16930, PR16727:
template<class Foo>
bool test(Foo f, int *array)
{
return false && false || array[f.get()]; // expected-warning {{'&&' within '||'}} expected-note {{parentheses}}
}