================ @@ -0,0 +1,43 @@ +// 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 + +// Step 3: Set mtime of the source from which PCH was built to the year 3000 (way in the future). +// RUN: touch -t 300001010000 %t/other.c + +// Step 4: Run CTU using the "stale" PCH +// Step 4: Run CTU using the "stale" PCH, and it should still load it and find the division by zero bug. ---------------- steakhal wrote:
This is probably coming from a merge-conflict resolution. Let's keep the longer one. ```suggestion // Step 4: Run CTU using the "stale" PCH, and it should still load it and find the division by zero bug. ``` https://github.com/llvm/llvm-project/pull/196298 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
