File: header_in_subdir.cc

package info (click to toggle)
iwyu 8.15-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 6,864 kB
  • sloc: cpp: 14,186; python: 5,958; ansic: 636; makefile: 29
file content (30 lines) | stat: -rw-r--r-- 906 bytes parent folder | download
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
//===--- header_in_subdir.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.
//
//===----------------------------------------------------------------------===//

// Test that subdirs are correctly recognized

#include "subdir/direct_subdir.h"

void foo() {
  // IWYU: IndirectSubDirClass is...*indirect_subdir.h
  IndirectSubDirClass ic;
}

/**** IWYU_SUMMARY

tests/cxx/header_in_subdir.cc should add these lines:
#include "tests/cxx/subdir/indirect_subdir.h"

tests/cxx/header_in_subdir.cc should remove these lines:
- #include "subdir/direct_subdir.h"  // lines XX-XX

The full include-list for tests/cxx/header_in_subdir.cc:
#include "tests/cxx/subdir/indirect_subdir.h"  // for IndirectSubDirClass

***** IWYU_SUMMARY */