brintos

brintos / llvm-project-archived public Read only

0
0
Text · 771 B · c85af1b Raw
25 lines · cpp
1// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -Wsystem-headers -D__GLIBCXX__=20100000L %s2 3// libstdc++4.6 in debug mode has explicit default constructors.4// stlport has this for all containers.5#ifdef BE_THE_HEADER6#pragma clang system_header7namespace std {8namespace __debug {9template <class T>10class vector {11public:12  explicit vector() {} // expected-warning 2 {{should not be explicit}}13};14}15}16#else17 18#define BE_THE_HEADER19#include __FILE__20 21struct { int a, b; std::__debug::vector<int> c; } e[] = { {1, 1} }; // expected-note{{used in initialization here}}22// expected-warning@+1 {{expression with side effects has no effect in an unevaluated context}}23decltype(new std::__debug::vector<int>[1]{}) x; // expected-note{{used in initialization here}}24#endif25