summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/new-array-size-conv.cpp
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2015-01-19 01:44:02 +0000
committerNathan Sidwell <nathan@acm.org>2015-01-19 01:44:02 +0000
commit44b21749b9d60e7212bee632dd11e4df1b19dfd6 (patch)
tree184ed42804c98fdfb0d2e4454e3a5afa2d2deba3 /clang/test/SemaCXX/new-array-size-conv.cpp
parenta3306ca6266488874e4f9f6725a9a5782ef55ec7 (diff)
downloadbcm5719-llvm-44b21749b9d60e7212bee632dd11e4df1b19dfd6.tar.gz
bcm5719-llvm-44b21749b9d60e7212bee632dd11e4df1b19dfd6.zip
PR6037
Warn on inaccessible direct base llvm-svn: 226423
Diffstat (limited to 'clang/test/SemaCXX/new-array-size-conv.cpp')
-rw-r--r--clang/test/SemaCXX/new-array-size-conv.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/new-array-size-conv.cpp b/clang/test/SemaCXX/new-array-size-conv.cpp
index e8bb67955f9..c987c2820ad 100644
--- a/clang/test/SemaCXX/new-array-size-conv.cpp
+++ b/clang/test/SemaCXX/new-array-size-conv.cpp
@@ -16,7 +16,8 @@ struct ValueEnum {
struct ValueBoth : ValueInt, ValueEnum { };
struct IndirectValueInt : ValueInt { };
-struct TwoValueInts : ValueInt, IndirectValueInt { };
+struct TwoValueInts : ValueInt, IndirectValueInt { }; // expected-warning{{direct base 'ValueInt' is inaccessible due to ambiguity:\n struct TwoValueInts -> struct ValueInt\n struct TwoValueInts -> struct IndirectValueInt -> struct ValueInt}}
+
void test() {
(void)new int[ValueInt(10)]; // expected-warning{{implicit conversion from array size expression of type 'ValueInt' to integral type 'int' is a C++11 extension}}
OpenPOWER on IntegriCloud