Files
clang-p2996/clang/test/SemaCXX/undefined-partial-specialization.cpp
Mariya Podchishchaeva 7c97dc20ab [clang] Do not crash on undefined template partial specialization
Before checking that template partial specialization is "reachable",
ensure it exists.

Fixes https://github.com/llvm/llvm-project/issues/61356

Reviewed By: shafik, erichkeane

Differential Revision: https://reviews.llvm.org/D148330
2023-04-27 05:38:41 -04:00

16 lines
369 B
C++

// RUN: %clang_cc1 -std=c++17 -verify %s
// RUN: %clang_cc1 -std=c++20 -verify %s
namespace GH61356 {
template <typename T, bool b>
class boo {void foo();};
template <typename T>
class boo<T, true>;
template<typename T>
void boo<T, true>::foo(){} // expected-error{{out-of-line definition of 'foo' from class 'boo<type-parameter-0-0, true>' without definition}}
}