alexfh added a comment.

Thanks for adding this diagnostic! I wonder whether we can include SLoc usage 
information into `-print-stats` output?



================
Comment at: clang/lib/Basic/SourceManager.cpp:2251
+  uint64_t CountedSize = 0;
+  for (int IDIndex = -(int)LoadedSLocEntryTable.size() - 1;
+       IDIndex < (int)LocalSLocEntryTable.size(); ++IDIndex) {
----------------
Could you add a comment about the meaning of negative IDIndex values?


================
Comment at: clang/test/Lexer/SourceLocationsOverflow.c:7
+// CHECK-NEXT: note: 214{{.......}}B in local locations, 0B in locations 
loaded from AST files, for a total of 214{{.......}}B (99% of available space)
+// CHECK-NEXT: 
/usr/local/google/home/richardsmith/llvm-mono-1/src/clang/test/Lexer/Inputs/inc2.h:1:1:
 note: file entered 214{{..}} times using 214{{.......}}B of space
+// CHECK-NEXT: 
/*.................................................................................................
----------------
You probably didn't mean to match local paths on your machine. Same below.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137751/new/

https://reviews.llvm.org/D137751

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D137751: ... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D137... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D137... Alexander Kornienko via Phabricator via cfe-commits
    • [PATCH] D137... Aaron Ballman via Phabricator via cfe-commits
    • [PATCH] D137... Shafik Yaghmour via Phabricator via cfe-commits
    • [PATCH] D137... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D137... Aaron Ballman via Phabricator via cfe-commits
    • [PATCH] D137... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D137... Richard Smith - zygoloid via Phabricator via cfe-commits

Reply via email to