ChuanqiXu added inline comments.

================
Comment at: clang/test/Modules/reserved-names-1.cpp:25
+                         expected-error {{module declaration must occur at the 
start of the translation unit}}
+export module std.foo;// expected-error {{'std' is a reserved name for a 
module}} \
+                         expected-error {{module declaration must occur at the 
start of the translation unit}}
----------------
aaron.ballman wrote:
> ChuanqiXu wrote:
> > It looks like the diagnostic message should be '`std.foo` is a ...'
> We tell the user which part of the path name is reserved instead of giving 
> them the whole path name. That helps for cases like: `export module 
> aaron.wrote.this.awesome.module;` If there's confusion from this, we could 
> probably change the diagnostic to be `'this' is a reserved identifier within 
> module name 'aaron.wrote.this.awesome.module'`, but because you can only 
> declare one module at a time, that seemed like overkill.
Got it. Makes sense.


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

https://reviews.llvm.org/D136953

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to