From 35037ae1971a92b07783339ee9d7a5da50a2ab4b Mon Sep 17 00:00:00 2001 From: Erich Keane Date: Wed, 20 Oct 2021 12:37:19 -0700 Subject: [PATCH] Make dr177x.cpp test work with Windows-32 bit platfroms with 'thiscall'. My downstream noticed that the test failed on windows-32 bit machines since the types have __attribute__((thiscall)) on them in a few places. This patch just adds a wildcard to handle that, since it isn't particularly important to the test. --- clang/test/CXX/drs/dr177x.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/clang/test/CXX/drs/dr177x.cpp b/clang/test/CXX/drs/dr177x.cpp index 0ac4deac6a8d..d307988ddbb6 100644 --- a/clang/test/CXX/drs/dr177x.cpp +++ b/clang/test/CXX/drs/dr177x.cpp @@ -2,6 +2,7 @@ // RUN: %clang_cc1 -std=c++11 %s -fexceptions -fcxx-exceptions -pedantic-errors -ast-dump | FileCheck %s --check-prefixes=CHECK,CXX11 // RUN: %clang_cc1 -std=c++14 %s -fexceptions -fcxx-exceptions -pedantic-errors -ast-dump | FileCheck %s --check-prefixes=CHECK,CXX11,CXX14 // RUN: %clang_cc1 -std=c++1z %s -fexceptions -fcxx-exceptions -pedantic-errors -ast-dump | FileCheck %s --check-prefixes=CHECK,CXX11,CXX14 +// RUN: %clang_cc1 -std=c++1z %s -fexceptions -fcxx-exceptions -pedantic-errors -triple i386-windows-pc -ast-dump | FileCheck %s --check-prefixes=CHECK,CXX11,CXX14 namespace dr1772 { // dr1772: 14 // __func__ in a lambda should name operator(), not the containing function. @@ -10,7 +11,7 @@ namespace dr1772 { // dr1772: 14 auto x = []() { __func__; }; // CXX11: LambdaExpr // CXX11: CXXRecordDecl - // CXX11: CXXMethodDecl{{.+}} operator() 'void () const' + // CXX11: CXXMethodDecl{{.+}} operator() 'void () {{.*}}const' // CXX11-NEXT: CompoundStmt // CXX11-NEXT: PredefinedExpr{{.+}} 'const char [11]' lvalue __func__ // CXX11-NEXT: StringLiteral{{.+}} 'const char [11]' lvalue "operator()" @@ -21,7 +22,7 @@ namespace dr1772 { // dr1772: 14 // CXX11-NEXT: CompoundStmt // CXX11: LambdaExpr // CXX11: CXXRecordDecl - // CXX11: CXXMethodDecl{{.+}} operator() 'void () const' + // CXX11: CXXMethodDecl{{.+}} operator() 'void () {{.*}}const' // CXX11-NEXT: CompoundStmt // CXX11-NEXT: PredefinedExpr{{.+}} 'const char [11]' lvalue __func__ // CXX11-NEXT: StringLiteral{{.+}} 'const char [11]' lvalue "operator()" @@ -46,7 +47,7 @@ namespace dr1779 { // dr1779: 14 class ClassTemplate { // CHECK: ClassTemplateDecl{{.+}} ClassTemplate void MemFunc() { - // CHECK: CXXMethodDecl{{.+}} MemFunc 'void ()' + // CHECK: CXXMethodDecl{{.+}} MemFunc 'void (){{.*}}' // CHECK-NEXT: CompoundStmt // CHECK-NEXT: PredefinedExpr{{.+}} '' lvalue __func__ __func__; @@ -55,7 +56,7 @@ namespace dr1779 { // dr1779: 14 }; template void ClassTemplate::OutOfLineMemFunc() { - // CHECK: CXXMethodDecl{{.+}}parent{{.+}} OutOfLineMemFunc 'void ()' + // CHECK: CXXMethodDecl{{.+}}parent{{.+}} OutOfLineMemFunc 'void (){{.*}}' // CHECK-NEXT: CompoundStmt // CHECK-NEXT: PredefinedExpr{{.+}} '' lvalue __func__ __func__; @@ -66,7 +67,7 @@ namespace dr1779 { // dr1779: 14 // CXX14: FunctionDecl{{.+}}contains_generic_lambda // CXX14: LambdaExpr // CXX14: CXXRecordDecl - // CXX14: CXXMethodDecl{{.+}} operator() 'auto (auto) const' + // CXX14: CXXMethodDecl{{.+}} operator() 'auto (auto) {{.*}}const' // CXX14-NEXT: ParmVarDecl // CXX14-NEXT: CompoundStmt // CXX14-NEXT: PredefinedExpr{{.+}} '' lvalue __func__