From: Chuanqi Xu Date: Thu, 30 Jun 2022 07:48:22 +0000 (+0800) Subject: [NFC] [Modules] Add test for inherit default arguments X-Git-Tag: upstream/15.0.7~3056 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f595003e8e86bcb9531c2439f6a3771e669a3f3e;p=platform%2Fupstream%2Fllvm.git [NFC] [Modules] Add test for inherit default arguments --- diff --git a/clang/test/Modules/InheritDefaultArguments.cppm b/clang/test/Modules/InheritDefaultArguments.cppm new file mode 100644 index 0000000..bbd5ad4 --- /dev/null +++ b/clang/test/Modules/InheritDefaultArguments.cppm @@ -0,0 +1,28 @@ +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: cd %t +// +// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -o %t/A.pcm +// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t -I%t %t/Use.cppm -verify -fsyntax-only + +//--- foo.h +template +class Templ; + +template +class Templ {}; + +template +Templ(T t) -> Templ; + +//--- A.cppm +module; +#include "foo.h" +export module A; + +//--- Use.cppm +// expected-no-diagnostics +module; +#include "foo.h" +export module X; +import A;