diff --git a/clang/tools/libclang/CXSourceLocation.h b/clang/tools/libclang/CXSourceLocation.h --- a/clang/tools/libclang/CXSourceLocation.h +++ b/clang/tools/libclang/CXSourceLocation.h @@ -29,7 +29,7 @@ translateSourceLocation(const SourceManager &SM, const LangOptions &LangOpts, SourceLocation Loc) { if (Loc.isInvalid()) - clang_getNullLocation(); + return clang_getNullLocation(); CXSourceLocation Result = { { &SM, &LangOpts, }, Loc.getRawEncoding() };