Shafik Yaghmour f8a37a6ce6 [Clang] Fix compat diagnostic to detect a nontype template parameter has a placeholder type using getContainedAutoType()
Based on the changes introduced by 15361a21e01026e74cb17011b702c7d1c881ae94 it
looks like C++17 compatibility diagnostic should have been checking
getContainedAutoType().

This fixes: https://github.com/llvm/llvm-project/issues/57369
  https://github.com/llvm/llvm-project/issues/57643
  https://github.com/llvm/llvm-project/issues/57793

Differential Revision: https://reviews.llvm.org/D132990
2022-09-18 11:54:32 -07:00

11 lines
243 B
C++

// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 -Wpre-c++17-compat %s
// expected-no-diagnostics
namespace GH57362 {
template <int num>
class TemplateClass {};
template <TemplateClass nttp> // ok, no diagnostic expected
void func() {}
}