brintos

brintos / llvm-project-archived public Read only

0
0
Text · 465 B · 5b1a904 Raw
31 lines · cpp
1// RUN: rm -fR %t2// RUN: split-file %s %t3// RUN: cd %t4// RUN: %clang_cc1 -std=c++20 -emit-header-unit -xc++-user-header header.h5// RUN: %clang_cc1 -std=c++20 -fmodule-file=header.pcm main.cpp6 7//--- header.h8template <typename T>9void f(T) {}10 11class A {12  virtual ~A();13};14 15inline A::~A() {16  f([](){});17}18 19struct B {20  void g() {21    f([](){22      [](){};23    });24  }25};26// expected-no-diagnostics27 28//--- main.cpp29import "header.h";30// expected-no-diagnostics31