aboutsummaryrefslogtreecommitdiff
path: root/clang/test/AST/ast-crash-doc-function-template.cpp
blob: a1627c7b4d5450e5f0b1b782fa1cc21dd4a14e22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// RUN: rm -rf %t
// RUN: split-file %s %t

// RUN: %clang_cc1 -x c++ -Wdocumentation -ast-dump-all %t/t.cpp

//--- t.h
/// MyClass in the header file
class MyClass {
public:
  template <typename T>
  void Foo() const;

  /// Bar
  void Bar() const;
};

//--- t.cpp
#include "t.h"

/// MyClass::Bar: Foo<int>() is implicitly instantiated and called here.
void MyClass::Bar() const {
  Foo<int>();
}

/// MyClass::Foo
template <typename T>
void MyClass::Foo() const {
}

// CHECK: TranslationUnitDecl