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

2024-11-07 Thread kadir çetinkaya via cfe-commits
kadircet wrote: sorry i am struggling to see the value in an integration test while we can (and do) test it in a unittest. can you elaborate ? https://github.com/llvm/llvm-project/pull/112517 ___ cfe-commits mailing

[clang] Reapply "[Clang][Sema] Always use latest redeclaration of primary template" (PR #114569)

2024-11-07 Thread kadir çetinkaya via cfe-commits
kadircet wrote: after this change clang seems to be crashing for: ```cpp template concept a = true; template class b {}; template class c {}; template class f; template requires a> f i(b>, h &&); template class f { template requires a> friend f i(b>, h &&); }; f k; void m()

[clang] Reapply "[Clang][Sema] Refactor collection of multi-level template argument lists (#106585, #111173)" (PR #111852)

2024-11-07 Thread kadir çetinkaya via cfe-commits
kadircet wrote: i've posted another reduced test case in https://github.com/llvm/llvm-project/pull/114569, as crash bisected to that commit specifically https://github.com/llvm/llvm-project/pull/111852 ___ cfe-commits mailing list cfe-commits@lists.l

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

2024-11-08 Thread kadir çetinkaya via cfe-commits
@@ -316,36 +294,205 @@ 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-08 Thread kadir çetinkaya via cfe-commits
@@ -124,10 +164,34 @@ struct ModuleFile { llvm::sys::fs::remove(ModuleFilePath); } + StringRef getModuleName() const { return ModuleName; } + + StringRef getModuleFilePath() const { return ModuleFilePath; } + +private: std::string ModuleName; std::string Module

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

2024-11-08 Thread kadir çetinkaya via cfe-commits
@@ -316,36 +294,205 @@ 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-08 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. 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-08 Thread kadir çetinkaya via cfe-commits
@@ -316,36 +309,221 @@ 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-08 Thread kadir çetinkaya via cfe-commits
@@ -316,36 +309,221 @@ 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-08 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] Rename CODE_OWNERS -> Maintainers (PR #114544)

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

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

2024-11-19 Thread kadir çetinkaya via cfe-commits
kadircet wrote: FWIW, I am planning to land this soon if there are no concerns from other maintainers https://github.com/llvm/llvm-project/pull/115852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

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

2024-11-08 Thread kadir çetinkaya via cfe-commits
kadircet wrote: thanks for the review! @AaronBallman i'd like to land this early next week and start testing/polishing. It'd be great if you can give some explicit LGTM. https://github.com/llvm/llvm-project/pull/112517 ___ cfe-commits mailing list cf

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

2024-09-17 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] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-02 Thread kadir çetinkaya via cfe-commits
@@ -149,15 +150,18 @@ void Dex::buildIndex() { InvertedIndex = std::move(Builder).build(); // Build RevRefs - for (const auto &[ID, RefList] : Refs) -for (const auto &R : RefList) - if ((R.Kind & ContainedRefsRequest::SupportedRefKinds) != - RefKind::Unk

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-02 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. I am sorry for my poor choice of words around `config knob`, I was trying to imply a knob like https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clangd/ClangdServer.h#L111. I don't think the knob needs to be exp

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-02 Thread kadir çetinkaya via cfe-commits
@@ -149,15 +150,18 @@ void Dex::buildIndex() { InvertedIndex = std::move(Builder).build(); // Build RevRefs - for (const auto &[ID, RefList] : Refs) -for (const auto &R : RefList) - if ((R.Kind & ContainedRefsRequest::SupportedRefKinds) != - RefKind::Unk

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

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

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-11-26 Thread kadir çetinkaya via cfe-commits
@@ -63,6 +63,9 @@ enum class RefKind : uint8_t { // ^ this references Foo, but does not explicitly spell out its name // }; Spelled = 1 << 3, + // A reference which is a call. Used as a filter for which references + // to store in data structures used for computing ou

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

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

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-11-26 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. sorry for losing track on the original patch, and thanks a lot for driving this to completion! > @kadircet perhaps you might be able to pick up this review? > > Or, in the absence of a full review, your opinion on the direction

[clang] [clang] Fix a use-after-free in expression evaluation (PR #118480)

2024-12-03 Thread kadir çetinkaya via cfe-commits
kadircet wrote: still trying to come up with a reproducer. i am also not sure if this is the best place to have the cleanup, but if i did that closer to [leaves](https://github.com/llvm/llvm-project/blob/main/clang/lib/AST/ExprConstant.cpp#L16376-L16385) tests start failing. so open for sugge

[clang] [clang] Fix a use-after-free in expression evaluation (PR #118480)

2024-12-03 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/118480 following ASAN failure is fixed with this patch. We store cleanups in EvalInfo, which are usually run with certain ScopeRAII objects. We can have temporaries in the cleanup stack, backed by CallStackFrame. If su

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-03 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, mostly LG! i think not leaving the default parameter values are important here to make sure we don't forget to pass the top-level config in any of the relevant places (both now, but also in the future). i know it probably comes wi

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-03 Thread kadir çetinkaya via cfe-commits
@@ -163,7 +163,7 @@ class Checker { unsigned ErrCount = 0; Checker(llvm::StringRef File, const ClangdLSPServer::Options &Opts) - : File(File), Opts(Opts) {} + : File(File), Opts(Opts), Index(/*SupportContainedRefs=*/false) {} kadircet wrote: why

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-03 Thread kadir çetinkaya via cfe-commits
@@ -108,7 +109,7 @@ class FileSymbols { /// FIXME: Expose an interface to remove files that are closed. class FileIndex : public MergedIndex { public: - FileIndex(); + FileIndex(bool SupportContainedRefs = true); kadircet wrote: same with the default param

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-03 Thread kadir çetinkaya via cfe-commits
@@ -69,7 +69,7 @@ enum class DuplicateHandling { /// locking when we swap or obtain references to snapshots. class FileSymbols { public: - FileSymbols(IndexContents IdxContents); + FileSymbols(IndexContents IdxContents, bool SupportContainedRefs = true); kadi

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-03 Thread kadir çetinkaya via cfe-commits
@@ -83,7 +83,8 @@ std::string toYAML(const Ref &); // Build an in-memory static index from an index file. // The size should be relatively small, so data can be managed in memory. std::unique_ptr loadIndex(llvm::StringRef Filename, - Symbol

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-03 Thread kadir çetinkaya via cfe-commits
@@ -64,16 +65,18 @@ class Dex : public SymbolIndex { typename FileRange, typename Payload> Dex(SymbolRange &&Symbols, RefsRange &&Refs, RelationsRange &&Relations, FileRange &&Files, IndexContents IdxContents, Payload &&BackingData, - size_t BackingData

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-03 Thread kadir çetinkaya via cfe-commits
@@ -36,7 +36,8 @@ class Dex : public SymbolIndex { public: // All data must outlive this index. template - Dex(SymbolRange &&Symbols, RefsRange &&Refs, RelationsRange &&Relations) + Dex(SymbolRange &&Symbols, RefsRange &&Refs, RelationsRange &&Relations, + bool Supp

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

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

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-03 Thread kadir çetinkaya via cfe-commits
@@ -88,9 +90,12 @@ struct UpdateIndexCallbacks : public ParsingCallbacks { indexStdlib(CI, std::move(*Loc)); // FIndex outlives the UpdateIndexCallbacks. -auto Task = [FIndex(FIndex), Path(Path.str()), Version(Version.str()), +auto Task = [this, FIndex(FIndex

[clang-tools-extra] [NFC] Fix uninitialized scalar field in constructor. (PR #118324)

2024-12-03 Thread kadir çetinkaya via cfe-commits
kadircet wrote: idxcontents is only used when we have a set of file names available. hence this was only set via relevant constructors and rest of the runtime doesn't use the field. but we don't construct tons of new index instances every second. so it's totally fine to just initialize them t

[clang] [clang] Fix a use-after-free in expression evaluation (PR #118480)

2024-12-03 Thread kadir çetinkaya via cfe-commits
@@ -4515,6 +4515,8 @@ handleLValueToRValueConversion(EvalInfo &Info, const Expr *Conv, QualType Type, } APValue Lit; + // Make sure we clean up the temporary created below. + FullExpressionRAII CleanupTemps(Info); kadircet wrote: > we c

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-05 Thread kadir çetinkaya via cfe-commits
kadircet wrote: relanded with benchmark fix in 61fe67a4017375fd675f75652e857e837f77fa51 changed required -> optional in c7ef0ac9fd28cb55b8c7c91a890b365cc688f9a9 https://github.com/llvm/llvm-project/pull/117673 ___ cfe-commits mailing list cfe-commits@

[clang-tools-extra] [NFC] Fix uninitialized scalar field in constructor. (PR #118324)

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

[clang] [clang][NFC] Change suppression mapping interfaces to use SourceLocation (PR #118960)

2024-12-06 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/118960 This way we can delay getting a presumed location even further, only performing it for diagnostics that are mapped. From 4c52dda9a253d643ef52f1f5f294cd1fd5bcfa76 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya

[clang-tools-extra] [clangd] Document the cases in which Dex::Files and IdxContents are populated (PR #118906)

2024-12-06 Thread kadir çetinkaya via cfe-commits
@@ -121,6 +121,8 @@ class Dex : public SymbolIndex { llvm::DenseMap, std::vector> Relations; std::shared_ptr KeepAlive; // poor man's move-only std::any // Set of files which were used during this index build. + // Files and IdxContents are only populated for dynamic an

[clang-tools-extra] [NFC] Use a move instead of a copy to optimize performance. (PR #118699)

2024-12-06 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. this is just a shared-ptr, but still better without the copy, thanks! https://github.com/llvm/llvm-project/pull/118699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang-tools-extra] [clangd] Add quick fix to automatically adds NOLINTNEXTLINE comment (PR #114661)

2024-12-06 Thread kadir çetinkaya via cfe-commits
kadircet wrote: (sorry for the late reply) > Just want to confirm that this infrastructure isn't currently being used by > anything in Clangd. we do have some out-of-tree usages, but nothing in the tree, apart from tests, use this infrastructure yet. > I assume I should extend FeatureModule

[clang-tools-extra] [clangd] Add clarifying comment about when Dex::IdxContents is populated (PR #118906)

2024-12-08 Thread kadir çetinkaya via cfe-commits
@@ -121,6 +121,8 @@ class Dex : public SymbolIndex { llvm::DenseMap, std::vector> Relations; std::shared_ptr KeepAlive; // poor man's move-only std::any // Set of files which were used during this index build. + // Files and IdxContents are only populated for dynamic an

[clang-tools-extra] [clangd] Add clarifying comment about when Dex::IdxContents is populated (PR #118906)

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

[clang] [clang-tools-extra] [clangd] Make clangd run `format::cleanupAroundReplacements()` for all code actions just as clang-tidy does (PR #118569)

2025-01-02 Thread kadir çetinkaya via cfe-commits
@@ -761,7 +762,35 @@ void StoreDiags::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, return false; if (!isInsideMainFile(FixIt.RemoveRange.getBegin(), SM)) return false; - Edits.push_back(toTextEdit(FixIt, SM, *LangOpts)); + + auto R = too

[clang] [clang-tools-extra] [clangd] Make clangd run `format::cleanupAroundReplacements()` for all code actions just as clang-tidy does (PR #118569)

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

[clang-tools-extra] [include-cleaner] Dont report explicit refs for global operator new/delete (PR #125199)

2025-01-31 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/125199 These are available for all translations implicitly. We shouldn't report explicit refs and enforce includes. From 4d6967a12f6793a27ed39fd7a7c1cc32fa001a09 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date:

[clang-tools-extra] [include-cleaner] Dont report explicit refs for global operator new/delete (PR #125199)

2025-01-31 Thread kadir çetinkaya via cfe-commits
kadircet wrote: so this is the alternative to https://github.com/llvm/llvm-project/pull/123027. as discussed offline that change would break translation units that depend on a user-provided declaration for new/delete operators. https://github.com/llvm/llvm-project/pull/125199 _

[clang-tools-extra] [include-cleaner] Add special mappings for operator new/delete (PR #123027)

2025-01-31 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/123027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] Add special mappings for operator new/delete (PR #123027)

2025-01-31 Thread kadir çetinkaya via cfe-commits
kadircet wrote: abandoning in favor of https://github.com/llvm/llvm-project/pull/125199 https://github.com/llvm/llvm-project/pull/123027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

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

[clang] [clang] Parse warning-suppression-mapping after setting up diagengine (PR #125714)

2025-02-04 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/125714 We can emit diagnostics while parsing warning-suppression-mapping, make sure command line flags take affect when emitting those. From 84b5e22eb0a6ebf7cdeb73d5e01a583dfb46aa8a Mon Sep 17 00:00:00 2001 From: Kad

[clang] [clang] Stop parsing warning suppression mappings in driver (PR #125722)

2025-02-04 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/125722 This gets rid of some extra IO from driver startup, and possiblity of emitting warnings twice. From 7dce959f33d828e4a06ba386715a3d92b7be34bf Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 4 Feb 202

[clang-tools-extra] [include-cleaner] Dont report explicit refs for global operator new/delete (PR #125199)

2025-01-31 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/125199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PCH, CUDA] Take CUDA attributes into account (PR #125127)

2025-01-31 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/125127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PCH, CUDA] Take CUDA attributes into account (PR #125127)

2025-01-31 Thread kadir çetinkaya via cfe-commits
@@ -14,12 +16,19 @@ void kcall(void (*kp)()) { __global__ void kern() { } +__host__ int overloaded_func(); kadircet wrote: can you also add a comment here explaining what we're testing? https://github.com/llvm/llvm-project/pull/125127 ___

[clang] [clang] Parse warning-suppression-mapping after setting up diagengine (PR #125714)

2025-02-06 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/125714 From b210fc4d5a12eeed12c1746012da41d0c50a79b4 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 4 Feb 2025 17:30:16 +0100 Subject: [PATCH] [clang] Parse warning-suppression-mapping after setting up dia

[clang] [clang] Parse warning-suppression-mapping after setting up diagengine (PR #125714)

2025-02-06 Thread kadir çetinkaya via cfe-commits
kadircet wrote: /cherry-pick ecb016a87d89aed36b8f5d8102e15d8eb0e57108 https://github.com/llvm/llvm-project/pull/125714 ___ 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] Add scanning cache (PR #125988)

2025-02-06 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. instead of introducing a new concept of `ProjectModulesCache` and requiring each `ProjectModules` implementation to know about it and work with it; what about introducing a: ```cpp class CachingProjectModules : public ProjectMo

[clang] [clang] Stop parsing warning suppression mappings in driver (PR #125722)

2025-02-06 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/125722 From 4b24e73d39da9ad9badb2411363082a44046fc3f Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 4 Feb 2025 17:45:55 +0100 Subject: [PATCH] [clang] Stop parsing warning suppression mappings in driver Th

[clang] [clang] Stop parsing warning suppression mappings in driver (PR #125722)

2025-02-06 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet milestoned https://github.com/llvm/llvm-project/pull/125722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Stop parsing warning suppression mappings in driver (PR #125722)

2025-02-06 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/125722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Stop parsing warning suppression mappings in driver (PR #125722)

2025-02-06 Thread kadir çetinkaya via cfe-commits
kadircet wrote: /cherry-pick df22bbe2beb57687c76402bc0cfdf7901a31cf29 https://github.com/llvm/llvm-project/pull/125722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Parse warning-suppression-mapping after setting up diagengine (PR #125714)

2025-02-06 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet milestoned https://github.com/llvm/llvm-project/pull/125714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Parse warning-suppression-mapping after setting up diagengine (PR #125714)

2025-02-06 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/125714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Handle pointer and reference type more robustly in HeuristicResolver::resolveMemberExpr() (PR #124451)

2025-02-10 Thread kadir çetinkaya via cfe-commits
kadircet wrote: FWIW, i bisected a performance regression (and possibly an infinite loop) in clangd to this PR. trying to get a reproducer now. https://github.com/llvm/llvm-project/pull/124451 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang][HeuristicResolver] Track the expression whose type is being simplified after each step in simplifyType() (PR #126689)

2025-02-11 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, lgtm! taking a closer look here, I feel more inclined towards having the step limit in the release branch. I think because we're resolving the initializer, we can still end up in situations where we have `equivalent (T,E)` pairs,

[clang] [clang][HeuristicResolver] Track the expression whose type is being simplified after each step in simplifyType() (PR #126689)

2025-02-11 Thread kadir çetinkaya via cfe-commits
@@ -210,52 +210,63 @@ QualType HeuristicResolverImpl::getPointeeType(QualType T) { QualType HeuristicResolverImpl::simplifyType(QualType Type, const Expr *E, bool UnwrapPointer) { bool DidUnwrapPointer = false; - auto SimplifyOne

[clang] [clang][HeuristicResolver] Track the expression whose type is being simplified after each step in simplifyType() (PR #126689)

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

[clang] [clang][HeuristicResolver] Track the expression whose type is being simplified after each step in simplifyType() (PR #126689)

2025-02-11 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/126689 From e5a3d7aa5362357acd30ef5d1bafaa814ac2c89f Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 11 Feb 2025 01:56:50 -0500 Subject: [PATCH 1/2] [clang][HeuristicResolver] Track the expression whose type i

[clang-tools-extra] [clangd] [C++20] [Modules] Add scanning cache (PR #125988)

2025-02-12 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > * Now the ScanningProjectModules are owned by different calls to > `ModulesBuilder::buildPrerequisiteModulesFor`. So we don't need to care about > thread safety in ScanningProjectModules. And if we make it the underlying > ProjectModules, we need to care about the thead safet

[clang] [PCH, CUDA] Take CUDA attributes into account (PR #125127)

2025-01-31 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks a lot, LGTM! https://github.com/llvm/llvm-project/pull/125127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] Dont report explicit refs for global operator new/delete (PR #125199)

2025-01-31 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/125199 From 696ef01effccbf6f666b444a8eea1eabaaa1f706 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Fri, 31 Jan 2025 11:17:27 +0100 Subject: [PATCH] [include-cleaner] Dont report explicit refs for global operat

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

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

[clang] [clang][NFC] Change suppression mapping interfaces to use SourceLocation (PR #118960)

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

[clang-tools-extra] [include-cleaner] Respect langopts when analyzing macro names (PR #123634)

2025-01-21 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/123634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

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

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-22 Thread kadir çetinkaya via cfe-commits
@@ -830,6 +830,16 @@ bool OverlayCDB::setCompileCommand(PathRef File, return true; } +std::unique_ptr +OverlayCDB::getProjectModules(PathRef File) const { + auto MDB = DelegatingCDB::getProjectModules(File); + MDB->setCommandMangler([&Mangler = Mangler](tooling::CompileCom

[clang] [Clang] Silently ignore unknown warnings in `--warning-suppression-mappings` (PR #124141)

2025-01-24 Thread kadir çetinkaya via cfe-commits
@@ -547,11 +547,9 @@ void WarningsSpecialCaseList::processSections(DiagnosticsEngine &Diags) { StringRef DiagGroup = SectionEntry->getKey(); if (Diags.getDiagnosticIDs()->getDiagnosticsInGroup( WarningFlavor, DiagGroup, GroupDiags)) { - StringRef Sugge

[clang] [Clang] Silently ignore unknown warnings in `--warning-suppression-mappings` (PR #124141)

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

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-20 Thread kadir çetinkaya via cfe-commits
@@ -38,10 +39,6 @@ class MockDirectoryCompilationDatabase : public MockCompilationDatabase { void addFile(llvm::StringRef Path, llvm::StringRef Contents); - std::unique_ptr getProjectModules(PathRef) const override { -return scanningProjectModules(MockedCDBPtr, TFS);

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

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

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-20 Thread kadir çetinkaya via cfe-commits
@@ -9,12 +9,17 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_PROJECTMODULES_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_PROJECTMODULES_H +#include "support/Function.h" #include "support/Path.h" #include "support/ThreadsafeFS.h" #include namespace clang { +namespace tooling { +

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-20 Thread kadir çetinkaya via cfe-commits
@@ -32,6 +32,9 @@ namespace { /// interfere with each other. class ModuleDependencyScanner { public: + using CommandProvider = kadircet wrote: Sorry I was just trying to say we don't need to have the same type-alias both in ModuleDependencyScanner and Projec

[clang-tools-extra] [include-cleaner] Respect langopts when analyzing macro names (PR #123634)

2025-01-20 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/123634 Fixes https://github.com/llvm/llvm-project/issues/113926. Fixes https://github.com/llvm/llvm-project/issues/63976. From 6d363897befee25fe498da24c00420777eb5958d Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

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

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2025-01-27 Thread kadir çetinkaya via cfe-commits
@@ -551,10 +547,12 @@ DiagnosticIDs::getDiagnosticSeverity(unsigned DiagID, SourceLocation Loc, // as well as disabling all messages which are currently mapped to Warning // (whether by default or downgraded from Error via e.g. -Wno-error or #pragma // diagnostic.) + /

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2025-01-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks! > This just exposes the same semantics as the tablegen files. alright, i guess I was missing this perspective. that makes sense now, thanks for the explanation! https://github.com/llvm/llvm-project/pull/119712 ___

[clang] [clang] Fix a use-after-free in expression evaluation (PR #118480)

2025-01-27 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > ping, is this still a problem? yes, this is still happening. but I am currently lacking cycles to dig deeper into expression evaluation to see if this is the right fix given the reproducer. @VitaNuo was to take a look with some limited capacity, but I think she's also in a s

[clang] [Clang] Silently ignore unknown warnings in `--warning-suppression-mappings` (PR #124141)

2025-01-27 Thread kadir çetinkaya via cfe-commits
@@ -547,11 +547,9 @@ void WarningsSpecialCaseList::processSections(DiagnosticsEngine &Diags) { StringRef DiagGroup = SectionEntry->getKey(); if (Diags.getDiagnosticIDs()->getDiagnosticsInGroup( WarningFlavor, DiagGroup, GroupDiags)) { - StringRef Sugge

[clang] Revert "[clang] Canonicalize absolute paths in dependency file" (PR #121638)

2025-01-13 Thread kadir çetinkaya via cfe-commits
kadircet wrote: thanks, LGTM! https://github.com/llvm/llvm-project/pull/121638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[clang] Canonicalize absolute paths in dependency file" (PR #121638)

2025-01-13 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/121638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Canonicalize absolute paths in dependency file (PR #117458)

2025-01-02 Thread kadir çetinkaya via cfe-commits
kadircet wrote: It's hard to say what's the right/wrong behavior when it comes to symlink handling, but I am having a hard time understanding what kind of applications can benefit from this new behavior. AFAICT most workflows that involve dependency files use it for "caching" purposes, and som

[clang] [diagtool] Make the BuiltinDiagnosticsByID table sorted (PR #120321)

2025-01-03 Thread kadir çetinkaya via cfe-commits
@@ -23,28 +23,29 @@ llvm::ArrayRef diagtool::getBuiltinDiagnosticsByName() { return llvm::ArrayRef(BuiltinDiagnosticsByName); } - // FIXME: Is it worth having two tables, especially when this one can get // out of sync easily? +// clang-format off kadirce

[clang] [diagtool] Make the BuiltinDiagnosticsByID table sorted (PR #120321)

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

[clang-tools-extra] [include-cleaner] Add special mappings for operator new/delete (PR #123027)

2025-01-15 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/123027 From 5339f8e303a99b8a75320b24a3a371e531fa6140 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Wed, 15 Jan 2025 10:11:09 +0100 Subject: [PATCH 1/2] [include-cleaner] Add special mappings for operator new/d

[clang] [clang] Fix a use-after-free in expression evaluation (PR #118480)

2025-01-15 Thread kadir çetinkaya via cfe-commits
kadircet wrote: sample in https://github.com/llvm/llvm-project/pull/118480#issuecomment-2538988006 still triggers the crash for me, need to pass `-std=c++20`. but note that it isn't the sample that should be built with ASAN, it's the clang itself that needs to be built with ASAN. passing `-DL

[clang] [clang] Add support for passing FileSystem to buildASTFromCodeWithArgs() (PR #123042)

2025-01-15 Thread kadir çetinkaya via cfe-commits
@@ -223,7 +223,11 @@ buildASTFromCode(StringRef Code, StringRef FileName = "input.cc", /// \param PCHContainerOps The PCHContainerOperations for loading and creating /// clang modules. /// -/// \param Adjuster A function to filter the command line arguments as specified. +///

[clang] [clang] Add support for passing FileSystem to buildASTFromCodeWithArgs() (PR #123042)

2025-01-15 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. https://github.com/llvm/llvm-project/pull/123042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add support for passing FileSystem to buildASTFromCodeWithArgs() (PR #123042)

2025-01-15 Thread kadir çetinkaya via cfe-commits
@@ -692,11 +692,12 @@ std::unique_ptr buildASTFromCodeWithArgs( StringRef Code, const std::vector &Args, StringRef FileName, StringRef ToolName, std::shared_ptr PCHContainerOps, ArgumentsAdjuster Adjuster, const FileContentMappings &VirtualMappedFiles, -Diagnos

[clang-tools-extra] [include-cleaner] Add special mappings for operator new/delete (PR #123027)

2025-01-15 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/123027 Our stdlib mappings are based on names, hence they can't handle special symbols like oprators. Global operator new/delete show up often enough in practice to create some user frustration, so we map these to .

[clang-tools-extra] [clang-tidy][modernize] Replace memmove/memcpy with std::copy (PR #122940)

2025-01-16 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > @kadircet Does the file need further changes from what I've already added? probably yes, it'd be great if you can just run https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clangd/TidyFastChecks.py to generate the edits https://github.com/llvm/llvm-project/pul

<    3   4   5   6   7   8   9   >