Commit Graph

1035 Commits

Author SHA1 Message Date
Robert Schulze
b475fbc9a7
Merge pull request #37300 from ClickHouse/cmake-cleanup-pt3
Various cmake cleanups
2022-05-20 10:02:36 +02:00
Robert Schulze
0c55ac76d2
A few clangtidy updates
Enable:

- bugprone-lambda-function-name: "Checks for attempts to get the name of
  a function from within a lambda expression. The name of a lambda is
  always something like operator(), which is almost never what was
  intended."

- bugprone-unhandled-self-assignment: "Finds user-defined copy
  assignment operators which do not protect the code against
  self-assignment either by checking self-assignment explicitly or using
  the copy-and-swap or the copy-and-move method.""

- hicpp-invalid-access-moved: "Warns if an object is used after it has
  been moved."

- hicpp-use-noexcept: "This check replaces deprecated dynamic exception
  specifications with the appropriate noexcept specification (introduced
  in C++11)"

- hicpp-use-override: "Adds override (introduced in C++11) to overridden
  virtual functions and removes virtual from those functions as it is
  not required."

- performance-type-promotion-in-math-fn: "Finds calls to C math library
  functions (from math.h or, in C++, cmath) with implicit float to
  double promotions."

Split up:

- cppcoreguidelines-*. Some of them may be useful (haven't checked in
  detail), therefore allow to toggle them individually.

Disable:

- linuxkernel-*. Obvious.
2022-05-17 20:56:57 +02:00
Robert Schulze
43945cea1b
Fixing some warnings 2022-05-16 20:59:27 +02:00
Robert Schulze
e3cfec5b09
Merge remote-tracking branch 'origin/master' into clangtidies 2022-05-16 10:12:50 +02:00
Robert Schulze
8117a1ce52
Don't leak suppression for -Wreserved-identifier out of header 2022-05-15 09:48:54 +02:00
Robert Schulze
1b81bb49b4
Enable clang-tidy modernize-deprecated-headers & hicpp-deprecated-headers
Official docs:

  Some headers from C library were deprecated in C++ and are no longer
  welcome in C++ codebases. Some have no effect in C++. For more details
  refer to the C++ 14 Standard [depr.c.headers] section. This check
  replaces C standard library headers with their C++ alternatives and
  removes redundant ones.
2022-05-09 08:23:33 +02:00
Robert Schulze
f866f8143d
Enable clang-tidy modernize-use-noexcept
Official docs:

  This check replaces deprecated dynamic exception specifications with
  the appropriate noexcept specification (introduced in C++11). By
  default this check will replace throw() with noexcept, and
  throw(<exception>[,...]) or throw(...) with noexcept(false).
2022-05-08 19:31:38 +02:00
Robert Schulze
3d3977bad3
Enable clang-tidy cert-err60-cpp
Official docs:

  This check flags all throw expressions where the exception object is
  not nothrow copy constructible.
2022-05-06 00:36:26 +02:00
mergify[bot]
64084b5e32
Merge branch 'master' into shared_ptr_helper3 2022-05-03 20:46:16 +00:00
Robert Schulze
ad0b3be79d
Replace uses of SFINAE by C++20 concepts
- enable_if is usually regarded as fragile and unreadable

- C++20 concepts are much easier to read and produce more expressive
  error messages
2022-05-02 09:23:53 +02:00
Robert Schulze
330212e0f4
Remove inherited create() method + disallow copying
The original motivation for this commit was that shared_ptr_helper used
std::shared_ptr<>() which does two heap allocations instead of
make_shared<>() which does a single allocation. Turned out that
1. the affected code (--> Storages/) is not on a hot path (rendering the
performance argument moot ...)
2. yet copying Storage objects is potentially dangerous and was
   previously allowed.

Hence, this change

- removes shared_ptr_helper and as a result all inherited create() methods,

- instead, Storage objects are now created using make_shared<>() by the
  caller (for that to work, many constructors had to be made public), and

- all Storage classes were marked as noncopyable using boost::noncopyable.

In sum, we are (likely) not making things faster but the code becomes
cleaner and harder to misuse.
2022-05-02 08:46:52 +02:00
Alexey Milovidov
1ddb04b992
Merge pull request #36715 from amosbird/refactorbase
Reorganize source files so that base won't depend on Common
2022-04-30 09:40:58 +03:00
Amos Bird
4a5e4274f0
base should not depend on Common 2022-04-29 10:26:35 +08:00
mergify[bot]
20e2fa9b3f
Merge branch 'master' into dynamic-columns-9 2022-04-28 17:53:03 +00:00
mergify[bot]
01357b2e1a
Merge branch 'master' into speed-up-build 2022-04-22 04:34:27 +00:00
Maksim Kita
57444fc7d3
Merge pull request #36444 from rschu1ze/clang-tidy-fixes
Clang tidy fixes
2022-04-21 16:11:27 +02:00
mergify[bot]
9c75f83a0b
Merge branch 'master' into speed-up-build 2022-04-20 23:20:21 +00:00
Robert Schulze
b24ca8de52
Fix various clang-tidy warnings
When I tried to add cool new clang-tidy 14 warnings, I noticed that the
current clang-tidy settings already produce a ton of warnings. This
commit addresses many of these. Almost all of them were non-critical,
i.e. C vs. C++ style casts.
2022-04-20 10:29:05 +02:00
alesapin
dd2e085ae5
Merge pull request #36365 from ClickHouse/fix-memory-warning-at-server-startup
Fix error in sanity checks
2022-04-18 11:51:21 +02:00
Alexey Milovidov
9bab9077b2 Fix error in sanity checks 2022-04-18 03:39:56 +02:00
Alexey Milovidov
f046dd6642 Speed up build a little 2022-04-16 03:58:50 +02:00
Alexey Milovidov
ccdd0a60f7 Remove Arcadia 2022-04-16 00:28:56 +02:00
Anton Popov
6364b6f78f Merge remote-tracking branch 'upstream/master' into dynamic-columns-9 2022-04-08 15:05:51 +00:00
Anton Popov
3fce23357c fix insertion of complex json with nested arrays 2022-04-08 14:58:02 +00:00
Alexander Tokmakov
7f54e7b422 Merge branch 'master' into mvcc_prototype 2022-04-07 15:14:06 +02:00
Anton Popov
13cb564d1e
Merge pull request #35716 from kssenii/fix-local-logs-level
Fix send_logs_level for clickhouse local
2022-04-06 18:52:47 +02:00
kssenii
83488b2d13 Better 2022-04-05 14:48:26 +02:00
mergify[bot]
3183b61c74
Merge branch 'master' into mvcc_prototype 2022-03-31 12:27:09 +00:00
Alexander Tokmakov
287d858fda Merge branch 'master' into mvcc_prototype 2022-03-29 16:24:12 +02:00
alesapin
842c0b8ff0 Merge remote-tracking branch 'origin/startup-sanity-checks' into startup-sanity-checks 2022-03-29 14:29:33 +02:00
alesapin
ed2c461fe1 Merge branch 'master' into startup-sanity-checks 2022-03-29 14:09:20 +02:00
alesapin
b838a7dcb0 Remove outdated links from CI 2022-03-28 15:53:22 +02:00
Sergei Trifonov
85f2ed12e1 fix darwin build 2022-03-25 12:52:50 +01:00
alesapin
93d1b1d198 Merge branch 'master' into startup-sanity-checks 2022-03-24 11:17:06 +01:00
Sergei Trifonov
c7cf14e743 fix style and darwin build 2022-03-23 19:15:01 +01:00
Alexander Tokmakov
9702b5177d Merge branch 'master' into mvcc_prototype 2022-03-14 21:45:38 +01:00
Maksim Kita
e14cfd5dcd Fix clang-tidy warnings in Access folder 2022-03-14 18:17:35 +00:00
alesapin
96c0e9fddf Better cmake 2022-03-11 15:47:07 +01:00
Alexander Tokmakov
8acfb8d27f Merge branch 'master' into mvcc_prototype 2022-03-07 17:40:15 +01:00
alesapin
c5a456802f Fix build 2022-03-04 19:39:11 +01:00
alesapin
5416b567d5 Merge branch 'master' into standalone_keeper_build 2022-03-04 13:35:07 +01:00
alesapin
0eb7d28192 Building small keeper binary 2022-03-03 21:27:46 +01:00
Vladimir C
38cf9ca7c2
Merge pull request #35005 from vdimir/fixarm64/00092_obfuscator 2022-03-03 12:17:30 +01:00
Maksim Kita
7d90afb3b0
Merge pull request #34988 from azat/safe-exit
Fix signal-unsafe TSan report in client
2022-03-03 09:21:26 +01:00
vdimir
c89de91fd4
clickhouse obfuscator aarch64 fix 2022-03-02 21:31:40 +00:00
Azat Khuzhin
798da0c314 Introduce safeExit() helper (_exit() compatible with TSan)
v2: add missing defines.h header
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-02 22:17:17 +03:00
Maksim Kita
b1a956c5f1 clang-tidy check performance-move-const-arg fix 2022-03-02 18:15:27 +00:00
Alexander Tokmakov
aa6b9a2abc Merge branch 'master' into mvcc_prototype 2022-02-23 23:22:03 +03:00
Amos Bird
56197cf31e
Allow only to specify --log-file 2022-02-18 18:14:58 +08:00
Alexander Tokmakov
dae044f86b Merge branch 'master' into mvcc_prototype 2022-02-17 13:49:37 +03:00