brintos

brintos / llvm-project-archived public Read only

0
0
Text · 882 B · 68c7b0d Raw
21 lines · cpp
1// RUN: rm -rf %t && mkdir %t2// RUN: mkdir -p %t/ctudir3// 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.cpp5// RUN: cp %S/Inputs/ctu-other.cpp.externalDefMap.ast-dump.txt %t/ctudir/externalDefMap.txt6// 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 %s12 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}21