Skip to content

Commit 216c382

Browse files
author
Davide Italiano
committed
[SILLocation] Mark this function as LLVM_NODISCARD to prevent misuses.
1 parent 7bf390a commit 216c382

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/SIL/SILLocation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ class SILLocation {
428428
static DebugLoc decode(SourceLoc Loc, const SourceManager &SM);
429429

430430
/// Return the decoded debug location.
431-
DebugLoc decodeDebugLoc(const SourceManager &SM) const {
431+
LLVM_NODISCARD DebugLoc decodeDebugLoc(const SourceManager &SM) const {
432432
return isDebugInfoLoc() ? Loc.DebugInfoLoc
433433
: decode(getDebugSourceLoc(), SM);
434434
}

0 commit comments

Comments
 (0)