Chuanqi Xu a0ce3e691c [C++20] [Modules] Avoid crash with calls to (this auto) syntax
Due to we didn't consider (this, auto) information when setting abbrev
for calls, we use incorrect format for calls, which cause crashes.

From
https://github.com/llvm/llvm-project/issues/118137
2025-06-25 14:12:32 +08:00

25 lines
702 B
C++

// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: split-file %s %t
//
// RUN: %clang_cc1 -std=c++23 %t/a.cppm -emit-module-interface -o %t/a.pcm
// RUN: %clang_cc1 -std=c++23 %t/a.cppm -emit-reduced-module-interface -o %t/a.pcm
// RUN: %clang_cc1 -std=c++23 %t/a.cppm -emit-llvm -o -
//--- a.h
typedef int nghttp2_session_callbacks;
//--- a.cppm
module;
#include "a.h"
export module g;
template <typename, typename T>
concept Deleter = requires(T ptr) { ptr; };
template <typename T, Deleter<T>> struct Handle {
void GetRaw(this auto);
};
struct SessionCallbacksDeleter
: Handle<nghttp2_session_callbacks, SessionCallbacksDeleter> {
} Server_callbacks;
void Server() { Server_callbacks.GetRaw(); }