| 1 |
// Should not crash with '-analyzer-opt-analyze-headers' option during CTU analysis. |
| 2 |
// |
| 3 |
// RUN: rm -rf %t && mkdir -p %t/ctudir |
| 4 |
// RUN: %clang_cc1 -std=c++14 -triple x86_64-pc-linux-gnu \ |
| 5 |
// RUN: -emit-pch -o %t/ctudir/ctu-inherited-default-ctor-other.cpp.ast \ |
| 6 |
// RUN: %S/Inputs/ctu-inherited-default-ctor-other.cpp |
| 7 |
// RUN: echo "59:c:@N@clang@S@DeclContextLookupResult@SingleElementDummyList ctu-inherited-default-ctor-other.cpp.ast" \ |
| 8 |
// RUN: > %t/ctudir/externalDefMap.txt |
| 9 |
// |
| 10 |
// RUN: %clang_analyze_cc1 -std=c++14 -triple x86_64-pc-linux-gnu \ |
| 11 |
// RUN: -analyzer-opt-analyze-headers \ |
| 12 |
// RUN: -analyzer-checker=core \ |
| 13 |
// RUN: -analyzer-config experimental-enable-naive-ctu-analysis=true \ |
| 14 |
// RUN: -analyzer-config ctu-dir=%t/ctudir \ |
| 15 |
// RUN: -analyzer-config display-ctu-progress=true \ |
| 16 |
// RUN: -verify %s 2>&1 | FileCheck %s |
| 17 |
// |
| 18 |
// expected-no-diagnostics |
| 19 |
// |
| 20 |
// CHECK: CTU loaded AST file: ctu-inherited-default-ctor-other.cpp.ast |
| 21 |
|
| 22 |
namespace clang {} |
| 23 |
namespace llvm {} |
| 24 |
namespace clang { |
| 25 |
class DeclContextLookupResult { |
| 26 |
static int *const SingleElementDummyList; |
| 27 |
}; |
| 28 |
} // namespace clang |