1 // RUN: rm -rf %t && mkdir %t 2 // RUN: mkdir -p %t/ctudir 3 // RUN: %clang_cc1 -std=c++14 -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.externalDefMap.ast-dump.txt %t/ctudir/externalDefMap.txt 6 // RUN: %clang_analyze_cc1 -std=c++14 -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 16 int f(int); 17 main()18int main() { 19 return f(5); 20 } 21