llvm-for-llvmta/tools/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p3.cpp
Nils Hölscher 7f403f4f1e added clang
2022-04-25 13:02:35 +02:00

8 lines
364 B
C++

// RUN: %clang_cc1 -fsyntax-only -verify %s
void f(int) { } // expected-note {{previous definition is here}}
void f(const int) { } // expected-error {{redefinition of 'f'}}
template <typename T> void ft(T) {}
template <> void ft(int) {} // expected-note {{previous definition is here}}
template <> void ft(int) {} // expected-error {{redefinition of 'ft<int>'}}