[flang] Fix crash in HLFIR generation (#118399)
[llvm-project.git] / clang / test / AST / ast-crash-doc-function-template.cpp
bloba1627c7b4d5450e5f0b1b782fa1cc21dd4a14e22
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
4 // RUN: %clang_cc1 -x c++ -Wdocumentation -ast-dump-all %t/t.cpp
6 //--- t.h
7 /// MyClass in the header file
8 class MyClass {
9 public:
10 template <typename T>
11 void Foo() const;
13 /// Bar
14 void Bar() const;
17 //--- t.cpp
18 #include "t.h"
20 /// MyClass::Bar: Foo<int>() is implicitly instantiated and called here.
21 void MyClass::Bar() const {
22 Foo<int>();
25 /// MyClass::Foo
26 template <typename T>
27 void MyClass::Foo() const {
30 // CHECK: TranslationUnitDecl