summaryrefslogtreecommitdiffstats
path: root/libcxx/test/libcxx/strings/basic.string/PR42676.sh.cpp
blob: 5aa2402c92c934ba49970370f6ecc23536faa7ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

// Regression test for PR42676.

// RUN: %cxx %flags %s -o %t.exe %compile_flags %link_flags -D_LIBCPP_HIDE_FROM_ABI_PER_TU
// RUN: %t.exe

#include <memory>
#include <string>

int main() {
    std::string s1(10u, '-', std::allocator<char>()); (void)s1;
    std::string s2("hello", std::allocator<char>()); (void)s2;
    std::string s3("hello"); (void)s3;
}
OpenPOWER on IntegriCloud