[clang] [clang][modules] Move `SLocEntry` search into `ASTReader` (PR #66966)

Jan Svoboda via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 25 13:41:15 PDT 2023


================
@@ -50,6 +50,7 @@ int y = a2<int>;
 // CHECK: In module 'a':
 // CHECK-NEXT: a.h:1:45: error:
 
+int z = b<int>;
 // MISSING-B: could not find file '{{.*}}b.h'
 // MISSING-B-NOT: please delete the module cache
----------------
jansvoboda11 wrote:

This test relied on the fact that when diagnosing line 49, the `SLocEntry` for "b.h" got deserialized as a side-effect of the binary search for "a.h", thus generating the `MISSING-B` error message. Since we no longer fully deserialize the "b.h" `SLocEntry` during the binary search for "a.h", let's force its full deserialization by triggering new diagnostics pointing directly into "b.h".

https://github.com/llvm/llvm-project/pull/66966


More information about the cfe-commits mailing list