1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-23 12:22:08 +00:00
Atmosphere/libraries/libstratosphere/source
Léo Lam 496adb0018
Minor header fixes to reduce parsing issues with Clang (#1700)
* Work around Clang's incomplete C++20 support for omitting typename

* vapours: fix Clang error about missing return in constexpr function

* stratosphere: fix call to non-constexpr strlen in constexpr function

strlen being constexpr is a non-compliant GCC extension; Clang
explicitly rejects it: https://reviews.llvm.org/D23692

* stratosphere: add a bunch of missing override specifiers

* stratosphere: work around Clang consteval bug

Minimal example: https://godbolt.org/z/MoM64v93M

The issue seems to be that Clang does not consider f(x) to be a
constant expression if x comes from a template argument that isn't
a non-type auto template argument (???)

We can work around this by relaxing GetMessageHeaderForCheck (by using
constexpr instead of consteval). This produces no functional changes
because the result of GetMessageHeaderForCheck() is assigned to a
constexpr variable, so the result is guaranteed to be computed
at compile-time.

* stratosphere: fix missing require clauses in definitions

GCC not requiring the require clauses to be repeated for member
definitions is actually a compiler bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96830

Clang rejects declarations with missing require clauses.

* Fix ALWAYS_INLINE_LAMBDA and parameter list relative order

While GCC doesn't seem to care about the position of the always_inline
attribute relative to the parameter list, Clang is very picky
and requires the attribute to appear after the parameter list
(and before a trailing return type)

* stratosphere: fix static constexpr member variable with incomplete type

GCC accepts this for some reason (because of the lambda?) but Clang
correctly rejects this.
2021-11-06 18:19:34 -07:00
..
ams spl: refactor for accuracy/move into libstrat 2021-10-10 12:57:36 -07:00
boot2 dmnt: enable experimental standalone usage of gdbstub, while starlink is in dev 2021-11-03 23:56:25 -07:00
cal
capsrv strat: use m_ for member variables 2021-10-10 00:14:06 -07:00
cfg sm/tipc: minor cleanup 2021-10-12 00:20:21 -07:00
crypto
cs cs: prevent exceptions from manifesting 2021-10-07 19:48:40 -07:00
dd
ddsf strat: use m_ for member variables 2021-10-10 00:14:06 -07:00
diag libstrat: enable -Wextra, -Werror 2021-10-06 15:20:48 -07:00
dmnt
erpt/srv sf: prevent emitting mitm/defer code unless server in process supports it 2021-10-11 19:01:27 -07:00
err
fs sprofile: various correctness fixes. 2021-10-29 17:38:44 -07:00
fssrv ams: improve offsetof style consistency 2021-10-18 00:17:13 -07:00
fssystem strat: use m_ for member variables 2021-10-10 00:14:06 -07:00
gpio constexpr: resign ourselves to gcc dropping void -> T support 2021-10-17 02:39:16 -07:00
hid
hos hos: whoops 2021-10-25 17:31:14 -07:00
htc strat: build sysmodules with -Wextra/-Werror 2021-10-06 23:22:54 -07:00
htcfs sf: prevent emitting mitm/defer code unless server in process supports it 2021-10-11 19:01:27 -07:00
htclow Minor header fixes to reduce parsing issues with Clang (#1700) 2021-11-06 18:19:34 -07:00
htcs sf: prevent emitting mitm/defer code unless server in process supports it 2021-10-11 19:01:27 -07:00
i2c constexpr: resign ourselves to gcc dropping void -> T support 2021-10-17 02:39:16 -07:00
init init: disable fsdev cwd to prevent abort on fsdev usage (fsdev should not be used) 2021-10-27 22:57:09 -07:00
kvdb strat: use m_ for member variables 2021-10-10 00:14:06 -07:00
ldr ams: replace most remaining operator & with std::addressof 2021-10-09 14:49:53 -07:00
lm sf: prevent emitting mitm/defer code unless server in process supports it 2021-10-11 19:01:27 -07:00
lmem constexpr: resign ourselves to gcc dropping void -> T support 2021-10-17 02:39:16 -07:00
lr lr: fix EraseRedirection hang introduced by refactoring 2021-10-18 11:00:55 -07:00
mem strat: use m_ for member variables 2021-10-10 00:14:06 -07:00
ncm Minor header fixes to reduce parsing issues with Clang (#1700) 2021-11-06 18:19:34 -07:00
nim
nsd/impl/device strat: use m_ for member variables 2021-10-10 00:14:06 -07:00
os dmnt2: detect thread name, add monitor get mapping(s), increase buffer sizes 2021-11-03 23:56:25 -07:00
osdbg dmnt2: try to avoid writing out of bounds when generating packets 2021-11-03 23:56:25 -07:00
patcher loader: refactor ro manager/improve accuracy 2021-10-10 18:22:32 -07:00
pgl tipc: implement special-case templating used by 13.0.0 pgl 2021-10-15 21:23:55 -07:00
pinmux/driver strat: use m_ for member variables 2021-10-10 00:14:06 -07:00
pm ams: replace most remaining operator & with std::addressof 2021-10-09 14:49:53 -07:00
powctl powctl: remove unused arm_neon header after last commit 2021-10-16 10:11:45 -07:00
psc strat: use m_ for member variables 2021-10-10 00:14:06 -07:00
pwm strat: use m_ for member variables 2021-10-10 00:14:06 -07:00
result
ro/impl svc: refactor/rename MemoryInfo fields 2021-10-05 15:16:54 -07:00
scs loader: refactor ro manager/improve accuracy 2021-10-10 18:22:32 -07:00
settings settings: fix correctness issue in LazyFileAccessor 2021-10-09 14:20:37 -07:00
sf strat: fix some mitm server management logic 2021-10-14 00:40:43 -07:00
sm ams: replace most remaining operator & with std::addressof 2021-10-09 14:49:53 -07:00
socket dmnt: enable experimental standalone usage of gdbstub, while starlink is in dev 2021-11-03 23:56:25 -07:00
spl spl: fix legacy physical keyslot compatibility 2021-10-30 11:21:25 -07:00
sprofile/srv sprofile: various correctness fixes. 2021-10-29 17:38:44 -07:00
time
updater strat: use m_ for member variables 2021-10-10 00:14:06 -07:00
usb strat: use sf::NativeHandle for ipc templating 2021-10-05 00:11:36 -07:00
util ams: replace most remaining operator & with std::addressof 2021-10-09 14:49:53 -07:00
wec
service_guard.h