C++98 and C++03 are effectively aliases as far as Clang is concerned. As such, allowing both std=c++98 and std=c++03 as Lit parameters is just slightly confusing, but provides no value. It's similar to allowing both std=c++17 and std=c++1z, which we don't do. This was discovered because we had an internal bot that ran the test suite under both c++98 AND c++03 -- one of which is redundant. Differential Revision: https://reviews.llvm.org/D80926
31 lines
813 B
C++
31 lines
813 B
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
// Source Licenses. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// UNSUPPORTED: c++03
|
|
|
|
// Before GCC 6, aggregate initialization kicks in.
|
|
// See https://stackoverflow.com/q/41799015/627587.
|
|
// UNSUPPORTED: gcc-5
|
|
|
|
// struct nothrow_t {
|
|
// explicit nothrow_t() = default;
|
|
// };
|
|
// extern const nothrow_t nothrow;
|
|
|
|
// This test checks for LWG 2510.
|
|
|
|
#include <new>
|
|
|
|
|
|
std::nothrow_t f() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}}
|
|
|
|
int main(int, char**) {
|
|
return 0;
|
|
}
|