llvm-project/clang/test/AST/ByteCode/libcxx/global-decl-id.cpp
Timm Baeder f09fd94d6b
[clang][bytecode] Restructure Program::CurrentDeclaration handling (#127456)
Properly reset to the last ID and return the current ID from
getCurrentDecl().
2025-02-17 11:24:43 +01:00

23 lines
428 B
C++

// RUN: %clang_cc1 -std=c++2c -fexperimental-new-constant-interpreter -verify=expected,both %s
// RUN: %clang_cc1 -std=c++2c -verify=ref,both %s
// both-no-diagnostics
namespace std {
constexpr int
midpoint(int __a, int ) {
constexpr unsigned __half_diff = 0;
return __half_diff;
}
}
struct Tuple {
int min;
int mid;
constexpr Tuple() {
min = 0;
mid = std::midpoint(min, min);
}
};
constexpr Tuple tup;