Skip to content

Commit ac5d14a

Browse files
committed
Remove use of the GNU ?: extension from a core header.
Please stop adding uses of this; the source base should be portable C++ to the greatest extent possible, and saving a few characters of typing does not qualify for an exception.
1 parent 15c3319 commit ac5d14a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/swift/SIL/SILBuilder.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ class SILBuilder {
8989
SILDebugLocation *createSILDebugLocation(SILLocation Loc) {
9090
// FIXME: Audit all uses and enable this assertion.
9191
// assert(getCurrentDebugScope() && "no debug scope");
92-
return getOrCreateDebugLocation(Loc, getCurrentDebugScope()
93-
?: getFunction().getDebugScope());
92+
auto Scope = getCurrentDebugScope();
93+
return getOrCreateDebugLocation(Loc,
94+
Scope ? Scope : getFunction().getDebugScope());
9495
}
9596

9697
//===--------------------------------------------------------------------===//

0 commit comments

Comments
 (0)