summaryrefslogtreecommitdiffstats
path: root/tests/cxx/overloaded_class.cc
blob: 812ac4142e199b9b3cb9fcf52b16f6f23ea4e69b (plain) (blame)
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
31
32
33
34
35
//===--- overloaded_class.cc - test input file for iwyu -------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

// IWYU_ARGS: -Xiwyu --check_also="tests/cxx/*-i1.h" -I .

// Tests the case where a template type is instantiated inside a
// template function.  If all the possible instantiations come
// from the same place, we want the template function to be
// responsible for the template type, and not the caller.

#include "tests/cxx/overloaded_class-d1.h"

int main() {
  // IWYU: MyFunc is...*overloaded_class-i1.h
  MyFunc<int>();
}

/**** IWYU_SUMMARY

tests/cxx/overloaded_class.cc should add these lines:
#include "tests/cxx/overloaded_class-i1.h"

tests/cxx/overloaded_class.cc should remove these lines:
- #include "tests/cxx/overloaded_class-d1.h"  // lines XX-XX

The full include-list for tests/cxx/overloaded_class.cc:
#include "tests/cxx/overloaded_class-i1.h"  // for MyFunc

***** IWYU_SUMMARY */