├── .github └── workflows │ ├── enforce-license-compliance.yml │ └── standards.yml ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── coverage_data ├── cpp-11-standard │ ├── #usr#include#c++#11#bits#alloc_traits.h.gcov │ ├── #usr#include#c++#11#bits#allocated_ptr.h.gcov │ ├── #usr#include#c++#11#bits#allocator.h.gcov │ ├── #usr#include#c++#11#bits#basic_string.h.gcov │ ├── #usr#include#c++#11#bits#basic_string.tcc.gcov │ ├── #usr#include#c++#11#bits#char_traits.h.gcov │ ├── #usr#include#c++#11#bits#cpp_type_traits.h.gcov │ ├── #usr#include#c++#11#bits#deque.tcc.gcov │ ├── #usr#include#c++#11#bits#exception_ptr.h.gcov │ ├── #usr#include#c++#11#bits#invoke.h.gcov │ ├── #usr#include#c++#11#bits#ios_base.h.gcov │ ├── #usr#include#c++#11#bits#locale_classes.tcc.gcov │ ├── #usr#include#c++#11#bits#locale_facets.h.gcov │ ├── #usr#include#c++#11#bits#move.h.gcov │ ├── #usr#include#c++#11#bits#predefined_ops.h.gcov │ ├── #usr#include#c++#11#bits#ptr_traits.h.gcov │ ├── #usr#include#c++#11#bits#range_access.h.gcov │ ├── #usr#include#c++#11#bits#regex.h.gcov │ ├── #usr#include#c++#11#bits#regex.tcc.gcov │ ├── #usr#include#c++#11#bits#regex_automaton.h.gcov │ ├── #usr#include#c++#11#bits#regex_automaton.tcc.gcov │ ├── #usr#include#c++#11#bits#regex_compiler.h.gcov │ ├── #usr#include#c++#11#bits#regex_compiler.tcc.gcov │ ├── #usr#include#c++#11#bits#regex_constants.h.gcov │ ├── #usr#include#c++#11#bits#regex_error.h.gcov │ ├── #usr#include#c++#11#bits#regex_executor.h.gcov │ ├── #usr#include#c++#11#bits#regex_executor.tcc.gcov │ ├── #usr#include#c++#11#bits#regex_scanner.h.gcov │ ├── #usr#include#c++#11#bits#regex_scanner.tcc.gcov │ ├── #usr#include#c++#11#bits#shared_ptr.h.gcov │ ├── #usr#include#c++#11#bits#shared_ptr_base.h.gcov │ ├── #usr#include#c++#11#bits#std_abs.h.gcov │ ├── #usr#include#c++#11#bits#std_function.h.gcov │ ├── #usr#include#c++#11#bits#stl_algo.h.gcov │ ├── #usr#include#c++#11#bits#stl_algobase.h.gcov │ ├── #usr#include#c++#11#bits#stl_construct.h.gcov │ ├── #usr#include#c++#11#bits#stl_deque.h.gcov │ ├── #usr#include#c++#11#bits#stl_function.h.gcov │ ├── #usr#include#c++#11#bits#stl_heap.h.gcov │ ├── #usr#include#c++#11#bits#stl_iterator.h.gcov │ ├── #usr#include#c++#11#bits#stl_iterator_base_funcs.h.gcov │ ├── #usr#include#c++#11#bits#stl_iterator_base_types.h.gcov │ ├── #usr#include#c++#11#bits#stl_map.h.gcov │ ├── #usr#include#c++#11#bits#stl_pair.h.gcov │ ├── #usr#include#c++#11#bits#stl_set.h.gcov │ ├── #usr#include#c++#11#bits#stl_stack.h.gcov │ ├── #usr#include#c++#11#bits#stl_tree.h.gcov │ ├── #usr#include#c++#11#bits#stl_uninitialized.h.gcov │ ├── #usr#include#c++#11#bits#stl_vector.h.gcov │ ├── #usr#include#c++#11#bits#unique_ptr.h.gcov │ ├── #usr#include#c++#11#bits#vector.tcc.gcov │ ├── #usr#include#c++#11#bitset.gcov │ ├── #usr#include#c++#11#chrono.gcov │ ├── #usr#include#c++#11#cmath.gcov │ ├── #usr#include#c++#11#ext#aligned_buffer.h.gcov │ ├── #usr#include#c++#11#ext#alloc_traits.h.gcov │ ├── #usr#include#c++#11#ext#atomicity.h.gcov │ ├── #usr#include#c++#11#ext#new_allocator.h.gcov │ ├── #usr#include#c++#11#ext#type_traits.h.gcov │ ├── #usr#include#c++#11#initializer_list.gcov │ ├── #usr#include#c++#11#iomanip.gcov │ ├── #usr#include#c++#11#limits.gcov │ ├── #usr#include#c++#11#new.gcov │ ├── #usr#include#c++#11#stdexcept.gcov │ ├── #usr#include#c++#11#tuple.gcov │ ├── #usr#include#c++#11#type_traits.gcov │ ├── #usr#include#c++#11#typeinfo.gcov │ ├── #usr#include#x86_64-linux-gnu#c++#11#bits#ctype_inline.h.gcov │ ├── SHA.txt │ ├── coverage_totals.txt │ ├── include#catch.hpp.gcov │ ├── src#index.cpp.gcov │ └── test#test_index.cpp.gcov ├── go-standard │ ├── SHA.txt │ ├── coverage.txt │ └── coverage_totals.txt ├── java-standard │ ├── SHA.txt │ ├── coverage_totals.txt │ └── jacocoTestReport.xml ├── kotlin-standard │ ├── SHA.txt │ ├── coverage_totals.txt │ └── jacocoTestReport.xml ├── python-standard │ ├── SHA.txt │ ├── coverage.xml │ └── coverage_totals.txt ├── ruby-standard-2 │ ├── SHA.txt │ ├── coverage.xml │ └── coverage_totals.txt ├── swift-standard │ ├── SHA.txt │ ├── coverage_totals.txt │ └── info.lcov └── typescript-standard │ ├── SHA.txt │ ├── coverage-final.json │ └── coverage_totals.txt ├── scripts ├── standard-cpp-11.sh ├── standard-go.sh ├── standard-java.sh ├── standard-kotlin.sh ├── standard-python.sh ├── standard-ruby-1.sh ├── standard-ruby-2.sh ├── standard-swift.sh └── standard-typescript.sh └── upstream.sh /.github/workflows/enforce-license-compliance.yml: -------------------------------------------------------------------------------- 1 | name: Enforce License Compliance 2 | 3 | on: 4 | pull_request: 5 | branches: [main, master] 6 | 7 | jobs: 8 | enforce-license-compliance: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: 'Enforce License Compliance' 12 | uses: getsentry/action-enforce-license-compliance@57ba820387a1a9315a46115ee276b2968da51f3d # main 13 | with: 14 | fossa_api_key: ${{ secrets.FOSSA_API_KEY }} 15 | -------------------------------------------------------------------------------- /.github/workflows/standards.yml: -------------------------------------------------------------------------------- 1 | name: Standards 2 | on: 3 | schedule: 4 | - cron: "0 0 * * *" 5 | jobs: 6 | run-standards: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | with: 11 | fetch-depth: 2 12 | - name: Set up Node v14 13 | uses: actions/setup-node@v2 14 | with: 15 | node-version: "14" 16 | - name: Run Standards Scripts 17 | env: 18 | GH_TOKEN: ${{ secrets.GH_TOKEN }} 19 | run: | 20 | bash scripts/standard-python.sh 21 | bash scripts/standard-swift.sh 22 | bash scripts/standard-ruby-2.sh 23 | bash scripts/standard-typescript.sh 24 | bash scripts/standard-kotlin.sh 25 | bash scripts/standard-go.sh 26 | bash scripts/standard-cpp-11.sh 27 | bash scripts/standard-java.sh 28 | - name: Trigger Autotest CircleCI Build After 15 Minutes 29 | env: 30 | CODECOV_DEVOPS_CIRCLECI_TOKEN: ${{ secrets.CODECOV_DEVOPS_CIRCLECI_TOKEN }} 31 | run: | 32 | echo "Sleep for 15 minutes..." 33 | sleep 15m 34 | curl --request POST \ 35 | --url https://circleci.com/api/v2/project/gh/codecov/autotest/pipeline \ 36 | --header "Circle-Token: ${CODECOV_DEVOPS_CIRCLECI_TOKEN}" \ 37 | --header 'content-type: application/json' \ 38 | --data '{"branch":"master"}' 39 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guide 2 | 3 | If you would like to contribute your own language specific standard to Codecov you can do so as follows: 4 | 5 | 1. Write a sample repository that contains Docker and docker-compose based orchestration for running your project easily locally (if containarization is possible) 6 | 2. Your project should be as simple as possible while providing and testing the following functions: 7 | - A function that is fully tested and covered by tests 8 | - A function that is not tested at all 9 | - A function that contains a conditional with a tested if and/or else condition. 10 | 3. A TravisCI configuration that will run the tests and upload coverage to Codecov. 11 | 12 | If your standard is accepted by Codecov you can transfer ownership to the Codecov Organization and will be accepted in our current [List of Standards](https://github.com/codecov/standards-scripts#list-of-standards) with credit given to the repository's original author. You can review the List of Standards to see which languages and frameworks currently need a standard submitted. If you create a standard please, email support@codecov.io with the subject line "New Standard Submission" and the team will review it for acceptance. 13 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Codecov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Codecov Language Standards 2 | 3 | [![Build Status](https://travis-ci.org/codecov/standards.svg?branch=master)](https://travis-ci.org/codecov/standards) 4 | [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fstandards.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fstandards?ref=badge_shield) 5 | 6 | ## What is this? 7 | 8 | This is a repository containing aggregated information about the state of all Codecov language standards. Each standard ensures that Codecov is properly processing reports for a particular language if its build is passing. 9 | 10 | ## List of Standards 11 | 12 | | Standard | Last Run | GitHub Actions | Codecov | 13 | |-|-|-|-| 14 | | [Python](https://github.com/codecov/Python-Standard.git) | [Coverage](https://github.com/codecov/standards/tree/master/coverage_data/python-standard) | [![Build](https://github.com/codecov/python-standard/actions/workflows/python-standard.yml/badge.svg)](https://github.com/codecov/python-standard/actions/workflows/python-standard.yml) |[![codecov](https://codecov.io/gh/codecov/Python-Standard/branch/master/graph/badge.svg)](https://codecov.io/gh/codecov/Python-Standard) | 15 | |[Swift/Xcode](https://github.com/codecov/Swift-Standard) | [Coverage](https://github.com/codecov/standards/tree/master/coverage_data/swift-standard) |[![Build](https://github.com/codecov/swift-standard/actions/workflows/swift_macos-10.15.yml/badge.svg)](https://github.com/codecov/swift-standard/actions/workflows/swift_macos-10.15.yml) |[![codecov](https://codecov.io/gh/codecov/Swift-Standard/branch/master/graph/badge.svg)](https://codecov.io/gh/codecov/Swift-Standard) | 16 | |[Ruby](https://github.com/codecov/Ruby-Standard-2) |[Coverage](https://github.com/codecov/standards/tree/master/coverage_data/ruby-standard-2) |[![Build](https://github.com/codecov/ruby-standard-2/actions/workflows/ruby-standard-2.yml/badge.svg)](https://github.com/codecov/ruby-standard-2/actions/workflows/ruby-standard-2.yml) |[![codecov](https://codecov.io/gh/codecov/Ruby-Standard-2/branch/master/graph/badge.svg)](https://codecov.io/gh/codecov/Ruby-Standard-2) | 17 | |[TypeScript](https://github.com/codecov/TypeScript-Standard) |[Coverage](https://github.com/codecov/standards/tree/master/coverage_data/typescript-standard) |[![Build](https://github.com/codecov/typescript-standard/actions/workflows/typescript-standard.yml/badge.svg)](https://github.com/codecov/typescript-standard/actions/workflows/typescript-standard.yml) |[![codecov](https://codecov.io/gh/codecov/TypeScript-Standard/branch/master/graph/badge.svg)](https://codecov.io/gh/codecov/TypeScript-Standard) | 18 | |[Kotlin](https://github.com/codecov/kotlin-Standard) |[Coverage](https://github.com/codecov/standards/tree/master/coverage_data/kotlin-standard)|[![Build](https://github.com/codecov/kotlin-standard/actions/workflows/kotlin-standard.yml/badge.svg)](https://github.com/codecov/kotlin-standard/actions/workflows/kotlin-standard.yml) |[![codecov](https://codecov.io/gh/codecov/kotlin-Standard/branch/master/graph/badge.svg)](https://codecov.io/gh/codecov/kotlin-Standard) | 19 | |[Go](https://github.com/codecov/go-Standard) |[Coverage](https://github.com/codecov/standards/tree/master/coverage_data/go-standard) |[![Build](https://github.com/codecov/go-standard/actions/workflows/go-standard.yml/badge.svg)](https://github.com/codecov/go-standard/actions/workflows/go-standard.yml) | [![codecov](https://codecov.io/gh/codecov/go-Standard/branch/master/graph/badge.svg)](https://codecov.io/gh/codecov/go-Standard) | 20 | |[C++ (11)](https://github.com/codecov/cpp-11-Standard) | [Coverage](https://github.com/codecov/standards/tree/master/coverage_data/cpp-11-standard) | [![Build](https://github.com/codecov/cpp-11-Standard/actions/workflows/cpp-11-standard.yml/badge.svg)](https://github.com/codecov/cpp-11-Standard/actions/workflows/cpp-11-standard.yml) |[![codecov](https://codecov.io/gh/codecov/cpp-11-Standard/branch/master/graph/badge.svg)](https://codecov.io/gh/codecov/cpp-11-Standard) | 21 | |[Java](https://github.com/codecov/java-Standard) |[Coverage](https://github.com/codecov/standards/tree/master/coverage_data/java-standard) |[![Build](https://github.com/codecov/java-standard/actions/workflows/java-standard.yml/badge.svg)](https://github.com/codecov/java-standard/actions/workflows/java-standard.yml) |[![codecov](https://codecov.io/gh/codecov/java-Standard/branch/master/graph/badge.svg)](https://codecov.io/gh/codecov/java-Standard) | 22 | 23 | ###### 1: The ruby gem does not appear to generate a report, please see the [Ruby 2 - Bash Uploader](https://github.com/codecov/Ruby-Standard-2) for status. 24 | 25 | ## Operation Details 26 | 27 | Inside the `scripts` folder, you'll find shell files that run daily on a GitHub Action CRON job. These scripts attach a timestamp to the `Last Updated` line in the `README.md` files for each standard and commit this change. This action triggers a GitHub Action build for the respective standard. 28 | 29 | Within the GitHub Action build for each standard: 30 | * Unit tests are run 31 | * A coverage report is generated (should not vary from commit to commit) 32 | * Coverage is uploaded to Codecov 33 | * A script ensures that Codecov's API returns the right coverage percentage 34 | 35 | If all of these details check out, then Codecov's processing for that language is working as intended. The build status of all of these builds are aggregated in the table above. 36 | 37 | ## Contributing 38 | 39 | Want to write a standard for a language that's not listed in the table? Contributions are welcome! See the [Contributing Guide](CONTRIBUTING.md) for more details. 40 | 41 | 42 | ## License 43 | [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fstandards.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fstandards?ref=badge_large) 44 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/#usr#include#c++#11#bits#exception_ptr.h.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:/usr/include/c++/11/bits/exception_ptr.h 2 | -: 0:Graph:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcno 3 | -: 0:Data:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcda 4 | -: 0:Runs:1 5 | -: 1:// Exception Handling support header (exception_ptr class) for -*- C++ -*- 6 | -: 2: 7 | -: 3:// Copyright (C) 2008-2021 Free Software Foundation, Inc. 8 | -: 4:// 9 | -: 5:// This file is part of GCC. 10 | -: 6:// 11 | -: 7:// GCC is free software; you can redistribute it and/or modify 12 | -: 8:// it under the terms of the GNU General Public License as published by 13 | -: 9:// the Free Software Foundation; either version 3, or (at your option) 14 | -: 10:// any later version. 15 | -: 11:// 16 | -: 12:// GCC is distributed in the hope that it will be useful, 17 | -: 13:// but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | -: 14:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | -: 15:// GNU General Public License for more details. 20 | -: 16:// 21 | -: 17:// Under Section 7 of GPL version 3, you are granted additional 22 | -: 18:// permissions described in the GCC Runtime Library Exception, version 23 | -: 19:// 3.1, as published by the Free Software Foundation. 24 | -: 20: 25 | -: 21:// You should have received a copy of the GNU General Public License and 26 | -: 22:// a copy of the GCC Runtime Library Exception along with this program; 27 | -: 23:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 28 | -: 24:// . 29 | -: 25: 30 | -: 26:/** @file bits/exception_ptr.h 31 | -: 27: * This is an internal header file, included by other library headers. 32 | -: 28: * Do not attempt to use it directly. @headername{exception} 33 | -: 29: */ 34 | -: 30: 35 | -: 31:#ifndef _EXCEPTION_PTR_H 36 | -: 32:#define _EXCEPTION_PTR_H 37 | -: 33: 38 | -: 34:#pragma GCC visibility push(default) 39 | -: 35: 40 | -: 36:#include 41 | -: 37:#include 42 | -: 38:#include 43 | -: 39:#include 44 | -: 40:#include 45 | -: 41: 46 | -: 42:#if __cplusplus >= 201103L 47 | -: 43:# include 48 | -: 44:#endif 49 | -: 45: 50 | -: 46:#ifdef _GLIBCXX_EH_PTR_RELOPS_COMPAT 51 | -: 47:# define _GLIBCXX_EH_PTR_USED __attribute__((__used__)) 52 | -: 48:#else 53 | -: 49:# define _GLIBCXX_EH_PTR_USED 54 | -: 50:#endif 55 | -: 51: 56 | -: 52:extern "C++" { 57 | -: 53: 58 | -: 54:namespace std 59 | -: 55:{ 60 | -: 56: class type_info; 61 | -: 57: 62 | -: 58: /** 63 | -: 59: * @addtogroup exceptions 64 | -: 60: * @{ 65 | -: 61: */ 66 | -: 62: 67 | -: 63: namespace __exception_ptr 68 | -: 64: { 69 | -: 65: class exception_ptr; 70 | -: 66: } 71 | -: 67: 72 | -: 68: using __exception_ptr::exception_ptr; 73 | -: 69: 74 | -: 70: /** Obtain an exception_ptr to the currently handled exception. If there 75 | -: 71: * is none, or the currently handled exception is foreign, return the null 76 | -: 72: * value. 77 | -: 73: */ 78 | -: 74: exception_ptr current_exception() _GLIBCXX_USE_NOEXCEPT; 79 | -: 75: 80 | -: 76: template 81 | -: 77: exception_ptr make_exception_ptr(_Ex) _GLIBCXX_USE_NOEXCEPT; 82 | -: 78: 83 | -: 79: /// Throw the object pointed to by the exception_ptr. 84 | -: 80: void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__)); 85 | -: 81: 86 | -: 82: namespace __exception_ptr 87 | -: 83: { 88 | -: 84: using std::rethrow_exception; 89 | -: 85: 90 | -: 86: /** 91 | -: 87: * @brief An opaque pointer to an arbitrary exception. 92 | -: 88: * @ingroup exceptions 93 | -: 89: */ 94 | -: 90: class exception_ptr 95 | -: 91: { 96 | -: 92: void* _M_exception_object; 97 | -: 93: 98 | -: 94: explicit exception_ptr(void* __e) _GLIBCXX_USE_NOEXCEPT; 99 | -: 95: 100 | -: 96: void _M_addref() _GLIBCXX_USE_NOEXCEPT; 101 | -: 97: void _M_release() _GLIBCXX_USE_NOEXCEPT; 102 | -: 98: 103 | -: 99: void *_M_get() const _GLIBCXX_NOEXCEPT __attribute__ ((__pure__)); 104 | -: 100: 105 | -: 101: friend exception_ptr std::current_exception() _GLIBCXX_USE_NOEXCEPT; 106 | -: 102: friend void std::rethrow_exception(exception_ptr); 107 | -: 103: template 108 | -: 104: friend exception_ptr std::make_exception_ptr(_Ex) _GLIBCXX_USE_NOEXCEPT; 109 | -: 105: 110 | -: 106: public: 111 | -: 107: exception_ptr() _GLIBCXX_USE_NOEXCEPT; 112 | -: 108: 113 | -: 109: exception_ptr(const exception_ptr&) _GLIBCXX_USE_NOEXCEPT; 114 | -: 110: 115 | -: 111:#if __cplusplus >= 201103L 116 | function _ZNSt15__exception_ptr13exception_ptrC2EDn called 0 returned 0% blocks executed 0% 117 | #####: 112: exception_ptr(nullptr_t) noexcept 118 | #####: 113: : _M_exception_object(nullptr) 119 | #####: 114: { } 120 | -: 115: 121 | function _ZNSt15__exception_ptr13exception_ptrC2EOS0_ called 0 returned 0% blocks executed 0% 122 | #####: 116: exception_ptr(exception_ptr&& __o) noexcept 123 | #####: 117: : _M_exception_object(__o._M_exception_object) 124 | #####: 118: { __o._M_exception_object = nullptr; } 125 | -: 119:#endif 126 | -: 120: 127 | -: 121:#if (__cplusplus < 201103L) || defined (_GLIBCXX_EH_PTR_COMPAT) 128 | -: 122: typedef void (exception_ptr::*__safe_bool)(); 129 | -: 123: 130 | -: 124: // For construction from nullptr or 0. 131 | -: 125: exception_ptr(__safe_bool) _GLIBCXX_USE_NOEXCEPT; 132 | -: 126:#endif 133 | -: 127: 134 | -: 128: exception_ptr& 135 | -: 129: operator=(const exception_ptr&) _GLIBCXX_USE_NOEXCEPT; 136 | -: 130: 137 | -: 131:#if __cplusplus >= 201103L 138 | -: 132: exception_ptr& 139 | -: 133: operator=(exception_ptr&& __o) noexcept 140 | -: 134: { 141 | -: 135: exception_ptr(static_cast(__o)).swap(*this); 142 | -: 136: return *this; 143 | -: 137: } 144 | -: 138:#endif 145 | -: 139: 146 | -: 140: ~exception_ptr() _GLIBCXX_USE_NOEXCEPT; 147 | -: 141: 148 | -: 142: void 149 | -: 143: swap(exception_ptr&) _GLIBCXX_USE_NOEXCEPT; 150 | -: 144: 151 | -: 145:#ifdef _GLIBCXX_EH_PTR_COMPAT 152 | -: 146: // Retained for compatibility with CXXABI_1.3. 153 | -: 147: void _M_safe_bool_dummy() _GLIBCXX_USE_NOEXCEPT 154 | -: 148: __attribute__ ((__const__)); 155 | -: 149: bool operator!() const _GLIBCXX_USE_NOEXCEPT 156 | -: 150: __attribute__ ((__pure__)); 157 | -: 151: operator __safe_bool() const _GLIBCXX_USE_NOEXCEPT; 158 | -: 152:#endif 159 | -: 153: 160 | -: 154:#if __cplusplus >= 201103L 161 | -: 155: explicit operator bool() const noexcept 162 | -: 156: { return _M_exception_object; } 163 | -: 157:#endif 164 | -: 158: 165 | -: 159:#if __cpp_impl_three_way_comparison >= 201907L \ 166 | -: 160: && ! defined _GLIBCXX_EH_PTR_RELOPS_COMPAT 167 | -: 161: friend bool 168 | -: 162: operator==(const exception_ptr&, const exception_ptr&) noexcept = default; 169 | -: 163:#else 170 | -: 164: friend _GLIBCXX_EH_PTR_USED bool 171 | function _ZNSt15__exception_ptreqERKNS_13exception_ptrES2_ called 0 returned 0% blocks executed 0% 172 | #####: 165: operator==(const exception_ptr& __x, const exception_ptr& __y) 173 | -: 166: _GLIBCXX_USE_NOEXCEPT 174 | #####: 167: { return __x._M_exception_object == __y._M_exception_object; } 175 | -: 168: 176 | -: 169: friend _GLIBCXX_EH_PTR_USED bool 177 | -: 170: operator!=(const exception_ptr& __x, const exception_ptr& __y) 178 | -: 171: _GLIBCXX_USE_NOEXCEPT 179 | -: 172: { return __x._M_exception_object != __y._M_exception_object; } 180 | -: 173:#endif 181 | -: 174: 182 | -: 175: const class std::type_info* 183 | -: 176: __cxa_exception_type() const _GLIBCXX_USE_NOEXCEPT 184 | -: 177: __attribute__ ((__pure__)); 185 | -: 178: }; 186 | -: 179: 187 | -: 180: _GLIBCXX_EH_PTR_USED 188 | -: 181: inline 189 | -: 182: exception_ptr::exception_ptr() _GLIBCXX_USE_NOEXCEPT 190 | -: 183: : _M_exception_object(0) 191 | -: 184: { } 192 | -: 185: 193 | -: 186: _GLIBCXX_EH_PTR_USED 194 | -: 187: inline 195 | function _ZNSt15__exception_ptr13exception_ptrC2ERKS0_ called 0 returned 0% blocks executed 0% 196 | #####: 188: exception_ptr::exception_ptr(const exception_ptr& __other) 197 | #####: 189: _GLIBCXX_USE_NOEXCEPT 198 | #####: 190: : _M_exception_object(__other._M_exception_object) 199 | -: 191: { 200 | #####: 192: if (_M_exception_object) 201 | branch 0 never executed 202 | branch 1 never executed 203 | #####: 193: _M_addref(); 204 | call 0 never executed 205 | #####: 194: } 206 | -: 195: 207 | -: 196: _GLIBCXX_EH_PTR_USED 208 | -: 197: inline 209 | function _ZNSt15__exception_ptr13exception_ptrD2Ev called 0 returned 0% blocks executed 0% 210 | #####: 198: exception_ptr::~exception_ptr() _GLIBCXX_USE_NOEXCEPT 211 | -: 199: { 212 | #####: 200: if (_M_exception_object) 213 | branch 0 never executed 214 | branch 1 never executed 215 | #####: 201: _M_release(); 216 | call 0 never executed 217 | #####: 202: } 218 | -: 203: 219 | -: 204: _GLIBCXX_EH_PTR_USED 220 | -: 205: inline exception_ptr& 221 | -: 206: exception_ptr::operator=(const exception_ptr& __other) _GLIBCXX_USE_NOEXCEPT 222 | -: 207: { 223 | -: 208: exception_ptr(__other).swap(*this); 224 | -: 209: return *this; 225 | -: 210: } 226 | -: 211: 227 | -: 212: _GLIBCXX_EH_PTR_USED 228 | -: 213: inline void 229 | -: 214: exception_ptr::swap(exception_ptr &__other) _GLIBCXX_USE_NOEXCEPT 230 | -: 215: { 231 | -: 216: void *__tmp = _M_exception_object; 232 | -: 217: _M_exception_object = __other._M_exception_object; 233 | -: 218: __other._M_exception_object = __tmp; 234 | -: 219: } 235 | -: 220: 236 | -: 221: /// @relates exception_ptr 237 | -: 222: inline void 238 | -: 223: swap(exception_ptr& __lhs, exception_ptr& __rhs) 239 | -: 224: { __lhs.swap(__rhs); } 240 | -: 225: 241 | -: 226: /// @cond undocumented 242 | -: 227: template 243 | -: 228: inline void 244 | -: 229: __dest_thunk(void* __x) 245 | -: 230: { static_cast<_Ex*>(__x)->~_Ex(); } 246 | -: 231: /// @endcond 247 | -: 232: 248 | -: 233: } // namespace __exception_ptr 249 | -: 234: 250 | -: 235: /// Obtain an exception_ptr pointing to a copy of the supplied object. 251 | -: 236: template 252 | -: 237: exception_ptr 253 | -: 238: make_exception_ptr(_Ex __ex) _GLIBCXX_USE_NOEXCEPT 254 | -: 239: { 255 | -: 240:#if __cpp_exceptions && __cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI \ 256 | -: 241: && __cplusplus >= 201103L 257 | -: 242: using _Ex2 = typename remove_reference<_Ex>::type; 258 | -: 243: void* __e = __cxxabiv1::__cxa_allocate_exception(sizeof(_Ex)); 259 | -: 244: (void) __cxxabiv1::__cxa_init_primary_exception( 260 | -: 245: __e, const_cast(&typeid(_Ex)), 261 | -: 246: __exception_ptr::__dest_thunk<_Ex2>); 262 | -: 247: try 263 | -: 248: { 264 | -: 249: ::new (__e) _Ex2(std::forward<_Ex>(__ex)); 265 | -: 250: return exception_ptr(__e); 266 | -: 251: } 267 | -: 252: catch(...) 268 | -: 253: { 269 | -: 254: __cxxabiv1::__cxa_free_exception(__e); 270 | -: 255: return current_exception(); 271 | -: 256: } 272 | -: 257:#elif __cpp_exceptions 273 | -: 258: try 274 | -: 259: { 275 | -: 260: throw __ex; 276 | -: 261: } 277 | -: 262: catch(...) 278 | -: 263: { 279 | -: 264: return current_exception(); 280 | -: 265: } 281 | -: 266:#else // no RTTI and no exceptions 282 | -: 267: return exception_ptr(); 283 | -: 268:#endif 284 | -: 269: } 285 | -: 270: 286 | -: 271:#undef _GLIBCXX_EH_PTR_USED 287 | -: 272: 288 | -: 273: /// @} group exceptions 289 | -: 274:} // namespace std 290 | -: 275: 291 | -: 276:} // extern "C++" 292 | -: 277: 293 | -: 278:#pragma GCC visibility pop 294 | -: 279: 295 | -: 280:#endif 296 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/#usr#include#c++#11#bits#locale_classes.tcc.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:/usr/include/c++/11/bits/locale_classes.tcc 2 | -: 0:Graph:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcno 3 | -: 0:Data:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcda 4 | -: 0:Runs:1 5 | -: 1:// Locale support -*- C++ -*- 6 | -: 2: 7 | -: 3:// Copyright (C) 2007-2021 Free Software Foundation, Inc. 8 | -: 4:// 9 | -: 5:// This file is part of the GNU ISO C++ Library. This library is free 10 | -: 6:// software; you can redistribute it and/or modify it under the 11 | -: 7:// terms of the GNU General Public License as published by the 12 | -: 8:// Free Software Foundation; either version 3, or (at your option) 13 | -: 9:// any later version. 14 | -: 10: 15 | -: 11:// This library is distributed in the hope that it will be useful, 16 | -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | -: 14:// GNU General Public License for more details. 19 | -: 15: 20 | -: 16:// Under Section 7 of GPL version 3, you are granted additional 21 | -: 17:// permissions described in the GCC Runtime Library Exception, version 22 | -: 18:// 3.1, as published by the Free Software Foundation. 23 | -: 19: 24 | -: 20:// You should have received a copy of the GNU General Public License and 25 | -: 21:// a copy of the GCC Runtime Library Exception along with this program; 26 | -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 27 | -: 23:// . 28 | -: 24: 29 | -: 25:/** @file bits/locale_classes.tcc 30 | -: 26: * This is an internal header file, included by other library headers. 31 | -: 27: * Do not attempt to use it directly. @headername{locale} 32 | -: 28: */ 33 | -: 29: 34 | -: 30:// 35 | -: 31:// ISO C++ 14882: 22.1 Locales 36 | -: 32:// 37 | -: 33: 38 | -: 34:#ifndef _LOCALE_CLASSES_TCC 39 | -: 35:#define _LOCALE_CLASSES_TCC 1 40 | -: 36: 41 | -: 37:#pragma GCC system_header 42 | -: 38: 43 | -: 39:namespace std _GLIBCXX_VISIBILITY(default) 44 | -: 40:{ 45 | -: 41:_GLIBCXX_BEGIN_NAMESPACE_VERSION 46 | -: 42: 47 | -: 43: template 48 | -: 44: locale:: 49 | -: 45: locale(const locale& __other, _Facet* __f) 50 | -: 46: { 51 | -: 47: _M_impl = new _Impl(*__other._M_impl, 1); 52 | -: 48: 53 | -: 49: __try 54 | -: 50: { _M_impl->_M_install_facet(&_Facet::id, __f); } 55 | -: 51: __catch(...) 56 | -: 52: { 57 | -: 53: _M_impl->_M_remove_reference(); 58 | -: 54: __throw_exception_again; 59 | -: 55: } 60 | -: 56: delete [] _M_impl->_M_names[0]; 61 | -: 57: _M_impl->_M_names[0] = 0; // Unnamed. 62 | -: 58: } 63 | -: 59: 64 | -: 60: template 65 | -: 61: locale 66 | -: 62: locale:: 67 | -: 63: combine(const locale& __other) const 68 | -: 64: { 69 | -: 65: _Impl* __tmp = new _Impl(*_M_impl, 1); 70 | -: 66: __try 71 | -: 67: { 72 | -: 68: __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); 73 | -: 69: } 74 | -: 70: __catch(...) 75 | -: 71: { 76 | -: 72: __tmp->_M_remove_reference(); 77 | -: 73: __throw_exception_again; 78 | -: 74: } 79 | -: 75: return locale(__tmp); 80 | -: 76: } 81 | -: 77: 82 | -: 78: template 83 | -: 79: bool 84 | -: 80: locale:: 85 | -: 81: operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, 86 | -: 82: const basic_string<_CharT, _Traits, _Alloc>& __s2) const 87 | -: 83: { 88 | -: 84: typedef std::collate<_CharT> __collate_type; 89 | -: 85: const __collate_type& __collate = use_facet<__collate_type>(*this); 90 | -: 86: return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), 91 | -: 87: __s2.data(), __s2.data() + __s2.length()) < 0); 92 | -: 88: } 93 | -: 89: 94 | -: 90: /** 95 | -: 91: * @brief Test for the presence of a facet. 96 | -: 92: * @ingroup locales 97 | -: 93: * 98 | -: 94: * has_facet tests the locale argument for the presence of the facet type 99 | -: 95: * provided as the template parameter. Facets derived from the facet 100 | -: 96: * parameter will also return true. 101 | -: 97: * 102 | -: 98: * @tparam _Facet The facet type to test the presence of. 103 | -: 99: * @param __loc The locale to test. 104 | -: 100: * @return true if @p __loc contains a facet of type _Facet, else false. 105 | -: 101: */ 106 | -: 102: template 107 | -: 103: bool 108 | -: 104: has_facet(const locale& __loc) throw() 109 | -: 105: { 110 | -: 106: const size_t __i = _Facet::id._M_id(); 111 | -: 107: const locale::facet** __facets = __loc._M_impl->_M_facets; 112 | -: 108: return (__i < __loc._M_impl->_M_facets_size 113 | -: 109:#if __cpp_rtti 114 | -: 110: && dynamic_cast(__facets[__i])); 115 | -: 111:#else 116 | -: 112: && static_cast(__facets[__i])); 117 | -: 113:#endif 118 | -: 114: } 119 | -: 115: 120 | -: 116: /** 121 | -: 117: * @brief Return a facet. 122 | -: 118: * @ingroup locales 123 | -: 119: * 124 | -: 120: * use_facet looks for and returns a reference to a facet of type Facet 125 | -: 121: * where Facet is the template parameter. If has_facet(locale) is true, 126 | -: 122: * there is a suitable facet to return. It throws std::bad_cast if the 127 | -: 123: * locale doesn't contain a facet of type Facet. 128 | -: 124: * 129 | -: 125: * @tparam _Facet The facet type to access. 130 | -: 126: * @param __loc The locale to use. 131 | -: 127: * @return Reference to facet of type Facet. 132 | -: 128: * @throw std::bad_cast if @p __loc doesn't contain a facet of type _Facet. 133 | -: 129: */ 134 | -: 130: template 135 | -: 131: const _Facet& 136 | function _ZSt9use_facetIKSt5ctypeIcEERKT_RKSt6locale called 0 returned 0% blocks executed 0% 137 | #####: 132: use_facet(const locale& __loc) 138 | -: 133: { 139 | #####: 134: const size_t __i = _Facet::id._M_id(); 140 | call 0 never executed 141 | #####: 135: const locale::facet** __facets = __loc._M_impl->_M_facets; 142 | #####: 136: if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) 143 | branch 0 never executed 144 | branch 1 never executed 145 | branch 2 never executed 146 | branch 3 never executed 147 | #####: 137: __throw_bad_cast(); 148 | call 0 never executed 149 | -: 138:#if __cpp_rtti 150 | #####: 139: return dynamic_cast(*__facets[__i]); 151 | branch 0 never executed 152 | branch 1 never executed 153 | call 2 never executed 154 | -: 140:#else 155 | -: 141: return static_cast(*__facets[__i]); 156 | -: 142:#endif 157 | -: 143: } 158 | -: 144: 159 | -: 145: 160 | -: 146: // Generic version does nothing. 161 | -: 147: template 162 | -: 148: int 163 | -: 149: collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () 164 | -: 150: { return 0; } 165 | -: 151: 166 | -: 152: // Generic version does nothing. 167 | -: 153: template 168 | -: 154: size_t 169 | -: 155: collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () 170 | -: 156: { return 0; } 171 | -: 157: 172 | -: 158: template 173 | -: 159: int 174 | -: 160: collate<_CharT>:: 175 | -: 161: do_compare(const _CharT* __lo1, const _CharT* __hi1, 176 | -: 162: const _CharT* __lo2, const _CharT* __hi2) const 177 | -: 163: { 178 | -: 164: // strcoll assumes zero-terminated strings so we make a copy 179 | -: 165: // and then put a zero at the end. 180 | -: 166: const string_type __one(__lo1, __hi1); 181 | -: 167: const string_type __two(__lo2, __hi2); 182 | -: 168: 183 | -: 169: const _CharT* __p = __one.c_str(); 184 | -: 170: const _CharT* __pend = __one.data() + __one.length(); 185 | -: 171: const _CharT* __q = __two.c_str(); 186 | -: 172: const _CharT* __qend = __two.data() + __two.length(); 187 | -: 173: 188 | -: 174: // strcoll stops when it sees a nul character so we break 189 | -: 175: // the strings into zero-terminated substrings and pass those 190 | -: 176: // to strcoll. 191 | -: 177: for (;;) 192 | -: 178: { 193 | -: 179: const int __res = _M_compare(__p, __q); 194 | -: 180: if (__res) 195 | -: 181: return __res; 196 | -: 182: 197 | -: 183: __p += char_traits<_CharT>::length(__p); 198 | -: 184: __q += char_traits<_CharT>::length(__q); 199 | -: 185: if (__p == __pend && __q == __qend) 200 | -: 186: return 0; 201 | -: 187: else if (__p == __pend) 202 | -: 188: return -1; 203 | -: 189: else if (__q == __qend) 204 | -: 190: return 1; 205 | -: 191: 206 | -: 192: __p++; 207 | -: 193: __q++; 208 | -: 194: } 209 | -: 195: } 210 | -: 196: 211 | -: 197: template 212 | -: 198: typename collate<_CharT>::string_type 213 | -: 199: collate<_CharT>:: 214 | -: 200: do_transform(const _CharT* __lo, const _CharT* __hi) const 215 | -: 201: { 216 | -: 202: string_type __ret; 217 | -: 203: 218 | -: 204: // strxfrm assumes zero-terminated strings so we make a copy 219 | -: 205: const string_type __str(__lo, __hi); 220 | -: 206: 221 | -: 207: const _CharT* __p = __str.c_str(); 222 | -: 208: const _CharT* __pend = __str.data() + __str.length(); 223 | -: 209: 224 | -: 210: size_t __len = (__hi - __lo) * 2; 225 | -: 211: 226 | -: 212: _CharT* __c = new _CharT[__len]; 227 | -: 213: 228 | -: 214: __try 229 | -: 215: { 230 | -: 216: // strxfrm stops when it sees a nul character so we break 231 | -: 217: // the string into zero-terminated substrings and pass those 232 | -: 218: // to strxfrm. 233 | -: 219: for (;;) 234 | -: 220: { 235 | -: 221: // First try a buffer perhaps big enough. 236 | -: 222: size_t __res = _M_transform(__c, __p, __len); 237 | -: 223: // If the buffer was not large enough, try again with the 238 | -: 224: // correct size. 239 | -: 225: if (__res >= __len) 240 | -: 226: { 241 | -: 227: __len = __res + 1; 242 | -: 228: delete [] __c, __c = 0; 243 | -: 229: __c = new _CharT[__len]; 244 | -: 230: __res = _M_transform(__c, __p, __len); 245 | -: 231: } 246 | -: 232: 247 | -: 233: __ret.append(__c, __res); 248 | -: 234: __p += char_traits<_CharT>::length(__p); 249 | -: 235: if (__p == __pend) 250 | -: 236: break; 251 | -: 237: 252 | -: 238: __p++; 253 | -: 239: __ret.push_back(_CharT()); 254 | -: 240: } 255 | -: 241: } 256 | -: 242: __catch(...) 257 | -: 243: { 258 | -: 244: delete [] __c; 259 | -: 245: __throw_exception_again; 260 | -: 246: } 261 | -: 247: 262 | -: 248: delete [] __c; 263 | -: 249: 264 | -: 250: return __ret; 265 | -: 251: } 266 | -: 252: 267 | -: 253: template 268 | -: 254: long 269 | -: 255: collate<_CharT>:: 270 | -: 256: do_hash(const _CharT* __lo, const _CharT* __hi) const 271 | -: 257: { 272 | -: 258: unsigned long __val = 0; 273 | -: 259: for (; __lo < __hi; ++__lo) 274 | -: 260: __val = 275 | -: 261: *__lo + ((__val << 7) 276 | -: 262: | (__val >> (__gnu_cxx::__numeric_traits:: 277 | -: 263: __digits - 7))); 278 | -: 264: return static_cast(__val); 279 | -: 265: } 280 | -: 266: 281 | -: 267: // Inhibit implicit instantiations for required instantiations, 282 | -: 268: // which are defined via explicit instantiations elsewhere. 283 | -: 269:#if _GLIBCXX_EXTERN_TEMPLATE 284 | -: 270: extern template class collate; 285 | -: 271: extern template class collate_byname; 286 | -: 272: 287 | -: 273: extern template 288 | -: 274: const collate& 289 | -: 275: use_facet >(const locale&); 290 | -: 276: 291 | -: 277: extern template 292 | -: 278: bool 293 | -: 279: has_facet >(const locale&); 294 | -: 280: 295 | -: 281:#ifdef _GLIBCXX_USE_WCHAR_T 296 | -: 282: extern template class collate; 297 | -: 283: extern template class collate_byname; 298 | -: 284: 299 | -: 285: extern template 300 | -: 286: const collate& 301 | -: 287: use_facet >(const locale&); 302 | -: 288: 303 | -: 289: extern template 304 | -: 290: bool 305 | -: 291: has_facet >(const locale&); 306 | -: 292:#endif 307 | -: 293:#endif 308 | -: 294: 309 | -: 295:_GLIBCXX_END_NAMESPACE_VERSION 310 | -: 296:} // namespace std 311 | -: 297: 312 | -: 298:#endif 313 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/#usr#include#c++#11#bits#ptr_traits.h.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:/usr/include/c++/11/bits/ptr_traits.h 2 | -: 0:Graph:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcno 3 | -: 0:Data:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcda 4 | -: 0:Runs:1 5 | -: 1:// Pointer Traits -*- C++ -*- 6 | -: 2: 7 | -: 3:// Copyright (C) 2011-2021 Free Software Foundation, Inc. 8 | -: 4:// 9 | -: 5:// This file is part of the GNU ISO C++ Library. This library is free 10 | -: 6:// software; you can redistribute it and/or modify it under the 11 | -: 7:// terms of the GNU General Public License as published by the 12 | -: 8:// Free Software Foundation; either version 3, or (at your option) 13 | -: 9:// any later version. 14 | -: 10: 15 | -: 11:// This library is distributed in the hope that it will be useful, 16 | -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | -: 14:// GNU General Public License for more details. 19 | -: 15: 20 | -: 16:// Under Section 7 of GPL version 3, you are granted additional 21 | -: 17:// permissions described in the GCC Runtime Library Exception, version 22 | -: 18:// 3.1, as published by the Free Software Foundation. 23 | -: 19: 24 | -: 20:// You should have received a copy of the GNU General Public License and 25 | -: 21:// a copy of the GCC Runtime Library Exception along with this program; 26 | -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 27 | -: 23:// . 28 | -: 24: 29 | -: 25:/** @file bits/ptr_traits.h 30 | -: 26: * This is an internal header file, included by other library headers. 31 | -: 27: * Do not attempt to use it directly. @headername{memory} 32 | -: 28: */ 33 | -: 29: 34 | -: 30:#ifndef _PTR_TRAITS_H 35 | -: 31:#define _PTR_TRAITS_H 1 36 | -: 32: 37 | -: 33:#if __cplusplus >= 201103L 38 | -: 34: 39 | -: 35:#include 40 | -: 36: 41 | -: 37:#if __cplusplus > 201703L 42 | -: 38:#define __cpp_lib_constexpr_memory 201811L 43 | -: 39:namespace __gnu_debug { struct _Safe_iterator_base; } 44 | -: 40:#endif 45 | -: 41: 46 | -: 42:namespace std _GLIBCXX_VISIBILITY(default) 47 | -: 43:{ 48 | -: 44:_GLIBCXX_BEGIN_NAMESPACE_VERSION 49 | -: 45: 50 | -: 46: class __undefined; 51 | -: 47: 52 | -: 48: // Given Template and U return Template, otherwise invalid. 53 | -: 49: template 54 | -: 50: struct __replace_first_arg 55 | -: 51: { }; 56 | -: 52: 57 | -: 53: template class _Template, typename _Up, 58 | -: 54: typename _Tp, typename... _Types> 59 | -: 55: struct __replace_first_arg<_Template<_Tp, _Types...>, _Up> 60 | -: 56: { using type = _Template<_Up, _Types...>; }; 61 | -: 57: 62 | -: 58: template 63 | -: 59: using __replace_first_arg_t = typename __replace_first_arg<_Tp, _Up>::type; 64 | -: 60: 65 | -: 61: template 66 | -: 62: using __make_not_void 67 | -: 63: = typename conditional::value, __undefined, _Tp>::type; 68 | -: 64: 69 | -: 65: template 70 | -: 66: struct __ptr_traits_elem_1 71 | -: 67: { }; 72 | -: 68: 73 | -: 69: template class _SomePointer, typename _Tp, 74 | -: 70: typename... _Args> 75 | -: 71: struct __ptr_traits_elem_1<_SomePointer<_Tp, _Args...>> 76 | -: 72: { 77 | -: 73: using element_type = _Tp; 78 | -: 74: using pointer = _SomePointer<_Tp, _Args...>; 79 | -: 75: 80 | -: 76: static pointer 81 | -: 77: pointer_to(__make_not_void& __e) 82 | -: 78: { return pointer::pointer_to(__e); } 83 | -: 79: }; 84 | -: 80: 85 | -: 81: template 86 | -: 82: struct __ptr_traits_elem : __ptr_traits_elem_1<_Ptr> 87 | -: 83: { }; 88 | -: 84: 89 | -: 85: template 90 | -: 86: struct __ptr_traits_elem<_Ptr, __void_t> 91 | -: 87: { 92 | -: 88: using element_type = typename _Ptr::element_type; 93 | -: 89: 94 | -: 90: static _Ptr 95 | -: 91: pointer_to(__make_not_void& __e) 96 | -: 92: { return _Ptr::pointer_to(__e); } 97 | -: 93: }; 98 | -: 94: 99 | -: 95: /** 100 | -: 96: * @brief Uniform interface to all pointer-like types 101 | -: 97: * @ingroup pointer_abstractions 102 | -: 98: */ 103 | -: 99: template 104 | -: 100: struct pointer_traits : __ptr_traits_elem<_Ptr> 105 | -: 101: { 106 | -: 102: private: 107 | -: 103: template 108 | -: 104: using __difference_type = typename _Tp::difference_type; 109 | -: 105: 110 | -: 106: template 111 | -: 107: struct __rebind : __replace_first_arg<_Tp, _Up> { }; 112 | -: 108: 113 | -: 109: template 114 | -: 110: struct __rebind<_Tp, _Up, __void_t>> 115 | -: 111: { using type = typename _Tp::template rebind<_Up>; }; 116 | -: 112: 117 | -: 113: public: 118 | -: 114: /// The pointer type. 119 | -: 115: using pointer = _Ptr; 120 | -: 116: 121 | -: 117: /// The type used to represent the difference between two pointers. 122 | -: 118: using difference_type 123 | -: 119: = __detected_or_t; 124 | -: 120: 125 | -: 121: /// A pointer to a different type. 126 | -: 122: template 127 | -: 123: using rebind = typename __rebind<_Ptr, _Up>::type; 128 | -: 124: }; 129 | -: 125: 130 | -: 126: /** 131 | -: 127: * @brief Partial specialization for built-in pointers. 132 | -: 128: * @ingroup pointer_abstractions 133 | -: 129: */ 134 | -: 130: template 135 | -: 131: struct pointer_traits<_Tp*> 136 | -: 132: { 137 | -: 133: /// The pointer type 138 | -: 134: typedef _Tp* pointer; 139 | -: 135: /// The type pointed to 140 | -: 136: typedef _Tp element_type; 141 | -: 137: /// Type used to represent the difference between two pointers 142 | -: 138: typedef ptrdiff_t difference_type; 143 | -: 139: 144 | -: 140: template 145 | -: 141: using rebind = _Up*; 146 | -: 142: 147 | -: 143: /** 148 | -: 144: * @brief Obtain a pointer to an object 149 | -: 145: * @param __r A reference to an object of type @c element_type 150 | -: 146: * @return @c addressof(__r) 151 | -: 147: */ 152 | -: 148: static _GLIBCXX20_CONSTEXPR pointer 153 | -: 149: pointer_to(__make_not_void& __r) noexcept 154 | -: 150: { return std::addressof(__r); } 155 | -: 151: }; 156 | -: 152: 157 | -: 153: /// Convenience alias for rebinding pointers. 158 | -: 154: template 159 | -: 155: using __ptr_rebind = typename pointer_traits<_Ptr>::template rebind<_Tp>; 160 | -: 156: 161 | -: 157: template 162 | -: 158: constexpr _Tp* 163 | 45*: 159: __to_address(_Tp* __ptr) noexcept 164 | -: 160: { 165 | -: 161: static_assert(!std::is_function<_Tp>::value, "not a function pointer"); 166 | 45*: 162: return __ptr; 167 | -: 163: } 168 | -: 164: 169 | -: 165:#if __cplusplus <= 201703L 170 | -: 166: template 171 | -: 167: constexpr typename std::pointer_traits<_Ptr>::element_type* 172 | -: 168: __to_address(const _Ptr& __ptr) 173 | -: 169: { return std::__to_address(__ptr.operator->()); } 174 | -: 170:#else 175 | -: 171: 176 | -: 172: template 177 | -: 173: constexpr auto 178 | -: 174: __to_address(const _Ptr& __ptr) noexcept 179 | -: 175: -> decltype(std::pointer_traits<_Ptr>::to_address(__ptr)) 180 | -: 176: { return std::pointer_traits<_Ptr>::to_address(__ptr); } 181 | -: 177: 182 | -: 178: template 183 | -: 179: constexpr auto 184 | -: 180: __to_address(const _Ptr& __ptr, _None...) noexcept 185 | -: 181: { 186 | -: 182: if constexpr (is_base_of_v<__gnu_debug::_Safe_iterator_base, _Ptr>) 187 | -: 183: return std::__to_address(__ptr.base().operator->()); 188 | -: 184: else 189 | -: 185: return std::__to_address(__ptr.operator->()); 190 | -: 186: } 191 | -: 187: 192 | -: 188:#define __cpp_lib_to_address 201711L 193 | -: 189: 194 | -: 190: /** 195 | -: 191: * @brief Obtain address referenced by a pointer to an object 196 | -: 192: * @param __ptr A pointer to an object 197 | -: 193: * @return @c __ptr 198 | -: 194: * @ingroup pointer_abstractions 199 | -: 195: */ 200 | -: 196: template 201 | -: 197: constexpr _Tp* 202 | -: 198: to_address(_Tp* __ptr) noexcept 203 | -: 199: { return std::__to_address(__ptr); } 204 | -: 200: 205 | -: 201: /** 206 | -: 202: * @brief Obtain address referenced by a pointer to an object 207 | -: 203: * @param __ptr A pointer to an object 208 | -: 204: * @return @c pointer_traits<_Ptr>::to_address(__ptr) if that expression is 209 | -: 205: well-formed, otherwise @c to_address(__ptr.operator->()) 210 | -: 206: * @ingroup pointer_abstractions 211 | -: 207: */ 212 | -: 208: template 213 | -: 209: constexpr auto 214 | -: 210: to_address(const _Ptr& __ptr) noexcept 215 | -: 211: { return std::__to_address(__ptr); } 216 | -: 212:#endif // C++2a 217 | -: 213: 218 | -: 214:_GLIBCXX_END_NAMESPACE_VERSION 219 | -: 215:} // namespace std 220 | -: 216: 221 | -: 217:#endif 222 | -: 218: 223 | -: 219:#endif 224 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/#usr#include#c++#11#bits#regex_automaton.tcc.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:/usr/include/c++/11/bits/regex_automaton.tcc 2 | -: 0:Graph:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcno 3 | -: 0:Data:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcda 4 | -: 0:Runs:1 5 | -: 1:// class template regex -*- C++ -*- 6 | -: 2: 7 | -: 3:// Copyright (C) 2013-2021 Free Software Foundation, Inc. 8 | -: 4:// 9 | -: 5:// This file is part of the GNU ISO C++ Library. This library is free 10 | -: 6:// software; you can redistribute it and/or modify it under the 11 | -: 7:// terms of the GNU General Public License as published by the 12 | -: 8:// Free Software Foundation; either version 3, or (at your option) 13 | -: 9:// any later version. 14 | -: 10: 15 | -: 11:// This library is distributed in the hope that it will be useful, 16 | -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | -: 14:// GNU General Public License for more details. 19 | -: 15: 20 | -: 16:// Under Section 7 of GPL version 3, you are granted additional 21 | -: 17:// permissions described in the GCC Runtime Library Exception, version 22 | -: 18:// 3.1, as published by the Free Software Foundation. 23 | -: 19: 24 | -: 20:// You should have received a copy of the GNU General Public License and 25 | -: 21:// a copy of the GCC Runtime Library Exception along with this program; 26 | -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 27 | -: 23:// . 28 | -: 24: 29 | -: 25:/** 30 | -: 26: * @file bits/regex_automaton.tcc 31 | -: 27: * This is an internal header file, included by other library headers. 32 | -: 28: * Do not attempt to use it directly. @headername{regex} 33 | -: 29: */ 34 | -: 30: 35 | -: 31:namespace std _GLIBCXX_VISIBILITY(default) 36 | -: 32:{ 37 | -: 33:_GLIBCXX_BEGIN_NAMESPACE_VERSION 38 | -: 34: 39 | -: 35:namespace __detail 40 | -: 36:{ 41 | -: 37:#ifdef _GLIBCXX_DEBUG 42 | -: 38: inline std::ostream& 43 | -: 39: _State_base::_M_print(std::ostream& ostr) const 44 | -: 40: { 45 | -: 41: switch (_M_opcode) 46 | -: 42: { 47 | -: 43: case _S_opcode_alternative: 48 | -: 44: case _S_opcode_repeat: 49 | -: 45: ostr << "alt next=" << _M_next << " alt=" << _M_alt; 50 | -: 46: break; 51 | -: 47: case _S_opcode_subexpr_begin: 52 | -: 48: ostr << "subexpr begin next=" << _M_next << " index=" << _M_subexpr; 53 | -: 49: break; 54 | -: 50: case _S_opcode_subexpr_end: 55 | -: 51: ostr << "subexpr end next=" << _M_next << " index=" << _M_subexpr; 56 | -: 52: break; 57 | -: 53: case _S_opcode_backref: 58 | -: 54: ostr << "backref next=" << _M_next << " index=" << _M_backref_index; 59 | -: 55: break; 60 | -: 56: case _S_opcode_match: 61 | -: 57: ostr << "match next=" << _M_next; 62 | -: 58: break; 63 | -: 59: case _S_opcode_accept: 64 | -: 60: ostr << "accept next=" << _M_next; 65 | -: 61: break; 66 | -: 62: default: 67 | -: 63: ostr << "unknown next=" << _M_next; 68 | -: 64: break; 69 | -: 65: } 70 | -: 66: return ostr; 71 | -: 67: } 72 | -: 68: 73 | -: 69: // Prints graphviz dot commands for state. 74 | -: 70: inline std::ostream& 75 | -: 71: _State_base::_M_dot(std::ostream& __ostr, _StateIdT __id) const 76 | -: 72: { 77 | -: 73: switch (_M_opcode) 78 | -: 74: { 79 | -: 75: case _S_opcode_alternative: 80 | -: 76: case _S_opcode_repeat: 81 | -: 77: __ostr << __id << " [label=\"" << __id << "\\nALT\"];\n" 82 | -: 78: << __id << " -> " << _M_next 83 | -: 79: << " [label=\"next\", tailport=\"s\"];\n" 84 | -: 80: << __id << " -> " << _M_alt 85 | -: 81: << " [label=\"alt\", tailport=\"n\"];\n"; 86 | -: 82: break; 87 | -: 83: case _S_opcode_backref: 88 | -: 84: __ostr << __id << " [label=\"" << __id << "\\nBACKREF " 89 | -: 85: << _M_subexpr << "\"];\n" 90 | -: 86: << __id << " -> " << _M_next << " [label=\"\"];\n"; 91 | -: 87: break; 92 | -: 88: case _S_opcode_line_begin_assertion: 93 | -: 89: __ostr << __id << " [label=\"" << __id << "\\nLINE_BEGIN \"];\n" 94 | -: 90: << __id << " -> " << _M_next << " [label=\"epsilon\"];\n"; 95 | -: 91: break; 96 | -: 92: case _S_opcode_line_end_assertion: 97 | -: 93: __ostr << __id << " [label=\"" << __id << "\\nLINE_END \"];\n" 98 | -: 94: << __id << " -> " << _M_next << " [label=\"epsilon\"];\n"; 99 | -: 95: break; 100 | -: 96: case _S_opcode_word_boundary: 101 | -: 97: __ostr << __id << " [label=\"" << __id << "\\nWORD_BOUNDRY " 102 | -: 98: << _M_neg << "\"];\n" 103 | -: 99: << __id << " -> " << _M_next << " [label=\"epsilon\"];\n"; 104 | -: 100: break; 105 | -: 101: case _S_opcode_subexpr_lookahead: 106 | -: 102: __ostr << __id << " [label=\"" << __id << "\\nLOOK_AHEAD\"];\n" 107 | -: 103: << __id << " -> " << _M_next 108 | -: 104: << " [label=\"epsilon\", tailport=\"s\"];\n" 109 | -: 105: << __id << " -> " << _M_alt 110 | -: 106: << " [label=\"\", tailport=\"n\"];\n"; 111 | -: 107: break; 112 | -: 108: case _S_opcode_subexpr_begin: 113 | -: 109: __ostr << __id << " [label=\"" << __id << "\\nSBEGIN " 114 | -: 110: << _M_subexpr << "\"];\n" 115 | -: 111: << __id << " -> " << _M_next << " [label=\"epsilon\"];\n"; 116 | -: 112: break; 117 | -: 113: case _S_opcode_subexpr_end: 118 | -: 114: __ostr << __id << " [label=\"" << __id << "\\nSEND " 119 | -: 115: << _M_subexpr << "\"];\n" 120 | -: 116: << __id << " -> " << _M_next << " [label=\"epsilon\"];\n"; 121 | -: 117: break; 122 | -: 118: case _S_opcode_dummy: 123 | -: 119: break; 124 | -: 120: case _S_opcode_match: 125 | -: 121: __ostr << __id << " [label=\"" << __id << "\\nMATCH\"];\n" 126 | -: 122: << __id << " -> " << _M_next << " [label=\"\"];\n"; 127 | -: 123: break; 128 | -: 124: case _S_opcode_accept: 129 | -: 125: __ostr << __id << " [label=\"" << __id << "\\nACC\"];\n" ; 130 | -: 126: break; 131 | -: 127: default: 132 | -: 128: _GLIBCXX_DEBUG_ASSERT(false); 133 | -: 129: break; 134 | -: 130: } 135 | -: 131: return __ostr; 136 | -: 132: } 137 | -: 133: 138 | -: 134: template 139 | -: 135: std::ostream& 140 | -: 136: _NFA<_TraitsT>::_M_dot(std::ostream& __ostr) const 141 | -: 137: { 142 | -: 138: __ostr << "digraph _Nfa {\n" 143 | -: 139: " rankdir=LR;\n"; 144 | -: 140: for (size_t __i = 0; __i < this->size(); ++__i) 145 | -: 141: (*this)[__i]._M_dot(__ostr, __i); 146 | -: 142: __ostr << "}\n"; 147 | -: 143: return __ostr; 148 | -: 144: } 149 | -: 145:#endif 150 | -: 146: 151 | -: 147: template 152 | -: 148: _StateIdT 153 | function _ZNSt8__detail4_NFAINSt7__cxx1112regex_traitsIcEEE17_M_insert_backrefEm called 0 returned 0% blocks executed 0% 154 | #####: 149: _NFA<_TraitsT>::_M_insert_backref(size_t __index) 155 | -: 150: { 156 | #####: 151: if (this->_M_flags & regex_constants::__polynomial) 157 | call 0 never executed 158 | branch 1 never executed 159 | branch 2 never executed 160 | #####: 152: __throw_regex_error(regex_constants::error_complexity, 161 | call 0 never executed 162 | branch 1 never executed 163 | branch 2 never executed 164 | -: 153: "Unexpected back-reference in polynomial mode."); 165 | -: 154: // To figure out whether a backref is valid, a stack is used to store 166 | -: 155: // unfinished sub-expressions. For example, when parsing 167 | -: 156: // "(a(b)(c\\1(d)))" at '\\1', _M_subexpr_count is 3, indicating that 3 168 | -: 157: // sub expressions are parsed or partially parsed(in the stack), aka, 169 | -: 158: // "(a..", "(b)" and "(c.."). 170 | -: 159: // _M_paren_stack is {1, 3}, for incomplete "(a.." and "(c..". At this 171 | -: 160: // time, "\\2" is valid, but "\\1" and "\\3" are not. 172 | #####: 161: if (__index >= _M_subexpr_count) 173 | branch 0 never executed 174 | branch 1 never executed 175 | #####: 162: __throw_regex_error( 176 | call 0 never executed 177 | branch 1 never executed 178 | branch 2 never executed 179 | -: 163: regex_constants::error_backref, 180 | -: 164: "Back-reference index exceeds current sub-expression count."); 181 | #####: 165: for (auto __it : this->_M_paren_stack) 182 | call 0 never executed 183 | call 1 never executed 184 | call 2 never executed 185 | call 3 never executed 186 | call 4 never executed 187 | branch 5 never executed 188 | branch 6 never executed 189 | #####: 166: if (__index == __it) 190 | branch 0 never executed 191 | branch 1 never executed 192 | #####: 167: __throw_regex_error( 193 | call 0 never executed 194 | branch 1 never executed 195 | branch 2 never executed 196 | -: 168: regex_constants::error_backref, 197 | -: 169: "Back-reference referred to an opened sub-expression."); 198 | #####: 170: this->_M_has_backref = true; 199 | #####: 171: _StateT __tmp(_S_opcode_backref); 200 | call 0 never executed 201 | #####: 172: __tmp._M_backref_index = __index; 202 | #####: 173: return _M_insert_state(std::move(__tmp)); 203 | call 0 never executed 204 | call 1 never executed 205 | call 2 never executed 206 | branch 3 never executed 207 | branch 4 never executed 208 | call 5 never executed 209 | call 6 never executed 210 | #####: 174: } 211 | call 0 never executed 212 | call 1 never executed 213 | -: 175: 214 | -: 176: template 215 | -: 177: void 216 | function _ZNSt8__detail4_NFAINSt7__cxx1112regex_traitsIcEEE18_M_eliminate_dummyEv called 0 returned 0% blocks executed 0% 217 | #####: 178: _NFA<_TraitsT>::_M_eliminate_dummy() 218 | -: 179: { 219 | #####: 180: for (auto& __it : *this) 220 | call 0 never executed 221 | call 1 never executed 222 | call 2 never executed 223 | call 3 never executed 224 | call 4 never executed 225 | branch 5 never executed 226 | branch 6 never executed 227 | -: 181: { 228 | #####: 182: while (__it._M_next >= 0 && (*this)[__it._M_next]._M_opcode() 229 | branch 0 never executed 230 | branch 1 never executed 231 | call 2 never executed 232 | call 3 never executed 233 | branch 4 never executed 234 | branch 5 never executed 235 | branch 6 never executed 236 | branch 7 never executed 237 | -: 183: == _S_opcode_dummy) 238 | #####: 184: __it._M_next = (*this)[__it._M_next]._M_next; 239 | call 0 never executed 240 | #####: 185: if (__it._M_has_alt()) 241 | call 0 never executed 242 | branch 1 never executed 243 | branch 2 never executed 244 | #####: 186: while (__it._M_alt >= 0 && (*this)[__it._M_alt]._M_opcode() 245 | branch 0 never executed 246 | branch 1 never executed 247 | call 2 never executed 248 | call 3 never executed 249 | branch 4 never executed 250 | branch 5 never executed 251 | branch 6 never executed 252 | branch 7 never executed 253 | -: 187: == _S_opcode_dummy) 254 | #####: 188: __it._M_alt = (*this)[__it._M_alt]._M_next; 255 | call 0 never executed 256 | -: 189: } 257 | #####: 190: } 258 | -: 191: 259 | -: 192: // Just apply DFS on the sequence and re-link their links. 260 | -: 193: template 261 | -: 194: _StateSeq<_TraitsT> 262 | function _ZNSt8__detail9_StateSeqINSt7__cxx1112regex_traitsIcEEE8_M_cloneEv called 0 returned 0% blocks executed 0% 263 | #####: 195: _StateSeq<_TraitsT>::_M_clone() 264 | -: 196: { 265 | #####: 197: std::map<_StateIdT, _StateIdT> __m; 266 | call 0 never executed 267 | #####: 198: std::stack<_StateIdT> __stack; 268 | call 0 never executed 269 | branch 1 never executed 270 | branch 2 never executed 271 | #####: 199: __stack.push(_M_start); 272 | call 0 never executed 273 | branch 1 never executed 274 | branch 2 never executed 275 | #####: 200: while (!__stack.empty()) 276 | call 0 never executed 277 | branch 1 never executed 278 | branch 2 never executed 279 | call 3 never executed 280 | branch 4 never executed 281 | branch 5 never executed 282 | call 6 never executed 283 | -: 201: { 284 | #####: 202: auto __u = __stack.top(); 285 | call 0 never executed 286 | #####: 203: __stack.pop(); 287 | call 0 never executed 288 | #####: 204: auto __dup = _M_nfa[__u]; 289 | call 0 never executed 290 | call 1 never executed 291 | branch 2 never executed 292 | branch 3 never executed 293 | -: 205: // _M_insert_state() never return -1 294 | #####: 206: auto __id = _M_nfa._M_insert_state(std::move(__dup)); 295 | call 0 never executed 296 | call 1 never executed 297 | call 2 never executed 298 | branch 3 never executed 299 | branch 4 never executed 300 | call 5 never executed 301 | call 6 never executed 302 | #####: 207: __m[__u] = __id; 303 | call 0 never executed 304 | branch 1 never executed 305 | branch 2 never executed 306 | #####: 208: if (__dup._M_has_alt()) 307 | call 0 never executed 308 | branch 1 never executed 309 | branch 2 never executed 310 | #####: 209: if (__dup._M_alt != _S_invalid_state_id 311 | #####: 210: && __m.count(__dup._M_alt) == 0) 312 | branch 0 never executed 313 | branch 1 never executed 314 | call 2 never executed 315 | branch 3 never executed 316 | branch 4 never executed 317 | branch 5 never executed 318 | branch 6 never executed 319 | branch 7 never executed 320 | branch 8 never executed 321 | #####: 211: __stack.push(__dup._M_alt); 322 | call 0 never executed 323 | branch 1 never executed 324 | branch 2 never executed 325 | #####: 212: if (__u == _M_end) 326 | branch 0 never executed 327 | branch 1 never executed 328 | #####: 213: continue; 329 | #####: 214: if (__dup._M_next != _S_invalid_state_id 330 | #####: 215: && __m.count(__dup._M_next) == 0) 331 | branch 0 never executed 332 | branch 1 never executed 333 | call 2 never executed 334 | branch 3 never executed 335 | branch 4 never executed 336 | branch 5 never executed 337 | branch 6 never executed 338 | branch 7 never executed 339 | branch 8 never executed 340 | #####: 216: __stack.push(__dup._M_next); 341 | call 0 never executed 342 | branch 1 never executed 343 | branch 2 never executed 344 | -: 217: } 345 | #####: 218: for (auto __it : __m) 346 | call 0 never executed 347 | call 1 never executed 348 | call 2 never executed 349 | call 3 never executed 350 | call 4 never executed 351 | branch 5 never executed 352 | branch 6 never executed 353 | -: 219: { 354 | #####: 220: auto __v = __it.second; 355 | #####: 221: auto& __ref = _M_nfa[__v]; 356 | call 0 never executed 357 | #####: 222: if (__ref._M_next != _S_invalid_state_id) 358 | branch 0 never executed 359 | branch 1 never executed 360 | #####: 223: __ref._M_next = __m.find(__ref._M_next)->second; 361 | call 0 never executed 362 | branch 1 never executed 363 | branch 2 never executed 364 | call 3 never executed 365 | #####: 224: if (__ref._M_has_alt() && __ref._M_alt != _S_invalid_state_id) 366 | call 0 never executed 367 | branch 1 never executed 368 | branch 2 never executed 369 | branch 3 never executed 370 | branch 4 never executed 371 | branch 5 never executed 372 | branch 6 never executed 373 | #####: 225: __ref._M_alt = __m.find(__ref._M_alt)->second; 374 | call 0 never executed 375 | branch 1 never executed 376 | branch 2 never executed 377 | call 3 never executed 378 | -: 226: } 379 | #####: 227: return _StateSeq(_M_nfa, __m[_M_start], __m[_M_end]); 380 | call 0 never executed 381 | branch 1 never executed 382 | branch 2 never executed 383 | call 3 never executed 384 | branch 4 never executed 385 | branch 5 never executed 386 | call 6 never executed 387 | #####: 228: } 388 | call 0 never executed 389 | call 1 never executed 390 | call 2 never executed 391 | call 3 never executed 392 | -: 229:} // namespace __detail 393 | -: 230: 394 | -: 231:_GLIBCXX_END_NAMESPACE_VERSION 395 | -: 232:} // namespace 396 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/#usr#include#c++#11#bits#regex_error.h.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:/usr/include/c++/11/bits/regex_error.h 2 | -: 0:Graph:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcno 3 | -: 0:Data:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcda 4 | -: 0:Runs:1 5 | -: 1:// class template regex -*- C++ -*- 6 | -: 2: 7 | -: 3:// Copyright (C) 2010-2021 Free Software Foundation, Inc. 8 | -: 4:// 9 | -: 5:// This file is part of the GNU ISO C++ Library. This library is free 10 | -: 6:// software; you can redistribute it and/or modify it under the 11 | -: 7:// terms of the GNU General Public License as published by the 12 | -: 8:// Free Software Foundation; either version 3, or (at your option) 13 | -: 9:// any later version. 14 | -: 10: 15 | -: 11:// This library is distributed in the hope that it will be useful, 16 | -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | -: 14:// GNU General Public License for more details. 19 | -: 15: 20 | -: 16:// Under Section 7 of GPL version 3, you are granted additional 21 | -: 17:// permissions described in the GCC Runtime Library Exception, version 22 | -: 18:// 3.1, as published by the Free Software Foundation. 23 | -: 19: 24 | -: 20:// You should have received a copy of the GNU General Public License and 25 | -: 21:// a copy of the GCC Runtime Library Exception along with this program; 26 | -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 27 | -: 23:// . 28 | -: 24: 29 | -: 25:/** 30 | -: 26: * @file bits/regex_error.h 31 | -: 27: * @brief Error and exception objects for the std regex library. 32 | -: 28: * 33 | -: 29: * This is an internal header file, included by other library headers. 34 | -: 30: * Do not attempt to use it directly. @headername{regex} 35 | -: 31: */ 36 | -: 32: 37 | -: 33:namespace std _GLIBCXX_VISIBILITY(default) 38 | -: 34:{ 39 | -: 35:_GLIBCXX_BEGIN_NAMESPACE_VERSION 40 | -: 36: 41 | -: 37:/** 42 | -: 38: * @addtogroup regex 43 | -: 39: * @{ 44 | -: 40: */ 45 | -: 41: 46 | -: 42:namespace regex_constants 47 | -: 43:{ 48 | -: 44: /** 49 | -: 45: * @name 5.3 Error Types 50 | -: 46: */ 51 | -: 47: ///@{ 52 | -: 48: 53 | -: 49: enum error_type 54 | -: 50: { 55 | -: 51: _S_error_collate, 56 | -: 52: _S_error_ctype, 57 | -: 53: _S_error_escape, 58 | -: 54: _S_error_backref, 59 | -: 55: _S_error_brack, 60 | -: 56: _S_error_paren, 61 | -: 57: _S_error_brace, 62 | -: 58: _S_error_badbrace, 63 | -: 59: _S_error_range, 64 | -: 60: _S_error_space, 65 | -: 61: _S_error_badrepeat, 66 | -: 62: _S_error_complexity, 67 | -: 63: _S_error_stack, 68 | -: 64: _S_null, 69 | -: 65: _S_grammar 70 | -: 66: }; 71 | -: 67: 72 | -: 68: /** The expression contained an invalid collating element name. */ 73 | -: 69: constexpr error_type error_collate(_S_error_collate); 74 | -: 70: 75 | -: 71: /** The expression contained an invalid character class name. */ 76 | -: 72: constexpr error_type error_ctype(_S_error_ctype); 77 | -: 73: 78 | -: 74: /** 79 | -: 75: * The expression contained an invalid escaped character, or a trailing 80 | -: 76: * escape. 81 | -: 77: */ 82 | -: 78: constexpr error_type error_escape(_S_error_escape); 83 | -: 79: 84 | -: 80: /** The expression contained an invalid back reference. */ 85 | -: 81: constexpr error_type error_backref(_S_error_backref); 86 | -: 82: 87 | -: 83: /** The expression contained mismatched [ and ]. */ 88 | -: 84: constexpr error_type error_brack(_S_error_brack); 89 | -: 85: 90 | -: 86: /** The expression contained mismatched ( and ). */ 91 | -: 87: constexpr error_type error_paren(_S_error_paren); 92 | -: 88: 93 | -: 89: /** The expression contained mismatched { and } */ 94 | -: 90: constexpr error_type error_brace(_S_error_brace); 95 | -: 91: 96 | -: 92: /** The expression contained an invalid range in a {} expression. */ 97 | -: 93: constexpr error_type error_badbrace(_S_error_badbrace); 98 | -: 94: 99 | -: 95: /** 100 | -: 96: * The expression contained an invalid character range, 101 | -: 97: * such as [b-a] in most encodings. 102 | -: 98: */ 103 | -: 99: constexpr error_type error_range(_S_error_range); 104 | -: 100: 105 | -: 101: /** 106 | -: 102: * There was insufficient memory to convert the expression into a 107 | -: 103: * finite state machine. 108 | -: 104: */ 109 | -: 105: constexpr error_type error_space(_S_error_space); 110 | -: 106: 111 | -: 107: /** 112 | -: 108: * One of *?+{ was not preceded by a valid regular expression. 113 | -: 109: */ 114 | -: 110: constexpr error_type error_badrepeat(_S_error_badrepeat); 115 | -: 111: 116 | -: 112: /** 117 | -: 113: * The complexity of an attempted match against a regular expression 118 | -: 114: * exceeded a pre-set level. 119 | -: 115: */ 120 | -: 116: constexpr error_type error_complexity(_S_error_complexity); 121 | -: 117: 122 | -: 118: /** 123 | -: 119: * There was insufficient memory to determine whether the 124 | -: 120: * regular expression could match the specified character sequence. 125 | -: 121: */ 126 | -: 122: constexpr error_type error_stack(_S_error_stack); 127 | -: 123: 128 | -: 124: ///@} 129 | -: 125:} // namespace regex_constants 130 | -: 126: 131 | -: 127: // [7.8] Class regex_error 132 | -: 128: /** 133 | -: 129: * @brief A regular expression exception class. 134 | -: 130: * @ingroup exceptions 135 | -: 131: * 136 | -: 132: * The regular expression library throws objects of this class on error. 137 | -: 133: */ 138 | -: 134: class regex_error : public std::runtime_error 139 | -: 135: { 140 | -: 136: regex_constants::error_type _M_code; 141 | -: 137: 142 | -: 138: public: 143 | -: 139: /** 144 | -: 140: * @brief Constructs a regex_error object. 145 | -: 141: * 146 | -: 142: * @param __ecode the regex error code. 147 | -: 143: */ 148 | -: 144: explicit 149 | -: 145: regex_error(regex_constants::error_type __ecode); 150 | -: 146: 151 | -: 147: virtual ~regex_error() throw(); 152 | -: 148: 153 | -: 149: /** 154 | -: 150: * @brief Gets the regex error code. 155 | -: 151: * 156 | -: 152: * @returns the regex error code. 157 | -: 153: */ 158 | -: 154: regex_constants::error_type 159 | -: 155: code() const noexcept 160 | -: 156: { return _M_code; } 161 | -: 157: 162 | -: 158: private: 163 | function _ZNSt11regex_errorC2ENSt15regex_constants10error_typeEPKc called 0 returned 0% blocks executed 0% 164 | #####: 159: regex_error(regex_constants::error_type __ecode, const char* __what) 165 | #####: 160: : std::runtime_error(__what), _M_code(__ecode) 166 | call 0 never executed 167 | #####: 161: { } 168 | -: 162: 169 | -: 163: friend void __throw_regex_error(regex_constants::error_type, const char*); 170 | -: 164: }; 171 | -: 165: 172 | -: 166: ///@} // group regex 173 | -: 167: 174 | -: 168: void 175 | -: 169: __throw_regex_error(regex_constants::error_type __ecode); 176 | -: 170: 177 | -: 171: inline void 178 | function _ZSt19__throw_regex_errorNSt15regex_constants10error_typeEPKc called 0 returned 0% blocks executed 0% 179 | #####: 172: __throw_regex_error(regex_constants::error_type __ecode 180 | -: 173: __attribute__((__unused__)), 181 | -: 174: const char* __what __attribute__((__unused__))) 182 | #####: 175: { _GLIBCXX_THROW_OR_ABORT(regex_error(__ecode, __what)); } 183 | call 0 never executed 184 | call 1 never executed 185 | branch 2 never executed 186 | branch 3 never executed 187 | call 4 never executed 188 | call 5 never executed 189 | -: 176: 190 | -: 177:_GLIBCXX_END_NAMESPACE_VERSION 191 | -: 178:} // namespace std 192 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/#usr#include#c++#11#bits#regex_scanner.h.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:/usr/include/c++/11/bits/regex_scanner.h 2 | -: 0:Graph:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcno 3 | -: 0:Data:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcda 4 | -: 0:Runs:1 5 | -: 1:// class template regex -*- C++ -*- 6 | -: 2: 7 | -: 3:// Copyright (C) 2013-2021 Free Software Foundation, Inc. 8 | -: 4:// 9 | -: 5:// This file is part of the GNU ISO C++ Library. This library is free 10 | -: 6:// software; you can redistribute it and/or modify it under the 11 | -: 7:// terms of the GNU General Public License as published by the 12 | -: 8:// Free Software Foundation; either version 3, or (at your option) 13 | -: 9:// any later version. 14 | -: 10: 15 | -: 11:// This library is distributed in the hope that it will be useful, 16 | -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | -: 14:// GNU General Public License for more details. 19 | -: 15: 20 | -: 16:// Under Section 7 of GPL version 3, you are granted additional 21 | -: 17:// permissions described in the GCC Runtime Library Exception, version 22 | -: 18:// 3.1, as published by the Free Software Foundation. 23 | -: 19: 24 | -: 20:// You should have received a copy of the GNU General Public License and 25 | -: 21:// a copy of the GCC Runtime Library Exception along with this program; 26 | -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 27 | -: 23:// . 28 | -: 24: 29 | -: 25:/** 30 | -: 26: * @file bits/regex_scanner.h 31 | -: 27: * This is an internal header file, included by other library headers. 32 | -: 28: * Do not attempt to use it directly. @headername{regex} 33 | -: 29: */ 34 | -: 30: 35 | -: 31:namespace std _GLIBCXX_VISIBILITY(default) 36 | -: 32:{ 37 | -: 33:_GLIBCXX_BEGIN_NAMESPACE_VERSION 38 | -: 34: 39 | -: 35:namespace __detail 40 | -: 36:{ 41 | -: 37: /** 42 | -: 38: * @addtogroup regex-detail 43 | -: 39: * @{ 44 | -: 40: */ 45 | -: 41: 46 | -: 42: struct _ScannerBase 47 | -: 43: { 48 | -: 44: public: 49 | -: 45: /// Token types returned from the scanner. 50 | -: 46: enum _TokenT : unsigned 51 | -: 47: { 52 | -: 48: _S_token_anychar, 53 | -: 49: _S_token_ord_char, 54 | -: 50: _S_token_oct_num, 55 | -: 51: _S_token_hex_num, 56 | -: 52: _S_token_backref, 57 | -: 53: _S_token_subexpr_begin, 58 | -: 54: _S_token_subexpr_no_group_begin, 59 | -: 55: _S_token_subexpr_lookahead_begin, // neg if _M_value[0] == 'n' 60 | -: 56: _S_token_subexpr_end, 61 | -: 57: _S_token_bracket_begin, 62 | -: 58: _S_token_bracket_neg_begin, 63 | -: 59: _S_token_bracket_end, 64 | -: 60: _S_token_interval_begin, 65 | -: 61: _S_token_interval_end, 66 | -: 62: _S_token_quoted_class, 67 | -: 63: _S_token_char_class_name, 68 | -: 64: _S_token_collsymbol, 69 | -: 65: _S_token_equiv_class_name, 70 | -: 66: _S_token_opt, 71 | -: 67: _S_token_or, 72 | -: 68: _S_token_closure0, 73 | -: 69: _S_token_closure1, 74 | -: 70: _S_token_line_begin, 75 | -: 71: _S_token_line_end, 76 | -: 72: _S_token_word_bound, // neg if _M_value[0] == 'n' 77 | -: 73: _S_token_comma, 78 | -: 74: _S_token_dup_count, 79 | -: 75: _S_token_eof, 80 | -: 76: _S_token_bracket_dash, 81 | -: 77: _S_token_unknown = -1u 82 | -: 78: }; 83 | -: 79: 84 | -: 80: protected: 85 | -: 81: typedef regex_constants::syntax_option_type _FlagT; 86 | -: 82: 87 | -: 83: enum _StateT 88 | -: 84: { 89 | -: 85: _S_state_normal, 90 | -: 86: _S_state_in_brace, 91 | -: 87: _S_state_in_bracket, 92 | -: 88: }; 93 | -: 89: 94 | -: 90: protected: 95 | function _ZNSt8__detail12_ScannerBaseC2ENSt15regex_constants18syntax_option_typeE called 0 returned 0% blocks executed 0% 96 | #####: 91: _ScannerBase(_FlagT __flags) 97 | #####: 92: : _M_state(_S_state_normal), 98 | #####: 93: _M_flags(__flags), 99 | #####: 94: _M_escape_tbl(_M_is_ecma() 100 | #####: 95: ? _M_ecma_escape_tbl 101 | branch 0 never executed 102 | branch 1 never executed 103 | -: 96: : _M_awk_escape_tbl), 104 | #####: 97: _M_spec_char(_M_is_ecma() 105 | call 0 never executed 106 | #####: 98: ? _M_ecma_spec_char 107 | branch 0 never executed 108 | branch 1 never executed 109 | #####: 99: : _M_flags & regex_constants::basic 110 | call 0 never executed 111 | #####: 100: ? _M_basic_spec_char 112 | branch 0 never executed 113 | branch 1 never executed 114 | #####: 101: : _M_flags & regex_constants::extended 115 | call 0 never executed 116 | #####: 102: ? _M_extended_spec_char 117 | branch 0 never executed 118 | branch 1 never executed 119 | #####: 103: : _M_flags & regex_constants::grep 120 | call 0 never executed 121 | #####: 104: ? ".[\\*^$\n" 122 | branch 0 never executed 123 | branch 1 never executed 124 | #####: 105: : _M_flags & regex_constants::egrep 125 | call 0 never executed 126 | #####: 106: ? ".[\\()*+?{|^$\n" 127 | branch 0 never executed 128 | branch 1 never executed 129 | #####: 107: : _M_flags & regex_constants::awk 130 | call 0 never executed 131 | #####: 108: ? _M_extended_spec_char 132 | branch 0 never executed 133 | branch 1 never executed 134 | -: 109: : nullptr), 135 | #####: 110: _M_at_bracket_start(false) 136 | call 0 never executed 137 | #####: 111: { __glibcxx_assert(_M_spec_char); } 138 | -: 112: 139 | -: 113: protected: 140 | -: 114: const char* 141 | function _ZNSt8__detail12_ScannerBase14_M_find_escapeEc called 0 returned 0% blocks executed 0% 142 | #####: 115: _M_find_escape(char __c) 143 | -: 116: { 144 | #####: 117: auto __it = _M_escape_tbl; 145 | #####: 118: for (; __it->first != '\0'; ++__it) 146 | branch 0 never executed 147 | branch 1 never executed 148 | #####: 119: if (__it->first == __c) 149 | branch 0 never executed 150 | branch 1 never executed 151 | #####: 120: return &__it->second; 152 | #####: 121: return nullptr; 153 | -: 122: } 154 | -: 123: 155 | -: 124: bool 156 | function _ZNKSt8__detail12_ScannerBase10_M_is_ecmaEv called 0 returned 0% blocks executed 0% 157 | #####: 125: _M_is_ecma() const 158 | #####: 126: { return _M_flags & regex_constants::ECMAScript; } 159 | call 0 never executed 160 | -: 127: 161 | -: 128: bool 162 | function _ZNKSt8__detail12_ScannerBase11_M_is_basicEv called 0 returned 0% blocks executed 0% 163 | #####: 129: _M_is_basic() const 164 | #####: 130: { return _M_flags & (regex_constants::basic | regex_constants::grep); } 165 | call 0 never executed 166 | call 1 never executed 167 | -: 131: 168 | -: 132: bool 169 | -: 133: _M_is_extended() const 170 | -: 134: { 171 | -: 135: return _M_flags & (regex_constants::extended 172 | -: 136: | regex_constants::egrep 173 | -: 137: | regex_constants::awk); 174 | -: 138: } 175 | -: 139: 176 | -: 140: bool 177 | -: 141: _M_is_grep() const 178 | -: 142: { return _M_flags & (regex_constants::grep | regex_constants::egrep); } 179 | -: 143: 180 | -: 144: bool 181 | function _ZNKSt8__detail12_ScannerBase9_M_is_awkEv called 0 returned 0% blocks executed 0% 182 | #####: 145: _M_is_awk() const 183 | #####: 146: { return _M_flags & regex_constants::awk; } 184 | call 0 never executed 185 | -: 147: 186 | -: 148: protected: 187 | -: 149: // TODO: Make them static in the next abi change. 188 | -: 150: const std::pair _M_token_tbl[9] = 189 | -: 151: { 190 | -: 152: {'^', _S_token_line_begin}, 191 | -: 153: {'$', _S_token_line_end}, 192 | -: 154: {'.', _S_token_anychar}, 193 | -: 155: {'*', _S_token_closure0}, 194 | -: 156: {'+', _S_token_closure1}, 195 | -: 157: {'?', _S_token_opt}, 196 | -: 158: {'|', _S_token_or}, 197 | -: 159: {'\n', _S_token_or}, // grep and egrep 198 | -: 160: {'\0', _S_token_or}, 199 | -: 161: }; 200 | -: 162: const std::pair _M_ecma_escape_tbl[8] = 201 | -: 163: { 202 | -: 164: {'0', '\0'}, 203 | -: 165: {'b', '\b'}, 204 | -: 166: {'f', '\f'}, 205 | -: 167: {'n', '\n'}, 206 | -: 168: {'r', '\r'}, 207 | -: 169: {'t', '\t'}, 208 | -: 170: {'v', '\v'}, 209 | -: 171: {'\0', '\0'}, 210 | -: 172: }; 211 | -: 173: const std::pair _M_awk_escape_tbl[11] = 212 | -: 174: { 213 | -: 175: {'"', '"'}, 214 | -: 176: {'/', '/'}, 215 | -: 177: {'\\', '\\'}, 216 | -: 178: {'a', '\a'}, 217 | -: 179: {'b', '\b'}, 218 | -: 180: {'f', '\f'}, 219 | -: 181: {'n', '\n'}, 220 | -: 182: {'r', '\r'}, 221 | -: 183: {'t', '\t'}, 222 | -: 184: {'v', '\v'}, 223 | -: 185: {'\0', '\0'}, 224 | -: 186: }; 225 | -: 187: const char* _M_ecma_spec_char = "^$\\.*+?()[]{}|"; 226 | -: 188: const char* _M_basic_spec_char = ".[\\*^$"; 227 | -: 189: const char* _M_extended_spec_char = ".[\\()*+?{|^$"; 228 | -: 190: 229 | -: 191: _StateT _M_state; 230 | -: 192: _FlagT _M_flags; 231 | -: 193: _TokenT _M_token; 232 | -: 194: const std::pair* _M_escape_tbl; 233 | -: 195: const char* _M_spec_char; 234 | -: 196: bool _M_at_bracket_start; 235 | -: 197: }; 236 | -: 198: 237 | -: 199: /** 238 | -: 200: * @brief Scans an input range for regex tokens. 239 | -: 201: * 240 | -: 202: * The %_Scanner class interprets the regular expression pattern in 241 | -: 203: * the input range passed to its constructor as a sequence of parse 242 | -: 204: * tokens passed to the regular expression compiler. The sequence 243 | -: 205: * of tokens provided depends on the flag settings passed to the 244 | -: 206: * constructor: different regular expression grammars will interpret 245 | -: 207: * the same input pattern in syntactically different ways. 246 | -: 208: */ 247 | -: 209: template 248 | -: 210: class _Scanner 249 | -: 211: : public _ScannerBase 250 | -: 212: { 251 | -: 213: public: 252 | -: 214: typedef std::basic_string<_CharT> _StringT; 253 | -: 215: typedef regex_constants::syntax_option_type _FlagT; 254 | -: 216: typedef const std::ctype<_CharT> _CtypeT; 255 | -: 217: 256 | -: 218: _Scanner(const _CharT* __begin, const _CharT* __end, 257 | -: 219: _FlagT __flags, std::locale __loc); 258 | -: 220: 259 | -: 221: void 260 | -: 222: _M_advance(); 261 | -: 223: 262 | -: 224: _TokenT 263 | function _ZNKSt8__detail8_ScannerIcE12_M_get_tokenEv called 0 returned 0% blocks executed 0% 264 | #####: 225: _M_get_token() const noexcept 265 | #####: 226: { return _M_token; } 266 | -: 227: 267 | -: 228: const _StringT& 268 | function _ZNKSt8__detail8_ScannerIcE12_M_get_valueB5cxx11Ev called 0 returned 0% blocks executed 0% 269 | #####: 229: _M_get_value() const noexcept 270 | #####: 230: { return _M_value; } 271 | -: 231: 272 | -: 232:#ifdef _GLIBCXX_DEBUG 273 | -: 233: std::ostream& 274 | -: 234: _M_print(std::ostream&); 275 | -: 235:#endif 276 | -: 236: 277 | -: 237: private: 278 | -: 238: void 279 | -: 239: _M_scan_normal(); 280 | -: 240: 281 | -: 241: void 282 | -: 242: _M_scan_in_bracket(); 283 | -: 243: 284 | -: 244: void 285 | -: 245: _M_scan_in_brace(); 286 | -: 246: 287 | -: 247: void 288 | -: 248: _M_eat_escape_ecma(); 289 | -: 249: 290 | -: 250: void 291 | -: 251: _M_eat_escape_posix(); 292 | -: 252: 293 | -: 253: void 294 | -: 254: _M_eat_escape_awk(); 295 | -: 255: 296 | -: 256: void 297 | -: 257: _M_eat_class(char); 298 | -: 258: 299 | -: 259: const _CharT* _M_current; 300 | -: 260: const _CharT* _M_end; 301 | -: 261: _CtypeT& _M_ctype; 302 | -: 262: _StringT _M_value; 303 | -: 263: void (_Scanner::* _M_eat_escape)(); 304 | -: 264: }; 305 | -: 265: 306 | -: 266: ///@} regex-detail 307 | -: 267:} // namespace __detail 308 | -: 268:_GLIBCXX_END_NAMESPACE_VERSION 309 | -: 269:} // namespace std 310 | -: 270: 311 | -: 271:#include 312 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/#usr#include#c++#11#bits#std_abs.h.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:/usr/include/c++/11/bits/std_abs.h 2 | -: 0:Graph:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcno 3 | -: 0:Data:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcda 4 | -: 0:Runs:1 5 | -: 1:// -*- C++ -*- C library enhancements header. 6 | -: 2: 7 | -: 3:// Copyright (C) 2016-2021 Free Software Foundation, Inc. 8 | -: 4:// 9 | -: 5:// This file is part of the GNU ISO C++ Library. This library is free 10 | -: 6:// software; you can redistribute it and/or modify it under the 11 | -: 7:// terms of the GNU General Public License as published by the 12 | -: 8:// Free Software Foundation; either version 3, or (at your option) 13 | -: 9:// any later version. 14 | -: 10: 15 | -: 11:// This library is distributed in the hope that it will be useful, 16 | -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | -: 14:// GNU General Public License for more details. 19 | -: 15: 20 | -: 16:// Under Section 7 of GPL version 3, you are granted additional 21 | -: 17:// permissions described in the GCC Runtime Library Exception, version 22 | -: 18:// 3.1, as published by the Free Software Foundation. 23 | -: 19: 24 | -: 20:// You should have received a copy of the GNU General Public License and 25 | -: 21:// a copy of the GCC Runtime Library Exception along with this program; 26 | -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 27 | -: 23:// . 28 | -: 24: 29 | -: 25:/** @file include/bits/std_abs.h 30 | -: 26: * This is an internal header file, included by other library headers. 31 | -: 27: * Do not attempt to use it directly. @headername{cmath, cstdlib} 32 | -: 28: */ 33 | -: 29: 34 | -: 30:#ifndef _GLIBCXX_BITS_STD_ABS_H 35 | -: 31:#define _GLIBCXX_BITS_STD_ABS_H 36 | -: 32: 37 | -: 33:#pragma GCC system_header 38 | -: 34: 39 | -: 35:#include 40 | -: 36: 41 | -: 37:#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS 42 | -: 38:#include_next 43 | -: 39:#ifdef __CORRECT_ISO_CPP_MATH_H_PROTO 44 | -: 40:# include_next 45 | -: 41:#endif 46 | -: 42:#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS 47 | -: 43: 48 | -: 44:#undef abs 49 | -: 45: 50 | -: 46:extern "C++" 51 | -: 47:{ 52 | -: 48:namespace std _GLIBCXX_VISIBILITY(default) 53 | -: 49:{ 54 | -: 50:_GLIBCXX_BEGIN_NAMESPACE_VERSION 55 | -: 51: 56 | -: 52: using ::abs; 57 | -: 53: 58 | -: 54:#ifndef __CORRECT_ISO_CPP_STDLIB_H_PROTO 59 | -: 55: inline long 60 | -: 56: abs(long __i) { return __builtin_labs(__i); } 61 | -: 57:#endif 62 | -: 58: 63 | -: 59:#ifdef _GLIBCXX_USE_LONG_LONG 64 | -: 60: inline long long 65 | -: 61: abs(long long __x) { return __builtin_llabs (__x); } 66 | -: 62:#endif 67 | -: 63: 68 | -: 64:// _GLIBCXX_RESOLVE_LIB_DEFECTS 69 | -: 65:// 2192. Validity and return type of std::abs(0u) is unclear 70 | -: 66:// 2294. should declare abs(double) 71 | -: 67:// 2735. std::abs(short), std::abs(signed char) and others should return int 72 | -: 68: 73 | -: 69:#ifndef __CORRECT_ISO_CPP_MATH_H_PROTO 74 | -: 70: inline _GLIBCXX_CONSTEXPR double 75 | function _ZSt3absd called 0 returned 0% blocks executed 0% 76 | #####: 71: abs(double __x) 77 | #####: 72: { return __builtin_fabs(__x); } 78 | -: 73: 79 | -: 74: inline _GLIBCXX_CONSTEXPR float 80 | function _ZSt3absf called 0 returned 0% blocks executed 0% 81 | #####: 75: abs(float __x) 82 | #####: 76: { return __builtin_fabsf(__x); } 83 | -: 77: 84 | -: 78: inline _GLIBCXX_CONSTEXPR long double 85 | -: 79: abs(long double __x) 86 | -: 80: { return __builtin_fabsl(__x); } 87 | -: 81:#endif 88 | -: 82: 89 | -: 83:#if defined(__GLIBCXX_TYPE_INT_N_0) 90 | -: 84: inline _GLIBCXX_CONSTEXPR __GLIBCXX_TYPE_INT_N_0 91 | -: 85: abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; } 92 | -: 86:#endif 93 | -: 87:#if defined(__GLIBCXX_TYPE_INT_N_1) 94 | -: 88: inline _GLIBCXX_CONSTEXPR __GLIBCXX_TYPE_INT_N_1 95 | -: 89: abs(__GLIBCXX_TYPE_INT_N_1 __x) { return __x >= 0 ? __x : -__x; } 96 | -: 90:#endif 97 | -: 91:#if defined(__GLIBCXX_TYPE_INT_N_2) 98 | -: 92: inline _GLIBCXX_CONSTEXPR __GLIBCXX_TYPE_INT_N_2 99 | -: 93: abs(__GLIBCXX_TYPE_INT_N_2 __x) { return __x >= 0 ? __x : -__x; } 100 | -: 94:#endif 101 | -: 95:#if defined(__GLIBCXX_TYPE_INT_N_3) 102 | -: 96: inline _GLIBCXX_CONSTEXPR __GLIBCXX_TYPE_INT_N_3 103 | -: 97: abs(__GLIBCXX_TYPE_INT_N_3 __x) { return __x >= 0 ? __x : -__x; } 104 | -: 98:#endif 105 | -: 99: 106 | -: 100:#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__CUDACC__) 107 | -: 101: inline _GLIBCXX_CONSTEXPR 108 | -: 102: __float128 109 | -: 103: abs(__float128 __x) 110 | -: 104: { return __x < 0 ? -__x : __x; } 111 | -: 105:#endif 112 | -: 106: 113 | -: 107:_GLIBCXX_END_NAMESPACE_VERSION 114 | -: 108:} // namespace 115 | -: 109:} // extern "C"++" 116 | -: 110: 117 | -: 111:#endif // _GLIBCXX_BITS_STD_ABS_H 118 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/#usr#include#c++#11#ext#atomicity.h.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:/usr/include/c++/11/ext/atomicity.h 2 | -: 0:Graph:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcno 3 | -: 0:Data:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcda 4 | -: 0:Runs:1 5 | -: 1:// Support for atomic operations -*- C++ -*- 6 | -: 2: 7 | -: 3:// Copyright (C) 2004-2021 Free Software Foundation, Inc. 8 | -: 4:// 9 | -: 5:// This file is part of the GNU ISO C++ Library. This library is free 10 | -: 6:// software; you can redistribute it and/or modify it under the 11 | -: 7:// terms of the GNU General Public License as published by the 12 | -: 8:// Free Software Foundation; either version 3, or (at your option) 13 | -: 9:// any later version. 14 | -: 10: 15 | -: 11:// This library is distributed in the hope that it will be useful, 16 | -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | -: 14:// GNU General Public License for more details. 19 | -: 15: 20 | -: 16:// Under Section 7 of GPL version 3, you are granted additional 21 | -: 17:// permissions described in the GCC Runtime Library Exception, version 22 | -: 18:// 3.1, as published by the Free Software Foundation. 23 | -: 19: 24 | -: 20:// You should have received a copy of the GNU General Public License and 25 | -: 21:// a copy of the GCC Runtime Library Exception along with this program; 26 | -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 27 | -: 23:// . 28 | -: 24: 29 | -: 25:/** @file ext/atomicity.h 30 | -: 26: * This file is a GNU extension to the Standard C++ Library. 31 | -: 27: */ 32 | -: 28: 33 | -: 29:#ifndef _GLIBCXX_ATOMICITY_H 34 | -: 30:#define _GLIBCXX_ATOMICITY_H 1 35 | -: 31: 36 | -: 32:#pragma GCC system_header 37 | -: 33: 38 | -: 34:#include 39 | -: 35:#include 40 | -: 36:#include 41 | -: 37:#if __has_include() 42 | -: 38:# include 43 | -: 39:#endif 44 | -: 40: 45 | -: 41:namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) 46 | -: 42:{ 47 | -: 43:_GLIBCXX_BEGIN_NAMESPACE_VERSION 48 | -: 44: 49 | -: 45: __attribute__((__always_inline__)) 50 | -: 46: inline bool 51 | -: 47: __is_single_threaded() _GLIBCXX_NOTHROW 52 | -: 48: { 53 | -: 49:#ifndef __GTHREADS 54 | -: 50: return true; 55 | -: 51:#elif __has_include() 56 | 2546: 52: return ::__libc_single_threaded; 57 | -: 53:#else 58 | -: 54: return !__gthread_active_p(); 59 | -: 55:#endif 60 | -: 56: } 61 | -: 57: 62 | -: 58: // Functions for portable atomic access. 63 | -: 59: // To abstract locking primitives across all thread policies, use: 64 | -: 60: // __exchange_and_add_dispatch 65 | -: 61: // __atomic_add_dispatch 66 | -: 62:#ifdef _GLIBCXX_ATOMIC_BUILTINS 67 | -: 63: inline _Atomic_word 68 | -: 64: __attribute__((__always_inline__)) 69 | -: 65: __exchange_and_add(volatile _Atomic_word* __mem, int __val) 70 | #####: 66: { return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); } 71 | -: 67: 72 | -: 68: inline void 73 | -: 69: __attribute__((__always_inline__)) 74 | -: 70: __atomic_add(volatile _Atomic_word* __mem, int __val) 75 | #####: 71: { __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); } 76 | -: 72:#else 77 | -: 73: _Atomic_word 78 | -: 74: __exchange_and_add(volatile _Atomic_word*, int) _GLIBCXX_NOTHROW; 79 | -: 75: 80 | -: 76: void 81 | -: 77: __atomic_add(volatile _Atomic_word*, int) _GLIBCXX_NOTHROW; 82 | -: 78:#endif 83 | -: 79: 84 | -: 80: inline _Atomic_word 85 | -: 81: __attribute__((__always_inline__)) 86 | -: 82: __exchange_and_add_single(_Atomic_word* __mem, int __val) 87 | -: 83: { 88 | 1320: 84: _Atomic_word __result = *__mem; 89 | 1320: 85: *__mem += __val; 90 | 1320: 86: return __result; 91 | -: 87: } 92 | -: 88: 93 | -: 89: inline void 94 | -: 90: __attribute__((__always_inline__)) 95 | -: 91: __atomic_add_single(_Atomic_word* __mem, int __val) 96 | 1226: 92: { *__mem += __val; } 97 | -: 93: 98 | -: 94: inline _Atomic_word 99 | -: 95: __attribute__ ((__always_inline__)) 100 | -: 96: __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) 101 | -: 97: { 102 | 1320: 98: if (__is_single_threaded()) 103 | branch 0 taken 100% (fallthrough) 104 | branch 1 taken 0% 105 | branch 2 taken 100% (fallthrough) 106 | branch 3 taken 0% 107 | 1320: 99: return __exchange_and_add_single(__mem, __val); 108 | -: 100: else 109 | #####: 101: return __exchange_and_add(__mem, __val); 110 | -: 102: } 111 | -: 103: 112 | -: 104: inline void 113 | -: 105: __attribute__ ((__always_inline__)) 114 | -: 106: __atomic_add_dispatch(_Atomic_word* __mem, int __val) 115 | -: 107: { 116 | 1226: 108: if (__is_single_threaded()) 117 | branch 0 taken 100% (fallthrough) 118 | branch 1 taken 0% 119 | -: 109: __atomic_add_single(__mem, __val); 120 | -: 110: else 121 | -: 111: __atomic_add(__mem, __val); 122 | 1226: 112: } 123 | -: 113: 124 | -: 114:_GLIBCXX_END_NAMESPACE_VERSION 125 | -: 115:} // namespace 126 | -: 116: 127 | -: 117:// Even if the CPU doesn't need a memory barrier, we need to ensure 128 | -: 118:// that the compiler doesn't reorder memory accesses across the 129 | -: 119:// barriers. 130 | -: 120:#ifndef _GLIBCXX_READ_MEM_BARRIER 131 | -: 121:#define _GLIBCXX_READ_MEM_BARRIER __atomic_thread_fence (__ATOMIC_ACQUIRE) 132 | -: 122:#endif 133 | -: 123:#ifndef _GLIBCXX_WRITE_MEM_BARRIER 134 | -: 124:#define _GLIBCXX_WRITE_MEM_BARRIER __atomic_thread_fence (__ATOMIC_RELEASE) 135 | -: 125:#endif 136 | -: 126: 137 | -: 127:#endif 138 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/#usr#include#c++#11#ext#type_traits.h.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:/usr/include/c++/11/ext/type_traits.h 2 | -: 0:Graph:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcno 3 | -: 0:Data:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcda 4 | -: 0:Runs:1 5 | -: 1:// -*- C++ -*- 6 | -: 2: 7 | -: 3:// Copyright (C) 2005-2021 Free Software Foundation, Inc. 8 | -: 4:// 9 | -: 5:// This file is part of the GNU ISO C++ Library. This library is free 10 | -: 6:// software; you can redistribute it and/or modify it under the terms 11 | -: 7:// of the GNU General Public License as published by the Free Software 12 | -: 8:// Foundation; either version 3, or (at your option) any later 13 | -: 9:// version. 14 | -: 10: 15 | -: 11:// This library is distributed in the hope that it will be useful, but 16 | -: 12:// WITHOUT ANY WARRANTY; without even the implied warranty of 17 | -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | -: 14:// General Public License for more details. 19 | -: 15: 20 | -: 16:// Under Section 7 of GPL version 3, you are granted additional 21 | -: 17:// permissions described in the GCC Runtime Library Exception, version 22 | -: 18:// 3.1, as published by the Free Software Foundation. 23 | -: 19: 24 | -: 20:// You should have received a copy of the GNU General Public License and 25 | -: 21:// a copy of the GCC Runtime Library Exception along with this program; 26 | -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 27 | -: 23:// . 28 | -: 24: 29 | -: 25:/** @file ext/type_traits.h 30 | -: 26: * This file is a GNU extension to the Standard C++ Library. 31 | -: 27: */ 32 | -: 28: 33 | -: 29:#ifndef _EXT_TYPE_TRAITS 34 | -: 30:#define _EXT_TYPE_TRAITS 1 35 | -: 31: 36 | -: 32:#pragma GCC system_header 37 | -: 33: 38 | -: 34:#include 39 | -: 35:#include 40 | -: 36: 41 | -: 37:extern "C++" { 42 | -: 38: 43 | -: 39:namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) 44 | -: 40:{ 45 | -: 41:_GLIBCXX_BEGIN_NAMESPACE_VERSION 46 | -: 42: 47 | -: 43: // Define a nested type if some predicate holds. 48 | -: 44: template 49 | -: 45: struct __enable_if 50 | -: 46: { }; 51 | -: 47: 52 | -: 48: template 53 | -: 49: struct __enable_if 54 | -: 50: { typedef _Tp __type; }; 55 | -: 51: 56 | -: 52: 57 | -: 53: // Conditional expression for types. If true, first, if false, second. 58 | -: 54: template 59 | -: 55: struct __conditional_type 60 | -: 56: { typedef _Iftrue __type; }; 61 | -: 57: 62 | -: 58: template 63 | -: 59: struct __conditional_type 64 | -: 60: { typedef _Iffalse __type; }; 65 | -: 61: 66 | -: 62: 67 | -: 63: // Given an integral builtin type, return the corresponding unsigned type. 68 | -: 64: template 69 | -: 65: struct __add_unsigned 70 | -: 66: { 71 | -: 67: private: 72 | -: 68: typedef __enable_if::__value, _Tp> __if_type; 73 | -: 69: 74 | -: 70: public: 75 | -: 71: typedef typename __if_type::__type __type; 76 | -: 72: }; 77 | -: 73: 78 | -: 74: template<> 79 | -: 75: struct __add_unsigned 80 | -: 76: { typedef unsigned char __type; }; 81 | -: 77: 82 | -: 78: template<> 83 | -: 79: struct __add_unsigned 84 | -: 80: { typedef unsigned char __type; }; 85 | -: 81: 86 | -: 82: template<> 87 | -: 83: struct __add_unsigned 88 | -: 84: { typedef unsigned short __type; }; 89 | -: 85: 90 | -: 86: template<> 91 | -: 87: struct __add_unsigned 92 | -: 88: { typedef unsigned int __type; }; 93 | -: 89: 94 | -: 90: template<> 95 | -: 91: struct __add_unsigned 96 | -: 92: { typedef unsigned long __type; }; 97 | -: 93: 98 | -: 94: template<> 99 | -: 95: struct __add_unsigned 100 | -: 96: { typedef unsigned long long __type; }; 101 | -: 97: 102 | -: 98: // Declare but don't define. 103 | -: 99: template<> 104 | -: 100: struct __add_unsigned; 105 | -: 101: 106 | -: 102: template<> 107 | -: 103: struct __add_unsigned; 108 | -: 104: 109 | -: 105: 110 | -: 106: // Given an integral builtin type, return the corresponding signed type. 111 | -: 107: template 112 | -: 108: struct __remove_unsigned 113 | -: 109: { 114 | -: 110: private: 115 | -: 111: typedef __enable_if::__value, _Tp> __if_type; 116 | -: 112: 117 | -: 113: public: 118 | -: 114: typedef typename __if_type::__type __type; 119 | -: 115: }; 120 | -: 116: 121 | -: 117: template<> 122 | -: 118: struct __remove_unsigned 123 | -: 119: { typedef signed char __type; }; 124 | -: 120: 125 | -: 121: template<> 126 | -: 122: struct __remove_unsigned 127 | -: 123: { typedef signed char __type; }; 128 | -: 124: 129 | -: 125: template<> 130 | -: 126: struct __remove_unsigned 131 | -: 127: { typedef short __type; }; 132 | -: 128: 133 | -: 129: template<> 134 | -: 130: struct __remove_unsigned 135 | -: 131: { typedef int __type; }; 136 | -: 132: 137 | -: 133: template<> 138 | -: 134: struct __remove_unsigned 139 | -: 135: { typedef long __type; }; 140 | -: 136: 141 | -: 137: template<> 142 | -: 138: struct __remove_unsigned 143 | -: 139: { typedef long long __type; }; 144 | -: 140: 145 | -: 141: // Declare but don't define. 146 | -: 142: template<> 147 | -: 143: struct __remove_unsigned; 148 | -: 144: 149 | -: 145: template<> 150 | -: 146: struct __remove_unsigned; 151 | -: 147: 152 | -: 148: 153 | -: 149: // For use in string and vstring. 154 | -: 150: template 155 | -: 151: inline bool 156 | 4287*: 152: __is_null_pointer(_Type* __ptr) 157 | 4287*: 153: { return __ptr == 0; } 158 | ------------------ 159 | _ZN9__gnu_cxx17__is_null_pointerIcEEbPT_: 160 | function _ZN9__gnu_cxx17__is_null_pointerIcEEbPT_ called 4287 returned 100% blocks executed 100% 161 | 4287: 152: __is_null_pointer(_Type* __ptr) 162 | 4287: 153: { return __ptr == 0; } 163 | ------------------ 164 | _ZN9__gnu_cxx17__is_null_pointerIKwEEbPT_: 165 | function _ZN9__gnu_cxx17__is_null_pointerIKwEEbPT_ called 0 returned 0% blocks executed 0% 166 | #####: 152: __is_null_pointer(_Type* __ptr) 167 | #####: 153: { return __ptr == 0; } 168 | ------------------ 169 | _ZN9__gnu_cxx17__is_null_pointerIKcEEbPT_: 170 | function _ZN9__gnu_cxx17__is_null_pointerIKcEEbPT_ called 0 returned 0% blocks executed 0% 171 | #####: 152: __is_null_pointer(_Type* __ptr) 172 | #####: 153: { return __ptr == 0; } 173 | ------------------ 174 | -: 154: 175 | -: 155: template 176 | -: 156: inline bool 177 | function _ZN9__gnu_cxx17__is_null_pointerINS_17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEEbT_ called 0 returned 0% blocks executed 0% 178 | #####: 157: __is_null_pointer(_Type) 179 | #####: 158: { return false; } 180 | -: 159: 181 | -: 160:#if __cplusplus >= 201103L 182 | -: 161: inline bool 183 | -: 162: __is_null_pointer(std::nullptr_t) 184 | -: 163: { return true; } 185 | -: 164:#endif 186 | -: 165: 187 | -: 166: // For arithmetic promotions in and 188 | -: 167: 189 | -: 168: template::__value> 190 | -: 169: struct __promote 191 | -: 170: { typedef double __type; }; 192 | -: 171: 193 | -: 172: // No nested __type member for non-integer non-floating point types, 194 | -: 173: // allows this type to be used for SFINAE to constrain overloads in 195 | -: 174: // and to only the intended types. 196 | -: 175: template 197 | -: 176: struct __promote<_Tp, false> 198 | -: 177: { }; 199 | -: 178: 200 | -: 179: template<> 201 | -: 180: struct __promote 202 | -: 181: { typedef long double __type; }; 203 | -: 182: 204 | -: 183: template<> 205 | -: 184: struct __promote 206 | -: 185: { typedef double __type; }; 207 | -: 186: 208 | -: 187: template<> 209 | -: 188: struct __promote 210 | -: 189: { typedef float __type; }; 211 | -: 190: 212 | -: 191:#if __cpp_fold_expressions 213 | -: 192: template 214 | -: 193: using __promoted_t = decltype((typename __promote<_Tp>::__type(0) + ...)); 215 | -: 194:#endif 216 | -: 195: 217 | -: 196: template::__type, 219 | -: 198: typename _Up2 = typename __promote<_Up>::__type> 220 | -: 199: struct __promote_2 221 | -: 200: { 222 | -: 201: typedef __typeof__(_Tp2() + _Up2()) __type; 223 | -: 202: }; 224 | -: 203: 225 | -: 204: template::__type, 227 | -: 206: typename _Up2 = typename __promote<_Up>::__type, 228 | -: 207: typename _Vp2 = typename __promote<_Vp>::__type> 229 | -: 208: struct __promote_3 230 | -: 209: { 231 | -: 210: typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type; 232 | -: 211: }; 233 | -: 212: 234 | -: 213: template::__type, 236 | -: 215: typename _Up2 = typename __promote<_Up>::__type, 237 | -: 216: typename _Vp2 = typename __promote<_Vp>::__type, 238 | -: 217: typename _Wp2 = typename __promote<_Wp>::__type> 239 | -: 218: struct __promote_4 240 | -: 219: { 241 | -: 220: typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type; 242 | -: 221: }; 243 | -: 222: 244 | -: 223:_GLIBCXX_END_NAMESPACE_VERSION 245 | -: 224:} // namespace 246 | -: 225:} // extern "C++" 247 | -: 226: 248 | -: 227:#endif 249 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/#usr#include#c++#11#initializer_list.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:/usr/include/c++/11/initializer_list 2 | -: 0:Graph:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcno 3 | -: 0:Data:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcda 4 | -: 0:Runs:1 5 | -: 1:// std::initializer_list support -*- C++ -*- 6 | -: 2: 7 | -: 3:// Copyright (C) 2008-2021 Free Software Foundation, Inc. 8 | -: 4:// 9 | -: 5:// This file is part of GCC. 10 | -: 6:// 11 | -: 7:// GCC is free software; you can redistribute it and/or modify 12 | -: 8:// it under the terms of the GNU General Public License as published by 13 | -: 9:// the Free Software Foundation; either version 3, or (at your option) 14 | -: 10:// any later version. 15 | -: 11:// 16 | -: 12:// GCC is distributed in the hope that it will be useful, 17 | -: 13:// but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | -: 14:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | -: 15:// GNU General Public License for more details. 20 | -: 16:// 21 | -: 17:// Under Section 7 of GPL version 3, you are granted additional 22 | -: 18:// permissions described in the GCC Runtime Library Exception, version 23 | -: 19:// 3.1, as published by the Free Software Foundation. 24 | -: 20: 25 | -: 21:// You should have received a copy of the GNU General Public License and 26 | -: 22:// a copy of the GCC Runtime Library Exception along with this program; 27 | -: 23:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 28 | -: 24:// . 29 | -: 25: 30 | -: 26:/** @file initializer_list 31 | -: 27: * This is a Standard C++ Library header. 32 | -: 28: */ 33 | -: 29: 34 | -: 30:#ifndef _INITIALIZER_LIST 35 | -: 31:#define _INITIALIZER_LIST 36 | -: 32: 37 | -: 33:#pragma GCC system_header 38 | -: 34: 39 | -: 35:#if __cplusplus < 201103L 40 | -: 36:# include 41 | -: 37:#else // C++0x 42 | -: 38: 43 | -: 39:#pragma GCC visibility push(default) 44 | -: 40: 45 | -: 41:#include 46 | -: 42: 47 | -: 43:namespace std 48 | -: 44:{ 49 | -: 45: /// initializer_list 50 | -: 46: template 51 | -: 47: class initializer_list 52 | -: 48: { 53 | -: 49: public: 54 | -: 50: typedef _E value_type; 55 | -: 51: typedef const _E& reference; 56 | -: 52: typedef const _E& const_reference; 57 | -: 53: typedef size_t size_type; 58 | -: 54: typedef const _E* iterator; 59 | -: 55: typedef const _E* const_iterator; 60 | -: 56: 61 | -: 57: private: 62 | -: 58: iterator _M_array; 63 | -: 59: size_type _M_len; 64 | -: 60: 65 | -: 61: // The compiler can call a private constructor. 66 | -: 62: constexpr initializer_list(const_iterator __a, size_type __l) 67 | -: 63: : _M_array(__a), _M_len(__l) { } 68 | -: 64: 69 | -: 65: public: 70 | -: 66: constexpr initializer_list() noexcept 71 | -: 67: : _M_array(0), _M_len(0) { } 72 | -: 68: 73 | -: 69: // Number of elements. 74 | -: 70: constexpr size_type 75 | 2*: 71: size() const noexcept { return _M_len; } 76 | ------------------ 77 | _ZNKSt16initializer_listIN5Catch12_GLOBAL__N_110ColumnInfoEE4sizeEv: 78 | function _ZNKSt16initializer_listIN5Catch12_GLOBAL__N_110ColumnInfoEE4sizeEv called 1 returned 100% blocks executed 100% 79 | 1: 71: size() const noexcept { return _M_len; } 80 | ------------------ 81 | _ZNKSt16initializer_listIN5Catch9VerbosityEE4sizeEv: 82 | function _ZNKSt16initializer_listIN5Catch9VerbosityEE4sizeEv called 1 returned 100% blocks executed 100% 83 | 1: 71: size() const noexcept { return _M_len; } 84 | ------------------ 85 | _ZNKSt16initializer_listIN5Catch5clara6detail11HelpColumnsEE4sizeEv: 86 | function _ZNKSt16initializer_listIN5Catch5clara6detail11HelpColumnsEE4sizeEv called 0 returned 0% blocks executed 0% 87 | #####: 71: size() const noexcept { return _M_len; } 88 | ------------------ 89 | _ZNKSt16initializer_listINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE4sizeEv: 90 | function _ZNKSt16initializer_listINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE4sizeEv called 0 returned 0% blocks executed 0% 91 | #####: 71: size() const noexcept { return _M_len; } 92 | ------------------ 93 | -: 72: 94 | -: 73: // First element. 95 | -: 74: constexpr const_iterator 96 | 4*: 75: begin() const noexcept { return _M_array; } 97 | ------------------ 98 | _ZNKSt16initializer_listIN5Catch12_GLOBAL__N_110ColumnInfoEE5beginEv: 99 | function _ZNKSt16initializer_listIN5Catch12_GLOBAL__N_110ColumnInfoEE5beginEv called 2 returned 100% blocks executed 100% 100 | 2: 75: begin() const noexcept { return _M_array; } 101 | ------------------ 102 | _ZNKSt16initializer_listIN5Catch9VerbosityEE5beginEv: 103 | function _ZNKSt16initializer_listIN5Catch9VerbosityEE5beginEv called 2 returned 100% blocks executed 100% 104 | 2: 75: begin() const noexcept { return _M_array; } 105 | ------------------ 106 | _ZNKSt16initializer_listIN5Catch5clara6detail11HelpColumnsEE5beginEv: 107 | function _ZNKSt16initializer_listIN5Catch5clara6detail11HelpColumnsEE5beginEv called 0 returned 0% blocks executed 0% 108 | #####: 75: begin() const noexcept { return _M_array; } 109 | ------------------ 110 | _ZNKSt16initializer_listINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5beginEv: 111 | function _ZNKSt16initializer_listINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5beginEv called 0 returned 0% blocks executed 0% 112 | #####: 75: begin() const noexcept { return _M_array; } 113 | ------------------ 114 | -: 76: 115 | -: 77: // One past the last element. 116 | -: 78: constexpr const_iterator 117 | 2*: 79: end() const noexcept { return begin() + size(); } 118 | ------------------ 119 | _ZNKSt16initializer_listIN5Catch12_GLOBAL__N_110ColumnInfoEE3endEv: 120 | function _ZNKSt16initializer_listIN5Catch12_GLOBAL__N_110ColumnInfoEE3endEv called 1 returned 100% blocks executed 100% 121 | 1: 79: end() const noexcept { return begin() + size(); } 122 | call 0 returned 100% 123 | call 1 returned 100% 124 | ------------------ 125 | _ZNKSt16initializer_listIN5Catch9VerbosityEE3endEv: 126 | function _ZNKSt16initializer_listIN5Catch9VerbosityEE3endEv called 1 returned 100% blocks executed 100% 127 | 1: 79: end() const noexcept { return begin() + size(); } 128 | call 0 returned 100% 129 | call 1 returned 100% 130 | ------------------ 131 | _ZNKSt16initializer_listIN5Catch5clara6detail11HelpColumnsEE3endEv: 132 | function _ZNKSt16initializer_listIN5Catch5clara6detail11HelpColumnsEE3endEv called 0 returned 0% blocks executed 0% 133 | #####: 79: end() const noexcept { return begin() + size(); } 134 | call 0 never executed 135 | call 1 never executed 136 | ------------------ 137 | _ZNKSt16initializer_listINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3endEv: 138 | function _ZNKSt16initializer_listINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3endEv called 0 returned 0% blocks executed 0% 139 | #####: 79: end() const noexcept { return begin() + size(); } 140 | call 0 never executed 141 | call 1 never executed 142 | ------------------ 143 | -: 80: }; 144 | -: 81: 145 | -: 82: /** 146 | -: 83: * @brief Return an iterator pointing to the first element of 147 | -: 84: * the initializer_list. 148 | -: 85: * @param __ils Initializer list. 149 | -: 86: * @relates initializer_list 150 | -: 87: */ 151 | -: 88: template 152 | -: 89: constexpr const _Tp* 153 | -: 90: begin(initializer_list<_Tp> __ils) noexcept 154 | -: 91: { return __ils.begin(); } 155 | -: 92: 156 | -: 93: /** 157 | -: 94: * @brief Return an iterator pointing to one past the last element 158 | -: 95: * of the initializer_list. 159 | -: 96: * @param __ils Initializer list. 160 | -: 97: * @relates initializer_list 161 | -: 98: */ 162 | -: 99: template 163 | -: 100: constexpr const _Tp* 164 | -: 101: end(initializer_list<_Tp> __ils) noexcept 165 | -: 102: { return __ils.end(); } 166 | -: 103:} 167 | -: 104: 168 | -: 105:#pragma GCC visibility pop 169 | -: 106: 170 | -: 107:#endif // C++11 171 | -: 108: 172 | -: 109:#endif // _INITIALIZER_LIST 173 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/#usr#include#c++#11#new.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:/usr/include/c++/11/new 2 | -: 0:Graph:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcno 3 | -: 0:Data:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcda 4 | -: 0:Runs:1 5 | -: 1:// The -*- C++ -*- dynamic memory management header. 6 | -: 2: 7 | -: 3:// Copyright (C) 1994-2021 Free Software Foundation, Inc. 8 | -: 4: 9 | -: 5:// This file is part of GCC. 10 | -: 6:// 11 | -: 7:// GCC is free software; you can redistribute it and/or modify 12 | -: 8:// it under the terms of the GNU General Public License as published by 13 | -: 9:// the Free Software Foundation; either version 3, or (at your option) 14 | -: 10:// any later version. 15 | -: 11:// 16 | -: 12:// GCC is distributed in the hope that it will be useful, 17 | -: 13:// but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | -: 14:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | -: 15:// GNU General Public License for more details. 20 | -: 16:// 21 | -: 17:// Under Section 7 of GPL version 3, you are granted additional 22 | -: 18:// permissions described in the GCC Runtime Library Exception, version 23 | -: 19:// 3.1, as published by the Free Software Foundation. 24 | -: 20: 25 | -: 21:// You should have received a copy of the GNU General Public License and 26 | -: 22:// a copy of the GCC Runtime Library Exception along with this program; 27 | -: 23:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 28 | -: 24:// . 29 | -: 25: 30 | -: 26:/** @file new 31 | -: 27: * This is a Standard C++ Library header. 32 | -: 28: * 33 | -: 29: * The header @c new defines several functions to manage dynamic memory and 34 | -: 30: * handling memory allocation errors; see 35 | -: 31: * https://gcc.gnu.org/onlinedocs/libstdc++/manual/dynamic_memory.html 36 | -: 32: * for more. 37 | -: 33: */ 38 | -: 34: 39 | -: 35:#ifndef _NEW 40 | -: 36:#define _NEW 41 | -: 37: 42 | -: 38:#pragma GCC system_header 43 | -: 39: 44 | -: 40:#include 45 | -: 41:#include 46 | -: 42: 47 | -: 43:#pragma GCC visibility push(default) 48 | -: 44: 49 | -: 45:extern "C++" { 50 | -: 46: 51 | -: 47:namespace std 52 | -: 48:{ 53 | -: 49: /** 54 | -: 50: * @brief Exception possibly thrown by @c new. 55 | -: 51: * @ingroup exceptions 56 | -: 52: * 57 | -: 53: * @c bad_alloc (or classes derived from it) is used to report allocation 58 | -: 54: * errors from the throwing forms of @c new. */ 59 | -: 55: class bad_alloc : public exception 60 | -: 56: { 61 | -: 57: public: 62 | -: 58: bad_alloc() throw() { } 63 | -: 59: 64 | -: 60:#if __cplusplus >= 201103L 65 | -: 61: bad_alloc(const bad_alloc&) = default; 66 | -: 62: bad_alloc& operator=(const bad_alloc&) = default; 67 | -: 63:#endif 68 | -: 64: 69 | -: 65: // This declaration is not useless: 70 | -: 66: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 71 | -: 67: virtual ~bad_alloc() throw(); 72 | -: 68: 73 | -: 69: // See comment in eh_exception.cc. 74 | -: 70: virtual const char* what() const throw(); 75 | -: 71: }; 76 | -: 72: 77 | -: 73:#if __cplusplus >= 201103L 78 | -: 74: class bad_array_new_length : public bad_alloc 79 | -: 75: { 80 | -: 76: public: 81 | -: 77: bad_array_new_length() throw() { } 82 | -: 78: 83 | -: 79: // This declaration is not useless: 84 | -: 80: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 85 | -: 81: virtual ~bad_array_new_length() throw(); 86 | -: 82: 87 | -: 83: // See comment in eh_exception.cc. 88 | -: 84: virtual const char* what() const throw(); 89 | -: 85: }; 90 | -: 86:#endif 91 | -: 87: 92 | -: 88:#if __cpp_aligned_new 93 | -: 89: enum class align_val_t: size_t {}; 94 | -: 90:#endif 95 | -: 91: 96 | -: 92: struct nothrow_t 97 | -: 93: { 98 | -: 94:#if __cplusplus >= 201103L 99 | -: 95: explicit nothrow_t() = default; 100 | -: 96:#endif 101 | -: 97: }; 102 | -: 98: 103 | -: 99: extern const nothrow_t nothrow; 104 | -: 100: 105 | -: 101: /** If you write your own error handler to be called by @c new, it must 106 | -: 102: * be of this type. */ 107 | -: 103: typedef void (*new_handler)(); 108 | -: 104: 109 | -: 105: /// Takes a replacement handler as the argument, returns the 110 | -: 106: /// previous handler. 111 | -: 107: new_handler set_new_handler(new_handler) throw(); 112 | -: 108: 113 | -: 109:#if __cplusplus >= 201103L 114 | -: 110: /// Return the current new handler. 115 | -: 111: new_handler get_new_handler() noexcept; 116 | -: 112:#endif 117 | -: 113:} // namespace std 118 | -: 114: 119 | -: 115://@{ 120 | -: 116:/** These are replaceable signatures: 121 | -: 117: * - normal single new and delete (no arguments, throw @c bad_alloc on error) 122 | -: 118: * - normal array new and delete (same) 123 | -: 119: * - @c nothrow single new and delete (take a @c nothrow argument, return 124 | -: 120: * @c NULL on error) 125 | -: 121: * - @c nothrow array new and delete (same) 126 | -: 122: * 127 | -: 123: * Placement new and delete signatures (take a memory address argument, 128 | -: 124: * does nothing) may not be replaced by a user's program. 129 | -: 125:*/ 130 | -: 126:_GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) 131 | -: 127: __attribute__((__externally_visible__)); 132 | -: 128:_GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) 133 | -: 129: __attribute__((__externally_visible__)); 134 | -: 130:void operator delete(void*) _GLIBCXX_USE_NOEXCEPT 135 | -: 131: __attribute__((__externally_visible__)); 136 | -: 132:void operator delete[](void*) _GLIBCXX_USE_NOEXCEPT 137 | -: 133: __attribute__((__externally_visible__)); 138 | -: 134:#if __cpp_sized_deallocation 139 | -: 135:void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT 140 | -: 136: __attribute__((__externally_visible__)); 141 | -: 137:void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT 142 | -: 138: __attribute__((__externally_visible__)); 143 | -: 139:#endif 144 | -: 140:_GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT 145 | -: 141: __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); 146 | -: 142:_GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT 147 | -: 143: __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); 148 | -: 144:void operator delete(void*, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT 149 | -: 145: __attribute__((__externally_visible__)); 150 | -: 146:void operator delete[](void*, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT 151 | -: 147: __attribute__((__externally_visible__)); 152 | -: 148:#if __cpp_aligned_new 153 | -: 149:_GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) 154 | -: 150: __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); 155 | -: 151:_GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) 156 | -: 152: _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); 157 | -: 153:void operator delete(void*, std::align_val_t) 158 | -: 154: _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); 159 | -: 155:void operator delete(void*, std::align_val_t, const std::nothrow_t&) 160 | -: 156: _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); 161 | -: 157:_GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) 162 | -: 158: __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); 163 | -: 159:_GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) 164 | -: 160: _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); 165 | -: 161:void operator delete[](void*, std::align_val_t) 166 | -: 162: _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); 167 | -: 163:void operator delete[](void*, std::align_val_t, const std::nothrow_t&) 168 | -: 164: _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); 169 | -: 165:#if __cpp_sized_deallocation 170 | -: 166:void operator delete(void*, std::size_t, std::align_val_t) 171 | -: 167: _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); 172 | -: 168:void operator delete[](void*, std::size_t, std::align_val_t) 173 | -: 169: _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); 174 | -: 170:#endif // __cpp_sized_deallocation 175 | -: 171:#endif // __cpp_aligned_new 176 | -: 172: 177 | -: 173:// Default placement versions of operator new. 178 | function _ZnwmPv called 3740 returned 100% blocks executed 100% 179 | 3740: 174:_GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT 180 | 3740: 175:{ return __p; } 181 | -: 176:_GLIBCXX_NODISCARD inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT 182 | -: 177:{ return __p; } 183 | -: 178: 184 | -: 179:// Default placement versions of operator delete. 185 | function _ZdlPvS_ called 0 returned 0% blocks executed 0% 186 | #####: 180:inline void operator delete (void*, void*) _GLIBCXX_USE_NOEXCEPT { } 187 | -: 181:inline void operator delete[](void*, void*) _GLIBCXX_USE_NOEXCEPT { } 188 | -: 182://@} 189 | -: 183:} // extern "C++" 190 | -: 184: 191 | -: 185:#if __cplusplus >= 201703L 192 | -: 186:#ifdef _GLIBCXX_HAVE_BUILTIN_LAUNDER 193 | -: 187:namespace std 194 | -: 188:{ 195 | -: 189:#define __cpp_lib_launder 201606 196 | -: 190: /// Pointer optimization barrier [ptr.launder] 197 | -: 191: template 198 | -: 192: [[nodiscard]] constexpr _Tp* 199 | -: 193: launder(_Tp* __p) noexcept 200 | -: 194: { return __builtin_launder(__p); } 201 | -: 195: 202 | -: 196: // The program is ill-formed if T is a function type or 203 | -: 197: // (possibly cv-qualified) void. 204 | -: 198: 205 | -: 199: template 206 | -: 200: void launder(_Ret (*)(_Args...) _GLIBCXX_NOEXCEPT_QUAL) = delete; 207 | -: 201: template 208 | -: 202: void launder(_Ret (*)(_Args......) _GLIBCXX_NOEXCEPT_QUAL) = delete; 209 | -: 203: 210 | -: 204: void launder(void*) = delete; 211 | -: 205: void launder(const void*) = delete; 212 | -: 206: void launder(volatile void*) = delete; 213 | -: 207: void launder(const volatile void*) = delete; 214 | -: 208:} 215 | -: 209:#endif // _GLIBCXX_HAVE_BUILTIN_LAUNDER 216 | -: 210:#endif // C++17 217 | -: 211: 218 | -: 212:#if __cplusplus > 201703L 219 | -: 213:namespace std 220 | -: 214:{ 221 | -: 215: /// Tag type used to declare a class-specific operator delete that can 222 | -: 216: /// invoke the destructor before deallocating the memory. 223 | -: 217: struct destroying_delete_t 224 | -: 218: { 225 | -: 219: explicit destroying_delete_t() = default; 226 | -: 220: }; 227 | -: 221: /// Tag variable of type destroying_delete_t. 228 | -: 222: inline constexpr destroying_delete_t destroying_delete{}; 229 | -: 223:} 230 | -: 224:// Only define the feature test macro if the compiler supports the feature: 231 | -: 225:#if __cpp_impl_destroying_delete 232 | -: 226:# define __cpp_lib_destroying_delete 201806L 233 | -: 227:#endif 234 | -: 228:#endif // C++20 235 | -: 229: 236 | -: 230:#pragma GCC visibility pop 237 | -: 231: 238 | -: 232:#endif 239 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/#usr#include#c++#11#stdexcept.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:/usr/include/c++/11/stdexcept 2 | -: 0:Graph:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcno 3 | -: 0:Data:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcda 4 | -: 0:Runs:1 5 | -: 1:// Standard exception classes -*- C++ -*- 6 | -: 2: 7 | -: 3:// Copyright (C) 2001-2021 Free Software Foundation, Inc. 8 | -: 4:// 9 | -: 5:// This file is part of the GNU ISO C++ Library. This library is free 10 | -: 6:// software; you can redistribute it and/or modify it under the 11 | -: 7:// terms of the GNU General Public License as published by the 12 | -: 8:// Free Software Foundation; either version 3, or (at your option) 13 | -: 9:// any later version. 14 | -: 10: 15 | -: 11:// This library is distributed in the hope that it will be useful, 16 | -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | -: 14:// GNU General Public License for more details. 19 | -: 15: 20 | -: 16:// Under Section 7 of GPL version 3, you are granted additional 21 | -: 17:// permissions described in the GCC Runtime Library Exception, version 22 | -: 18:// 3.1, as published by the Free Software Foundation. 23 | -: 19: 24 | -: 20:// You should have received a copy of the GNU General Public License and 25 | -: 21:// a copy of the GCC Runtime Library Exception along with this program; 26 | -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 27 | -: 23:// . 28 | -: 24: 29 | -: 25:/** @file include/stdexcept 30 | -: 26: * This is a Standard C++ Library header. 31 | -: 27: */ 32 | -: 28: 33 | -: 29:// 34 | -: 30:// ISO C++ 19.1 Exception classes 35 | -: 31:// 36 | -: 32: 37 | -: 33:#ifndef _GLIBCXX_STDEXCEPT 38 | -: 34:#define _GLIBCXX_STDEXCEPT 1 39 | -: 35: 40 | -: 36:#pragma GCC system_header 41 | -: 37: 42 | -: 38:#include 43 | -: 39:#include 44 | -: 40: 45 | -: 41:namespace std _GLIBCXX_VISIBILITY(default) 46 | -: 42:{ 47 | -: 43:_GLIBCXX_BEGIN_NAMESPACE_VERSION 48 | -: 44: 49 | -: 45:#if _GLIBCXX_USE_DUAL_ABI 50 | -: 46:#if _GLIBCXX_USE_CXX11_ABI 51 | -: 47: // Emulates an old COW string when the new std::string is in use. 52 | -: 48: struct __cow_string 53 | -: 49: { 54 | -: 50: union { 55 | -: 51: const char* _M_p; 56 | -: 52: char _M_bytes[sizeof(const char*)]; 57 | -: 53: }; 58 | -: 54: 59 | -: 55: __cow_string(); 60 | -: 56: __cow_string(const std::string&); 61 | -: 57: __cow_string(const char*, size_t); 62 | -: 58: __cow_string(const __cow_string&) _GLIBCXX_NOTHROW; 63 | -: 59: __cow_string& operator=(const __cow_string&) _GLIBCXX_NOTHROW; 64 | -: 60: ~__cow_string(); 65 | -: 61:#if __cplusplus >= 201103L 66 | -: 62: __cow_string(__cow_string&&) noexcept; 67 | -: 63: __cow_string& operator=(__cow_string&&) noexcept; 68 | -: 64:#endif 69 | -: 65: }; 70 | -: 66: 71 | -: 67: typedef basic_string __sso_string; 72 | -: 68:#else // _GLIBCXX_USE_CXX11_ABI 73 | -: 69: typedef basic_string __cow_string; 74 | -: 70: 75 | -: 71: // Emulates a new SSO string when the old std::string is in use. 76 | -: 72: struct __sso_string 77 | -: 73: { 78 | -: 74: struct __str 79 | -: 75: { 80 | -: 76: const char* _M_p; 81 | -: 77: size_t _M_string_length; 82 | -: 78: char _M_local_buf[16]; 83 | -: 79: }; 84 | -: 80: 85 | -: 81: union { 86 | -: 82: __str _M_s; 87 | -: 83: char _M_bytes[sizeof(__str)]; 88 | -: 84: }; 89 | -: 85: 90 | -: 86: __sso_string() _GLIBCXX_NOTHROW; 91 | -: 87: __sso_string(const std::string&); 92 | -: 88: __sso_string(const char*, size_t); 93 | -: 89: __sso_string(const __sso_string&); 94 | -: 90: __sso_string& operator=(const __sso_string&); 95 | -: 91: ~__sso_string(); 96 | -: 92:#if __cplusplus >= 201103L 97 | -: 93: __sso_string(__sso_string&&) noexcept; 98 | -: 94: __sso_string& operator=(__sso_string&&) noexcept; 99 | -: 95:#endif 100 | -: 96: }; 101 | -: 97:#endif // _GLIBCXX_USE_CXX11_ABI 102 | -: 98:#else // _GLIBCXX_USE_DUAL_ABI 103 | -: 99: typedef basic_string __sso_string; 104 | -: 100: typedef basic_string __cow_string; 105 | -: 101:#endif 106 | -: 102: 107 | -: 103: /** 108 | -: 104: * @addtogroup exceptions 109 | -: 105: * @{ 110 | -: 106: */ 111 | -: 107: 112 | -: 108: /** Logic errors represent problems in the internal logic of a program; 113 | -: 109: * in theory, these are preventable, and even detectable before the 114 | -: 110: * program runs (e.g., violations of class invariants). 115 | -: 111: * @brief One of two subclasses of exception. 116 | -: 112: */ 117 | -: 113: class logic_error : public exception 118 | -: 114: { 119 | -: 115: __cow_string _M_msg; 120 | -: 116: 121 | -: 117: public: 122 | -: 118: /** Takes a character string describing the error. */ 123 | -: 119: explicit 124 | -: 120: logic_error(const string& __arg) _GLIBCXX_TXN_SAFE; 125 | -: 121: 126 | -: 122:#if __cplusplus >= 201103L 127 | -: 123: explicit 128 | -: 124: logic_error(const char*) _GLIBCXX_TXN_SAFE; 129 | -: 125: 130 | -: 126: logic_error(logic_error&&) noexcept; 131 | -: 127: logic_error& operator=(logic_error&&) noexcept; 132 | -: 128:#endif 133 | -: 129: 134 | -: 130:#if _GLIBCXX_USE_CXX11_ABI || _GLIBCXX_DEFINE_STDEXCEPT_COPY_OPS 135 | -: 131: logic_error(const logic_error&) _GLIBCXX_NOTHROW; 136 | -: 132: logic_error& operator=(const logic_error&) _GLIBCXX_NOTHROW; 137 | -: 133:#elif __cplusplus >= 201103L 138 | -: 134: logic_error(const logic_error&) = default; 139 | -: 135: logic_error& operator=(const logic_error&) = default; 140 | -: 136:#endif 141 | -: 137: 142 | -: 138: virtual ~logic_error() _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW; 143 | -: 139: 144 | -: 140: /** Returns a C-style character string describing the general cause of 145 | -: 141: * the current error (the same string passed to the ctor). */ 146 | -: 142: virtual const char* 147 | -: 143: what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW; 148 | -: 144: 149 | -: 145:# ifdef _GLIBCXX_TM_TS_INTERNAL 150 | -: 146: friend void* 151 | -: 147: ::_txnal_logic_error_get_msg(void* e); 152 | -: 148:# endif 153 | -: 149: }; 154 | -: 150: 155 | -: 151: /** Thrown by the library, or by you, to report domain errors (domain in 156 | -: 152: * the mathematical sense). */ 157 | -: 153: class domain_error : public logic_error 158 | -: 154: { 159 | -: 155: public: 160 | -: 156: explicit domain_error(const string& __arg) _GLIBCXX_TXN_SAFE; 161 | -: 157:#if __cplusplus >= 201103L 162 | -: 158: explicit domain_error(const char*) _GLIBCXX_TXN_SAFE; 163 | function _ZNSt12domain_errorC2ERKS_ called 0 returned 0% blocks executed 0% 164 | #####: 159: domain_error(const domain_error&) = default; 165 | call 0 never executed 166 | -: 160: domain_error& operator=(const domain_error&) = default; 167 | -: 161: domain_error(domain_error&&) = default; 168 | -: 162: domain_error& operator=(domain_error&&) = default; 169 | -: 163:#endif 170 | -: 164: virtual ~domain_error() _GLIBCXX_NOTHROW; 171 | -: 165: }; 172 | -: 166: 173 | -: 167: /** Thrown to report invalid arguments to functions. */ 174 | -: 168: class invalid_argument : public logic_error 175 | -: 169: { 176 | -: 170: public: 177 | -: 171: explicit invalid_argument(const string& __arg) _GLIBCXX_TXN_SAFE; 178 | -: 172:#if __cplusplus >= 201103L 179 | -: 173: explicit invalid_argument(const char*) _GLIBCXX_TXN_SAFE; 180 | -: 174: invalid_argument(const invalid_argument&) = default; 181 | -: 175: invalid_argument& operator=(const invalid_argument&) = default; 182 | -: 176: invalid_argument(invalid_argument&&) = default; 183 | -: 177: invalid_argument& operator=(invalid_argument&&) = default; 184 | -: 178:#endif 185 | -: 179: virtual ~invalid_argument() _GLIBCXX_NOTHROW; 186 | -: 180: }; 187 | -: 181: 188 | -: 182: /** Thrown when an object is constructed that would exceed its maximum 189 | -: 183: * permitted size (e.g., a basic_string instance). */ 190 | -: 184: class length_error : public logic_error 191 | -: 185: { 192 | -: 186: public: 193 | -: 187: explicit length_error(const string& __arg) _GLIBCXX_TXN_SAFE; 194 | -: 188:#if __cplusplus >= 201103L 195 | -: 189: explicit length_error(const char*) _GLIBCXX_TXN_SAFE; 196 | -: 190: length_error(const length_error&) = default; 197 | -: 191: length_error& operator=(const length_error&) = default; 198 | -: 192: length_error(length_error&&) = default; 199 | -: 193: length_error& operator=(length_error&&) = default; 200 | -: 194:#endif 201 | -: 195: virtual ~length_error() _GLIBCXX_NOTHROW; 202 | -: 196: }; 203 | -: 197: 204 | -: 198: /** This represents an argument whose value is not within the expected 205 | -: 199: * range (e.g., boundary checks in basic_string). */ 206 | -: 200: class out_of_range : public logic_error 207 | -: 201: { 208 | -: 202: public: 209 | -: 203: explicit out_of_range(const string& __arg) _GLIBCXX_TXN_SAFE; 210 | -: 204:#if __cplusplus >= 201103L 211 | -: 205: explicit out_of_range(const char*) _GLIBCXX_TXN_SAFE; 212 | -: 206: out_of_range(const out_of_range&) = default; 213 | -: 207: out_of_range& operator=(const out_of_range&) = default; 214 | -: 208: out_of_range(out_of_range&&) = default; 215 | -: 209: out_of_range& operator=(out_of_range&&) = default; 216 | -: 210:#endif 217 | -: 211: virtual ~out_of_range() _GLIBCXX_NOTHROW; 218 | -: 212: }; 219 | -: 213: 220 | -: 214: /** Runtime errors represent problems outside the scope of a program; 221 | -: 215: * they cannot be easily predicted and can generally only be caught as 222 | -: 216: * the program executes. 223 | -: 217: * @brief One of two subclasses of exception. 224 | -: 218: */ 225 | -: 219: class runtime_error : public exception 226 | -: 220: { 227 | -: 221: __cow_string _M_msg; 228 | -: 222: 229 | -: 223: public: 230 | -: 224: /** Takes a character string describing the error. */ 231 | -: 225: explicit 232 | -: 226: runtime_error(const string& __arg) _GLIBCXX_TXN_SAFE; 233 | -: 227: 234 | -: 228:#if __cplusplus >= 201103L 235 | -: 229: explicit 236 | -: 230: runtime_error(const char*) _GLIBCXX_TXN_SAFE; 237 | -: 231: 238 | -: 232: runtime_error(runtime_error&&) noexcept; 239 | -: 233: runtime_error& operator=(runtime_error&&) noexcept; 240 | -: 234:#endif 241 | -: 235: 242 | -: 236:#if _GLIBCXX_USE_CXX11_ABI || _GLIBCXX_DEFINE_STDEXCEPT_COPY_OPS 243 | -: 237: runtime_error(const runtime_error&) _GLIBCXX_NOTHROW; 244 | -: 238: runtime_error& operator=(const runtime_error&) _GLIBCXX_NOTHROW; 245 | -: 239:#elif __cplusplus >= 201103L 246 | -: 240: runtime_error(const runtime_error&) = default; 247 | -: 241: runtime_error& operator=(const runtime_error&) = default; 248 | -: 242:#endif 249 | -: 243: 250 | -: 244: virtual ~runtime_error() _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW; 251 | -: 245: 252 | -: 246: /** Returns a C-style character string describing the general cause of 253 | -: 247: * the current error (the same string passed to the ctor). */ 254 | -: 248: virtual const char* 255 | -: 249: what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW; 256 | -: 250: 257 | -: 251:# ifdef _GLIBCXX_TM_TS_INTERNAL 258 | -: 252: friend void* 259 | -: 253: ::_txnal_runtime_error_get_msg(void* e); 260 | -: 254:# endif 261 | -: 255: }; 262 | -: 256: 263 | -: 257: /** Thrown to indicate range errors in internal computations. */ 264 | -: 258: class range_error : public runtime_error 265 | -: 259: { 266 | -: 260: public: 267 | -: 261: explicit range_error(const string& __arg) _GLIBCXX_TXN_SAFE; 268 | -: 262:#if __cplusplus >= 201103L 269 | -: 263: explicit range_error(const char*) _GLIBCXX_TXN_SAFE; 270 | -: 264: range_error(const range_error&) = default; 271 | -: 265: range_error& operator=(const range_error&) = default; 272 | -: 266: range_error(range_error&&) = default; 273 | -: 267: range_error& operator=(range_error&&) = default; 274 | -: 268:#endif 275 | -: 269: virtual ~range_error() _GLIBCXX_NOTHROW; 276 | -: 270: }; 277 | -: 271: 278 | -: 272: /** Thrown to indicate arithmetic overflow. */ 279 | -: 273: class overflow_error : public runtime_error 280 | -: 274: { 281 | -: 275: public: 282 | -: 276: explicit overflow_error(const string& __arg) _GLIBCXX_TXN_SAFE; 283 | -: 277:#if __cplusplus >= 201103L 284 | -: 278: explicit overflow_error(const char*) _GLIBCXX_TXN_SAFE; 285 | -: 279: overflow_error(const overflow_error&) = default; 286 | -: 280: overflow_error& operator=(const overflow_error&) = default; 287 | -: 281: overflow_error(overflow_error&&) = default; 288 | -: 282: overflow_error& operator=(overflow_error&&) = default; 289 | -: 283:#endif 290 | -: 284: virtual ~overflow_error() _GLIBCXX_NOTHROW; 291 | -: 285: }; 292 | -: 286: 293 | -: 287: /** Thrown to indicate arithmetic underflow. */ 294 | -: 288: class underflow_error : public runtime_error 295 | -: 289: { 296 | -: 290: public: 297 | -: 291: explicit underflow_error(const string& __arg) _GLIBCXX_TXN_SAFE; 298 | -: 292:#if __cplusplus >= 201103L 299 | -: 293: explicit underflow_error(const char*) _GLIBCXX_TXN_SAFE; 300 | -: 294: underflow_error(const underflow_error&) = default; 301 | -: 295: underflow_error& operator=(const underflow_error&) = default; 302 | -: 296: underflow_error(underflow_error&&) = default; 303 | -: 297: underflow_error& operator=(underflow_error&&) = default; 304 | -: 298:#endif 305 | -: 299: virtual ~underflow_error() _GLIBCXX_NOTHROW; 306 | -: 300: }; 307 | -: 301: 308 | -: 302: /// @} group exceptions 309 | -: 303: 310 | -: 304:_GLIBCXX_END_NAMESPACE_VERSION 311 | -: 305:} // namespace 312 | -: 306: 313 | -: 307:#endif /* _GLIBCXX_STDEXCEPT */ 314 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/#usr#include#c++#11#typeinfo.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:/usr/include/c++/11/typeinfo 2 | -: 0:Graph:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcno 3 | -: 0:Data:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcda 4 | -: 0:Runs:1 5 | -: 1:// RTTI support for -*- C++ -*- 6 | -: 2:// Copyright (C) 1994-2021 Free Software Foundation, Inc. 7 | -: 3:// 8 | -: 4:// This file is part of GCC. 9 | -: 5:// 10 | -: 6:// GCC is free software; you can redistribute it and/or modify 11 | -: 7:// it under the terms of the GNU General Public License as published by 12 | -: 8:// the Free Software Foundation; either version 3, or (at your option) 13 | -: 9:// any later version. 14 | -: 10:// 15 | -: 11:// GCC is distributed in the hope that it will be useful, 16 | -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | -: 14:// GNU General Public License for more details. 19 | -: 15:// 20 | -: 16:// Under Section 7 of GPL version 3, you are granted additional 21 | -: 17:// permissions described in the GCC Runtime Library Exception, version 22 | -: 18:// 3.1, as published by the Free Software Foundation. 23 | -: 19: 24 | -: 20:// You should have received a copy of the GNU General Public License and 25 | -: 21:// a copy of the GCC Runtime Library Exception along with this program; 26 | -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 27 | -: 23:// . 28 | -: 24: 29 | -: 25:/** @file typeinfo 30 | -: 26: * This is a Standard C++ Library header. 31 | -: 27: */ 32 | -: 28: 33 | -: 29:#ifndef _TYPEINFO 34 | -: 30:#define _TYPEINFO 35 | -: 31: 36 | -: 32:#pragma GCC system_header 37 | -: 33: 38 | -: 34:#include 39 | -: 35:#if __cplusplus >= 201103L 40 | -: 36:#include 41 | -: 37:#endif 42 | -: 38: 43 | -: 39:#pragma GCC visibility push(default) 44 | -: 40: 45 | -: 41:extern "C++" { 46 | -: 42: 47 | -: 43:namespace __cxxabiv1 48 | -: 44:{ 49 | -: 45: class __class_type_info; 50 | -: 46:} // namespace __cxxabiv1 51 | -: 47: 52 | -: 48:// Determine whether typeinfo names for the same type are merged (in which 53 | -: 49:// case comparison can just compare pointers) or not (in which case strings 54 | -: 50:// must be compared), and whether comparison is to be implemented inline or 55 | -: 51:// not. We used to do inline pointer comparison by default if weak symbols 56 | -: 52:// are available, but even with weak symbols sometimes names are not merged 57 | -: 53:// when objects are loaded with RTLD_LOCAL, so now we always use strcmp by 58 | -: 54:// default. For ABI compatibility, we do the strcmp inline if weak symbols 59 | -: 55:// are available, and out-of-line if not. Out-of-line pointer comparison 60 | -: 56:// is used where the object files are to be portable to multiple systems, 61 | -: 57:// some of which may not be able to use pointer comparison, but the 62 | -: 58:// particular system for which libstdc++ is being built can use pointer 63 | -: 59:// comparison; in particular for most ARM EABI systems, where the ABI 64 | -: 60:// specifies out-of-line comparison. The compiler's target configuration 65 | -: 61:// can override the defaults by defining __GXX_TYPEINFO_EQUALITY_INLINE to 66 | -: 62:// 1 or 0 to indicate whether or not comparison is inline, and 67 | -: 63:// __GXX_MERGED_TYPEINFO_NAMES to 1 or 0 to indicate whether or not pointer 68 | -: 64:// comparison can be used. 69 | -: 65: 70 | -: 66:#ifndef __GXX_MERGED_TYPEINFO_NAMES 71 | -: 67:// By default, typeinfo names are not merged. 72 | -: 68:#define __GXX_MERGED_TYPEINFO_NAMES 0 73 | -: 69:#endif 74 | -: 70: 75 | -: 71:// By default follow the old inline rules to avoid ABI changes. 76 | -: 72:#ifndef __GXX_TYPEINFO_EQUALITY_INLINE 77 | -: 73: #if !__GXX_WEAK__ 78 | -: 74: #define __GXX_TYPEINFO_EQUALITY_INLINE 0 79 | -: 75: #else 80 | -: 76: #define __GXX_TYPEINFO_EQUALITY_INLINE 1 81 | -: 77: #endif 82 | -: 78:#endif 83 | -: 79: 84 | -: 80:namespace std 85 | -: 81:{ 86 | -: 82: /** 87 | -: 83: * @brief Part of RTTI. 88 | -: 84: * 89 | -: 85: * The @c type_info class describes type information generated by 90 | -: 86: * an implementation. 91 | -: 87: */ 92 | -: 88: class type_info 93 | -: 89: { 94 | -: 90: public: 95 | -: 91: /** Destructor first. Being the first non-inline virtual function, this 96 | -: 92: * controls in which translation unit the vtable is emitted. The 97 | -: 93: * compiler makes use of that information to know where to emit 98 | -: 94: * the runtime-mandated type_info structures in the new-abi. */ 99 | -: 95: virtual ~type_info(); 100 | -: 96: 101 | -: 97: /** Returns an @e implementation-defined byte string; this is not 102 | -: 98: * portable between compilers! */ 103 | -: 99: const char* name() const _GLIBCXX_NOEXCEPT 104 | -: 100: { return __name[0] == '*' ? __name + 1 : __name; } 105 | -: 101: 106 | -: 102:#if !__GXX_TYPEINFO_EQUALITY_INLINE 107 | -: 103: // In old abi, or when weak symbols are not supported, there can 108 | -: 104: // be multiple instances of a type_info object for one 109 | -: 105: // type. Uniqueness must use the _name value, not object address. 110 | -: 106: bool before(const type_info& __arg) const _GLIBCXX_NOEXCEPT; 111 | -: 107: bool operator==(const type_info& __arg) const _GLIBCXX_NOEXCEPT; 112 | -: 108:#else 113 | -: 109: #if !__GXX_MERGED_TYPEINFO_NAMES 114 | -: 110: /** Returns true if @c *this precedes @c __arg in the implementation's 115 | -: 111: * collation order. */ 116 | -: 112: // Even with the new abi, on systems that support dlopen 117 | -: 113: // we can run into cases where type_info names aren't merged, 118 | -: 114: // so we still need to do string comparison. 119 | -: 115: bool before(const type_info& __arg) const _GLIBCXX_NOEXCEPT 120 | -: 116: { return (__name[0] == '*' && __arg.__name[0] == '*') 121 | -: 117: ? __name < __arg.__name 122 | -: 118: : __builtin_strcmp (__name, __arg.__name) < 0; } 123 | -: 119: 124 | function _ZNKSt9type_infoeqERKS_ called 0 returned 0% blocks executed 0% 125 | #####: 120: bool operator==(const type_info& __arg) const _GLIBCXX_NOEXCEPT 126 | -: 121: { 127 | #####: 122: return ((__name == __arg.__name) 128 | #####: 123: || (__name[0] != '*' && 129 | branch 0 never executed 130 | branch 1 never executed 131 | branch 2 never executed 132 | branch 3 never executed 133 | #####: 124: __builtin_strcmp (__name, __arg.__name) == 0)); 134 | branch 0 never executed 135 | branch 1 never executed 136 | -: 125: } 137 | -: 126: #else 138 | -: 127: // On some targets we can rely on type_info's NTBS being unique, 139 | -: 128: // and therefore address comparisons are sufficient. 140 | -: 129: bool before(const type_info& __arg) const _GLIBCXX_NOEXCEPT 141 | -: 130: { return __name < __arg.__name; } 142 | -: 131: 143 | -: 132: bool operator==(const type_info& __arg) const _GLIBCXX_NOEXCEPT 144 | -: 133: { return __name == __arg.__name; } 145 | -: 134: #endif 146 | -: 135:#endif 147 | -: 136: 148 | -: 137:#if __cpp_impl_three_way_comparison < 201907L 149 | -: 138: bool operator!=(const type_info& __arg) const _GLIBCXX_NOEXCEPT 150 | -: 139: { return !operator==(__arg); } 151 | -: 140:#endif 152 | -: 141: 153 | -: 142:#if __cplusplus >= 201103L 154 | -: 143: size_t hash_code() const noexcept 155 | -: 144: { 156 | -: 145:# if !__GXX_MERGED_TYPEINFO_NAMES 157 | -: 146: return _Hash_bytes(name(), __builtin_strlen(name()), 158 | -: 147: static_cast(0xc70f6907UL)); 159 | -: 148:# else 160 | -: 149: return reinterpret_cast(__name); 161 | -: 150:# endif 162 | -: 151: } 163 | -: 152:#endif // C++11 164 | -: 153: 165 | -: 154: // Return true if this is a pointer type of some kind 166 | -: 155: virtual bool __is_pointer_p() const; 167 | -: 156: 168 | -: 157: // Return true if this is a function type 169 | -: 158: virtual bool __is_function_p() const; 170 | -: 159: 171 | -: 160: // Try and catch a thrown type. Store an adjusted pointer to the 172 | -: 161: // caught type in THR_OBJ. If THR_TYPE is not a pointer type, then 173 | -: 162: // THR_OBJ points to the thrown object. If THR_TYPE is a pointer 174 | -: 163: // type, then THR_OBJ is the pointer itself. OUTER indicates the 175 | -: 164: // number of outer pointers, and whether they were const 176 | -: 165: // qualified. 177 | -: 166: virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, 178 | -: 167: unsigned __outer) const; 179 | -: 168: 180 | -: 169: // Internally used during catch matching 181 | -: 170: virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, 182 | -: 171: void **__obj_ptr) const; 183 | -: 172: 184 | -: 173: protected: 185 | -: 174: const char *__name; 186 | -: 175: 187 | -: 176: explicit type_info(const char *__n): __name(__n) { } 188 | -: 177: 189 | -: 178: private: 190 | -: 179: /// Assigning type_info is not supported. 191 | -: 180: type_info& operator=(const type_info&); 192 | -: 181: type_info(const type_info&); 193 | -: 182: }; 194 | -: 183: 195 | -: 184: /** 196 | -: 185: * @brief Thrown during incorrect typecasting. 197 | -: 186: * @ingroup exceptions 198 | -: 187: * 199 | -: 188: * If you attempt an invalid @c dynamic_cast expression, an instance of 200 | -: 189: * this class (or something derived from this class) is thrown. */ 201 | -: 190: class bad_cast : public exception 202 | -: 191: { 203 | -: 192: public: 204 | -: 193: bad_cast() _GLIBCXX_USE_NOEXCEPT { } 205 | -: 194: 206 | -: 195: // This declaration is not useless: 207 | -: 196: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 208 | -: 197: virtual ~bad_cast() _GLIBCXX_USE_NOEXCEPT; 209 | -: 198: 210 | -: 199: // See comment in eh_exception.cc. 211 | -: 200: virtual const char* what() const _GLIBCXX_USE_NOEXCEPT; 212 | -: 201: }; 213 | -: 202: 214 | -: 203: /** 215 | -: 204: * @brief Thrown when a NULL pointer in a @c typeid expression is used. 216 | -: 205: * @ingroup exceptions 217 | -: 206: */ 218 | -: 207: class bad_typeid : public exception 219 | -: 208: { 220 | -: 209: public: 221 | -: 210: bad_typeid () _GLIBCXX_USE_NOEXCEPT { } 222 | -: 211: 223 | -: 212: // This declaration is not useless: 224 | -: 213: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 225 | -: 214: virtual ~bad_typeid() _GLIBCXX_USE_NOEXCEPT; 226 | -: 215: 227 | -: 216: // See comment in eh_exception.cc. 228 | -: 217: virtual const char* what() const _GLIBCXX_USE_NOEXCEPT; 229 | -: 218: }; 230 | -: 219:} // namespace std 231 | -: 220: 232 | -: 221:} // extern "C++" 233 | -: 222: 234 | -: 223:#pragma GCC visibility pop 235 | -: 224: 236 | -: 225:#endif 237 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/#usr#include#x86_64-linux-gnu#c++#11#bits#ctype_inline.h.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:/usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h 2 | -: 0:Graph:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcno 3 | -: 0:Data:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcda 4 | -: 0:Runs:1 5 | -: 1:// Locale support -*- C++ -*- 6 | -: 2: 7 | -: 3:// Copyright (C) 2000-2021 Free Software Foundation, Inc. 8 | -: 4:// 9 | -: 5:// This file is part of the GNU ISO C++ Library. This library is free 10 | -: 6:// software; you can redistribute it and/or modify it under the 11 | -: 7:// terms of the GNU General Public License as published by the 12 | -: 8:// Free Software Foundation; either version 3, or (at your option) 13 | -: 9:// any later version. 14 | -: 10: 15 | -: 11:// This library is distributed in the hope that it will be useful, 16 | -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | -: 14:// GNU General Public License for more details. 19 | -: 15: 20 | -: 16:// Under Section 7 of GPL version 3, you are granted additional 21 | -: 17:// permissions described in the GCC Runtime Library Exception, version 22 | -: 18:// 3.1, as published by the Free Software Foundation. 23 | -: 19: 24 | -: 20:// You should have received a copy of the GNU General Public License and 25 | -: 21:// a copy of the GCC Runtime Library Exception along with this program; 26 | -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 27 | -: 23:// . 28 | -: 24: 29 | -: 25:/** @file bits/ctype_inline.h 30 | -: 26: * This is an internal header file, included by other library headers. 31 | -: 27: * Do not attempt to use it directly. @headername{locale} 32 | -: 28: */ 33 | -: 29: 34 | -: 30:// 35 | -: 31:// ISO C++ 14882: 22.1 Locales 36 | -: 32:// 37 | -: 33: 38 | -: 34:// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) 39 | -: 35:// functions go in ctype.cc 40 | -: 36: 41 | -: 37:namespace std _GLIBCXX_VISIBILITY(default) 42 | -: 38:{ 43 | -: 39:_GLIBCXX_BEGIN_NAMESPACE_VERSION 44 | -: 40: 45 | -: 41: bool 46 | function _ZNKSt5ctypeIcE2isEtc called 0 returned 0% blocks executed 0% 47 | #####: 42: ctype:: 48 | -: 43: is(mask __m, char __c) const 49 | #####: 44: { return _M_table[static_cast(__c)] & __m; } 50 | -: 45: 51 | -: 46: const char* 52 | -: 47: ctype:: 53 | -: 48: is(const char* __low, const char* __high, mask* __vec) const 54 | -: 49: { 55 | -: 50: while (__low < __high) 56 | -: 51: *__vec++ = _M_table[static_cast(*__low++)]; 57 | -: 52: return __high; 58 | -: 53: } 59 | -: 54: 60 | -: 55: const char* 61 | -: 56: ctype:: 62 | -: 57: scan_is(mask __m, const char* __low, const char* __high) const 63 | -: 58: { 64 | -: 59: while (__low < __high 65 | -: 60: && !(_M_table[static_cast(*__low)] & __m)) 66 | -: 61: ++__low; 67 | -: 62: return __low; 68 | -: 63: } 69 | -: 64: 70 | -: 65: const char* 71 | -: 66: ctype:: 72 | -: 67: scan_not(mask __m, const char* __low, const char* __high) const 73 | -: 68: { 74 | -: 69: while (__low < __high 75 | -: 70: && (_M_table[static_cast(*__low)] & __m) != 0) 76 | -: 71: ++__low; 77 | -: 72: return __low; 78 | -: 73: } 79 | -: 74: 80 | -: 75:_GLIBCXX_END_NAMESPACE_VERSION 81 | -: 76:} // namespace 82 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/SHA.txt: -------------------------------------------------------------------------------- 1 | ee3ae524a3367ef01130c087bdae66ff029e6ce7 2 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/coverage_totals.txt: -------------------------------------------------------------------------------- 1 | 50.00000 2 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/src#index.cpp.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:src/index.cpp 2 | -: 0:Graph:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcno 3 | -: 0:Data:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcda 4 | -: 0:Runs:1 5 | -: 1:namespace Index { 6 | function _ZN5Index12uncovered_ifEb called 1 returned 100% blocks executed 75% 7 | 1: 2: bool uncovered_if(bool a = true) { 8 | 1: 3: if (a) 9 | branch 0 taken 100% (fallthrough) 10 | branch 1 taken 0% 11 | 1: 4: return false; 12 | -: 5: else 13 | #####: 6: return true; 14 | -: 7: } 15 | -: 8: 16 | function _ZN5Index13fully_coveredEv called 1 returned 100% blocks executed 100% 17 | 1: 9: bool fully_covered() { 18 | 1: 10: return true; 19 | -: 11: } 20 | -: 12: 21 | function _ZN5Index9uncoveredEv called 0 returned 0% blocks executed 0% 22 | #####: 13: bool uncovered() { 23 | #####: 14: return true; 24 | -: 15: } 25 | -: 16:} 26 | -------------------------------------------------------------------------------- /coverage_data/cpp-11-standard/test#test_index.cpp.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:test/test_index.cpp 2 | -: 0:Graph:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcno 3 | -: 0:Data:/home/runner/work/cpp-11-standard/cpp-11-standard/TestBinary-test_index.gcda 4 | -: 0:Runs:1 5 | -: 1:#define CATCH_CONFIG_MAIN 6 | -: 2:#include "../include/catch.hpp" 7 | -: 3:#include "../src/index.cpp" 8 | -: 4: 9 | function _ZL19C_A_T_C_H_T_E_S_T_0v called 1 returned 100% blocks executed 44% 10 | 1: 5:TEST_CASE("Test uncovered_if method", "[index]") 11 | -: 6:{ 12 | 1: 7: REQUIRE (Index::uncovered_if() == false); 13 | call 0 returned 100% 14 | call 1 returned 100% 15 | call 2 returned 100% 16 | call 3 returned 100% 17 | branch 4 taken 100% (fallthrough) 18 | branch 5 taken 0% (throw) 19 | call 6 returned 100% 20 | call 7 returned 100% 21 | branch 8 taken 100% (fallthrough) 22 | branch 9 taken 0% (throw) 23 | call 10 returned 100% 24 | branch 11 taken 100% (fallthrough) 25 | branch 12 taken 0% (throw) 26 | call 13 returned 100% 27 | branch 14 taken 100% (fallthrough) 28 | branch 15 taken 0% (throw) 29 | call 16 returned 100% 30 | call 17 returned 100% 31 | branch 18 taken 100% (fallthrough) 32 | branch 19 taken 0% (throw) 33 | call 20 returned 100% 34 | call 21 never executed 35 | call 22 never executed 36 | call 23 never executed 37 | branch 24 never executed 38 | branch 25 never executed 39 | call 26 never executed 40 | branch 27 never executed 41 | branch 28 never executed 42 | call 29 never executed 43 | call 30 never executed 44 | 1: 8:} 45 | -: 9: 46 | function _ZL19C_A_T_C_H_T_E_S_T_2v called 1 returned 100% blocks executed 44% 47 | 1: 10:TEST_CASE("Test fully covered", "[index]") 48 | -: 11:{ 49 | 1: 12: REQUIRE (Index::fully_covered() == true); 50 | call 0 returned 100% 51 | call 1 returned 100% 52 | call 2 returned 100% 53 | call 3 returned 100% 54 | branch 4 taken 100% (fallthrough) 55 | branch 5 taken 0% (throw) 56 | call 6 returned 100% 57 | call 7 returned 100% 58 | branch 8 taken 100% (fallthrough) 59 | branch 9 taken 0% (throw) 60 | call 10 returned 100% 61 | branch 11 taken 100% (fallthrough) 62 | branch 12 taken 0% (throw) 63 | call 13 returned 100% 64 | branch 14 taken 100% (fallthrough) 65 | branch 15 taken 0% (throw) 66 | call 16 returned 100% 67 | call 17 returned 100% 68 | branch 18 taken 100% (fallthrough) 69 | branch 19 taken 0% (throw) 70 | call 20 returned 100% 71 | call 21 never executed 72 | call 22 never executed 73 | call 23 never executed 74 | branch 24 never executed 75 | branch 25 never executed 76 | call 26 never executed 77 | branch 27 never executed 78 | branch 28 never executed 79 | call 29 never executed 80 | call 30 never executed 81 | 1: 13:} 82 | -------------------------------------------------------------------------------- /coverage_data/go-standard/SHA.txt: -------------------------------------------------------------------------------- 1 | df2bbc24804ea87f542be76e6c1a3142eda49082 2 | -------------------------------------------------------------------------------- /coverage_data/go-standard/coverage.txt: -------------------------------------------------------------------------------- 1 | mode: atomic 2 | goStandard/main.go:5.31,6.7 1 1 3 | goStandard/main.go:6.7,8.3 1 1 4 | goStandard/main.go:10.2,10.13 1 0 5 | goStandard/main.go:14.26,16.2 1 1 6 | goStandard/main.go:21.23,23.2 1 0 7 | -------------------------------------------------------------------------------- /coverage_data/go-standard/coverage_totals.txt: -------------------------------------------------------------------------------- 1 | 62.50000 2 | -------------------------------------------------------------------------------- /coverage_data/java-standard/SHA.txt: -------------------------------------------------------------------------------- 1 | 70f9e4fb8c4c10527d1f8aa6691c3c8f9e707b0a 2 | -------------------------------------------------------------------------------- /coverage_data/java-standard/coverage_totals.txt: -------------------------------------------------------------------------------- 1 | 50.0 2 | -------------------------------------------------------------------------------- /coverage_data/java-standard/jacocoTestReport.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /coverage_data/kotlin-standard/SHA.txt: -------------------------------------------------------------------------------- 1 | c812045cf355bd538b4414b2dd3fd66e9f438add 2 | -------------------------------------------------------------------------------- /coverage_data/kotlin-standard/coverage_totals.txt: -------------------------------------------------------------------------------- 1 | 50.00000 2 | -------------------------------------------------------------------------------- /coverage_data/kotlin-standard/jacocoTestReport.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /coverage_data/python-standard/SHA.txt: -------------------------------------------------------------------------------- 1 | 78e956f22e706b9373bd00ebb2136e0a787c0d47 2 | -------------------------------------------------------------------------------- /coverage_data/python-standard/coverage.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | /home/runner/work/python-standard/python-standard 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /coverage_data/python-standard/coverage_totals.txt: -------------------------------------------------------------------------------- 1 | 85.71 2 | -------------------------------------------------------------------------------- /coverage_data/ruby-standard-2/SHA.txt: -------------------------------------------------------------------------------- 1 | ee79dad954a93ea6de5f4f1d0b76c3fd4545499c 2 | -------------------------------------------------------------------------------- /coverage_data/ruby-standard-2/coverage.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | /home/runner/work/ruby-standard-2/ruby-standard-2 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /coverage_data/ruby-standard-2/coverage_totals.txt: -------------------------------------------------------------------------------- 1 | 93.65 2 | -------------------------------------------------------------------------------- /coverage_data/swift-standard/SHA.txt: -------------------------------------------------------------------------------- 1 | 9743a6a0a82a0e56c9a11732867fa2cb67df0423 2 | -------------------------------------------------------------------------------- /coverage_data/swift-standard/coverage_totals.txt: -------------------------------------------------------------------------------- 1 | 70.00000 2 | -------------------------------------------------------------------------------- /coverage_data/swift-standard/info.lcov: -------------------------------------------------------------------------------- 1 | SF:/Users/runner/work/swift-standard/swift-standard/standard-swift/AppDelegate.swift 2 | FN:16,$s14standard_swift11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0k6LaunchJ3KeyaypGSgtF 3 | FN:23,$s14standard_swift11AppDelegateC11application_26configurationForConnecting7optionsSo20UISceneConfigurationCSo13UIApplicationC_So0J7SessionCSo0J17ConnectionOptionsCtF 4 | FN:29,$s14standard_swift11AppDelegateC11application_23didDiscardSceneSessionsySo13UIApplicationC_ShySo14UISceneSessionCGtF 5 | FNDA:3,$s14standard_swift11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0k6LaunchJ3KeyaypGSgtF 6 | FNDA:1,$s14standard_swift11AppDelegateC11application_26configurationForConnecting7optionsSo20UISceneConfigurationCSo13UIApplicationC_So0J7SessionCSo0J17ConnectionOptionsCtF 7 | FNDA:0,$s14standard_swift11AppDelegateC11application_23didDiscardSceneSessionsySo13UIApplicationC_ShySo14UISceneSessionCGtF 8 | FNF:3 9 | FNH:2 10 | DA:16,3 11 | DA:17,3 12 | DA:18,3 13 | DA:19,3 14 | DA:23,1 15 | DA:24,1 16 | DA:25,1 17 | DA:26,1 18 | DA:27,1 19 | DA:29,0 20 | DA:30,0 21 | DA:31,0 22 | DA:32,0 23 | DA:33,0 24 | BRF:0 25 | BRH:0 26 | LF:14 27 | LH:9 28 | end_of_record 29 | SF:/Users/runner/work/swift-standard/swift-standard/standard-swift/ContentDetail.swift 30 | FN:16,$s14standard_swift13ContentDetailV4bodyQrvg 31 | FN:17,$s14standard_swift13ContentDetailV4bodyQrvg7SwiftUI9TupleViewVyAE0I0PAEE9clipShape_5styleQrqd___AE9FillStyleVtAE0K0Rd__lFQOyAiEE5frame5width6height9alignmentQr12CoreGraphics7CGFloatVSg_AvE9AlignmentVtFQOyAE5ImageV_Qo__AE6CircleVQo__AE4TextVA4_tGyXEfU_ 32 | FNDA:0,$s14standard_swift13ContentDetailV4bodyQrvg 33 | FNDA:0,$s14standard_swift13ContentDetailV4bodyQrvg7SwiftUI9TupleViewVyAE0I0PAEE9clipShape_5styleQrqd___AE9FillStyleVtAE0K0Rd__lFQOyAiEE5frame5width6height9alignmentQr12CoreGraphics7CGFloatVSg_AvE9AlignmentVtFQOyAE5ImageV_Qo__AE6CircleVQo__AE4TextVA4_tGyXEfU_ 34 | FNF:2 35 | FNH:0 36 | DA:16,0 37 | DA:17,0 38 | DA:18,0 39 | DA:19,0 40 | DA:20,0 41 | DA:21,0 42 | DA:22,0 43 | DA:23,0 44 | DA:24,0 45 | DA:25,0 46 | BRF:0 47 | BRH:0 48 | LF:17 49 | LH:0 50 | end_of_record 51 | SF:/Users/runner/work/swift-standard/swift-standard/standard-swift/ContentRow.swift 52 | FN:16,$s14standard_swift10ContentRowV4bodyQrvg 53 | FN:17,$s14standard_swift10ContentRowV4bodyQrvg7SwiftUI9TupleViewVyAE0I0PAEE7paddingyQrAE4EdgeO3SetV_12CoreGraphics7CGFloatVSgtFQOyAiEE9clipShape_5styleQrqd___AE9FillStyleVtAE0Q0Rd__lFQOyAiEE5frame5width6height9alignmentQrAR_ArE9AlignmentVtFQOyAE5ImageV_Qo__AE6CircleVQo__Qo__AE6VStackVyAGyAE4TextV_A12_tGGAE6SpacerVtGyXEfU_ 54 | FN:20,$s14standard_swift10ContentRowV4bodyQrvg7SwiftUI9TupleViewVyAE0I0PAEE7paddingyQrAE4EdgeO3SetV_12CoreGraphics7CGFloatVSgtFQOyAiEE9clipShape_5styleQrqd___AE9FillStyleVtAE0Q0Rd__lFQOyAiEE5frame5width6height9alignmentQrAR_ArE9AlignmentVtFQOyAE5ImageV_Qo__AE6CircleVQo__Qo__AE6VStackVyAGyAE4TextV_A12_tGGAE6SpacerVtGyXEfU_A13_yXEfU_ 55 | FNDA:15,$s14standard_swift10ContentRowV4bodyQrvg 56 | FNDA:15,$s14standard_swift10ContentRowV4bodyQrvg7SwiftUI9TupleViewVyAE0I0PAEE7paddingyQrAE4EdgeO3SetV_12CoreGraphics7CGFloatVSgtFQOyAiEE9clipShape_5styleQrqd___AE9FillStyleVtAE0Q0Rd__lFQOyAiEE5frame5width6height9alignmentQrAR_ArE9AlignmentVtFQOyAE5ImageV_Qo__AE6CircleVQo__Qo__AE6VStackVyAGyAE4TextV_A12_tGGAE6SpacerVtGyXEfU_ 57 | FNDA:15,$s14standard_swift10ContentRowV4bodyQrvg7SwiftUI9TupleViewVyAE0I0PAEE7paddingyQrAE4EdgeO3SetV_12CoreGraphics7CGFloatVSgtFQOyAiEE9clipShape_5styleQrqd___AE9FillStyleVtAE0Q0Rd__lFQOyAiEE5frame5width6height9alignmentQrAR_ArE9AlignmentVtFQOyAE5ImageV_Qo__AE6CircleVQo__Qo__AE6VStackVyAGyAE4TextV_A12_tGGAE6SpacerVtGyXEfU_A13_yXEfU_ 58 | FNF:3 59 | FNH:3 60 | DA:16,15 61 | DA:17,15 62 | DA:18,15 63 | DA:19,15 64 | DA:20,15 65 | DA:21,15 66 | DA:22,15 67 | DA:23,15 68 | DA:24,15 69 | DA:25,15 70 | DA:26,15 71 | BRF:0 72 | BRH:0 73 | LF:24 74 | LH:24 75 | end_of_record 76 | SF:/Users/runner/work/swift-standard/swift-standard/standard-swift/ContentView.swift 77 | FN:12,$s14standard_swift11ContentViewV4bodyQrvg 78 | FN:14,$s14standard_swift11ContentViewV4bodyQrvg7SwiftUI0D0PAEE18navigationBarTitleyQrAE4TextVFQOyAE4ListVys5NeverOAE7ForEachVySayAA9DeveloperVGSiAE14NavigationLinkVyAA0C3RowVAA0C6DetailVGGG_Qo_yXEfU_ 79 | FN:15,$s14standard_swift11ContentViewV4bodyQrvg7SwiftUI0D0PAEE18navigationBarTitleyQrAE4TextVFQOyAE4ListVys5NeverOAE7ForEachVySayAA9DeveloperVGSiAE14NavigationLinkVyAA0C3RowVAA0C6DetailVGGG_Qo_yXEfU_AzRcfU_ 80 | FN:16,$s14standard_swift11ContentViewV4bodyQrvg7SwiftUI0D0PAEE18navigationBarTitleyQrAE4TextVFQOyAE4ListVys5NeverOAE7ForEachVySayAA9DeveloperVGSiAE14NavigationLinkVyAA0C3RowVAA0C6DetailVGGG_Qo_yXEfU_AzRcfU_AWyXEfU_ 81 | FNDA:3,$s14standard_swift11ContentViewV4bodyQrvg 82 | FNDA:3,$s14standard_swift11ContentViewV4bodyQrvg7SwiftUI0D0PAEE18navigationBarTitleyQrAE4TextVFQOyAE4ListVys5NeverOAE7ForEachVySayAA9DeveloperVGSiAE14NavigationLinkVyAA0C3RowVAA0C6DetailVGGG_Qo_yXEfU_ 83 | FNDA:30,$s14standard_swift11ContentViewV4bodyQrvg7SwiftUI0D0PAEE18navigationBarTitleyQrAE4TextVFQOyAE4ListVys5NeverOAE7ForEachVySayAA9DeveloperVGSiAE14NavigationLinkVyAA0C3RowVAA0C6DetailVGGG_Qo_yXEfU_AzRcfU_ 84 | FNDA:30,$s14standard_swift11ContentViewV4bodyQrvg7SwiftUI0D0PAEE18navigationBarTitleyQrAE4TextVFQOyAE4ListVys5NeverOAE7ForEachVySayAA9DeveloperVGSiAE14NavigationLinkVyAA0C3RowVAA0C6DetailVGGG_Qo_yXEfU_AzRcfU_AWyXEfU_ 85 | FNF:4 86 | FNH:4 87 | DA:12,3 88 | DA:13,3 89 | DA:14,3 90 | DA:15,30 91 | DA:16,30 92 | DA:17,30 93 | DA:18,30 94 | DA:19,30 95 | DA:20,3 96 | DA:21,3 97 | DA:22,3 98 | BRF:0 99 | BRH:0 100 | LF:27 101 | LH:27 102 | end_of_record 103 | SF:/Users/runner/work/swift-standard/swift-standard/standard-swift/Index.swift 104 | FN:14,$s14standard_swift5IndexC12uncovered_if1aS2b_tF 105 | FN:23,$s14standard_swift5IndexC13fully_coveredSbyF 106 | FN:28,$s14standard_swift5IndexC9uncoveredSbyF 107 | FNDA:1,$s14standard_swift5IndexC12uncovered_if1aS2b_tF 108 | FNDA:1,$s14standard_swift5IndexC13fully_coveredSbyF 109 | FNDA:0,$s14standard_swift5IndexC9uncoveredSbyF 110 | FNF:3 111 | FNH:2 112 | DA:14,1 113 | DA:15,1 114 | DA:16,1 115 | DA:17,1 116 | DA:18,0 117 | DA:19,0 118 | DA:20,0 119 | DA:23,1 120 | DA:24,1 121 | DA:25,1 122 | DA:28,0 123 | DA:29,0 124 | DA:30,0 125 | BRF:0 126 | BRH:0 127 | LF:13 128 | LH:7 129 | end_of_record 130 | SF:/Users/runner/work/swift-standard/swift-standard/standard-swift/SceneDelegate.swift 131 | FN:17,$s14standard_swift13SceneDelegateC5scene_13willConnectTo7optionsySo7UISceneC_So0J7SessionCSo0J17ConnectionOptionsCtF 132 | FN:31,$s14standard_swift13SceneDelegateC18sceneDidDisconnectyySo7UISceneCF 133 | FN:38,$s14standard_swift13SceneDelegateC20sceneDidBecomeActiveyySo7UISceneCF 134 | FN:43,$s14standard_swift13SceneDelegateC21sceneWillResignActiveyySo7UISceneCF 135 | FN:48,$s14standard_swift13SceneDelegateC24sceneWillEnterForegroundyySo7UISceneCF 136 | FN:53,$s14standard_swift13SceneDelegateC23sceneDidEnterBackgroundyySo7UISceneCF 137 | FNDA:3,$s14standard_swift13SceneDelegateC5scene_13willConnectTo7optionsySo7UISceneC_So0J7SessionCSo0J17ConnectionOptionsCtF 138 | FNDA:0,$s14standard_swift13SceneDelegateC18sceneDidDisconnectyySo7UISceneCF 139 | FNDA:3,$s14standard_swift13SceneDelegateC20sceneDidBecomeActiveyySo7UISceneCF 140 | FNDA:0,$s14standard_swift13SceneDelegateC21sceneWillResignActiveyySo7UISceneCF 141 | FNDA:3,$s14standard_swift13SceneDelegateC24sceneWillEnterForegroundyySo7UISceneCF 142 | FNDA:0,$s14standard_swift13SceneDelegateC23sceneDidEnterBackgroundyySo7UISceneCF 143 | FNF:6 144 | FNH:3 145 | DA:17,3 146 | DA:18,3 147 | DA:19,3 148 | DA:20,3 149 | DA:21,3 150 | DA:22,3 151 | DA:23,3 152 | DA:24,3 153 | DA:25,3 154 | DA:26,3 155 | DA:27,3 156 | DA:28,3 157 | DA:29,3 158 | DA:31,0 159 | DA:32,0 160 | DA:33,0 161 | DA:34,0 162 | DA:35,0 163 | DA:36,0 164 | DA:38,3 165 | DA:39,3 166 | DA:40,3 167 | DA:41,3 168 | DA:43,0 169 | DA:44,0 170 | DA:45,0 171 | DA:46,0 172 | DA:48,3 173 | DA:49,3 174 | DA:50,3 175 | DA:51,3 176 | DA:53,0 177 | DA:54,0 178 | DA:55,0 179 | DA:56,0 180 | DA:57,0 181 | BRF:0 182 | BRH:0 183 | LF:36 184 | LH:21 185 | end_of_record 186 | -------------------------------------------------------------------------------- /coverage_data/typescript-standard/SHA.txt: -------------------------------------------------------------------------------- 1 | 2a411eeb76dc9ab70f254a90a804b5770ed7b308 2 | -------------------------------------------------------------------------------- /coverage_data/typescript-standard/coverage-final.json: -------------------------------------------------------------------------------- 1 | {"/home/runner/work/typescript-standard/typescript-standard/src/index.ts": {"path":"/home/runner/work/typescript-standard/typescript-standard/src/index.ts","statementMap":{"0":{"start":{"line":4,"column":4},"end":{"line":10,"column":null}},"1":{"start":{"line":5,"column":8},"end":{"line":9,"column":null}},"2":{"start":{"line":6,"column":12},"end":{"line":6,"column":null}},"3":{"start":{"line":8,"column":12},"end":{"line":8,"column":null}},"4":{"start":{"line":13,"column":4},"end":{"line":15,"column":null}},"5":{"start":{"line":14,"column":8},"end":{"line":14,"column":null}},"6":{"start":{"line":18,"column":4},"end":{"line":20,"column":null}},"7":{"start":{"line":19,"column":8},"end":{"line":19,"column":null}},"8":{"start":{"line":1,"column":0},"end":{"line":1,"column":21}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":1,"column":0},"end":{"line":1,"column":21}},"loc":{"start":{"line":1,"column":0},"end":{"line":22,"column":1}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":4,"column":19},"end":{"line":4,"column":20}},"loc":{"start":{"line":4,"column":32},"end":{"line":10,"column":5}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":13,"column":20},"end":{"line":13,"column":23}},"loc":{"start":{"line":13,"column":25},"end":{"line":15,"column":5}}},"3":{"name":"(anonymous_3)","decl":{"start":{"line":18,"column":16},"end":{"line":18,"column":19}},"loc":{"start":{"line":18,"column":21},"end":{"line":20,"column":5}}}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":20},"end":{"line":4,"column":28}},"type":"default-arg","locations":[{"start":{"line":4,"column":24},"end":{"line":4,"column":28}}]},"1":{"loc":{"start":{"line":5,"column":8},"end":{"line":9,"column":null}},"type":"if","locations":[{"start":{"line":5,"column":8},"end":{"line":9,"column":null}},{"start":{"line":7,"column":16},"end":{"line":9,"column":null}}]}},"s":{"0":2,"1":1,"2":1,"3":0,"4":2,"5":1,"6":2,"7":0,"8":1},"f":{"0":2,"1":1,"2":1,"3":0},"b":{"0":[1],"1":[1,0]}} 2 | } 3 | -------------------------------------------------------------------------------- /coverage_data/typescript-standard/coverage_totals.txt: -------------------------------------------------------------------------------- 1 | 70.00000 2 | -------------------------------------------------------------------------------- /scripts/standard-cpp-11.sh: -------------------------------------------------------------------------------- 1 | #Function: Helper shell script for C++ standards repo 2 | 3 | 4 | #clone the C++ standards repo from gh 5 | echo "Cloning Cpp-11 Standard repo..." 6 | clone_repo(){ 7 | git clone https://codecov:${GH_TOKEN}@github.com/codecov/cpp-11-standard.git 8 | cd cpp-11-standard 9 | } 10 | 11 | # Get current month and year, e.g: Apr 2018 12 | dateAndTime=`date +"%D %T"` 13 | 14 | #change repo readme in line, update it with the latest build date 15 | echo "Modifying README.md..." 16 | change_readme() { 17 | sed -i -e "s|.*Last Updated:.*|### Last Updated: $dateAndTime|g" README.md 18 | 19 | rm -f README.md-e 20 | } 21 | 22 | #commit files and upload to github repo with new commmit sha 23 | echo "Committing changes, pushing to GH repo..." 24 | commit_and_upload() { 25 | git config --global user.email "devops@codecov.io" 26 | git config --global user.name "Codecov Devops" 27 | git add . 28 | git commit -m "New Build: ${dateAndTime}" 29 | git remote rm origin 30 | git remote add origin https://codecov:${GH_TOKEN}@github.com/codecov/cpp-11-standard.git 31 | git push origin master --quiet 32 | 33 | } 34 | 35 | #run all methods 36 | clone_repo 37 | change_readme 38 | commit_and_upload -------------------------------------------------------------------------------- /scripts/standard-go.sh: -------------------------------------------------------------------------------- 1 | #Function: Helper shell script for go standards repo 2 | 3 | 4 | #clone the go standards repo from gh 5 | echo "Cloning Go Standard repo..." 6 | clone_repo(){ 7 | git clone https://codecov:${GH_TOKEN}@github.com/codecov/go-standard.git 8 | cd go-standard 9 | } 10 | 11 | # Get current month and year, e.g: Apr 2018 12 | dateAndTime=`date +"%D %T"` 13 | 14 | #change repo readme in line, update it with the latest build date 15 | echo "Modifying README.md..." 16 | change_readme() { 17 | sed -i -e "s|.*Last Updated:.*|### Last Updated: $dateAndTime|g" README.md 18 | 19 | rm -f README.md-e 20 | } 21 | 22 | #commit files and upload to github repo with new commmit sha 23 | echo "Committing changes, pushing to GH repo..." 24 | commit_and_upload() { 25 | git config --global user.email "devops@codecov.io" 26 | git config --global user.name "Codecov Devops" 27 | git add . 28 | git commit -m "New Build: ${dateAndTime}" 29 | git remote rm origin 30 | git remote add origin https://codecov:${GH_TOKEN}@github.com/codecov/go-standard.git 31 | git push origin master --quiet 32 | 33 | } 34 | 35 | #run all methods 36 | clone_repo 37 | change_readme 38 | commit_and_upload -------------------------------------------------------------------------------- /scripts/standard-java.sh: -------------------------------------------------------------------------------- 1 | #Function: Helper shell script for java standards repo 2 | 3 | 4 | #clone the java standards repo from gh 5 | echo "Cloning Java Standard repo..." 6 | clone_repo(){ 7 | git clone https://codecov:${GH_TOKEN}@github.com/codecov/java-standard.git 8 | cd java-standard 9 | } 10 | 11 | # Get current month and year, e.g: Apr 2018 12 | dateAndTime=`date +"%D %T"` 13 | 14 | #change repo readme in line, update it with the latest build date 15 | echo "Modifying README.md..." 16 | change_readme() { 17 | sed -i -e "s|.*Last Updated:.*|### Last Updated: $dateAndTime|g" README.md 18 | 19 | rm -f README.md-e 20 | } 21 | 22 | #commit files and upload to github repo with new commmit sha 23 | echo "Committing changes, pushing to GH repo..." 24 | commit_and_upload() { 25 | git config --global user.email "devops@codecov.io" 26 | git config --global user.name "Codecov Devops" 27 | git add . 28 | git commit -m "New Build: ${dateAndTime}" 29 | git remote rm origin 30 | git remote add origin https://codecov:${GH_TOKEN}@github.com/codecov/java-standard.git 31 | git push origin master --quiet 32 | 33 | } 34 | 35 | #run all methods 36 | clone_repo 37 | change_readme 38 | commit_and_upload -------------------------------------------------------------------------------- /scripts/standard-kotlin.sh: -------------------------------------------------------------------------------- 1 | #Function: Helper shell script for kotlin standards repo 2 | 3 | 4 | #clone the kotlin standards repo from gh 5 | echo "Cloning Kotlin Standard repo..." 6 | clone_repo(){ 7 | git clone https://codecov:${GH_TOKEN}@github.com/codecov/kotlin-standard.git 8 | cd kotlin-standard 9 | } 10 | 11 | # Get current month and year, e.g: Apr 2018 12 | dateAndTime=`date +"%D %T"` 13 | 14 | #change repo readme in line, update it with the latest build date 15 | echo "Modifying README.md..." 16 | change_readme() { 17 | sed -i -e "s|.*Last Updated:.*|### Last Updated: $dateAndTime|g" README.md 18 | 19 | rm -f README.md-e 20 | } 21 | 22 | #commit files and upload to github repo with new commmit sha 23 | echo "Committing changes, pushing to GH repo..." 24 | commit_and_upload() { 25 | git config --global user.email "devops@codecov.io" 26 | git config --global user.name "Codecov Devops" 27 | git add . 28 | git commit -m "New Build: ${dateAndTime}" 29 | git remote rm origin 30 | git remote add origin https://codecov:${GH_TOKEN}@github.com/codecov/kotlin-standard.git 31 | git push origin master --quiet 32 | 33 | } 34 | 35 | #run all methods 36 | clone_repo 37 | change_readme 38 | commit_and_upload -------------------------------------------------------------------------------- /scripts/standard-python.sh: -------------------------------------------------------------------------------- 1 | #Function: Helper shell script for python standards repo 2 | 3 | #clone the python standards repo from gh 4 | echo "Cloning Python Standard repo..." 5 | clone_repo(){ 6 | git clone https://codecov:${GH_TOKEN}@github.com/codecov/python-standard.git 7 | cd python-standard 8 | } 9 | 10 | # Get current month and year, e.g: Apr 2018 11 | dateAndTime=`date +"%D %T"` 12 | 13 | #change repo readme in line, update it with the latest build date 14 | echo "Modifying README.md..." 15 | change_readme() { 16 | sed -i -e "s|.*Last Updated:.*|### Last Updated: $dateAndTime|g" README.md 17 | 18 | rm -f README.md-e 19 | } 20 | 21 | #commit files and upload to github repo with new commmit sha 22 | echo "Committing changes, pushing to GH repo..." 23 | commit_and_upload() { 24 | git config --global user.email "devops@codecov.io" 25 | git config --global user.name "Codecov Devops" 26 | git add . 27 | git commit -m "New Build: ${dateAndTime}" 28 | git remote rm origin 29 | git remote add origin https://codecov:${GH_TOKEN}@github.com/codecov/python-standard.git 30 | git push origin master --quiet 31 | 32 | } 33 | 34 | #run all methods 35 | clone_repo 36 | change_readme 37 | commit_and_upload -------------------------------------------------------------------------------- /scripts/standard-ruby-1.sh: -------------------------------------------------------------------------------- 1 | #Function: Helper shell script for ruby standard 1 repo (codecov gem edition) 2 | 3 | #clone the ruby standards 1 repo from gh 4 | echo "Cloning Ruby Standard 1 repo..." 5 | clone_repo(){ 6 | git clone https://codecov:${GH_TOKEN}@github.com/codecov/ruby-standard-1.git 7 | cd ruby-standard-1 8 | } 9 | 10 | # Get current month and year, e.g: Apr 2018 11 | dateAndTime=`date +"%D %T"` 12 | 13 | #change repo readme in line, update it with the latest build date 14 | echo "Modifying README.md..." 15 | change_readme() { 16 | sed -i -e "s|.*Last Updated:.*|### Last Updated: $dateAndTime|g" README.md 17 | 18 | rm -f README.md-e 19 | } 20 | 21 | #commit files and upload to github repo with new commmit sha 22 | echo "Committing changes, pushing to GH repo..." 23 | commit_and_upload() { 24 | 25 | git add . 26 | git commit -m "New Build: ${dateAndTime}" 27 | git remote rm origin 28 | git remote add origin https://codecov:${GH_TOKEN}@github.com/codecov/ruby-standard-1.git 29 | git pull origin master 30 | git push origin master --quiet 31 | 32 | } 33 | 34 | #run all methods 35 | clone_repo 36 | change_readme 37 | commit_and_upload -------------------------------------------------------------------------------- /scripts/standard-ruby-2.sh: -------------------------------------------------------------------------------- 1 | #Function: Helper shell script for ruby standard 2 repo (bash uploader edition) 2 | 3 | 4 | #clone the ruby standards 2 repo from gh 5 | echo "Cloning Ruby Standard 2 repo..." 6 | clone_repo(){ 7 | git clone https://codecov:${GH_TOKEN}@github.com/codecov/ruby-standard-2.git 8 | cd ruby-standard-2 9 | } 10 | 11 | # Get current month and year, e.g: Apr 2018 12 | dateAndTime=`date +"%D %T"` 13 | 14 | #change repo readme in line, update it with the latest build date 15 | echo "Modifying README.md..." 16 | change_readme() { 17 | sed -i -e "s|.*Last Updated:.*|### Last Updated: $dateAndTime|g" README.md 18 | 19 | rm -f README.md-e 20 | } 21 | 22 | #commit files and upload to github repo with new commmit sha 23 | echo "Committing changes, pushing to GH repo..." 24 | commit_and_upload() { 25 | git config --global user.email "devops@codecov.io" 26 | git config --global user.name "Codecov Devops" 27 | git add . 28 | git commit -m "New Build: ${dateAndTime}" 29 | git remote rm origin 30 | git remote add origin https://codecov:${GH_TOKEN}@github.com/codecov/ruby-standard-2.git 31 | git pull origin master 32 | git push origin master --quiet 33 | 34 | } 35 | 36 | #run all methods 37 | clone_repo 38 | change_readme 39 | commit_and_upload -------------------------------------------------------------------------------- /scripts/standard-swift.sh: -------------------------------------------------------------------------------- 1 | #Function: Helper shell script for swift standards repo 2 | 3 | 4 | #clone the swift standards repo from gh 5 | echo "Cloning Swift Standard repo..." 6 | clone_repo(){ 7 | git clone https://codecov:${GH_TOKEN}@github.com/codecov/swift-standard.git 8 | cd swift-standard 9 | } 10 | 11 | # Get current month and year, e.g: Apr 2018 12 | dateAndTime=`date +"%D %T"` 13 | 14 | #change repo readme in line, update it with the latest build date 15 | echo "Modifying README.md..." 16 | change_readme() { 17 | sed -i -e "s|.*Last Updated:.*|### Last Updated: $dateAndTime|g" README.md 18 | 19 | rm -f README.md-e 20 | } 21 | 22 | #commit files and upload to github repo with new commmit sha 23 | echo "Committing changes, pushing to GH repo..." 24 | commit_and_upload() { 25 | git config --global user.email "devops@codecov.io" 26 | git config --global user.name "Codecov Devops" 27 | git add . 28 | git commit -m "New Build: ${dateAndTime}" 29 | git remote rm origin 30 | git remote add origin https://codecov:${GH_TOKEN}@github.com/codecov/swift-standard.git 31 | git pull origin master 32 | git push origin master --quiet 33 | 34 | } 35 | 36 | #run all methods 37 | clone_repo 38 | change_readme 39 | commit_and_upload -------------------------------------------------------------------------------- /scripts/standard-typescript.sh: -------------------------------------------------------------------------------- 1 | #Function: Helper shell script for typescript standard repo 2 | 3 | 4 | #clone the typescript standard repo from gh 5 | echo "Cloning TypeScript Standard repo..." 6 | clone_repo(){ 7 | git clone https://codecov:${GH_TOKEN}@github.com/codecov/typescript-standard.git 8 | cd typescript-standard 9 | } 10 | 11 | # Get current month and year, e.g: Apr 2018 12 | dateAndTime=`date +"%D %T"` 13 | 14 | #change repo readme in line, update it with the latest build date 15 | echo "Modifying README.md..." 16 | change_readme() { 17 | sed -i -e "s|.*Last Updated:.*|### Last Updated: $dateAndTime|g" README.md 18 | 19 | rm -f README.md-e 20 | } 21 | 22 | #commit files and upload to github repo with new commmit sha 23 | echo "Committing changes, pushing to GH repo..." 24 | commit_and_upload() { 25 | git config --global user.email "devops@codecov.io" 26 | git config --global user.name "Codecov Devops" 27 | git add . 28 | git commit -m "New Build: ${dateAndTime}" 29 | git remote rm origin 30 | git remote add origin https://codecov:${GH_TOKEN}@github.com/codecov/typescript-standard.git 31 | git pull origin master 32 | git push origin master --quiet 33 | 34 | } 35 | 36 | #run all methods 37 | clone_repo 38 | change_readme 39 | commit_and_upload -------------------------------------------------------------------------------- /upstream.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Update this to the coverage file you want to upload to the standards repo 4 | COVERAGE_SOURCE_FILE=${COVERAGE_SOURCE_FILE} 5 | 6 | # -=- Nothing below here should need to be changed -=- 7 | 8 | echo "Starting the coverage data push to the standards repo..." 9 | echo "Generating the SHA.txt file" 10 | PROJECT_NAME=$(basename `git rev-parse --show-toplevel`) 11 | echo $PROJECT_NAME 12 | echo "Seeing if there are any non-.github/ changes" 13 | LAST_MERGE_COMMIT=$(git log --merges -n 2 --format=%H | tail -1) 14 | NON_CI_DIFF_FILES=$(git diff HEAD $LAST_MERGE_COMMIT --name-only | grep -v ^.github/) 15 | if [[ -z $NON_CI_DIFF_FILES ]]; then 16 | echo "Only .github/ files found, skipping upload" 17 | exit 0; 18 | else 19 | echo "Found non-.github/ files" 20 | echo $NON_CI_DIFF_FILES 21 | fi 22 | COVERAGE_SHA=$(git rev-list HEAD | head -1) 23 | echo $COVERAGE_SHA > SHA.txt 24 | echo "Processing coverage for report belonging to latest commit" 25 | echo "Calling https://api.codecov.io/api/v2/gh/codecov/repos/$PROJECT_NAME/commits/$COVERAGE_SHA" 26 | PROD_COVERAGE=$(curl "https://api.codecov.io/api/v2/gh/codecov/repos/$PROJECT_NAME/commits/$COVERAGE_SHA"| \ 27 | python3 -c "import sys, json; print(json.load(sys.stdin)['totals']['coverage'])") 28 | echo "Validating if production coverage is a number" 29 | if ! [[ $PROD_COVERAGE =~ ^[0-9]+([.][0-9]+)?$ ]] ; then 30 | echo "error: Not a number" >&2; exit 1 31 | fi 32 | echo "Generating coverage_totals.txt file" 33 | echo $PROD_COVERAGE > coverage_totals.txt 34 | echo "Cloning the standards repo in the parent directory" 35 | cd .. 36 | git clone https://codecov:${GH_TOKEN}@github.com/codecov/standards.git 37 | cd standards 38 | echo "Deleting content in coverage_data if it exists" 39 | COVERAGE_DEST_DIR="coverage_data/$PROJECT_NAME" 40 | rm -rf $COVERAGE_DEST_DIR 41 | echo "Commiting deletion of coverage data" 42 | git config --global user.email "devops@codecov.io" 43 | git config --global user.name "Codecov Devops" 44 | git add . 45 | git commit -m "Deleting existing coverage data for $PROJECT_NAME with SHA $COVERAGE_SHA" 46 | echo "Recreating coverage directory" 47 | mkdir -p $COVERAGE_DEST_DIR 48 | echo "Copying the coverage file and SHA.txt to the coverage directory" 49 | cp ../$PROJECT_NAME/$COVERAGE_SOURCE_FILE $COVERAGE_DEST_DIR/ 50 | cp ../$PROJECT_NAME/SHA.txt $COVERAGE_DEST_DIR/ 51 | cp ../$PROJECT_NAME/coverage_totals.txt $COVERAGE_DEST_DIR/ 52 | echo "Commiting and pushing the coverage data to the standards repo." 53 | git add coverage_data 54 | git commit -m "Updating coverage data for $PROJECT_NAME with SHA $COVERAGE_SHA" 55 | git push origin --force 56 | echo "Push to upstream complete!" 57 | --------------------------------------------------------------------------------