[clang] [clang] Don't crash when module directive `export module foo` not following a semicolon and there are no rest pp-tokens in current module file (PR #187845)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 24 04:20:34 PDT 2026


================
@@ -339,6 +339,7 @@ Bug Fixes in This Version
 - Fixed a crash when normalizing constraints involving concept template parameters whose index coincided with non-concept template parameters in the same parameter mapping.
 - Fixed a crash caused by accessing dependent diagnostics of a non-dependent context.
 - Fixed a crash when substituting into a non-type template parameter that has a type containing an undeduced placeholder type.
+- Fixed a crash when module directive ``export module foo`` not following a semicolon and there are no rest pp-tokens in current module file. (#GH187771)
----------------
AaronBallman wrote:

```suggestion
- Correctly diagnosing and no longer crashing when ``export module foo``
  (without a semicolon) are the final tokens in a module file. (#GH187771)
```
Minor rewording

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


More information about the cfe-commits mailing list