539 changed files with 3718 additions and 3503 deletions
-
8.github/workflows/build.yaml
-
31.github/workflows/notify-issue.yaml
-
31.github/workflows/notify-pr.yaml
-
29.github/workflows/notify-push.yaml
-
7common/build-style/cmake.sh
-
2common/build-style/meson.sh
-
3common/build-style/waf.sh
-
11common/build-style/waf3.sh
-
9common/environment/configure/gnu-configure-args.sh
-
8common/hooks/post-install/00-lib32.sh
-
7common/hooks/post-install/00-libdir.sh
-
9common/hooks/pre-install/00-lib32.sh
-
8common/hooks/pre-install/00-libdir.sh
-
81common/shlibs
-
28common/travis/check-install.sh
-
4common/wrappers/cross-cc
-
26srcpkgs/66/patches/ed738d6cbdc78e3b8ce869949b601505caa4b6cb.diff
-
7srcpkgs/66/template
-
4srcpkgs/ImageMagick/template
-
4srcpkgs/ImageMagick6/template
-
6srcpkgs/MangoHud/template
-
4srcpkgs/QMPlay2/template
-
9srcpkgs/Terminal/patches/x86_64-musl-termios_h.patch
-
16srcpkgs/Terminal/template
-
11srcpkgs/abGate/template
-
6srcpkgs/acl/template
-
12srcpkgs/adobe-flash-plugin/template
-
2srcpkgs/aisleriot/template
-
37srcpkgs/amdvlk/template
-
7srcpkgs/amfora/template
-
11srcpkgs/apvlv/patches/fix-build-with-poppler-0.73.0.patch
-
11srcpkgs/apvlv/patches/fix-gcc6-getline.patch
-
23srcpkgs/apvlv/patches/fix-gcc7-ftbfs.patch
-
10srcpkgs/apvlv/template
-
12srcpkgs/arcan/patches/cmake-espeak-ng.patch
-
2srcpkgs/arcan/template
-
7srcpkgs/attr/template
-
2srcpkgs/autogen/template
-
2srcpkgs/avahi-discover/template
-
4srcpkgs/bctoolbox/template
-
8srcpkgs/binutils/template
-
6srcpkgs/boinc/template
-
2srcpkgs/bomi/template
-
4srcpkgs/bpytop/template
-
4srcpkgs/bzrtp/template
-
4srcpkgs/calibre/template
-
4srcpkgs/cargo-about/template
-
5srcpkgs/cegui/template
-
4srcpkgs/chezmoi/template
-
2srcpkgs/cifs-utils/template
-
343srcpkgs/clazy/files/clazy-001-llvm11-stringref.patch
-
28srcpkgs/clazy/files/clazy-002-llvm11-stringref.patch
-
16srcpkgs/clazy/template
-
4srcpkgs/cmake-bootstrap/template
-
1srcpkgs/cmake-bootstrap/update
-
4srcpkgs/cni-plugins/template
-
20srcpkgs/collectd/template
-
4srcpkgs/comrak/template
-
4srcpkgs/conmon/template
-
1srcpkgs/cross-aarch64-linux-gnu/files/fix-cxxflags-passing.patch
-
1srcpkgs/cross-aarch64-linux-gnu/files/use-pure-64bit-configs.patch
-
15srcpkgs/cross-aarch64-linux-gnu/template
-
1srcpkgs/cross-aarch64-linux-musl/files/fix-cxxflags-passing.patch
-
1srcpkgs/cross-aarch64-linux-musl/files/gccgo-musl.patch
-
1srcpkgs/cross-aarch64-linux-musl/files/invalid_tls_model.patch
-
1srcpkgs/cross-aarch64-linux-musl/files/libgnarl-musl.patch
-
1srcpkgs/cross-aarch64-linux-musl/files/libssp-musl.patch
-
1srcpkgs/cross-aarch64-linux-musl/files/musl-ada.patch
-
1srcpkgs/cross-aarch64-linux-musl/files/use-pure-64bit-configs.patch
-
19srcpkgs/cross-aarch64-linux-musl/template
-
1srcpkgs/cross-arm-linux-gnueabi/files/fix-cxxflags-passing.patch
-
21srcpkgs/cross-arm-linux-gnueabi/template
-
1srcpkgs/cross-arm-linux-gnueabihf/files/fix-cxxflags-passing.patch
-
21srcpkgs/cross-arm-linux-gnueabihf/template
-
1srcpkgs/cross-arm-linux-musleabi/files/fix-cxxflags-passing.patch
-
1srcpkgs/cross-arm-linux-musleabi/files/gccgo-musl.patch
-
1srcpkgs/cross-arm-linux-musleabi/files/invalid_tls_model.patch
-
1srcpkgs/cross-arm-linux-musleabi/files/libgnarl-musl.patch
-
1srcpkgs/cross-arm-linux-musleabi/files/libssp-musl.patch
-
1srcpkgs/cross-arm-linux-musleabi/files/musl-ada.patch
-
16srcpkgs/cross-arm-linux-musleabi/template
-
1srcpkgs/cross-arm-linux-musleabihf/files/fix-cxxflags-passing.patch
-
1srcpkgs/cross-arm-linux-musleabihf/files/gccgo-musl.patch
-
1srcpkgs/cross-arm-linux-musleabihf/files/invalid_tls_model.patch
-
1srcpkgs/cross-arm-linux-musleabihf/files/libgnarl-musl.patch
-
1srcpkgs/cross-arm-linux-musleabihf/files/libssp-musl.patch
-
1srcpkgs/cross-arm-linux-musleabihf/files/musl-ada.patch
-
16srcpkgs/cross-arm-linux-musleabihf/template
-
1srcpkgs/cross-armv7l-linux-gnueabihf/files/fix-cxxflags-passing.patch
-
21srcpkgs/cross-armv7l-linux-gnueabihf/template
-
1srcpkgs/cross-armv7l-linux-musleabihf/files/fix-cxxflags-passing.patch
-
1srcpkgs/cross-armv7l-linux-musleabihf/files/gccgo-musl.patch
-
1srcpkgs/cross-armv7l-linux-musleabihf/files/invalid_tls_model.patch
-
1srcpkgs/cross-armv7l-linux-musleabihf/files/libgnarl-musl.patch
-
1srcpkgs/cross-armv7l-linux-musleabihf/files/libssp-musl.patch
-
1srcpkgs/cross-armv7l-linux-musleabihf/files/musl-ada.patch
-
16srcpkgs/cross-armv7l-linux-musleabihf/template
-
1srcpkgs/cross-i686-linux-musl/files/fix-cxxflags-passing.patch
-
1srcpkgs/cross-i686-linux-musl/files/gccgo-musl.patch
-
1srcpkgs/cross-i686-linux-musl/files/invalid_tls_model.patch
@ -1,31 +0,0 @@ |
|||
name: "Issue Notification" |
|||
on: |
|||
issues: |
|||
types: [opened, closed] |
|||
|
|||
jobs: |
|||
ircnotify: |
|||
runs-on: ubuntu-latest |
|||
timeout-minutes: 3 |
|||
steps: |
|||
- name: Shorten URL |
|||
id: shortener |
|||
if: github.repository == 'void-linux/void-packages' |
|||
uses: Gottox/url-shortener-action@master |
|||
with: |
|||
url: "${{ github.event.issue.html_url }}" |
|||
- name: "Issue Notification" |
|||
uses: Gottox/irc-message-action@main |
|||
continue-on-error: true |
|||
if: github.repository == 'void-linux/void-packages' |
|||
with: |
|||
channel: "#xbps" |
|||
nickname: void-packages |
|||
sasl_password: ${{ secrets.freenode_password_void_packages }} |
|||
tls: true |
|||
message: >- |
|||
${{ github.actor }} |
|||
${{ github.event.action }} issue |
|||
#${{ github.event.issue.number }} |
|||
“${{ github.event.issue.title }}” |
|||
${{ steps.shortener.outputs.short_url }} |
@ -1,31 +0,0 @@ |
|||
name: "Pull Request Notification" |
|||
on: |
|||
pull_request: |
|||
types: [opened, closed] |
|||
|
|||
jobs: |
|||
ircnotify: |
|||
runs-on: ubuntu-latest |
|||
timeout-minutes: 3 |
|||
steps: |
|||
- name: Shorten URL |
|||
id: shortener |
|||
if: github.repository == 'void-linux/void-packages' |
|||
uses: Gottox/url-shortener-action@master |
|||
with: |
|||
url: "${{ github.event.pull_request.html_url }}" |
|||
- name: "Pull Request Notification" |
|||
uses: Gottox/irc-message-action@main |
|||
continue-on-error: true |
|||
if: github.repository == 'void-linux/void-packages' |
|||
with: |
|||
channel: "#xbps" |
|||
nickname: void-packages |
|||
sasl_password: ${{ secrets.freenode_password_void_packages }} |
|||
tls: true |
|||
message: >- |
|||
${{ github.actor }} |
|||
${{ github.event.action }} pull request |
|||
#${{ github.event.pull_request.number }} |
|||
“${{ github.event.pull_request.title }}” |
|||
${{ steps.shortener.outputs.short_url }} |
@ -1,29 +0,0 @@ |
|||
name: "Push Notification" |
|||
on: |
|||
push: |
|||
branches: [master] |
|||
|
|||
jobs: |
|||
ircnotify: |
|||
runs-on: ubuntu-latest |
|||
timeout-minutes: 3 |
|||
steps: |
|||
- name: Shorten URL |
|||
id: shortener |
|||
if: github.repository == 'void-linux/void-packages' |
|||
uses: Gottox/url-shortener-action@master |
|||
with: |
|||
url: "${{ github.event.compare }}" |
|||
- name: "Push Notification" |
|||
uses: Gottox/irc-message-action@main |
|||
continue-on-error: true |
|||
if: github.repository == 'void-linux/void-packages' |
|||
with: |
|||
channel: "#xbps" |
|||
nickname: void-packages |
|||
sasl_password: ${{ secrets.freenode_password_void_packages }} |
|||
tls: true |
|||
message: >- |
|||
${{ github.actor }} |
|||
pushed |
|||
${{ steps.shortener.outputs.short_url }} |
@ -1,8 +0,0 @@ |
|||
# This hook removes the /usr/lib32 symlink on 32-bit systems. |
|||
|
|||
hook() { |
|||
if [ "$XBPS_TARGET_WORDSIZE" = "32" ] && \ |
|||
[ "${pkgname}" != "base-files" ]; then |
|||
rm -f ${PKGDESTDIR}/usr/lib32 |
|||
fi |
|||
} |
@ -0,0 +1,7 @@ |
|||
# This hook removes the wordsize specific libdir symlink. |
|||
|
|||
hook() { |
|||
if [ "${pkgname}" != "base-files" ]; then |
|||
rm -f ${PKGDESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE} |
|||
fi |
|||
} |
@ -1,9 +0,0 @@ |
|||
# This hook creates the /usr/lib32 symlink for 32-bit systems. |
|||
|
|||
hook() { |
|||
if [ "$XBPS_TARGET_WORDSIZE" = "32" ] && \ |
|||
[ "${pkgname}" != "base-files" ]; then |
|||
vmkdir usr/lib |
|||
ln -sf lib ${PKGDESTDIR}/usr/lib32 |
|||
fi |
|||
} |
@ -0,0 +1,8 @@ |
|||
# This hook creates the wordsize specific libdir symlink. |
|||
|
|||
hook() { |
|||
if [ "${pkgname}" != "base-files" ]; then |
|||
vmkdir usr/lib |
|||
ln -sf lib ${PKGDESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE} |
|||
fi |
|||
} |
@ -0,0 +1,28 @@ |
|||
#!/bin/sh |
|||
# |
|||
# check-install.sh |
|||
|
|||
export XBPS_TARGET_ARCH="$2" XBPS_DISTDIR=/hostrepo |
|||
|
|||
if [ "$1" != "$XBPS_TARGET_ARCH" ]; then |
|||
triplet="$(/hostrepo/xbps-src -a "$XBPS_TARGET_ARCH" show-var XBPS_CROSS_TRIPLET)" |
|||
ROOTDIR="-r /usr/$triplet" |
|||
fi |
|||
|
|||
ADDREPO="--repository=$HOME/hostdir/binpkgs --repository=$HOME/hostdir/binpkgs/nonfree" |
|||
|
|||
while read -r pkg; do |
|||
for subpkg in $(xsubpkg $pkg); do |
|||
/bin/echo -e "\x1b[32mTrying to install dependants of $subpkg:\x1b[0m" |
|||
for dep in $(xbps-query $ADDREPO -RX "$subpkg"); do |
|||
xbps-install \ |
|||
$ROOTDIR $ADDREPO \ |
|||
-Sny \ |
|||
"$subpkg" "$(xbps-uhelper getpkgname "$dep")" |
|||
if [ $? -eq 8 ]; then |
|||
/bin/echo -e "\x1b[31mFailed to install '$subpkg' and '$dep'\x1b[0m" |
|||
exit 1 |
|||
fi |
|||
done |
|||
done |
|||
done < /tmp/templates |
@ -1,26 +0,0 @@ |
|||
diff --git a/src/lib66/ss_environ.c b/src/lib66/ss_environ.c
|
|||
index 05f2697c45d3958147d9243c24a5389897c2bd41..12c2b8fcbc99fcb83adf576c1541984a4b23e8e5 100644
|
|||
--- a/src/lib66/ss_environ.c
|
|||
+++ b/src/lib66/ss_environ.c
|
|||
@@ -185,7 +185,7 @@ int env_make_symlink(stralloc *dst,stralloc *old_dst,sv_alltype *sv,uint8_t conf
|
|||
* a directory. File means old format, in this case we enforce to pass |
|||
* to the new one. */ |
|||
r = lstat(sym_version,&st) ; |
|||
- if (S_ISLNK(st.st_mode))
|
|||
+ if (S_ISLNK(st.st_mode) && !r)
|
|||
{ |
|||
if (sarealpath(&saversion,sym_version) == -1) |
|||
log_warn_return(LOG_EXIT_ZERO,"sarealpath of: ",sym_version) ; |
|||
diff --git a/src/lib66/ssexec_disable.c b/src/lib66/ssexec_disable.c
|
|||
index ed884021cea729be8d22af9323fa5ec67c7a7b56..5e056509171fcaaa48ae52ea2390400edc1a3312 100644
|
|||
--- a/src/lib66/ssexec_disable.c
|
|||
+++ b/src/lib66/ssexec_disable.c
|
|||
@@ -213,7 +213,7 @@ int ssexec_disable(int argc, char const *const *argv,char const *const *envp,sse
|
|||
|
|||
/** The force options can be only used if the service is not marked initialized. |
|||
* This option should only be used when we have a inconsistent state between |
|||
- * the /var/lib/66/system/<tree>/servicedirs/* and /var/lib/66/system/<tree>/.resolve
|
|||
+ * the /var/lib/66/system/<tree>/servicedirs/ and /var/lib/66/system/<tree>/.resolve
|
|||
* directory meaning a service which is not present in the compiled db but its resolve file |
|||
* exist.*/ |
|||
if (FORCE && ss_state_check(state,name)) |
@ -0,0 +1,9 @@ |
|||
Building on x86_64-musl fails with: |
|||
|
|||
TerminalView.m:49:12: fatal error: termio.h: No such file or directory |
|||
|
|||
--- TerminalView.m 2017-08-02 13:17:43.000000000 -0400
|
|||
+++ TerminalView.m 2020-12-17 01:38:16.124286870 -0500
|
|||
@@ -49 +49 @@ activated */
|
|||
-# include <termio.h>
|
|||
+# include <termios.h>
|
@ -0,0 +1,16 @@ |
|||
# Template file for 'Terminal' |
|||
pkgname=Terminal |
|||
version=0.9.9 |
|||
revision=1 |
|||
build_style=gnu-makefile |
|||
make_use_env=yes |
|||
hostmakedepends="gnustep-make gcc-objc" |
|||
makedepends="gnustep-base-devel gnustep-gui-devel" |
|||
depends="gnustep-base gnustep-gui gnustep-back" |
|||
short_desc="Terminal emulator for GNUstep" |
|||
maintainer="Phosu Parsons <founderofjp@gmail.com>" |
|||
license="GPL-2.0-only" |
|||
homepage="http://gap.nongnu.org/terminal/" |
|||
distfiles="${NONGNU_SITE}/gap/${pkgname}-${version}.tar.gz" |
|||
checksum=27f81bbecdbd10cde8c080012cde4973bec20e551c58c29f353733cf03c220e9 |
|||
nocross="objc doesn't get cross build at present within gcc (see gnustep-base)" |
@ -1,11 +0,0 @@ |
|||
--- src/ApvlvPdf.cc
|
|||
+++ src/ApvlvPdf.cc
|
|||
@@ -29,7 +29,7 @@
|
|||
#include "ApvlvPdf.h" |
|||
|
|||
#ifndef POPPLER_WITH_GDK |
|||
-#include <goo/gtypes.h>
|
|||
+#include <goo/gfile.h>
|
|||
|
|||
static void |
|||
copy_cairo_surface_to_pixbuf (cairo_surface_t *surface, |
@ -1,11 +0,0 @@ |
|||
--- src/ApvlvParams.cc 2015-01-10 15:04:24.000000000 +0100
|
|||
+++ src/ApvlvParams.cc 2016-10-04 00:06:58.187468048 +0200
|
|||
@@ -90,7 +90,7 @@
|
|||
return false; |
|||
} |
|||
|
|||
- while ((getline (os, str)) != NULL)
|
|||
+ while (getline (os, str))
|
|||
{ |
|||
string argu, data, crap; |
|||
stringstream is (str); |
@ -1,23 +0,0 @@ |
|||
--- src/ApvlvCmds.cc
|
|||
+++ src/ApvlvCmds.cc
|
|||
@@ -200,7 +200,7 @@ namespace apvlv
|
|||
|
|||
if (len >= 4 |
|||
&& *s == '<' |
|||
- && (e = strchr ((char *) s, '>')) != '\0' && *(s + 2) != '-')
|
|||
+ && (e = strchr ((char *) s, '>')) && *(s + 2) != '-')
|
|||
{ |
|||
e++; |
|||
StringKeyMap::iterator it; |
|||
--- src/ApvlvCore.cc
|
|||
+++ src/ApvlvCore.cc
|
|||
@@ -90,7 +90,7 @@ namespace apvlv
|
|||
{ |
|||
mInuse = use; |
|||
|
|||
- if (mInuse == false && gView->hasloaded (filename (), type ()) == false)
|
|||
+ if (mInuse == false && !gView->hasloaded (filename (), type ()))
|
|||
{ |
|||
debug ("core :%p is not needed, delete it\n", this); |
|||
delete this; |
|||
|
@ -1,16 +1,16 @@ |
|||
# Template file for 'apvlv' |
|||
pkgname=apvlv |
|||
version=0.1.5 |
|||
revision=8 |
|||
version=0.2.0 |
|||
revision=1 |
|||
build_style=cmake |
|||
configure_args="-DAPVLV_WITH_UMD=no -DAPVLV_WITH_DJVU=yes -DAPVLV_WITH_TXT=yes" |
|||
hostmakedepends="pkg-config" |
|||
makedepends="gtk+3-devel poppler-glib-devel djvulibre-devel" |
|||
makedepends="gtk+3-devel poppler-glib-devel djvulibre-devel webkit2gtk-devel ebook-tools-devel" |
|||
depends="desktop-file-utils" |
|||
short_desc="Vim-like PDF/DJVU/TXT viewer" |
|||
maintainer="Logen K <logen@sudotask.com>" |
|||
license="GPL-2" |
|||
license="GPL-2.0-only" |
|||
homepage="http://naihe2010.github.io/apvlv/" |
|||
distfiles="https://github.com/naihe2010/apvlv/archive/v${version}.tar.gz" |
|||
checksum=dca98157e63c9fec12d6514751ea26549813dc7b87d838b0003f31a444100a8a |
|||
checksum=a4a2f42a7e42715a21d2356def3ed93c180c6ae41128580addee42835e5374c2 |
|||
replaces="apvlv-git>=0" |
@ -0,0 +1,12 @@ |
|||
diff --git a/src/platform/cmake/modules/FindEspeak.cmake b/src/platform/cmake/modules/FindEspeak.cmake
|
|||
index 6815e874..a548a232 100644
|
|||
--- a/src/platform/cmake/modules/FindEspeak.cmake
|
|||
+++ b/src/platform/cmake/modules/FindEspeak.cmake
|
|||
@@ -1,5 +1,5 @@
|
|||
-FIND_PATH( ESPEAK_INCLUDE_DIR espeak/speak_lib.h )
|
|||
-FIND_LIBRARY(ESPEAK_LIBRARIES NAMES espeak )
|
|||
+FIND_PATH( ESPEAK_INCLUDE_DIR espeak/speak_lib.h)
|
|||
+FIND_LIBRARY(ESPEAK_LIBRARIES NAMES espeak espeak-ng)
|
|||
|
|||
IF( ESPEAK_LIBRARIES ) |
|||
SET( ESPEAK_FOUND TRUE ) |
@ -1,343 +0,0 @@ |
|||
From 30d6a2b64f5a05722fdc5d8e3754dbf13425cd62 Mon Sep 17 00:00:00 2001 |
|||
From: Egor Gabov <egor.gabov@waveaccess.ru> |
|||
Date: Thu, 4 Jun 2020 17:10:21 +0300 |
|||
Subject: [PATCH] updated for compatibility with LLVM 10 |
|||
|
|||
In LLVM 10 llvm::StringRef operator std::string() is marked as explicit. |
|||
In this commit all implicit conversion from llvm::StringRef to |
|||
std::string are changed by explicit. |
|||
Also included header file clang/Basic/FileManager.h in src/MiniDumper |
|||
because without this header, class clang::FileEntry in incomplete class |
|||
---
|
|||
src/FixItExporter.cpp | 5 +++-- |
|||
src/MiniAstDumper.cpp | 1 + |
|||
src/Utils.cpp | 2 +- |
|||
src/checkbase.cpp | 2 +- |
|||
src/checks/detachingbase.cpp | 2 +- |
|||
src/checks/level0/qenums.cpp | 2 +- |
|||
src/checks/level0/qt-macros.cpp | 4 ++-- |
|||
src/checks/level0/unused-non-trivial-variable.cpp | 2 +- |
|||
src/checks/level1/detaching-temporary.cpp | 2 +- |
|||
src/checks/level1/non-pod-global-static.cpp | 2 +- |
|||
src/checks/level1/qproperty-without-notify.cpp | 2 +- |
|||
src/checks/level2/missing-typeinfo.cpp | 2 +- |
|||
src/checks/level2/old-style-connect.cpp | 6 +++--- |
|||
src/checks/level2/rule-of-three.cpp | 2 +- |
|||
src/checks/manuallevel/ifndef-define-typo.cpp | 6 +++--- |
|||
src/checks/manuallevel/qproperty-type-mismatch.cpp | 2 +- |
|||
src/checks/manuallevel/qrequiredresult-candidates.cpp | 2 +- |
|||
src/checks/manuallevel/qt-keywords.cpp | 4 ++-- |
|||
src/checks/manuallevel/reserve-candidates.cpp | 3 ++- |
|||
19 files changed, 28 insertions(+), 25 deletions(-) |
|||
|
|||
diff --git a/src/FixItExporter.cpp b/src/FixItExporter.cpp
|
|||
index f3af2e54..44240cf5 100644
|
|||
--- a/src/FixItExporter.cpp
|
|||
+++ b/src/FixItExporter.cpp
|
|||
@@ -68,7 +68,7 @@ void FixItExporter::BeginSourceFile(const LangOptions &LangOpts, const Preproces
|
|||
|
|||
const auto id = SourceMgr.getMainFileID(); |
|||
const auto entry = SourceMgr.getFileEntryForID(id); |
|||
- getTuDiag().MainSourceFile = entry->getName();
|
|||
+ getTuDiag().MainSourceFile = static_cast<std::string>(entry->getName());
|
|||
} |
|||
|
|||
bool FixItExporter::IncludeInDiagnosticCounts() const |
|||
@@ -89,7 +89,8 @@ tooling::Diagnostic FixItExporter::ConvertDiagnostic(const Diagnostic &Info)
|
|||
// TODO: This returns an empty string: DiagEngine->getDiagnosticIDs()->getWarningOptionForDiag(Info.getID()); |
|||
// HACK: capture it at the end of the message: Message text [check-name] |
|||
|
|||
- std::string checkName = DiagEngine.getDiagnosticIDs()->getWarningOptionForDiag(Info.getID());
|
|||
+ std::string checkName =
|
|||
+ static_cast<std::string>(DiagEngine.getDiagnosticIDs()->getWarningOptionForDiag(Info.getID()));
|
|||
std::string messageText; |
|||
|
|||
if (checkName.empty()) { |
|||
diff --git a/src/MiniAstDumper.cpp b/src/MiniAstDumper.cpp
|
|||
index 47661749..6124e6e8 100644
|
|||
--- a/src/MiniAstDumper.cpp
|
|||
+++ b/src/MiniAstDumper.cpp
|
|||
@@ -24,6 +24,7 @@
|
|||
|
|||
#include <clang/Frontend/CompilerInstance.h> |
|||
#include <clang/Frontend/FrontendPluginRegistry.h> |
|||
+#include <clang/Basic/FileManager.h>
|
|||
|
|||
using namespace clang; |
|||
using namespace std; |
|||
diff --git a/src/Utils.cpp b/src/Utils.cpp
|
|||
index 001ced98..b0812fe3 100644
|
|||
--- a/src/Utils.cpp
|
|||
+++ b/src/Utils.cpp
|
|||
@@ -878,7 +878,7 @@ string Utils::filenameForLoc(SourceLocation loc, const clang::SourceManager &sm)
|
|||
if (loc.isMacroID()) |
|||
loc = sm.getExpansionLoc(loc); |
|||
|
|||
- const string filename = sm.getFilename(loc);
|
|||
+ const string filename = static_cast<std::string>(sm.getFilename(loc));
|
|||
auto splitted = clazy::splitString(filename, '/'); |
|||
if (splitted.empty()) |
|||
return {}; |
|||
diff --git a/src/checkbase.cpp b/src/checkbase.cpp
|
|||
index 8b40e19d..22a426cf 100644
|
|||
--- a/src/checkbase.cpp
|
|||
+++ b/src/checkbase.cpp
|
|||
@@ -188,7 +188,7 @@ bool CheckBase::shouldIgnoreFile(SourceLocation loc) const
|
|||
if (!loc.isValid()) |
|||
return true; |
|||
|
|||
- string filename = sm().getFilename(loc);
|
|||
+ string filename = static_cast<std::string>(sm().getFilename(loc));
|
|||
|
|||
return clazy::any_of(m_filesToIgnore, [filename](const std::string &ignored) { |
|||
return clazy::contains(filename, ignored); |
|||
diff --git a/src/checks/detachingbase.cpp b/src/checks/detachingbase.cpp
|
|||
index 70311f42..1b094ee7 100644
|
|||
--- a/src/checks/detachingbase.cpp
|
|||
+++ b/src/checks/detachingbase.cpp
|
|||
@@ -57,7 +57,7 @@ bool DetachingBase::isDetachingMethod(CXXMethodDecl *method, DetachingMethodType
|
|||
|
|||
const std::unordered_map<string, std::vector<StringRef>> &methodsByType = detachingMethodType == DetachingMethod ? clazy::detachingMethods() |
|||
: clazy::detachingMethodsWithConstCounterParts(); |
|||
- auto it = methodsByType.find(className);
|
|||
+ auto it = methodsByType.find(static_cast<std::string>(className));
|
|||
if (it != methodsByType.cend()) { |
|||
const auto &methods = it->second; |
|||
if (clazy::contains(methods, clazy::name(method))) |
|||
diff --git a/src/checks/level0/qenums.cpp b/src/checks/level0/qenums.cpp
|
|||
index 00075b5c..db8910f2 100644
|
|||
--- a/src/checks/level0/qenums.cpp
|
|||
+++ b/src/checks/level0/qenums.cpp
|
|||
@@ -59,7 +59,7 @@ void QEnums::VisitMacroExpands(const Token &MacroNameTok, const SourceRange &ran
|
|||
// We simply check if :: is present because it's very cumbersome to to check for different classes when dealing with the pre-processor |
|||
|
|||
CharSourceRange crange = Lexer::getAsCharRange(range, sm(), lo()); |
|||
- string text = Lexer::getSourceText(crange, sm(), lo());
|
|||
+ string text = static_cast<std::string>(Lexer::getSourceText(crange, sm(), lo()));
|
|||
if (clazy::contains(text, "::")) |
|||
return; |
|||
} |
|||
diff --git a/src/checks/level0/qt-macros.cpp b/src/checks/level0/qt-macros.cpp
|
|||
index d3a587cb..ab8e9f52 100644
|
|||
--- a/src/checks/level0/qt-macros.cpp
|
|||
+++ b/src/checks/level0/qt-macros.cpp
|
|||
@@ -44,7 +44,7 @@ void QtMacros::VisitMacroDefined(const Token &MacroNameTok)
|
|||
return; |
|||
|
|||
IdentifierInfo *ii = MacroNameTok.getIdentifierInfo(); |
|||
- if (ii && clazy::startsWith(ii->getName(), "Q_OS_"))
|
|||
+ if (ii && clazy::startsWith(static_cast<std::string>(ii->getName()), "Q_OS_"))
|
|||
m_OSMacroExists = true; |
|||
} |
|||
|
|||
@@ -58,7 +58,7 @@ void QtMacros::checkIfDef(const Token ¯oNameTok, SourceLocation Loc)
|
|||
if (preProcessorVisitor && preProcessorVisitor->qtVersion() < 51204 && ii->getName() == "Q_OS_WINDOWS") { |
|||
// Q_OS_WINDOWS was introduced in 5.12.4 |
|||
emitWarning(Loc, "Q_OS_WINDOWS was only introduced in Qt 5.12.4, use Q_OS_WIN instead"); |
|||
- } else if (!m_OSMacroExists && clazy::startsWith(ii->getName(), "Q_OS_")) {
|
|||
+ } else if (!m_OSMacroExists && clazy::startsWith(static_cast<std::string>(ii->getName()), "Q_OS_")) {
|
|||
emitWarning(Loc, "Include qglobal.h before testing Q_OS_ macros"); |
|||
} |
|||
} |
|||
diff --git a/src/checks/level0/unused-non-trivial-variable.cpp b/src/checks/level0/unused-non-trivial-variable.cpp
|
|||
index 4e4b8303..93815f27 100644
|
|||
--- a/src/checks/level0/unused-non-trivial-variable.cpp
|
|||
+++ b/src/checks/level0/unused-non-trivial-variable.cpp
|
|||
@@ -91,7 +91,7 @@ bool UnusedNonTrivialVariable::isUninterestingType(const CXXRecordDecl *record)
|
|||
static const vector<StringRef> blacklistedTemplates = { "QScopedPointer", "QSetValueOnDestroy", "QScopedValueRollback" }; |
|||
StringRef className = clazy::name(record); |
|||
for (StringRef templateName : blacklistedTemplates) { |
|||
- if (clazy::startsWith(className, templateName))
|
|||
+ if (clazy::startsWith(static_cast<std::string>(className), static_cast<std::string>(templateName)))
|
|||
return true; |
|||
} |
|||
|
|||
diff --git a/src/checks/level1/detaching-temporary.cpp b/src/checks/level1/detaching-temporary.cpp
|
|||
index fedfc81c..60c75532 100644
|
|||
--- a/src/checks/level1/detaching-temporary.cpp
|
|||
+++ b/src/checks/level1/detaching-temporary.cpp
|
|||
@@ -140,7 +140,7 @@ void DetachingTemporary::VisitStmt(clang::Stmt *stm)
|
|||
StringRef className = clazy::name(classDecl); |
|||
|
|||
const std::unordered_map<string, std::vector<StringRef>> &methodsByType = clazy::detachingMethods(); |
|||
- auto it = methodsByType.find(className);
|
|||
+ auto it = methodsByType.find(static_cast<std::string>(className));
|
|||
auto it2 = m_writeMethodsByType.find(className); |
|||
|
|||
std::vector<StringRef> allowedFunctions; |
|||
diff --git a/src/checks/level1/non-pod-global-static.cpp b/src/checks/level1/non-pod-global-static.cpp
|
|||
index 5879bff8..433b5c5f 100644
|
|||
--- a/src/checks/level1/non-pod-global-static.cpp
|
|||
+++ b/src/checks/level1/non-pod-global-static.cpp
|
|||
@@ -74,7 +74,7 @@ void NonPodGlobalStatic::VisitStmt(clang::Stmt *stm)
|
|||
const SourceLocation declStart = clazy::getLocStart(varDecl); |
|||
|
|||
if (declStart.isMacroID()) { |
|||
- auto macroName = Lexer::getImmediateMacroName(declStart, sm(), lo());
|
|||
+ auto macroName = static_cast<std::string>(Lexer::getImmediateMacroName(declStart, sm(), lo()));
|
|||
if (clazy::startsWithAny(macroName, { "Q_IMPORT_PLUGIN", "Q_CONSTRUCTOR_FUNCTION", "Q_DESTRUCTOR_FUNCTION"})) // Don't warn on these |
|||
return; |
|||
} |
|||
diff --git a/src/checks/level1/qproperty-without-notify.cpp b/src/checks/level1/qproperty-without-notify.cpp
|
|||
index e1d6db4a..3af9fee2 100644
|
|||
--- a/src/checks/level1/qproperty-without-notify.cpp
|
|||
+++ b/src/checks/level1/qproperty-without-notify.cpp
|
|||
@@ -69,7 +69,7 @@ void QPropertyWithoutNotify::VisitMacroExpands(const clang::Token &MacroNameTok,
|
|||
return; |
|||
CharSourceRange crange = Lexer::getAsCharRange(range, sm(), lo()); |
|||
|
|||
- string text = Lexer::getSourceText(crange, sm(), lo());
|
|||
+ string text = static_cast<std::string>(Lexer::getSourceText(crange, sm(), lo()));
|
|||
if (text.back() == ')') |
|||
text.pop_back(); |
|||
|
|||
diff --git a/src/checks/level2/missing-typeinfo.cpp b/src/checks/level2/missing-typeinfo.cpp
|
|||
index 98df2cd4..03b44e06 100644
|
|||
--- a/src/checks/level2/missing-typeinfo.cpp
|
|||
+++ b/src/checks/level2/missing-typeinfo.cpp
|
|||
@@ -74,7 +74,7 @@ void MissingTypeInfo::VisitDecl(clang::Decl *decl)
|
|||
if (sm().isInSystemHeader(clazy::getLocStart(record))) |
|||
return; |
|||
|
|||
- std::string typeName = clazy::name(record);
|
|||
+ std::string typeName = static_cast<std::string>(clazy::name(record));
|
|||
if (typeName == "QPair") // QPair doesn't use Q_DECLARE_TYPEINFO, but rather a explicit QTypeInfo. |
|||
return; |
|||
|
|||
diff --git a/src/checks/level2/old-style-connect.cpp b/src/checks/level2/old-style-connect.cpp
|
|||
index 0fe68c13..396cb703 100644
|
|||
--- a/src/checks/level2/old-style-connect.cpp
|
|||
+++ b/src/checks/level2/old-style-connect.cpp
|
|||
@@ -274,7 +274,7 @@ void OldStyleConnect::VisitMacroExpands(const Token ¯oNameTok, const SourceR
|
|||
return; |
|||
|
|||
auto charRange = Lexer::getAsCharRange(range, sm(), lo()); |
|||
- const string text = Lexer::getSourceText(charRange, sm(), lo());
|
|||
+ const string text = static_cast<std::string>(Lexer::getSourceText(charRange, sm(), lo()));
|
|||
|
|||
static regex rx(R"(Q_PRIVATE_SLOT\s*\((.*)\s*,\s*.*\s+(.*)\(.*)"); |
|||
smatch match; |
|||
@@ -293,7 +293,7 @@ string OldStyleConnect::signalOrSlotNameFromMacro(SourceLocation macroLoc)
|
|||
CharSourceRange expansionRange = clazy::getImmediateExpansionRange(macroLoc, sm()); |
|||
SourceRange range = SourceRange(expansionRange.getBegin(), expansionRange.getEnd()); |
|||
auto charRange = Lexer::getAsCharRange(range, sm(), lo()); |
|||
- const string text = Lexer::getSourceText(charRange, sm(), lo());
|
|||
+ const string text = static_cast<std::string>(Lexer::getSourceText(charRange, sm(), lo()));
|
|||
|
|||
static regex rx(R"(\s*(SIGNAL|SLOT)\s*\(\s*(.+)\s*\(.*)"); |
|||
|
|||
@@ -315,7 +315,7 @@ bool OldStyleConnect::isSignalOrSlot(SourceLocation loc, string ¯oName) cons
|
|||
if (!loc.isMacroID() || loc.isInvalid()) |
|||
return false; |
|||
|
|||
- macroName = Lexer::getImmediateMacroName(loc, sm(), lo());
|
|||
+ macroName = static_cast<std::string>(Lexer::getImmediateMacroName(loc, sm(), lo()));
|
|||
return macroName == "SIGNAL" || macroName == "SLOT"; |
|||
} |
|||
|
|||
diff --git a/src/checks/level2/rule-of-three.cpp b/src/checks/level2/rule-of-three.cpp
|
|||
index 8db55d53..7583fcc5 100644
|
|||
--- a/src/checks/level2/rule-of-three.cpp
|
|||
+++ b/src/checks/level2/rule-of-three.cpp
|
|||
@@ -140,7 +140,7 @@ void RuleOfThree::VisitDecl(clang::Decl *decl)
|
|||
|
|||
const string className = record->getNameAsString(); |
|||
const string classQualifiedName = record->getQualifiedNameAsString(); |
|||
- const string filename = sm().getFilename(recordStart);
|
|||
+ const string filename = static_cast<std::string>(sm().getFilename(recordStart));
|
|||
if (clazy::endsWith(className, "Private") && clazy::endsWithAny(filename, { ".cpp", ".cxx", "_p.h" })) |
|||
return; // Lots of RAII classes fall into this category. And even Private (d-pointer) classes, warning in that case would just be noise |
|||
|
|||
diff --git a/src/checks/manuallevel/ifndef-define-typo.cpp b/src/checks/manuallevel/ifndef-define-typo.cpp
|
|||
index edb6cdf4..e9c50a45 100644
|
|||
--- a/src/checks/manuallevel/ifndef-define-typo.cpp
|
|||
+++ b/src/checks/manuallevel/ifndef-define-typo.cpp
|
|||
@@ -44,7 +44,7 @@ void IfndefDefineTypo::VisitMacroDefined(const Token ¯oNameTok)
|
|||
{ |
|||
if (!m_lastIfndef.empty()) { |
|||
if (IdentifierInfo *ii = macroNameTok.getIdentifierInfo()) { |
|||
- maybeWarn(ii->getName(), macroNameTok.getLocation());
|
|||
+ maybeWarn(static_cast<std::string>(ii->getName()), macroNameTok.getLocation());
|
|||
} |
|||
} |
|||
} |
|||
@@ -53,7 +53,7 @@ void IfndefDefineTypo::VisitDefined(const Token ¯oNameTok, const SourceRange
|
|||
{ |
|||
if (!m_lastIfndef.empty()) { |
|||
if (IdentifierInfo *ii = macroNameTok.getIdentifierInfo()) { |
|||
- maybeWarn(ii->getName(), macroNameTok.getLocation());
|
|||
+ maybeWarn(static_cast<std::string>(ii->getName()), macroNameTok.getLocation());
|
|||
} |
|||
} |
|||
} |
|||
@@ -66,7 +66,7 @@ void IfndefDefineTypo::VisitIfdef(SourceLocation, const Token &)
|
|||
void IfndefDefineTypo::VisitIfndef(SourceLocation, const Token ¯oNameTok) |
|||
{ |
|||
if (IdentifierInfo *ii = macroNameTok.getIdentifierInfo()) |
|||
- m_lastIfndef = ii->getName();
|
|||
+ m_lastIfndef = static_cast<std::string>(ii->getName());
|
|||
} |
|||
|
|||
void IfndefDefineTypo::VisitIf(SourceLocation, SourceRange, PPCallbacks::ConditionValueKind) |
|||
diff --git a/src/checks/manuallevel/qproperty-type-mismatch.cpp b/src/checks/manuallevel/qproperty-type-mismatch.cpp
|
|||
index f91159cb..952d9f1d 100644
|
|||
--- a/src/checks/manuallevel/qproperty-type-mismatch.cpp
|
|||
+++ b/src/checks/manuallevel/qproperty-type-mismatch.cpp
|
|||
@@ -237,7 +237,7 @@ void QPropertyTypeMismatch::VisitMacroExpands(const clang::Token &MacroNameTok,
|
|||
|
|||
CharSourceRange crange = Lexer::getAsCharRange(range, sm(), lo()); |
|||
|
|||
- string text = Lexer::getSourceText(crange, sm(), lo());
|
|||
+ string text = static_cast<std::string>(Lexer::getSourceText(crange, sm(), lo()));
|
|||
if (!text.empty() && text.back() == ')') |
|||
text.pop_back(); |
|||
|
|||
diff --git a/src/checks/manuallevel/qrequiredresult-candidates.cpp b/src/checks/manuallevel/qrequiredresult-candidates.cpp
|
|||
index 912dbaa0..6375bd7b 100644
|
|||
--- a/src/checks/manuallevel/qrequiredresult-candidates.cpp
|
|||
+++ b/src/checks/manuallevel/qrequiredresult-candidates.cpp
|
|||
@@ -65,7 +65,7 @@ void QRequiredResultCandidates::VisitDecl(clang::Decl *decl)
|
|||
|
|||
|
|||
if (returnClass == classDecl) { |
|||
- const std::string methodName = clazy::name(method);
|
|||
+ const std::string methodName = static_cast<std::string>(clazy::name(method));
|
|||
if (methodName.empty()) // fixes assert |
|||
return; |
|||
|
|||
diff --git a/src/checks/manuallevel/qt-keywords.cpp b/src/checks/manuallevel/qt-keywords.cpp
|
|||
index e792e95a..b60752c9 100644
|
|||
--- a/src/checks/manuallevel/qt-keywords.cpp
|
|||
+++ b/src/checks/manuallevel/qt-keywords.cpp
|
|||
@@ -59,12 +59,12 @@ void QtKeywords::VisitMacroExpands(const Token ¯oNameTok, const SourceRange
|
|||
} |
|||
|
|||
static const vector<StringRef> keywords = { "foreach", "signals", "slots", "emit" }; |
|||
- std::string name = ii->getName();
|
|||
+ std::string name = static_cast<std::string>(ii->getName());
|
|||
if (!clazy::contains(keywords, name)) |
|||
return; |
|||
|
|||
// Make sure the macro is Qt's. It must be defined in Qt's headers, not 3rdparty |
|||
- std::string qtheader = sm().getFilename(sm().getSpellingLoc(minfo->getDefinitionLoc()));
|
|||
+ std::string qtheader = static_cast<std::string>(sm().getFilename(sm().getSpellingLoc(minfo->getDefinitionLoc())));
|
|||
if (!clazy::endsWith(qtheader, "qglobal.h") && !clazy::endsWith(qtheader, "qobjectdefs.h")) |
|||
return; |
|||
|
|||
diff --git a/src/checks/manuallevel/reserve-candidates.cpp b/src/checks/manuallevel/reserve-candidates.cpp
|
|||
index 389cac5a..92e4491c 100644
|
|||
--- a/src/checks/manuallevel/reserve-candidates.cpp
|
|||
+++ b/src/checks/manuallevel/reserve-candidates.cpp
|
|||
@@ -78,7 +78,8 @@ static bool isCandidateMethod(CXXMethodDecl *methodDecl)
|
|||
if (!classDecl) |
|||
return false; |
|||
|
|||
- if (!clazy::equalsAny(clazy::name(methodDecl), { "append", "push_back", "push", "operator<<", "operator+=" }))
|
|||
+ if (!clazy::equalsAny(static_cast<std::string>(clazy::name(methodDecl)),
|
|||
+ { "append", "push_back", "push", "operator<<", "operator+=" }))
|
|||
return false; |
|||
|
|||
if (!clazy::isAReserveClass(classDecl)) |
|||
--
|
|||
GitLab |
|||
|
@ -1,28 +0,0 @@ |
|||
From 25aa102cc49def9573ffbed88155589cd60a2e8f Mon Sep 17 00:00:00 2001 |
|||
From: Egor Gabov <egor.gabov@waveaccess.ru> |
|||
Date: Fri, 5 Jun 2020 16:52:53 +0300 |
|||
Subject: [PATCH] updated for compatibility with LLVM 10 (clazy-standalone) |
|||
|
|||
In LLVM 10 llvm::StringRef operator std::string() is marked as explicit. |
|||
In this commit all implicit conversion from llvm::StringRef to |
|||
std::string are changed by explicit. |
|||
---
|
|||
src/checks/manuallevel/jnisignatures.cpp | 2 +- |
|||
1 file changed, 1 insertion(+), 1 deletion(-) |
|||
|
|||
diff --git a/src/checks/manuallevel/jnisignatures.cpp b/src/checks/manuallevel/jnisignatures.cpp
|
|||
index 81e61d48..5d4fe203 100644
|
|||
--- a/src/checks/manuallevel/jnisignatures.cpp
|
|||
+++ b/src/checks/manuallevel/jnisignatures.cpp
|
|||
@@ -103,7 +103,7 @@ void JniSignatures::checkFunctionCall(Stmt *stm)
|
|||
return; |
|||
} |
|||
|
|||
- const std::string name = clazy::name(funDecl);
|
|||
+ const std::string name = static_cast<std::string>(clazy::name(funDecl));
|
|||
|
|||
if (name == "callObjectMethod" || name == "callMethod") { |
|||
checkArgAt(callExpr, 0, methodNameRegex, "Invalid method name"); |
|||
--
|
|||
GitLab |
|||
|
@ -1,20 +1,14 @@ |
|||
# Template file for 'clazy' |
|||
pkgname=clazy |
|||
version=1.7 |
|||
revision=2 |
|||
version=1.8 |
|||
revision=1 |
|||
create_wrksrc=yes |
|||
build_style=cmake |
|||
hostmakedepends="python" |
|||
makedepends="clang llvm" |
|||
short_desc="Qt oriented code checker based on clang framework" |
|||
maintainer="John <me@johnnynator.dev>" |
|||
license="LGPL-2.0-or-later" |
|||
homepage="https://cgit.kde.org/clazy.git/about/" |
|||
homepage="https://apps.kde.org/en/clazy" |
|||
distfiles="${KDE_SITE}/clazy/${version}/src/${pkgname}-${version}.tar.xz" |
|||
checksum=754da5815f769dd6b72a040a2430525c93f294eb7769c78271603df9614f1b21 |
|||
checksum=ff0a5b5e694149df5f60bb7a4dc253ee4752b803453c5d29fa79611b54ecffdc |
|||
nocross="Clang cannot be installed as makedep" |
|||
|
|||
post_extract() { |
|||
for i in ${FILESDIR}/clazy-*.patch; do |
|||
patch -sNp1 -i ${i} |
|||
done |
|||
} |