diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-09-23 18:27:11 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-09-23 18:27:11 +0000 |
| commit | 263a0a33cc28e1549c51af30f2b8b47ffac3215e (patch) | |
| tree | 22157966b94fac9a8141109c0be2486cb316629c /clang/test/SemaTemplate/instantiate-static-var.cpp | |
| parent | 5c42bcca205eb073a9416fbd76ee5bc59ba9eab0 (diff) | |
| download | bcm5719-llvm-263a0a33cc28e1549c51af30f2b8b47ffac3215e.tar.gz bcm5719-llvm-263a0a33cc28e1549c51af30f2b8b47ffac3215e.zip | |
Don't warn about runtime behavior problems in variable initializers that we
know are going to be constant-evaluated.
Any relevant diagnostics should be produced by constant expression evaluation.
llvm-svn: 314067
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-static-var.cpp')
| -rw-r--r-- | clang/test/SemaTemplate/instantiate-static-var.cpp | 2 |
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 547470db5c5..648ee4153fd 100644 --- a/clang/test/SemaTemplate/instantiate-static-var.cpp +++ b/clang/test/SemaTemplate/instantiate-static-var.cpp @@ -5,7 +5,7 @@ template<typename T, T Divisor> class X { public: - static const T value = 10 / Divisor; // expected-error{{in-class initializer for static data member is not a constant expression}} expected-warning {{division by zero}} + static const T value = 10 / Divisor; // expected-error{{in-class initializer for static data member is not a constant expression}} }; int array1[X<int, 2>::value == 5? 1 : -1]; |

