[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-30 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/106241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-30 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/106241 From c8c29eae625991ee1ea7dfbfcda4a31f0b19b2e3 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 27 Aug 2024 17:56:47 +0200 Subject: [PATCH] [clang] Cleanup IncludeLocMap CompilerInstance can re-use sam

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-30 Thread Ilya Biryukov via cfe-commits
@@ -453,6 +454,61 @@ TEST_F(SourceManagerTest, loadedSLocEntryIsInTheSameTranslationUnit) { #if defined(LLVM_ON_UNIX) +TEST_F(SourceManagerTest, ResetsIncludeLocMap) { ilya-biryukov wrote: Suggestion: add a comment explaining what this aims to test at a mor

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-30 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov approved this pull request. LGMT with a small suggestion. Thanks for getting the test in! https://github.com/llvm/llvm-project/pull/106241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-30 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/106241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-29 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff fdca2c33a1f33f4886d969ea0f0219764c7b6b59 f8fb04379255a783f1fbdcd07cfff5846d253d32 --e

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-29 Thread kadir çetinkaya via cfe-commits
@@ -350,6 +350,7 @@ void SourceManager::clearIDTables() { LastLineNoContentCache = nullptr; LastFileIDLookup = FileID(); + IncludedLocMap.clear(); kadircet wrote: done https://github.com/llvm/llvm-project/pull/106241

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-29 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/106241 From f8fb04379255a783f1fbdcd07cfff5846d253d32 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 27 Aug 2024 17:56:47 +0200 Subject: [PATCH] [clang] Cleanup IncludeLocMap CompilerInstance can re-use sam

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-28 Thread Ilya Biryukov via cfe-commits
@@ -350,6 +350,7 @@ void SourceManager::clearIDTables() { LastLineNoContentCache = nullptr; LastFileIDLookup = FileID(); + IncludedLocMap.clear(); ilya-biryukov wrote: Is there a way to write a unit test checking this behavior? SourceManager should be r

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-28 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov requested changes to this pull request. This looks good, but I wanted to explore if we could write a unit test for this... https://github.com/llvm/llvm-project/pull/106241 ___ cfe-commits mailing list cfe-commits@lists

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-28 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/106241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: kadir çetinkaya (kadircet) Changes CompilerInstance can re-use same SourceManager across multiple frontendactions. During this process it calls `SourceManager::clearIDTables` to reset any caches based on FileIDs. It didn't reset IncludeLoc

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/106241 CompilerInstance can re-use same SourceManager across multiple frontendactions. During this process it calls `SourceManager::clearIDTables` to reset any caches based on FileIDs. It didn't reset IncludeLocMap, r