summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-static-var.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-12 21:30:55 +0000
committerChris Lattner <sabre@nondot.org>2010-01-12 21:30:55 +0000
commit7011795ee4139ba9df843f89b20a837c2ce366e5 (patch)
tree7b4a33b779f48acdf1cdabeee1cdb84907b3f013 /clang/test/SemaTemplate/instantiate-static-var.cpp
parent18473f329dbd23a888fd09b39ea3832e42ce1604 (diff)
downloadbcm5719-llvm-7011795ee4139ba9df843f89b20a837c2ce366e5.tar.gz
bcm5719-llvm-7011795ee4139ba9df843f89b20a837c2ce366e5.zip
use DiagRuntimeBehavior to silence the div/rem by zero warning when
not in an evaluated context. This removes some bogus warnings. llvm-svn: 93258
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-static-var.cpp')
-rw-r--r--clang/test/SemaTemplate/instantiate-static-var.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaTemplate/instantiate-static-var.cpp b/clang/test/SemaTemplate/instantiate-static-var.cpp
index 1fcc36b43cc..789fe3db872 100644
--- a/clang/test/SemaTemplate/instantiate-static-var.cpp
+++ b/clang/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];
OpenPOWER on IntegriCloud