summaryrefslogtreecommitdiff
path: root/clang/test/Analysis/cxx-inherited-ctor-is-skipped-as-top-level.cpp
blob: be7982e64114821bd7a71da3c42c819b3fce7cbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-display-progress %s 2>&1 | FileCheck %s

// Test that inheriting constructors are not analyzed as top-level functions.

// CHECK: ANALYZE (Path,  Inline_Regular): {{.*}} c()
// CHECK: ANALYZE (Path,  Inline_Regular): {{.*}} a::a(int)
// CHECK-NOT: ANALYZE (Path,  Inline_Regular): {{.*}} b::a(int)

class a {
public:
  a(int) {}
};
struct b : a {
  using a::a; // Ihnerited ctor.
};
void c() {
  int d;
  (b(d));
  (a(d));
}