[clang] #101784 part 2: fix error handling of TranslationUnit.reparse (PR #102410)

Jannick Kremer via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 8 07:00:29 PDT 2024


================
@@ -3263,9 +3298,11 @@ def reparse(self, unsaved_files=None, options=0):
             unsaved_files = []
 
         unsaved_files_array = self.process_unsaved_files(unsaved_files)
-        ptr = conf.lib.clang_reparseTranslationUnit(
+        result = conf.lib.clang_reparseTranslationUnit(
             self, len(unsaved_files), unsaved_files_array, options
         )
+        if result != 0:
+            raise CXError(result, 'Error reparsing TranslationUnit.')
----------------
DeinAlptraum wrote:

Since we are now explicitly throwing an error where there was none before, this should probably haven an entry in `clang/docs/ReleaseNotes.rst` under "Potentially Breaking Changes"

https://github.com/llvm/llvm-project/pull/102410


More information about the cfe-commits mailing list