Skip to content

Commit

Permalink
Remove use of the GNU ?: extension from a core header.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rjmccall committed Dec 3, 2015
1 parent 15c3319 commit ac5d14a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/swift/SIL/SILBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ class SILBuilder {
SILDebugLocation *createSILDebugLocation(SILLocation Loc) {
// FIXME: Audit all uses and enable this assertion.
// assert(getCurrentDebugScope() && "no debug scope");
return getOrCreateDebugLocation(Loc, getCurrentDebugScope()
?: getFunction().getDebugScope());
auto Scope = getCurrentDebugScope();
return getOrCreateDebugLocation(Loc,
Scope ? Scope : getFunction().getDebugScope());
}

//===--------------------------------------------------------------------===//
Expand Down

0 comments on commit ac5d14a

Please sign in to comment.