iains added inline comments.
================
Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:1543
+def err_import_not_allowed_here : Error<
+ "imports must be contiguous and immediately follow the module declaration">;
+def err_import_in_global_fragment : Error<
----------------
urnathan wrote:
> "imports must immediately follow a module declaration"? (the contiguous
> isn't adding anything IMHO)
um, maybe I need two diagnostics then - the "contiguous" aspect applies when
imports are split by a non-import statement.
Selecting between the two case on the basis of a flag seems unproductive here.
Would two diagnostics seem more reasonable to you?
================
Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:1544-1547
+def err_import_in_global_fragment : Error<
+ "module%select{| partition}0 imports cannot be in the global module
fragment">;
+def err_import_in_private_fragment : Error<
+ "module%select{| partition}0 imports cannot be in the private module
fragment">;
----------------
urnathan wrote:
> You could I suppose have a single diagnostuc and select between global &
> private?
good idea, I'll do that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118893/new/
https://reviews.llvm.org/D118893
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits