summaryrefslogtreecommitdiffstats
path: root/tests/cxx/fwd_decl_with_instantiation.cc
blob: 279111457626731f5c72de839ef225b5792b927a (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
//===--- fwd_decl_with_instantiation.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: -I .

// Tests a situation where iwyu got confused between forward-declarations
// and definitions.  It happened when the .cc file needed a definition of
// a templated type and the .h only needed a forward-declaration.  The
// .h file would replace the forward-declaration with another one
// exactly like it.

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

DirectClass<int> instantiated_dc;


/**** IWYU_SUMMARY

(tests/cxx/fwd_decl_with_instantiation.cc has correct #includes/fwd-decls)

***** IWYU_SUMMARY */