[PATCH] D106864: [clang][cli] Expose -fno-cxx-modules in cc1

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 30 06:57:09 PDT 2021


jansvoboda11 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
+
----------------
arphaman wrote:
> 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.
Addressed in the latest revision.


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

https://reviews.llvm.org/D106864



More information about the cfe-commits mailing list