diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-12 21:30:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-12 21:30:55 +0000 |
commit | cb329c506d0e041b9523618158ac925d620c24ac (patch) | |
tree | c01bbca9054e23c8810d399bab725570e92819b0 /test/SemaTemplate/instantiate-static-var.cpp | |
parent | 84d0a19828599e8623223632d59447fd498999cf (diff) |
use DiagRuntimeBehavior to silence the div/rem by zero warning when
not in an evaluated context. This removes some bogus warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/instantiate-static-var.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-static-var.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/SemaTemplate/instantiate-static-var.cpp b/test/SemaTemplate/instantiate-static-var.cpp index 1fcc36b43c..789fe3db87 100644 --- a/test/SemaTemplate/instantiate-static-var.cpp +++ b/test/SemaTemplate/instantiate-static-var.cpp @@ -2,7 +2,7 @@ template<typename T, T Divisor> class X { public: - static const T value = 10 / Divisor; // expected-error{{in-class initializer is not an integral constant expression}} expected-warning {{division by zero is undefined}} + static const T value = 10 / Divisor; // expected-error{{in-class initializer is not an integral constant expression}} }; int array1[X<int, 2>::value == 5? 1 : -1]; |