arphaman added inline comments.

================
Comment at: clang/test/Modules/cxx20-disable.cpp:2
+// RUN: rm -rf %t && mkdir %t
+// RUN: not %clang_cc1 -x objective-c++ -std=c++20 -fno-cxx-modules -I %t %s
+
----------------
jansvoboda11 wrote:
> I'm not sure how to best test this. Checking the error messages is not that 
> useful, since they don't make the intent here any clearer:
> 
> ```
> <path>/llvm-project/clang/test/Modules/cxx20-disable.cpp:4:8: error: expected 
> template
> export module Foo;
>        ^
> <path>/llvm-project/clang/test/Modules/cxx20-disable.cpp:4:8: error: unknown 
> type name 'module'
> 2 errors generated.
> ```
You could still check the errors with -verify but add a comment that expressed 
the intent of why these errors are verified. Also it might make sense to add an 
inverse test case that doesn't use the `-fno-cxx-modules` flag, where this will 
just work.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106864

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

Reply via email to