Skip to content

Commit 2adde7d

Browse files
committed
noexcept
1 parent 692e38c commit 2adde7d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

llvm/include/llvm/Support/IOSandbox.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,22 @@ namespace llvm::sys::sandbox {
5454
/// }
5555
template <class FnTy> struct Interposed;
5656

57-
template <class RetTy, class... ArgTy> struct Interposed<RetTy (*)(ArgTy...)> {
57+
template <class RetTy, class... ArgTy, bool NE>
58+
struct Interposed<RetTy (*)(ArgTy...) noexcept(NE)> {
5859
RetTy (*Fn)(ArgTy...);
5960

60-
RetTy operator()(ArgTy... Arg) const {
61+
RetTy operator()(ArgTy... Arg) const noexcept(NE) {
6162
violationIfEnabled();
6263
return Fn(std::forward<ArgTy>(Arg)...);
6364
}
6465
};
6566

66-
template <class RetTy, class... ArgTy>
67-
struct Interposed<RetTy (*)(ArgTy..., ...)> {
67+
template <class RetTy, class... ArgTy, bool NE>
68+
struct Interposed<RetTy (*)(ArgTy..., ...) noexcept(NE)> {
6869
RetTy (*Fn)(ArgTy..., ...);
6970

7071
template <class... CVarArgTy>
71-
RetTy operator()(ArgTy... Arg, CVarArgTy... CVarArg) const {
72+
RetTy operator()(ArgTy... Arg, CVarArgTy... CVarArg) const noexcept(NE) {
7273
violationIfEnabled();
7374
return Fn(std::forward<ArgTy>(Arg)..., std::forward<CVarArgTy>(CVarArg)...);
7475
}

0 commit comments

Comments
 (0)