Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Use string_view in instructions and diagnostics #226

Merged
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
wasm-server-build:
name: WASM language server
runs-on: ubuntu-20.04
container: emscripten/emsdk:2.0.12
container: emscripten/emsdk:3.1.3

steps:
- uses: actions/checkout@v1
Expand All @@ -79,8 +79,8 @@ jobs:
- name: Configure
run: >
mkdir build && cd build && emcmake cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DDISCOVER_TESTS=Off
-DWITH_LIBCXX=Off -DWITH_STATIC_CRT=Off -DCMAKE_EXE_LINKER_FLAGS="-s NODERAWFS=1"
-DCMAKE_CXX_FLAGS="-s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=8 -s TOTAL_MEMORY=268435456 -s PROXY_TO_PTHREAD=1 -fexceptions -s NODERAWFS=1 -s EXIT_RUNTIME=1 --bind"
-DWITH_LIBCXX=Off -DWITH_STATIC_CRT=Off -DCMAKE_CXX_FLAGS="-s USE_PTHREADS=1 -fexceptions"
-DCMAKE_EXE_LINKER_FLAGS="-s PTHREAD_POOL_SIZE=8 -s TOTAL_MEMORY=268435456 -s PROXY_TO_PTHREAD=1 -s NODERAWFS=1 -s EXIT_RUNTIME=1 --bind"
-DCMAKE_CROSSCOMPILING_EMULATOR="node;--experimental-wasm-threads;--experimental-wasm-bulk-memory"
-Dgtest_disable_pthreads=On -DBUILD_VSIX=Off ../
- name: Build
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/Check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Requirements install
run: sudo apt-get update && sudo apt-get install uuid-dev ninja-build libc++-10-dev libc++abi-10-dev
run: sudo apt-get update && sudo apt-get install uuid-dev ninja-build libc++-12-dev libc++abi-12-dev
- name: Configure
run: mkdir build && cd build && cmake -G Ninja -DBUILD_VSIX=Off -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_CXX_FLAGS="-fsanitize=address,undefined" ../
run: mkdir build && cd build && cmake -G Ninja -DBUILD_VSIX=Off -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DCMAKE_CXX_FLAGS="-fsanitize=address,undefined" ../
- name: Build
run: cd build && cmake --build .
- name: Test
Expand All @@ -47,9 +47,9 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Requirements install
run: sudo apt-get update && sudo apt-get install uuid-dev ninja-build libc++-10-dev libc++abi-10-dev
run: sudo apt-get update && sudo apt-get install uuid-dev ninja-build libc++-12-dev libc++abi-12-dev
- name: Configure
run: mkdir build && cd build && cmake -G Ninja -DBUILD_VSIX=Off -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_CXX_FLAGS="-fsanitize=thread" ../
run: mkdir build && cd build && cmake -G Ninja -DBUILD_VSIX=Off -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DCMAKE_CXX_FLAGS="-fsanitize=thread" ../
- name: Build
run: cd build && cmake --build .
- name: Test
Expand All @@ -62,9 +62,9 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Requirements install
run: sudo apt-get install -y clang-format-10
run: sudo apt-get install -y clang-format-12
- name: Run clang-format
run: clang-format-10 -style=file -n $(find . -name \*.h -print -o -name \*.cpp -print) 2>&1 | tee clang-format-output.txt
run: clang-format-12 -style=file -n $(find . -name \*.h -print -o -name \*.cpp -print) 2>&1 | tee clang-format-output.txt
- name: Upload clang-format-output.txt
uses: actions/upload-artifact@v1
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/Sonarcloud-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ jobs:
- name: Get version
run: echo "VERSION=$(node -e "console.log(require('./clients/vscode-hlasmplugin/package.json').version)")" >> $GITHUB_ENV
- name: Requirements install
run: sudo apt-get update && sudo apt-get install uuid-dev ninja-build libc++-10-dev libc++abi-10-dev
run: sudo apt-get update && sudo apt-get install uuid-dev ninja-build libc++-12-dev libc++abi-12-dev
- name: Configure
run: >
mkdir build && cd build &&
cmake -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_C_COMPILER=clang-10
-DCMAKE_CXX_COMPILER=clang++-10
-DCMAKE_C_COMPILER=clang-12
-DCMAKE_CXX_COMPILER=clang++-12
-DCMAKE_CXX_FLAGS="-fprofile-instr-generate -fcoverage-mapping"
../
- name: Sonar build wrapper download
Expand All @@ -61,9 +61,9 @@ jobs:
with:
run: npm --prefix clients/vscode-hlasmplugin test
- name: Merge raw profiles
run: cd build/bin && llvm-profdata-10 merge -o hlasm_profile library.rawprof server.rawprof
run: cd build/bin && llvm-profdata-12 merge -o hlasm_profile library.rawprof server.rawprof
- name: Generate lcov coverage
run: cd build/bin && llvm-cov-10 show -instr-profile hlasm_profile library_test -object server_test > ../coverage.txt
run: cd build/bin && llvm-cov-12 show -instr-profile hlasm_profile library_test -object server_test > ../coverage.txt
- name: Pull request event info
if: github.event_name == 'pull_request'
run: |
Expand Down
12 changes: 6 additions & 6 deletions CMakeSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"buildRoot": "${projectDir}\\build\\${name}",
"installRoot": "${projectDir}\\install\\${name}",
"cmakeExecutable": "/usr/bin/cmake",
"cmakeCommandArgs": "-DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_C_COMPILER=clang-10",
"cmakeCommandArgs": "-DCMAKE_CXX_COMPILER=clang++-12 -DCMAKE_C_COMPILER=clang-12",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "linux_x64" ],
Expand All @@ -103,7 +103,7 @@
"buildRoot": "${projectDir}\\build\\${name}",
"installRoot": "${projectDir}\\install\\${name}",
"cmakeExecutable": "/usr/bin/cmake",
"cmakeCommandArgs": "-DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_FLAGS=\"-fsanitize=address,undefined\"",
"cmakeCommandArgs": "-DCMAKE_CXX_COMPILER=clang++-12 -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_FLAGS=\"-fsanitize=address,undefined\"",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "linux_x64" ],
Expand All @@ -118,7 +118,7 @@
"buildRoot": "${projectDir}\\build\\${name}",
"installRoot": "${projectDir}\\install\\${name}",
"cmakeExecutable": "/usr/bin/cmake",
"cmakeCommandArgs": "-DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_FLAGS=\"-fsanitize=address,undefined,fuzzer-no-link\"",
"cmakeCommandArgs": "-DCMAKE_CXX_COMPILER=clang++-12 -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_FLAGS=\"-fsanitize=address,undefined,fuzzer-no-link\"",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "linux_x64" ],
Expand All @@ -133,7 +133,7 @@
"buildRoot": "${projectDir}\\build\\${name}",
"installRoot": "${projectDir}\\install\\${name}",
"cmakeExecutable": "/usr/bin/cmake",
"cmakeCommandArgs": "-DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_FLAGS=\"-fsanitize=thread\"",
"cmakeCommandArgs": "-DCMAKE_CXX_COMPILER=clang++-12 -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_FLAGS=\"-fsanitize=thread\"",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "linux_x64" ],
Expand All @@ -148,7 +148,7 @@
"buildRoot": "${projectDir}\\build\\${name}",
"installRoot": "${projectDir}\\install\\${name}",
"cmakeExecutable": "/usr/bin/cmake",
"cmakeCommandArgs": "-DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_FLAGS=\"-fsanitize=thread\"",
"cmakeCommandArgs": "-DCMAKE_CXX_COMPILER=clang++-12 -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_FLAGS=\"-fsanitize=thread\"",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "linux_x64" ],
Expand All @@ -163,7 +163,7 @@
"buildRoot": "${projectDir}\\build\\${name}",
"installRoot": "${projectDir}\\install\\${name}",
"cmakeExecutable": "/usr/bin/cmake",
"cmakeCommandArgs": "-DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_C_COMPILER=clang-10 -DBUILD_FUZZER=On -DBUILD_VSIX=Off -DWITH_LIBCXX=Off -DCMAKE_CXX_FLAGS=\"-fsanitize=address,undefined\"",
"cmakeCommandArgs": "-DCMAKE_CXX_COMPILER=clang++-12 -DCMAKE_C_COMPILER=clang-12 -DBUILD_FUZZER=On -DBUILD_VSIX=Off -DWITH_LIBCXX=Off -DCMAKE_CXX_FLAGS=\"-fsanitize=address,undefined\"",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"inheritEnvironments": [ "linux_x64" ],
Expand Down
2 changes: 1 addition & 1 deletion parser_library/include/sequence.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class sequence<c_type, void>
size_t size_ = 0;
};
template<class T>
explicit sequence(T &&) -> sequence<std::decay_t<decltype(*std::declval<T>().data())>, void>;
explicit sequence(T&&) -> sequence<std::decay_t<decltype(*std::declval<T>().data())>, void>;

} // namespace hlasm_plugin::parser_library

Expand Down
Loading