gcc_workaround.pass.cpp 696 B

12345678910111213141516171819202122
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. // Tests workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64816.
  9. #include <string>
  10. #include "test_macros.h"
  11. void f(const std::string &s) { TEST_IGNORE_NODISCARD s.begin(); }
  12. #include <vector>
  13. void AppendTo(const std::vector<char> &v) { TEST_IGNORE_NODISCARD v.begin(); }
  14. int main(int, char**) {
  15. return 0;
  16. }