diff options
Diffstat (limited to 'clang/test/SemaCXX')
| -rw-r--r-- | clang/test/SemaCXX/warn-unused-comparison.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/warn-unused-comparison.cpp b/clang/test/SemaCXX/warn-unused-comparison.cpp index c193462e15c..0153f213ba1 100644 --- a/clang/test/SemaCXX/warn-unused-comparison.cpp +++ b/clang/test/SemaCXX/warn-unused-comparison.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -Wno-unused -Wunused-comparison %s +// RUN: %clang_cc1 -fsyntax-only -fcxx-exceptions -verify -Wno-unused -Wunused-comparison %s struct A { bool operator==(const A&); @@ -70,3 +70,25 @@ void test() { EQ(x, 5); #undef EQ } + +namespace PR10291 { + template<typename T> + class X + { + public: + + X() : i(0) { } + + void foo() + { + throw + i == 0u ? + 5 : 6; + } + + private: + int i; + }; + + X<int> x; +} |

