[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-01 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,92 @@ + +Warning suppression mappings + + +.. contents:: + :local: + +Introduction + + +Warning suppression mappings enables users to suppress clang's diagnostics in a +per-file granular manner. Enabl

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-01 Thread kadir çetinkaya via cfe-commits
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +class WarningsSpecialCaseList : public llvm::SpecialCaseList { +public: + static std::unique_ptr + create(const llvm::MemoryBuffer &MB, st

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-01 Thread kadir çetinkaya via cfe-commits
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +class WarningsSpecialCaseList : public llvm::SpecialCaseList { kadircet wrote: because we don't have any visibility restri

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-01 Thread kadir çetinkaya via cfe-commits
@@ -1315,6 +1319,29 @@ with its corresponding `Wno-` option. Note that when combined with :option:`-w` (which disables all warnings), disabling all warnings wins. +.. _warning_suppression_mappings: + +Controlling Diagnostics via Suppression Mappings +^^

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-02 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks I think this LG in terms of module-builder interfaces, but I think we can make some more changes to implementation to ensure it's easier to maintain going forward. speaking of maintenance, @HighCommander4 is definitely

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-02 Thread kadir çetinkaya via cfe-commits
@@ -316,36 +287,169 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName, if (Clang->getDiagnostics().hasErrorOccurred()) return llvm::createStringError("Compilation failed"); - BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output); - return llv

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-02 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/106683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-02 Thread kadir çetinkaya via cfe-commits
@@ -316,36 +287,169 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName, if (Clang->getDiagnostics().hasErrorOccurred()) return llvm::createStringError("Compilation failed"); - BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output); - return llv

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-02 Thread kadir çetinkaya via cfe-commits
@@ -316,36 +287,169 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName, if (Clang->getDiagnostics().hasErrorOccurred()) return llvm::createStringError("Compilation failed"); - BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output); - return llv

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-02 Thread kadir çetinkaya via cfe-commits
@@ -482,6 +482,42 @@ void func() { EXPECT_EQ(Result.signatures[0].parameters[0].labelString, "int a"); } +TEST_F(PrerequisiteModulesTests, ReusablePrerequisiteModulesTest) { kadircet wrote: can you also add some tests demonstrating behavior in presence of s

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-02 Thread kadir çetinkaya via cfe-commits
@@ -228,54 +223,30 @@ class StandalonePrerequisiteModules : public PrerequisiteModules { return BuiltModuleNames.contains(ModuleName); } - void addModuleFile(llvm::StringRef ModuleName, - llvm::StringRef ModuleFilePath) { -RequiredModules.emplac

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-02 Thread kadir çetinkaya via cfe-commits
@@ -228,54 +223,30 @@ class StandalonePrerequisiteModules : public PrerequisiteModules { return BuiltModuleNames.contains(ModuleName); } - void addModuleFile(llvm::StringRef ModuleName, - llvm::StringRef ModuleFilePath) { -RequiredModules.emplac

[clang-tools-extra] [clangd] [Modules] Add VFS to ASTUnit::LoadFromASTFile (PR #113879)

2024-10-28 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. (need to write something here apparently) https://github.com/llvm/llvm-project/pull/113879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang-tools-extra] [clangd] [Modules] Add VFS to ASTUnit::LoadFromASTFile (PR #113879)

2024-10-28 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > So I prefer ASTUnit here especially clangd already depends on clangFrontend > already so I feel like I didn't introduce a new dependency. It isn't at all about having this dependency in terms of "build graph", but rather about mental complexity and maintenance burden of that.

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-28 Thread kadir çetinkaya via cfe-commits
@@ -946,6 +953,24 @@ class DiagnosticsEngine : public RefCountedBase { return (Level)Diags->getDiagnosticLevel(DiagID, Loc, *this); } + /// Diagnostic suppression mappings can be used to ignore diagnostics based on + /// the file they occur in. Mapping file is expect

[clang-tools-extra] [clangd] [Modules] Add VFS to ASTUnit::LoadFromASTFile (PR #113879)

2024-10-28 Thread kadir çetinkaya via cfe-commits
@@ -127,33 +127,39 @@ struct ModuleFile { std::string ModuleFilePath; }; -bool IsModuleFileUpToDate(PathRef ModuleFilePath, - const PrerequisiteModules &RequisiteModules, - llvm::IntrusiveRefCntPtr VFS) { +bool IsModuleFileU

[clang-tools-extra] [clangd] [Modules] Add VFS to ASTUnit::LoadFromASTFile (PR #113879)

2024-10-28 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. https://github.com/llvm/llvm-project/pull/113879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [Modules] Add VFS to ASTUnit::LoadFromASTFile (PR #113879)

2024-10-28 Thread kadir çetinkaya via cfe-commits
@@ -127,33 +127,39 @@ struct ModuleFile { std::string ModuleFilePath; }; -bool IsModuleFileUpToDate(PathRef ModuleFilePath, - const PrerequisiteModules &RequisiteModules, - llvm::IntrusiveRefCntPtr VFS) { +bool IsModuleFileU

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-28 Thread kadir çetinkaya via cfe-commits
@@ -8979,3 +8979,8 @@ def wasm_opt : Flag<["--"], "wasm-opt">, Group, HelpText<"Enable the wasm-opt optimizer (default)">, MarshallingInfoNegativeFlag>; + +def warning_suppression_mappings_EQ : Joined<["--"], + "warning-suppression-mappings=">, Group, + HelpText<"File c

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-28 Thread kadir çetinkaya via cfe-commits
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +class WarningsSpecialCaseList : public llvm::SpecialCaseList { kadircet wrote: unfortunately we need to use inheritance, a

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-28 Thread kadir çetinkaya via cfe-commits
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +class WarningsSpecialCaseList : public llvm::SpecialCaseList { +public: + static std::unique_ptr + create(const llvm::MemoryBuffer &MB, st

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-28 Thread kadir çetinkaya via cfe-commits
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +class WarningsSpecialCaseList : public llvm::SpecialCaseList { +public: + static std::unique_ptr + create(const llvm::MemoryBuffer &MB, st

[clang-tools-extra] [clangd] [Modules] Use ASTReader directly in IsModuleFileUpToDate (PR #113879)

2024-10-28 Thread kadir çetinkaya via cfe-commits
@@ -127,50 +128,64 @@ struct ModuleFile { std::string ModuleFilePath; }; -bool IsModuleFileUpToDate( -PathRef ModuleFilePath, -const PrerequisiteModules &RequisiteModules) { -IntrusiveRefCntPtr Diags = - CompilerInstance::createDiagnostics(new DiagnosticOptions(

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-10-28 Thread kadir çetinkaya via cfe-commits
@@ -85,19 +85,20 @@ class PrerequisiteModules { /// different versions and different source files. class ModulesBuilder { public: - ModulesBuilder(const GlobalCompilationDatabase &CDB) : CDB(CDB) {} + ModulesBuilder() = default; + virtual ~ModulesBuilder() = default; Mo

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-28 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet commented: thanks for the review @bricknerb, this is ready for next round https://github.com/llvm/llvm-project/pull/112517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-10-28 Thread kadir çetinkaya via cfe-commits
@@ -85,19 +85,20 @@ class PrerequisiteModules { /// different versions and different source files. class ModulesBuilder { kadircet wrote: > I was told we don't like forward declaration in clangd Yes in theory this is also a forward declaration, but it's not in

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-28 Thread kadir çetinkaya via cfe-commits
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +class WarningsSpecialCaseList : public llvm::SpecialCaseList { +public: + static std::unique_ptr + create(const llvm::MemoryBuffer &MB, st

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-10-28 Thread kadir çetinkaya via cfe-commits
@@ -338,17 +460,129 @@ ModulesBuilder::buildPrerequisiteModulesFor(PathRef File, return std::move(RequiredModules); } -bool StandalonePrerequisiteModules::canReuse( +ReusableModulesBuilder::ModuleBuildingSharedOwner +ReusableModulesBuilder::getOrCreateModuleBuildingOwner(Str

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-28 Thread kadir çetinkaya via cfe-commits
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +class WarningsSpecialCaseList : public llvm::SpecialCaseList { kadircet wrote: i'd rather keep it here as I actually want

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-28 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/112517 From c0d2e4590308ebaaee78d7fe130a72b8586f6a88 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Mon, 14 Oct 2024 11:20:55 +0200 Subject: [PATCH 1/4] [clang] Introduce diagnostics suppression mappings This i

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-28 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > clang/docs/ReleaseNotes.rst? I was planning to add docs in a follow up once the UX is more mature, but I guess it doesn't hurt to do that here as well. https://github.com/llvm/llvm-project/pull/112517 ___ cfe-commits mailing list cf

[clang-tools-extra] [clangd] [Modules] Use ASTReader directly in IsModuleFileUpToDate (PR #113879)

2024-10-28 Thread kadir çetinkaya via cfe-commits
@@ -127,33 +127,39 @@ struct ModuleFile { std::string ModuleFilePath; }; -bool IsModuleFileUpToDate(PathRef ModuleFilePath, - const PrerequisiteModules &RequisiteModules, - llvm::IntrusiveRefCntPtr VFS) { +bool IsModuleFileU

[clang-tools-extra] [clangd] [Modules] Use ASTReader directly in IsModuleFileUpToDate (PR #113879)

2024-10-28 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks! https://github.com/llvm/llvm-project/pull/113879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [Modules] Use ASTReader directly in IsModuleFileUpToDate (PR #113879)

2024-10-28 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/113879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [Modules] Use ASTReader directly in IsModuleFileUpToDate (PR #113879)

2024-10-28 Thread kadir çetinkaya via cfe-commits
@@ -127,50 +128,64 @@ struct ModuleFile { std::string ModuleFilePath; }; -bool IsModuleFileUpToDate( -PathRef ModuleFilePath, -const PrerequisiteModules &RequisiteModules) { -IntrusiveRefCntPtr Diags = - CompilerInstance::createDiagnostics(new DiagnosticOptions(

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-12 Thread kadir çetinkaya via cfe-commits
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName, if (Clang->getDiagnostics().hasErrorOccurred()) return llvm::createStringError("Compilation failed"); - BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output); - return llv

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-12 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks, i think this looks great! some little comments/nits. https://github.com/llvm/llvm-project/pull/106683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-12 Thread kadir çetinkaya via cfe-commits
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName, if (Clang->getDiagnostics().hasErrorOccurred()) return llvm::createStringError("Compilation failed"); - BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output); - return llv

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-12 Thread kadir çetinkaya via cfe-commits
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName, if (Clang->getDiagnostics().hasErrorOccurred()) return llvm::createStringError("Compilation failed"); - BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output); - return llv

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-12 Thread kadir çetinkaya via cfe-commits
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName, if (Clang->getDiagnostics().hasErrorOccurred()) return llvm::createStringError("Compilation failed"); - BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output); - return llv

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-12 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/106683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-12 Thread kadir çetinkaya via cfe-commits
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName, if (Clang->getDiagnostics().hasErrorOccurred()) return llvm::createStringError("Compilation failed"); - BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output); - return llv

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-12 Thread kadir çetinkaya via cfe-commits
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName, if (Clang->getDiagnostics().hasErrorOccurred()) return llvm::createStringError("Compilation failed"); - BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output); - return llv

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-12 Thread kadir çetinkaya via cfe-commits
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName, if (Clang->getDiagnostics().hasErrorOccurred()) return llvm::createStringError("Compilation failed"); - BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output); - return llv

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-11-12 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks a lot for bearing with me! LGTM, let's ship it! https://github.com/llvm/llvm-project/pull/106683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-13 Thread kadir çetinkaya via cfe-commits
@@ -23,10 +23,15 @@ // simpler because a remark can't be promoted to an error. #include "clang/Basic/AllDiagnostics.h" #include "clang/Basic/Diagnostic.h" +#include "clang/Basic/DiagnosticDriver.h" +#include "clang/Basic/DiagnosticIDs.h" #include "clang/Basic/DiagnosticOptions

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-13 Thread kadir çetinkaya via cfe-commits
@@ -1315,6 +1319,34 @@ with its corresponding `Wno-` option. Note that when combined with :option:`-w` (which disables all warnings), disabling all warnings wins. +.. _warning_suppression_mappings: + +Controlling Diagnostics via Suppression Mappings +^^

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-13 Thread kadir çetinkaya via cfe-commits
@@ -9017,3 +9017,8 @@ def wasm_opt : Flag<["--"], "wasm-opt">, Group, HelpText<"Enable the wasm-opt optimizer (default)">, MarshallingInfoNegativeFlag>; + +def warning_suppression_mappings_EQ : Joined<["--"], kadircet wrote: > This should move elsewhere

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-13 Thread kadir çetinkaya via cfe-commits
@@ -1315,6 +1319,34 @@ with its corresponding `Wno-` option. Note that when combined with :option:`-w` (which disables all warnings), disabling all warnings wins. +.. _warning_suppression_mappings: + +Controlling Diagnostics via Suppression Mappings +^^

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-13 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/112517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-13 Thread kadir çetinkaya via cfe-commits
@@ -477,6 +486,136 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +// FIXME: We should isolate the parser from SpecialCaseList and just use it +// here. +class WarningsSpecialCaseList : public llvm::SpecialC

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-12 Thread kadir çetinkaya via cfe-commits
kadircet wrote: @AaronBallman merging this to main now. PLMK if you have any concerns, I am happy to address them post-submit (or revert if need be) https://github.com/llvm/llvm-project/pull/112517 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [clang-tools-extra] [NFC] Explicitly pass a VFS when creating DiagnosticsEngine (PR #115852)

2024-11-12 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/115852 From a999e3081d16170d510ab74222564fbcb4c6a7c2 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 12 Nov 2024 12:09:29 +0100 Subject: [PATCH 1/2] [NFC] Explicitly pass a VFS when creating DiagnosticsEngi

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-12 Thread kadir çetinkaya via cfe-commits
kadircet wrote: so https://github.com/llvm/llvm-project/commit/12e3ed8de8c6063b15916b3faf67c8c9cd17df1f should resolve both lldb buildbot breakage and compile time regression in clang. that being said, I don't think https://github.com/llvm/llvm-project/commit/12e3ed8de8c6063b15916b3faf67c8c9

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-12 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > FYI, looks like this is causing following LLDB tests to fail: > https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/15106/execution/node/97/log/ > > ``` > Unresolved Tests (17): > lldb-api :: > commands/expression/import-std-module/array/TestArrayFromStdModu

[clang] [clang-tools-extra] [NFC] Explicitly pass a VFS when creating DiagnosticsEngine (PR #115852)

2024-11-12 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/115852 Starting with 41e3919ded78d8870f7c95e9181c7f7e29aa3cc4 DiagnosticsEngine creation might perform IO. It was implicitly defaulting to getRealFileSystem. This patch makes it explicit by pushing the decision making

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

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

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-23 Thread kadir çetinkaya via cfe-commits
kadircet wrote: i think limiting this to `RealFileSystem::openFileForRead` LG, but can we make sure `IsText` defaults to `false` and we can only set it in `#ifdef __MVS__` block to make sure this is really a no-op for other platforms. e.g.: ```cppp auto OpenFlags = sys::fs::OF_None; #ifdef __MV

[clang-tools-extra] [clangd] Improve filtering logic for undesired proto symbols (PR #110091)

2024-09-26 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/110091 This used to filter any names with `_` in them, apart from enum-constants. Resulting in discrepancies in behavior when we had fields that have `_` in the name, or for accessors like `set_`, `has_`. The logic se

[clang-tools-extra] [clangd] Improve filtering logic for undesired proto symbols (PR #110091)

2024-09-26 Thread kadir çetinkaya via cfe-commits
kadircet wrote: https://reviews.llvm.org/D46751 for context from the original patch https://github.com/llvm/llvm-project/pull/110091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-09-26 Thread kadir çetinkaya via cfe-commits
@@ -489,13 +485,7 @@ static DiagnosticIDs::Level toLevel(diag::Severity SV) { DiagnosticIDs::Level DiagnosticIDs::getDiagnosticLevel(unsigned DiagID, SourceLocation Loc, const DiagnosticsEngine &Diag) const { - // Handle custom diagnostics, wh

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-09-25 Thread kadir çetinkaya via cfe-commits
@@ -489,13 +485,7 @@ static DiagnosticIDs::Level toLevel(diag::Severity SV) { DiagnosticIDs::Level DiagnosticIDs::getDiagnosticLevel(unsigned DiagID, SourceLocation Loc, const DiagnosticsEngine &Diag) const { - // Handle custom diagnostics, wh

[clang] [clang-format] Fix a bug in annotating angles containing FatArrow (PR #108671)

2024-09-24 Thread kadir çetinkaya via cfe-commits
@@ -243,14 +244,16 @@ class AnnotatingParser { // operator that was misinterpreted because we are parsing template // parameters. // FIXME: This is getting out of hand, write a decent parser. - if (InExpr && !Line.startsWith(tok::kw_template) && + if

[clang-tools-extra] [clangd] [C++20] [Modules] Support code complete for C++20 modules (PR #110083)

2024-09-26 Thread kadir çetinkaya via cfe-commits
@@ -402,6 +402,46 @@ import A; EXPECT_TRUE(D.isFromASTFile()); } +// An end to end test for code complete in modules +TEST_F(PrerequisiteModulesTests, CodeCompleteTest) { kadircet wrote: can you also add a test for signature help? https://github.com/llvm/l

[clang-tools-extra] [clangd] Improve filtering logic for undesired proto symbols (PR #110091)

2024-09-26 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/110091 From 08e2a37c8b028efcacd5ee8a269aed837ba16698 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 26 Sep 2024 10:55:49 +0200 Subject: [PATCH] [clangd] Improve filtering logic for undesired proto symbols

[clang-tools-extra] [clangd] [C++20] [Modules] Support code complete for C++20 modules (PR #110083)

2024-09-26 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/110083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Support code complete for C++20 modules (PR #110083)

2024-09-26 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks, mostly LG! https://github.com/llvm/llvm-project/pull/110083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Support code complete for C++20 modules (PR #110083)

2024-09-26 Thread kadir çetinkaya via cfe-commits
@@ -2108,7 +2116,7 @@ class CodeCompleteFlow { } // namespace -clang::CodeCompleteOptions CodeCompleteOptions::getClangCompleteOpts() const { +clang::CodeCompleteOptions CodeCompleteOptions::getClangCompleteOpts(bool ForceLoadExternal) const { kadircet wrote

[clang-tools-extra] [clangd] [C++20] [Modules] Support code complete for C++20 modules (PR #110083)

2024-09-26 Thread kadir çetinkaya via cfe-commits
@@ -2108,7 +2116,7 @@ class CodeCompleteFlow { } // namespace -clang::CodeCompleteOptions CodeCompleteOptions::getClangCompleteOpts() const { +clang::CodeCompleteOptions CodeCompleteOptions::getClangCompleteOpts(bool ForceLoadExternal) const { kadircet wrote

[clang] [llvm] [clang] Add/enhance documentation for some important classes. (PR #109795)

2024-09-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/109795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add/enhance documentation for some important classes. (PR #109795)

2024-09-27 Thread kadir çetinkaya via cfe-commits
@@ -1802,32 +1802,32 @@ enum class ArraySizeModifier; enum class ElaboratedTypeKeyword; enum class VectorKind; -/// The base class of the type hierarchy. +/// A type in the program, such as `int` or `vector`. +/// This the base class for a hierarchy: PointerType, BuiltinType e

[clang] [llvm] [clang] Add/enhance documentation for some important classes. (PR #109795)

2024-09-27 Thread kadir çetinkaya via cfe-commits
@@ -79,8 +79,24 @@ enum class StringLiteralKind; // AST classes for statements. //===--===// -/// Stmt - This represents one statement. +/// A statement or expression in the program. /// +/// This is the bas

[clang] [llvm] [clang] Add/enhance documentation for some important classes. (PR #109795)

2024-09-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks a lot for doing this! https://github.com/llvm/llvm-project/pull/109795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] Attach Header to AnalysisResults for misisng headers (PR #110272)

2024-09-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/110272 Currently callers of analyze can't get detailed information about a missing header, e.g. resolve path. Only way to get at this is to use low level walkUsed funciton, which is way more complicated than just cal

[clang-tools-extra] [clangd] Improve robustness when clang-tidy check names contain leading spaces. (PR #109421)

2024-09-20 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks! https://github.com/llvm/llvm-project/pull/109421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-20 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/107906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-20 Thread kadir çetinkaya via cfe-commits
kadircet wrote: i've also just noticed https://github.com/llvm/llvm-project/commit/3b3accb598ec87a6a30b0e18ded06071030bb78f, which seem to be pushed without review and any tests, changing behavior more in a non-obvious way. Please not that logic you have in: ``` Expected FDOrErr = sys::fs::o

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-20 Thread kadir çetinkaya via cfe-commits
@@ -323,10 +325,11 @@ ErrorOr RealFileSystem::status(const Twine &Path) { } ErrorOr> -RealFileSystem::openFileForRead(const Twine &Name) { +RealFileSystem::openFileForRead(const Twine &Name, bool IsText) { SmallString<256> RealName, Storage; Expected FDOrErr = sys::fs::

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-20 Thread kadir çetinkaya via cfe-commits
@@ -121,8 +121,18 @@ ContentCache::getBufferOrNone(DiagnosticsEngine &Diag, FileManager &FM, // Start with the assumption that the buffer is invalid to simplify early // return paths. IsBufferInvalid = true; - - auto BufferOrError = FM.getBufferForFile(*ContentsEntry, I

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-20 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet commented: hi sorry for missing this during the review time, i believe this change is changing some of the core support library interfaces in a way that's not justified. this is an interface implemented by quite a lot of both upstream and downstream clients, but th

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-20 Thread kadir çetinkaya via cfe-commits
kadircet wrote: thanks a lot for the swift response! I can see how none of these implementations are not using those flags _today_, but we're changing the observable behavior for them as well, and if some of those implementations decides to give meaning to these flags, it might be impossible

[clang-tools-extra] [clangd] Improve filtering logic for undesired proto symbols (PR #110091)

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

[clang] [clang-tools-extra] [lldb] [llvm] Propagate IsText parameter to openFileForRead function (PR #110661)

2024-10-01 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. sorry this is same as https://github.com/llvm/llvm-project/pull/107906 (with a bigger impact radius, as you're also changing getBufferForFile) and doesn't address any of the issues mention about explaining the semantics of `IsT

[clang-tools-extra] [include-cleaner] Suppress all clang warnings (PR #109099)

2024-09-18 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/109099 This patch disables all clang warnings when running include-cleaner, as users aren't interested in other findings and in-development code might have them temporarily. This ensures tool can keep working even in p

[clang-tools-extra] [include-cleaner] Suppress all clang warnings (PR #109099)

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

[clang] [clang-tools-extra] Remove clang-pseudo (PR #109154)

2024-09-19 Thread kadir çetinkaya via cfe-commits
kadircet wrote: thanks a lot for taking care of this @AaronBallman, I think the only concern here is not regressing clangd functionality. We can figure out how we should trim down the bits that're moving into clangd later if need be. I think this LG, but cc @hokein as well. https://github.co

[clang] [clang-format] Fix a bug in annotating angles containing FatArrow (PR #108671)

2024-09-25 Thread kadir çetinkaya via cfe-commits
@@ -243,14 +244,16 @@ class AnnotatingParser { // operator that was misinterpreted because we are parsing template // parameters. // FIXME: This is getting out of hand, write a decent parser. - if (InExpr && !Line.startsWith(tok::kw_template) && + if

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,90 @@ + +Warning suppression mappings + + +.. contents:: + :local: + +Introduction + + +Warning suppression mappings enable users to suppress Clang's diagnostics in a +per-file granular manner. Enabli

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet commented: > Note that there are a few open comments from previous iterations. I tried to go over them, but github UI was ... suboptimal. So PLMK if you got some that aren't addressed in this revision as well. https://github.com/llvm/llvm-project/pull/112517 ___

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
@@ -167,4 +176,159 @@ TEST(DiagnosticTest, storedDiagEmptyWarning) { // Make sure an empty warning can round-trip with \c StoredDiagnostic. Diags.Report(CaptureConsumer.StoredDiags.front()); } + +class SuppressionMappingTest : public testing::Test { +public: + SuppressionM

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,90 @@ + +Warning suppression mappings + + +.. contents:: + :local: + +Introduction + + +Warning suppression mappings enable users to suppress Clang's diagnostics in a +per-file granular manner. Enabli

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/112517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
@@ -477,6 +486,136 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +// FIXME: We should isolate the parser from SpecialCaseList and just use it +// here. +class WarningsSpecialCaseList : public llvm::SpecialC

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
@@ -701,11 +702,10 @@ class CompilerInstance : public ModuleLoader { /// used by some diagnostics printers (for logging purposes only). /// /// \return The new object on success, or null on failure. - static IntrusiveRefCntPtr - createDiagnostics(DiagnosticOptions *Opts

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
@@ -477,6 +486,109 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +class WarningsSpecialCaseList : public llvm::SpecialCaseList { +public: + static std::unique_ptr + create(const llvm::MemoryBuffer &MB, st

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,90 @@ + +Warning suppression mappings + + +.. contents:: + :local: + +Introduction + + +Warning suppression mappings enable users to suppress Clang's diagnostics in a +per-file granular manner. Enabli

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
@@ -167,4 +176,159 @@ TEST(DiagnosticTest, storedDiagEmptyWarning) { // Make sure an empty warning can round-trip with \c StoredDiagnostic. Diags.Report(CaptureConsumer.StoredDiags.front()); } + +class SuppressionMappingTest : public testing::Test { +public: + SuppressionM

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
@@ -167,4 +176,159 @@ TEST(DiagnosticTest, storedDiagEmptyWarning) { // Make sure an empty warning can round-trip with \c StoredDiagnostic. Diags.Report(CaptureConsumer.StoredDiags.front()); } + +class SuppressionMappingTest : public testing::Test { +public: + SuppressionM

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,90 @@ + +Warning suppression mappings + + +.. contents:: + :local: + +Introduction + + +Warning suppression mappings enable users to suppress Clang's diagnostics in a +per-file granular manner. Enabli

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
kadircet wrote: sorry missed that, added docs to clang root tree https://github.com/llvm/llvm-project/pull/112517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

<    2   3   4   5   6   7   8   9   >