| ... | @@ -3053,6 +3053,11 @@ ZigClangASTUnit *ZigClangLoadFromCommandLine(const char **args_begin, const char | ... | @@ -3053,6 +3053,11 @@ ZigClangASTUnit *ZigClangLoadFromCommandLine(const char **args_begin, const char |
| 3053 | msg->msg_len = msg_str_ref.size(); | 3053 | msg->msg_len = msg_str_ref.size(); |
| 3054 | | 3054 | |
| 3055 | clang::FullSourceLoc fsl = it->getLocation(); | 3055 | clang::FullSourceLoc fsl = it->getLocation(); |
| | 3056 | |
| | 3057 | // Ensure the source location is valid before expanding it |
| | 3058 | if (fsl.isInvalid()) { |
| | 3059 | continue; |
| | 3060 | } |
| 3056 | // Expand the location if possible | 3061 | // Expand the location if possible |
| 3057 | fsl = fsl.getFileLoc(); | 3062 | fsl = fsl.getFileLoc(); |
| 3058 | | 3063 | |