[PATCH] D104442: [libclang] Fix error handler in translateSourceLocation.

Simon Tatham via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 18 05:43:49 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGfd569a11b585: [libclang] Fix error handler in translateSourceLocation. (authored by simon_tatham).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104442/new/

https://reviews.llvm.org/D104442

Files:
  clang/tools/libclang/CXSourceLocation.h


Index: clang/tools/libclang/CXSourceLocation.h
===================================================================
--- clang/tools/libclang/CXSourceLocation.h
+++ 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() };


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104442.352984.patch
Type: text/x-patch
Size: 547 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210618/30311f23/attachment.bin>


More information about the cfe-commits mailing list