
Fix for regression #130917, changes in #111992 were too broad. This change reduces scope of previous fix. Added `ExternalASTSource::wasThisDeclarationADefinition` to detect cases when FunctionDecl lost body due to declaration merges.
22 lines
329 B
C++
22 lines
329 B
C++
// RUN: %clang_cc1 -std=c++20 -verify -emit-llvm-only %s
|
|
|
|
template <int>
|
|
void Create(const void* = nullptr);
|
|
|
|
template <int>
|
|
struct ObjImpl {
|
|
template <int>
|
|
friend void ::Create(const void*);
|
|
};
|
|
|
|
template <int I>
|
|
void Create(const void*) {
|
|
(void) ObjImpl<I>{};
|
|
}
|
|
|
|
int main() {
|
|
Create<42>();
|
|
}
|
|
|
|
// expected-no-diagnostics
|