commit | 29cb2fdbc1fff5ba4978c85dd886231858d0c112 | [log] [tgz] |
---|---|---|
author | John McCall <rjmccall@apple.com> | Sat Dec 04 06:09:13 2010 +0000 |
committer | John McCall <rjmccall@apple.com> | Sat Dec 04 06:09:13 2010 +0000 |
tree | 4b3fb523c4cb53c875ba9571c1a1ce341c5b4a83 | |
parent | bd35f73b6bd91a859d7c0e1b4b0e9719f342e62c [diff] [blame] |
When deciding whether to complain about the type of a boolean condition, use the type of the expression *after* array/function decay. llvm-svn: 120895
diff --git a/clang/test/SemaCXX/condition.cpp b/clang/test/SemaCXX/condition.cpp index daa86f6..61d1762 100644 --- a/clang/test/SemaCXX/condition.cpp +++ b/clang/test/SemaCXX/condition.cpp
@@ -42,3 +42,12 @@ if (int *ip = ip) { } } + +// Make sure we do function/array decay. +void test3() { + if ("help") + (void) 0; + + if (test3) + (void) 0; +}