// RUN: rm -rf %t // RUN: mkdir -p %t/ctudir // RUN: split-file %s %t // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -std=c++20 \ // RUN: -emit-pch -o %t/ctudir/import.cpp.ast %t/import.cpp // RUN: %clang_analyze_cc1 -triple x86_64-pc-linux-gnu -std=c++20 \ // RUN: -analyzer-checker=core \ // RUN: -analyzer-config experimental-enable-naive-ctu-analysis=true \ // RUN: -analyzer-config ctu-dir=%t/ctudir \ // RUN: -verify %t/main.cpp //--- main.cpp // expected-no-diagnostics template concept Sizable = requires(T t) { t.size(); }; template concept Container = Sizable && requires(T t) { t.begin(); }; template struct BoolConstant {}; using FalseCheck = BoolConstant>; void importee(); void caller() { importee(); } // no-crash //--- import.cpp // Check that importing this code does not cause crash. template concept Sizable = requires(T t) { t.size(); }; template concept Container = Sizable && requires(T t) { t.begin(); }; template struct BoolConstant {}; using FalseCheck = BoolConstant>; void importee() { FalseCheck f{}; (void)f; } //--- ctudir/externalDefMap.txt 14:c:@F@importee# import.cpp.ast