31 lines · cpp
1// RUN: rm -rf %t2// RUN: split-file %s %t3 4// RUN: %clang_cc1 -x c++ -Wdocumentation -ast-dump-all %t/t.cpp5 6//--- t.h7/// MyClass in the header file8class MyClass {9public:10 template <typename T>11 void Foo() const;12 13 /// Bar14 void Bar() const;15};16 17//--- t.cpp18#include "t.h"19 20/// MyClass::Bar: Foo<int>() is implicitly instantiated and called here.21void MyClass::Bar() const {22 Foo<int>();23}24 25/// MyClass::Foo26template <typename T>27void MyClass::Foo() const {28}29 30// CHECK: TranslationUnitDecl31