diff options
author | Saar Raz <saar@raz.email> | 2019-10-15 15:24:26 +0000 |
---|---|---|
committer | Saar Raz <saar@raz.email> | 2019-10-15 15:24:26 +0000 |
commit | 5d98ba6077dac656fbf023e9312d9c131d53144c (patch) | |
tree | 99153ade097830f469e5ff0a04fc37daeff3819a /clang/test/PCH/cxx2a-concept-specialization-expr.cpp | |
parent | d545c9056e00988d2d146f8f1440b2dd192f306b (diff) | |
download | bcm5719-llvm-5d98ba6077dac656fbf023e9312d9c131d53144c.tar.gz bcm5719-llvm-5d98ba6077dac656fbf023e9312d9c131d53144c.zip |
[Concepts] Concept Specialization Expressions
Part of C++20 Concepts implementation effort. Added Concept Specialization Expressions that are created when a concept is refe$
D41217 on Phabricator.
(recommit after fixing failing Parser test on windows)
llvm-svn: 374903
Diffstat (limited to 'clang/test/PCH/cxx2a-concept-specialization-expr.cpp')
-rw-r--r-- | clang/test/PCH/cxx2a-concept-specialization-expr.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/clang/test/PCH/cxx2a-concept-specialization-expr.cpp b/clang/test/PCH/cxx2a-concept-specialization-expr.cpp new file mode 100644 index 00000000000..6227d57c872 --- /dev/null +++ b/clang/test/PCH/cxx2a-concept-specialization-expr.cpp @@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -std=c++2a -emit-pch %s -o %t +// RUN: %clang_cc1 -std=c++2a -include-pch %t -verify %s + +// expected-no-diagnostics + +#ifndef HEADER +#define HEADER + +template<typename... T> +concept C = true; + +namespace n { + template<typename... T> + concept C = true; +} + +void f() { + (void)C<int>; + (void)C<int, void>; + (void)n::C<void>; +} + +#else /*included pch*/ + +int main() { + (void)C<int>; + (void)C<int, void>; + (void)n::C<void>; + f(); +} + +#endif // HEADER |