summaryrefslogtreecommitdiffstats
path: root/tests/cxx/inline_namespace.cc
blob: f70b0dc767e854b907d5b17843035a3059caf373 (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
//===--- inline_namespace.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 that IWYU never considers a decl inside an inline namespace
// forward-declarable, and that diagnostics never mention the inline namespace
// name (xyz::v1).

#include "tests/cxx/inline_namespace.h"

// IWYU: xyz::Foo is...*inline_namespace-i1.h
int Function(const xyz::Foo& foo) {
  // IWYU: xyz::Foo is...*inline_namespace-i1.h
  return foo.value;
}

/**** IWYU_SUMMARY

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

***** IWYU_SUMMARY */