[clang] 4c88cfb - Add test for substitutability of variable templates in closure type

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Wed May 12 18:45:51 PDT 2021


Author: Richard Smith
Date: 2021-05-12T18:45:33-07:00
New Revision: 4c88cfb1dc79227be78f8dade966934384914e5e

URL: https://github.com/llvm/llvm-project/commit/4c88cfb1dc79227be78f8dade966934384914e5e
DIFF: https://github.com/llvm/llvm-project/commit/4c88cfb1dc79227be78f8dade966934384914e5e.diff

LOG: Add test for substitutability of variable templates in closure type
mangling.

Added: 
    

Modified: 
    clang/test/CodeGenCXX/mangle-lambdas.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGenCXX/mangle-lambdas.cpp b/clang/test/CodeGenCXX/mangle-lambdas.cpp
index 7d236b4685a5..66ce8a856851 100644
--- a/clang/test/CodeGenCXX/mangle-lambdas.cpp
+++ b/clang/test/CodeGenCXX/mangle-lambdas.cpp
@@ -44,6 +44,9 @@ template<typename T> auto var_template = [] {
 
 int *use_var_template = var_template<int>();
 
+// CHECK-LABEL: define {{.*}} @_Z29use_var_template_substitutionN12var_templateIiEMUlvE_ENS_IfEMUlvE_E
+void use_var_template_substitution(decltype(var_template<int>), decltype(var_template<float>)) {}
+
 struct S {
   void f(int = []{return 1;}()
              + []{return 2;}(),


        


More information about the cfe-commits mailing list