[clang] [clang][modules] Avoid modules diagnostics for `__has_include()` (PR #71450)

2023-11-06 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/71450 After #70144 Clang started resolving module maps even for `__has_include()` expressions. The unintended consequence of this is that diagnostics related to module mis-use started trigerring. These diagnostic

[clang] [clang][modules] Avoid modules diagnostics for `__has_include()` (PR #71450)

2023-11-06 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/71450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4f31d32 - [clang] Improve `SourceManager::PrintStats()`

2023-11-06 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2023-11-06T14:45:04-08:00 New Revision: 4f31d328aa165e559c9f374dc3201657921f150d URL: https://github.com/llvm/llvm-project/commit/4f31d328aa165e559c9f374dc3201657921f150d DIFF: https://github.com/llvm/llvm-project/commit/4f31d328aa165e559c9f374dc3201657921f150d.diff L

[clang] 8c09916 - [clang] Fix test after 4f31d32

2023-11-06 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2023-11-06T14:56:25-08:00 New Revision: 8c099168509da532c26ba843eed612dc53b27afc URL: https://github.com/llvm/llvm-project/commit/8c099168509da532c26ba843eed612dc53b27afc DIFF: https://github.com/llvm/llvm-project/commit/8c099168509da532c26ba843eed612dc53b27afc.diff L

[clang] [clang][modules] Avoid modules diagnostics for `__has_include()` (PR #71450)

2023-11-06 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/71450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DependencyScanner] Remove all warning flags when suppressing warnings (PR #71612)

2023-11-07 Thread Jan Svoboda via cfe-commits
@@ -52,6 +52,28 @@ static void optimizeHeaderSearchOpts(HeaderSearchOptions &Opts, Opts.UserEntries.push_back(Entries[Idx]); } +static void optimizeDiagnosticOpts(DiagnosticOptions &Opts, + bool IsSystemModule) { + // If this is not a sy

[clang] [clang][DependencyScanner] Remove all warning flags when suppressing warnings (PR #71612)

2023-11-07 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,84 @@ +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: sed -e "s|DIR|%/t|g" %t/build/compile-commands.json.in > %t/build/compile-commands.json +// RUN: clang-scan-deps -compilation-database %t/build/compile-commands.json \ +// RUN: -j 1 -format experimental-full

[clang] [clang][DependencyScanner] Remove all warning flags when suppressing warnings (PR #71612)

2023-11-07 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,84 @@ +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: sed -e "s|DIR|%/t|g" %t/build/compile-commands.json.in > %t/build/compile-commands.json +// RUN: clang-scan-deps -compilation-database %t/build/compile-commands.json \ +// RUN: -j 1 -format experimental-full

[clang] [clang][DependencyScanner] Remove all warning flags when suppressing warnings (PR #71612)

2023-11-07 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,84 @@ +// RUN: rm -rf %t jansvoboda11 wrote: Could you add a short summary of what this test is for? https://github.com/llvm/llvm-project/pull/71612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang][deps] Skip writing `DIAG_PRAGMA_MAPPINGS` record (PR #70874)

2023-11-09 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/70874 >From 450c5adeb3ddc5bf7e01fcbe379c37b08d4de9d1 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Tue, 31 Oct 2023 16:35:38 -0700 Subject: [PATCH] [clang][deps] Skip writing `DIAG_PRAGMA_MAPPINGS` record ---

[clang] [clang][deps] Skip writing `DIAG_PRAGMA_MAPPINGS` record (PR #70874)

2023-11-09 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 ready_for_review https://github.com/llvm/llvm-project/pull/70874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Skip writing `DIAG_PRAGMA_MAPPINGS` record (PR #70874)

2023-11-09 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/70874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DependencyScanner] Remove all warning flags when suppressing warnings (PR #71612)

2023-11-09 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/71612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Skip writing `DIAG_PRAGMA_MAPPINGS` record (PR #70874)

2023-11-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/70874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] NFC: Deprecate `FileEntry::getName()` (PR #68157)

2023-12-04 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/68157 >From e3a96bef47d029e1109dcad51840bab672c7351c Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Tue, 3 Oct 2023 13:40:07 -0700 Subject: [PATCH 1/2] [clang] NFC: Deprecate `FileEntry::getName()` --- clang/i

[clang] [clang][modules] Reset codegen options. (PR #74006)

2023-12-04 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM, nice! https://github.com/llvm/llvm-project/pull/74006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang] NFC: Deprecate `FileEntry::getName()` (PR #68157)

2023-12-04 Thread Jan Svoboda via cfe-commits
@@ -284,7 +284,6 @@ TEST_F(FileManagerTest, getFileRefReturnsCorrectNameForDifferentStatPath) { ASSERT_FALSE(!F1Alias); ASSERT_FALSE(!F1Alias2); EXPECT_EQ("dir/f1.cpp", F1->getName()); - EXPECT_EQ("dir/f1.cpp", F1->getFileEntry().getName()); jansvoboda1

[clang-tools-extra] [clang] [clang][tidy] Ensure rewriter has the correct CWD (PR #67839)

2023-12-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/67839 >From 9c798ed914b0008d98587c94f8ee3bb914412215 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 8 Sep 2023 16:39:10 -0700 Subject: [PATCH 1/2] [clang][tidy] Ensure rewriter has the correct CWD This rev

[clang] [clang-tools-extra] [clang][tidy] Ensure rewriter has the correct CWD (PR #67839)

2023-12-05 Thread Jan Svoboda via cfe-commits
@@ -227,6 +227,14 @@ class ErrorReporter { llvm::errs() << "Can't apply replacements for file " << File << "\n"; } } + + auto BuildDir = Context.getCurrentBuildDirectory(); jansvoboda11 wrote: You're right, the `clang-tidy/infrastr

[clang-tools-extra] [clang] [clang][tidy] Ensure rewriter has the correct CWD (PR #67839)

2023-12-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/67839 >From 9c798ed914b0008d98587c94f8ee3bb914412215 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 8 Sep 2023 16:39:10 -0700 Subject: [PATCH 1/3] [clang][tidy] Ensure rewriter has the correct CWD This rev

[llvm] [clang] [clang] NFC: Deprecate `FileEntry::getName()` (PR #68157)

2023-12-05 Thread Jan Svoboda via cfe-commits
@@ -157,6 +157,25 @@ #define LLVM_DEPRECATED(MSG, FIX) [[deprecated(MSG)]] #endif +// clang-format off +#if defined(__clang__) || defined(__GNUC__) +#define LLVM_IGNORE_DEPRECATIONS_OF_DECLARATIONS_BEGIN \ jansvoboda11 wrote: Maybe we

[clang-tools-extra] [clang] [clang][tidy] Ensure rewriter has the correct CWD (PR #67839)

2023-12-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/67839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][tidy] Ensure rewriter has the correct CWD (PR #67839)

2023-12-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/67839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] bb0f162 - [clang][tidy] Fix build failure after 07157db

2023-12-05 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2023-12-05T15:52:57-08:00 New Revision: bb0f162b3acfab3146807ab1e01946596d9921f9 URL: https://github.com/llvm/llvm-project/commit/bb0f162b3acfab3146807ab1e01946596d9921f9 DIFF: https://github.com/llvm/llvm-project/commit/bb0f162b3acfab3146807ab1e01946596d9921f9.diff L

[clang] [llvm] [clang] NFC: Deprecate `FileEntry::getName()` (PR #68157)

2023-12-06 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/68157 >From d015b32b5a48c84a94b6a34138f809caf94ed456 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Tue, 3 Oct 2023 13:40:07 -0700 Subject: [PATCH 1/3] [clang] NFC: Deprecate `FileEntry::getName()` --- clang/i

[llvm] [clang] [clang] NFC: Deprecate `FileEntry::getName()` (PR #68157)

2023-12-06 Thread Jan Svoboda via cfe-commits
@@ -157,6 +157,25 @@ #define LLVM_DEPRECATED(MSG, FIX) [[deprecated(MSG)]] #endif +// clang-format off +#if defined(__clang__) || defined(__GNUC__) +#define LLVM_IGNORE_DEPRECATIONS_OF_DECLARATIONS_BEGIN \ jansvoboda11 wrote: OK, I us

[llvm] [clang] [clang] NFC: Deprecate `FileEntry::getName()` (PR #68157)

2023-12-06 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/68157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f1c08ee - [clang] NFCI: Use `FileEntryRef::getName()` in clangIndexSerialization

2023-12-06 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2023-12-06T11:34:46-08:00 New Revision: f1c08eebb3bb5eb6e984bcca511381a9748c6705 URL: https://github.com/llvm/llvm-project/commit/f1c08eebb3bb5eb6e984bcca511381a9748c6705 DIFF: https://github.com/llvm/llvm-project/commit/f1c08eebb3bb5eb6e984bcca511381a9748c6705.diff L

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/74782 The existing code incorrectly assumes that `Path` can be empty. It can't, it always contains at least `<` or `"`. On Unix, this patch fixes an incorrect diagnostics that instead of `"/Users/blah"` suggested

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/74782 >From 6ab18edae7b86ca216848b7fcaff5e58fb3e186c Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 7 Dec 2023 15:15:16 -0800 Subject: [PATCH] [clang][lex] Fix non-portability diagnostics with absolute pat

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/74782 >From 6ab18edae7b86ca216848b7fcaff5e58fb3e186c Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 7 Dec 2023 15:15:16 -0800 Subject: [PATCH 1/2] [clang][lex] Fix non-portability diagnostics with absolute

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/74782 >From 6ab18edae7b86ca216848b7fcaff5e58fb3e186c Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 7 Dec 2023 15:15:16 -0800 Subject: [PATCH 1/3] [clang][lex] Fix non-portability diagnostics with absolute

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-08 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/74782 >From 6ab18edae7b86ca216848b7fcaff5e58fb3e186c Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 7 Dec 2023 15:15:16 -0800 Subject: [PATCH 1/4] [clang][lex] Fix non-portability diagnostics with absolute

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-08 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: My first version of the test put backslashes into the source file (i.e. `#include "C:\foo\bar"`) which doesn't really work, because Clang treats those as string escape sequences. Instead of trying to replace `\` with `\\` in the test, I chose to use forward slashes, which s

[clang] [clang] NFCI: Make `ModuleFile::File` non-optional (PR #74892)

2023-12-08 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/74892 AFAICT, `ModuleFile::File` can be `std::nullopt` only for PCM files loaded from the standard input. This patch starts setting that variable to `FileManager::getSTDIN()` in that case, which makes it possible

[clang] [clang] NFCI: Make `ModuleFile::File` non-optional (PR #74892)

2023-12-08 Thread Jan Svoboda via cfe-commits
@@ -441,22 +434,19 @@ void ModuleManager::visit(llvm::function_ref Visitor, bool ModuleManager::lookupModuleFile(StringRef FileName, off_t ExpectedSize, time_t ExpectedModTime, OptionalFileEntryRef &File

[clang] [clang] NFCI: Make `ModuleFile::File` non-optional (PR #74892)

2023-12-08 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/74892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] NFCI: Make `ModuleFile::File` non-optional (PR #74892)

2023-12-08 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/74892 >From fb5c8c9fe856aaa2a314effa26486d5fbf019140 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 7 Dec 2023 14:04:35 -0800 Subject: [PATCH 1/2] [clang] NFCI: Make `ModuleFile::File` non-optional --- ..

[clang] [clang] NFCI: Make `ModuleFile::File` non-optional (PR #74892)

2023-12-08 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/74892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] NFC: Remove `OptionalFileEntryRefDegradesToFileEntryPtr` (PR #74899)

2023-12-08 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/74899 None >From de1d9c6808271ea802813daa71e6d94bce8a9894 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 7 Dec 2023 11:38:49 -0800 Subject: [PATCH] [clang] NFC: Remove `OptionalFileEntryRefDegradesToFileE

[clang] [clang-tools-extra] [clang] NFC: Remove `OptionalDirectoryEntryRefDegradesToDirectoryEntryPtr` (PR #74900)

2023-12-08 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/74900 None >From 999dcc9b5237af4cca7460042edb709af6ccdf05 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 7 Dec 2023 14:22:04 -0800 Subject: [PATCH] [clang] NFC: Remove 'OptionalDirectoryEntryRefDegradesTo

[clang] [clang-tools-extra] [clang] NFC: Remove `OptionalFileEntryRefDegradesToFileEntryPtr` (PR #74899)

2023-12-08 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/74899 >From de1d9c6808271ea802813daa71e6d94bce8a9894 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 7 Dec 2023 11:38:49 -0800 Subject: [PATCH 1/2] [clang] NFC: Remove `OptionalFileEntryRefDegradesToFileEnt

[clang-tools-extra] [clang] [clang] NFC: Remove `OptionalFileEntryRefDegradesToFileEntryPtr` (PR #74899)

2023-12-08 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/74899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [clang] NFC: Remove `OptionalDirectoryEntryRefDegradesToDirectoryEntryPtr` (PR #74900)

2023-12-08 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/74900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] NFC: Remove `{File, Directory}Entry::getName()` (PR #74910)

2023-12-08 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/74910 None >From f1a4ff8dc30b755e95fcd4871eb59b0d49f86c7b Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 7 Dec 2023 09:29:14 -0800 Subject: [PATCH] [clang] NFC: Remove `{File,Directory}Entry::getName()` -

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-11 Thread Jan Svoboda via cfe-commits
@@ -2466,15 +2466,21 @@ Preprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport( // The drive letter is optional for absolute paths on Windows, but // clang currently cannot process absolute paths in #include lines that // don't have a driv

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-11 Thread Jan Svoboda via cfe-commits
@@ -2466,15 +2466,21 @@ Preprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport( // The drive letter is optional for absolute paths on Windows, but // clang currently cannot process absolute paths in #include lines that // don't have a driv

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/74782 >From 6ab18edae7b86ca216848b7fcaff5e58fb3e186c Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 7 Dec 2023 15:15:16 -0800 Subject: [PATCH 1/5] [clang][lex] Fix non-portability diagnostics with absolute

[llvm] [clang] [clang] NFC: Remove `{File, Directory}Entry::getName()` (PR #74910)

2023-12-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/74910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] NFC: Remove `{File, Directory}Entry::getName()` (PR #74910)

2023-12-11 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Note: I'd like to merge this PR after we branch off for Clang 18 in January or February 2024. I had the patch lying around, so I figured I might as well create the PR. https://github.com/llvm/llvm-project/pull/74910 ___ cfe-commit

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/74782 >From 6ab18edae7b86ca216848b7fcaff5e58fb3e186c Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 7 Dec 2023 15:15:16 -0800 Subject: [PATCH 1/6] [clang][lex] Fix non-portability diagnostics with absolute

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-11 Thread Jan Svoboda via cfe-commits
@@ -2466,15 +2466,21 @@ Preprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport( // The drive letter is optional for absolute paths on Windows, but // clang currently cannot process absolute paths in #include lines that // don't have a driv

[clang] [ClangModule] Fix decl-params-determinisim test after serialization change (PR #72572)

2023-11-16 Thread Jan Svoboda via cfe-commits
@@ -23,27 +23,28 @@ jansvoboda11 wrote: Should `op13` in the comment be updated? https://github.com/llvm/llvm-project/pull/72572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [ClangModule] Fix decl-params-determinisim test after serialization change (PR #72572)

2023-11-16 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM with little nit. https://github.com/llvm/llvm-project/pull/72572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Don't prevent translation of FW_Private includes when explicitly building FW (PR #70714)

2023-10-30 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/70714 We prevent translating `#include ` into an import of FW_Private when compiling the implementation of FW or FW_Private. This is specified via `-fmodule-name=` on the TU command line (used to be `-fmodule-im

[clang] [clang][deps] Skip slow `UNHASHED_CONTROL_BLOCK` records (PR #69975)

2023-10-30 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/69975 >From 0270c76e779457486ee89f100db2b7151832c290 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Tue, 10 Oct 2023 14:16:13 -0700 Subject: [PATCH 1/5] [clang][modules] Make `DIAGNOSTIC_OPTIONS` skippable ---

[clang] [clang][deps] Skip slow `UNHASHED_CONTROL_BLOCK` records (PR #69975)

2023-10-31 Thread Jan Svoboda via cfe-commits
@@ -1212,52 +1212,54 @@ void ASTWriter::writeUnhashedControlBlock(Preprocessor &PP, Record.clear(); } + const auto &HSOpts = PP.getHeaderSearchInfo().getHeaderSearchOpts(); + // Diagnostic options. const auto &Diags = Context.getDiagnostics(); const Diagnostic

[clang] [clang][deps] Skip writing `DIAG_PRAGMA_MAPPINGS` record (PR #70874)

2023-10-31 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/70874 None >From c3602bceb01aa93f801670a31bb43903d6a10d9c Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Tue, 31 Oct 2023 16:35:38 -0700 Subject: [PATCH] [clang][deps] Skip writing `DIAG_PRAGMA_MAPPINGS` record

[clang] [clang][modules] Don't prevent translation of FW_Private includes when explicitly building FW (PR #70714)

2023-11-01 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/70714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Track included files per submodule (PR #71117)

2023-11-02 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/71117 None >From 9debc58d5135fbde51967dfb076d0ec5d954df38 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 2 Nov 2023 14:35:30 -0700 Subject: [PATCH] [clang][modules] Track included files per submodule ---

[clang] [clang][deps] Skip slow `UNHASHED_CONTROL_BLOCK` records (PR #69975)

2023-11-02 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/69975 >From 5dd9d64726dba95f71dfb276dd1be4d386313a99 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Tue, 10 Oct 2023 14:16:13 -0700 Subject: [PATCH 1/6] [clang][modules] Make `DIAGNOSTIC_OPTIONS` skippable ---

[clang] [clang][deps] Skip slow `UNHASHED_CONTROL_BLOCK` records (PR #69975)

2023-11-02 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/69975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Strip LLVM options (PR #75405)

2023-12-13 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: sed -e "s|DIR|%/t|g" %t/cdb1.json.template > %t/cdb1.json + +// RUN: clang-scan-deps -compilation-database %t/cdb1.json -format experimental-full > %t/result1.txt +// RUN: FileCheck %s -input-file %t/result1.t

[clang] [clang][modules] Strip LLVM options (PR #75405)

2023-12-13 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: sed -e "s|DIR|%/t|g" %t/cdb1.json.template > %t/cdb1.json + +// RUN: clang-scan-deps -compilation-database %t/cdb1.json -format experimental-full > %t/result1.txt +// RUN: FileCheck %s -input-file %t/result1.t

[clang] [clang][modules] Strip LLVM options (PR #75405)

2023-12-13 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/75405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2023-12-14 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > This seems like something that shouldn't be in the compiler binary itself. > There should be a separate binary for this type of thing. Discussed here: https://discourse.llvm.org/t/rfc-modules-build-daemon-build-system-agnostic-support-for-explicitly-built-modules/71524 h

[clang] [llvm] [clang-tools-extra] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

2023-12-15 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: The new tests started failing on Apple build bot: https://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/38908/ Can you please fix these or revert the commit? https://github.com/llvm/llvm-project/pull/65815 ___ cfe-

[clang] [llvm] [clang-tools-extra] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

2023-12-15 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > Thanks for letting me know, I'm preparing a fix. By the way, is there a way > to run a buildbot manually? Thanks! Not that I know of. https://github.com/llvm/llvm-project/pull/65815 ___ cfe-commits mailing list cfe-commits@lists

[clang] [llvm] [lldb] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/75530 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 requested changes to this pull request. This looks pretty nice, I left just a couple of notes. You might want to take a look at the CI failures. https://github.com/llvm/llvm-project/pull/75530 ___ cfe-commits mailing li

[clang] [llvm] [lldb] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via cfe-commits
@@ -11,46 +11,13 @@ namespace clang { -CodeGenOptions::CodeGenOptions() { -#define CODEGENOPT(Name, Bits, Default) Name = Default; -#define ENUM_CODEGENOPT(Name, Type, Bits, Default) set##Name(Default); -#include "clang/Basic/CodeGenOptions.def" +CodeGenOptions::CodeGenOption

[lldb] [clang] [llvm] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via cfe-commits
@@ -11,6 +11,7 @@ #include "clang/APINotes/APINotesOptions.h" #include "clang/Basic/CodeGenOptions.h" +#include "clang/Basic/DebugOptions.h" jansvoboda11 wrote: Wouldn't a forward declaration be enough in this case? https://github.com/llvm/llvm-project/pull/

[llvm] [lldb] [clang] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via cfe-commits
@@ -224,19 +233,20 @@ class CompilerInvocation : public CompilerInvocationBase { /// @{ // Note: These need to be pulled in manually. Otherwise, they get hidden by // the mutable getters with the same names. - using CompilerInvocationBase::getLangOpts; - using CompilerI

[lldb] [clang] [llvm] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via cfe-commits
@@ -1722,6 +1738,11 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, #include "clang/Driver/Options.inc" #undef CODEGEN_OPTION_WITH_MARSHALLING +#define DEBUG_OPTION_WITH_MARSHALLING(...) \

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-15 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Ping. https://github.com/llvm/llvm-project/pull/74782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Make sure ninja can clean "ClangdXPC.framework" (PR #75669)

2023-12-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/75669 After building the ClangdXPC target, `ninja clean` fails with the following error: ``` ninja: error: remove(lib/ClangdXPC.framework): Directory not empty ninja: error: remove(/lib/ClangdXPC.framework): Dire

[llvm] [clang] [PGO][nfc] Add `-fdiagnostics-show-profile-count` option to show real loop count from instr-profile (PR #75021)

2023-12-18 Thread Jan Svoboda via cfe-commits
@@ -2091,6 +2091,12 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, bool UsingProfile = UsingSampleProfile || !Opts.ProfileInstrumentUsePath.empty(); + if (Args.hasArg(options::OPT_fdiagnostics_show_profile_count) &&

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-18 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/74782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang][DependencyScanner] Remove unused -ivfsoverlay files (PR #73734)

2023-11-29 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: We set `RedirectingFileSystem::HasBeenUsed` to `true` while implicitly compiling one module, but then hand off the same VFS object to implicit compile of another module. This will cause all modules discovered later to incorrectly inherit that bit from previous modules. This

[llvm] [clang] [clang][DependencyScanner] Remove unused -ivfsoverlay files (PR #73734)

2023-11-29 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: I'm not thrilled by the chosen implementation strategy. Disabling tracking during parts of header search does not sound obviously correct to me. Module map search can have subtle side-effects, and I wouldn't be suprised if this feature was affected by one. That said, I have

[clang] [clang][modules] Reset codegen options. (PR #74006)

2023-12-01 Thread Jan Svoboda via cfe-commits
@@ -4770,9 +4770,20 @@ std::string CompilerInvocation::getModuleHash() const { // When compiling with -gmodules, also hash -fdebug-prefix-map as it // affects the debug info in the PCM. - if (getCodeGenOpts().DebugTypeExtRefs) + if (getHeaderSearchOpts().ModuleFormat ==

[clang] [clang][modules] Reset codegen options. (PR #74006)

2023-12-01 Thread Jan Svoboda via cfe-commits
@@ -515,6 +430,8 @@ ENUM_CODEGENOPT(ZeroCallUsedRegs, llvm::ZeroCallUsedRegs::ZeroCallUsedRegsKind, /// non-deleting destructors. (No effect on Microsoft ABI.) CODEGENOPT(CtorDtorReturnThis, 1, 0) +#include "DebugOptions.def" jansvoboda11 wrote: Do you think

[clang] [clang][modules] Reset codegen options. (PR #74006)

2023-12-01 Thread Jan Svoboda via cfe-commits
@@ -515,6 +430,8 @@ ENUM_CODEGENOPT(ZeroCallUsedRegs, llvm::ZeroCallUsedRegs::ZeroCallUsedRegsKind, /// non-deleting destructors. (No effect on Microsoft ABI.) CODEGENOPT(CtorDtorReturnThis, 1, 0) +#include "DebugOptions.def" jansvoboda11 wrote: Got it. In t

[clang] [clang][modules] Reset codegen options. (PR #74006)

2023-12-01 Thread Jan Svoboda via cfe-commits
@@ -4770,9 +4770,20 @@ std::string CompilerInvocation::getModuleHash() const { // When compiling with -gmodules, also hash -fdebug-prefix-map as it // affects the debug info in the PCM. - if (getCodeGenOpts().DebugTypeExtRefs) + if (getHeaderSearchOpts().ModuleFormat ==

[clang-tools-extra] [clang] [clang][tidy] Ensure rewriter has the correct CWD (PR #67839)

2023-12-04 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Ping @PiotrZSL. https://github.com/llvm/llvm-project/pull/67839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Use the exports file on all Unix systems (PR #76742)

2024-01-02 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/76742 None >From 9e6eb5fbf9e1b540c976d7102dd090622734fd40 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Tue, 2 Jan 2024 10:44:45 -0800 Subject: [PATCH] [libclang] Use the exports file on all Unix systems ---

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2024-01-02 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Thanks for reporting @jrmwng, I'll look into it. https://github.com/llvm/llvm-project/pull/74782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2024-01-03 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > Thanks for reporting @jrmwng, I'll look into it. I wasn't able to reproduce locally on Windows 10. Can you please share detailed reproduction steps and any other config that may be relevant? It seems your realpath to the LLVM repo is `"C:\GitHub\llvm-project"` and the `ch

[clang] [clang] Fix test for case-insensitive absolute includes (PR #76985)

2024-01-04 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/76985 When the test was ran via a symlink path, the diagnostic did not fire, since the `%t` path in the include directive would differ in more than just a case from the real path of the header file. >From c8ebe8

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2024-01-04 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Thank you. I think the symlink is most likely the culprit. I'll be able to confirm on my Windows machine tomorrow. For now, I have a speculative fix: https://github.com/llvm/llvm-project/pull/76985 https://github.com/llvm/llvm-project/pull/74782

[llvm] [clang] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-01-04 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,60 @@ +//=== SocketMsgSupport.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[llvm] [clang] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-01-04 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,48 @@ +//===-- Utils.h ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[llvm] [clang] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-01-04 Thread Jan Svoboda via cfe-commits
@@ -383,6 +383,9 @@ class FrontendOptions { LLVM_PREFERRED_TYPE(bool) unsigned ModulesShareFileManager : 1; + /// Connect to module build daemon + unsigned ModuleBuildDaemon : 1; jansvoboda11 wrote: Mark this with `LLVM_PREFERRED_TYPE(bool)`, like the o

[llvm] [clang] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-01-04 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,48 @@ +//===-- Utils.h ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [libclang] Use the exports file on all Unix systems (PR #76742)

2024-01-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/76742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix test for case-insensitive absolute includes (PR #76985)

2024-01-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/76985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix test for case-insensitive absolute includes (PR #76985)

2024-01-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 ready_for_review https://github.com/llvm/llvm-project/pull/76985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix test for case-insensitive absolute includes (PR #76985)

2024-01-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/76985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2024-01-05 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: @jrmwng PR #76985 (landed in 853b133) seems to have resolved this issue for me. Can you confirm that on your end? https://github.com/llvm/llvm-project/pull/74782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [clang][modules] Remove `_Private` suffix from framework auto-link hints. (PR #77120)

2024-01-08 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,25 @@ +// Test that autolink hints for frameworks don't use the private module name. jansvoboda11 wrote: Why is this desired? What happens if the private module name is provided? https://github.com/llvm/llvm-project/pull/77120

  1   2   3   4   5   6   7   8   9   10   >