blob: 314bada0c20dd7f206bbcfa0305b747692ec002d [file] [log] [blame]
Gabor Marton32aff2e2018-12-07 16:32:43 +00001// RUN: rm -rf %t && mkdir %t
2// RUN: mkdir -p %t/ctudir
3// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu \
4// RUN: -emit-pch -o %t/ctudir/ctu-other.cpp.ast %S/Inputs/ctu-other.cpp
5// RUN: cp %S/Inputs/ctu-other.cpp.externalFnMap.txt %t/ctudir/externalFnMap.txt
6// RUN: %clang_analyze_cc1 -triple powerpc64-montavista-linux-gnu \
7// RUN: -analyzer-checker=core,debug.ExprInspection \
8// RUN: -analyzer-config experimental-enable-naive-ctu-analysis=true \
9// RUN: -analyzer-config ctu-dir=%t/ctudir \
10// RUN: -Werror=ctu \
11// RUN: -verify %s
12
13// We expect an error in this file, but without a location.
14// expected-error-re@./ctu-different-triples.cpp:*{{imported AST from {{.*}} had been generated for a different target, current: powerpc64-montavista-linux-gnu, imported: x86_64-pc-linux-gnu}}
15
16int f(int);
17
18int main() {
19 return f(5);
20}