================
@@ -0,0 +1,42 @@
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+// RUN: split-file %s %t
+
+// Step 1: Build PCH and defmap.
+// RUN: %clang_cc1 -x c -emit-pch -fvalidate-ast-input-files-content -o 
%t/other.c.ast %t/other.c
+// RUN: %clang_extdef_map %t/other.c -- -c -x c > %t/externalDefMap.tmp.txt
+// RUN: sed -e 's| .*other\.c| other.c.ast|' %t/externalDefMap.tmp.txt > 
%t/externalDefMap.txt
+
+// Step 2: Run CTU using the PCH - the division by zero is found via inlining.
+// RUN: %clang_analyze_cc1 \
+// RUN:   -fvalidate-ast-input-files-content \
+// RUN:   -analyzer-checker=core \
+// RUN:   -analyzer-config experimental-enable-naive-ctu-analysis=true \
+// RUN:   -analyzer-config ctu-dir=%t \
+// RUN:   -verify %t/main.c
----------------
necto wrote:

Thanks for the idea.
I tried it and I did not like: it makes it harder to tell what is going on 
because of the indirection. My pattern matching on run lines fails and I have 
to engage deeper thinking.
Moreover, I decided to add a negative test case with slight difference:

191bb9fd03c3 Add a negative test case

here the third run is not the same as the first two.

Do you think it would look better with a `DEFINE` now?

https://github.com/llvm/llvm-project/pull/196298
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to