[clang] [clang][analyzer] Forward CTU-import failure conditions (PR #189064)
Balázs Kéri via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 31 07:32:11 PDT 2026
================
@@ -649,13 +734,23 @@ CrossTranslationUnitContext::ASTLoader::loadFromSource(
}
llvm::Expected<InvocationListTy>
-parseInvocationList(StringRef FileContent, llvm::sys::path::Style PathStyle) {
+parseInvocationList(StringRef FileContent, llvm::sys::path::Style PathStyle,
+ StringRef FilePath) {
InvocationListTy InvocationList;
/// LLVM YAML parser is used to extract information from invocation list file.
llvm::SourceMgr SM;
llvm::yaml::Stream InvocationFile(FileContent, SM);
+ auto getLine = [&SM](const llvm::yaml::Node *N) -> int {
+ return N ? SM.FindLineNumber(N->getSourceRange().Start) : 0;
+ };
+ auto wrongFormat = [&](const llvm::yaml::Node *N) {
----------------
balazske wrote:
```suggestion
auto WrongFormatError = [&](const llvm::yaml::Node *N) {
```
https://github.com/llvm/llvm-project/pull/189064
More information about the cfe-commits
mailing list