[clang] [clang-tools-extra] [clang][AST][clang-tidy] Do not set a reduced traversal scope in ASTM… (PR #132725)

2025-04-05 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet commented: > Are you able to test this PR and confirm it fixes the regressions you > encountered? hi @carlosgalvezp , yes this fixes the particular issues we had, thanks! https://github.com/llvm/llvm-project/pull/132725 __

[clang-tools-extra] [clangd] [C++20] [Modules] Add modules suffix for 'Header' Source Switch (PR #131591)

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

[clang] [clang-tools-extra] [clang][AST][clang-tidy] Do not set a reduced traversal scope in ASTM… (PR #132725)

2025-03-25 Thread kadir çetinkaya via cfe-commits
@@ -94,8 +94,6 @@ Improvements to clang-tidy - :program:`clang-tidy` no longer processes declarations from system headers by default, greatly improving performance. This behavior is disabled if the `SystemHeaders` option is enabled. - Note: this may lead to false negatives

[clang] [clang-tools-extra] [clang][AST][clang-tidy] Do not set a reduced traversal scope in ASTM… (PR #132725)

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

[clang] [clang-tools-extra] [clang][AST][clang-tidy] Do not set a reduced traversal scope in ASTM… (PR #132725)

2025-03-24 Thread kadir çetinkaya via cfe-commits
@@ -94,8 +94,6 @@ Improvements to clang-tidy - :program:`clang-tidy` no longer processes declarations from system headers by default, greatly improving performance. This behavior is disabled if the `SystemHeaders` option is enabled. - Note: this may lead to false negatives

[clang] [clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-20 Thread kadir çetinkaya via cfe-commits
kadircet wrote: Hi folks, we're seeing some regressions on our internal tidy checks after this patch. The regression is similar to what @haoNoQ raised in https://github.com/llvm/llvm-project/pull/128150#issuecomment-2705425193, the blast radius a little bit wider than checks that build and in

[clang-tools-extra] [clangd] Add `BuiltinHeaders` flag to Config file (PR #129459)

2025-03-07 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > we've had users for whom the BuiltinHeaders: QueryDriver behaviour worked > better and want to switch back to it (examples here, here, here, here). I'd argue that the fix isn't as simple as using builtin headers from a different toolchain for those users. Because clang itself

[clang-tools-extra] [clangd] Explicitly block until async task completes (PR #130077)

2025-03-06 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/130077 We started seeing some use-after-frees starting with https://github.com/llvm/llvm-project/pull/125433. This patch ensures we explicitly block for the async task, if there's one, before destructing `std::future

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

2025-02-25 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. sorry for the delayed turn around, lgtm! https://github.com/llvm/llvm-project/pull/125988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

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

2025-02-25 Thread kadir çetinkaya via cfe-commits
@@ -380,30 +381,114 @@ llvm::SmallVector getAllRequiredModules(ProjectModules &MDB, return ModuleNames; } +class CachingProjectModules : public ProjectModules { +public: + CachingProjectModules(const GlobalCompilationDatabase &CDB) : CDB(CDB) {} + + std::vector getRequire

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

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

[clang] [SafeBuffers] Check if unsafe-buffers* warnings are enabled earlier (PR #128603)

2025-02-25 Thread kadir çetinkaya via cfe-commits
@@ -2625,14 +2636,10 @@ void clang::sema::AnalysisBasedWarnings::IssueWarnings( // More analysis ... }; + // Emit per-function analysis-based warnings that require the whole-TU - // reasoning. Check if any of them is enabled at all before scanning the AST: - if (!Di

[clang] [SafeBuffers] Check if unsafe-buffers* warnings are enabled earlier (PR #128603)

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

[clang] [clang][Tooling] Support relative directory in compilation database (PR #127734)

2025-02-19 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > In my case I am using my build system (bazel) to generate the > compile_commands.json file as part of the build. At this point given bazel's > sandboxing / hermiticity model, the user's checkout PWD is unknown. This file > is then copied somewhere and used by clangd. Today to

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

2025-02-19 Thread kadir çetinkaya via cfe-commits
@@ -411,6 +411,58 @@ TEST(LocateSymbol, FindOverrides) { sym("foo", Code.range("2"), std::nullopt))); } +TEST(LocateSymbol, FindOverridesObjC) { + auto Code = Annotations(R"objc( +@protocol Fooey +- (void)foo; +@end +@interfa

[clang-tools-extra] [clangd] Store full decl/def range with symbol locations (PR #118102)

2025-02-19 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > Could you say more about this? What happened to ClangdModules? Sorry, apparently I even forgot its proper name, i meant `clangd::FeatureModule`. Nothing bad happened, we built this infra but didn't get a chance to polish and use it afterwards. We wanted to migrate any non-cor

[clang-tools-extra] [clangd] Avoid round-trip from SourceLocation to clangd::Range and back in SymbolCollector::handleMacros() (PR #127757)

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

[clang-tools-extra] [clangd] Store full decl/def range with symbol locations (PR #118102)

2025-02-18 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > We could cut the memory usage overhead of the patch in half by only having it > in one of them. (@kadircet would that change your analysis of the tradeoffs > at all?) I think that'd still be too much considering the functionality we'll get in the end. Others might not share

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

2025-02-17 Thread kadir çetinkaya via cfe-commits
@@ -1438,6 +1461,15 @@ ReferencesResult findReferences(ParsedAST &AST, Position Pos, uint32_t Limit, getOverriddenMethods(CMD, OverriddenMethods); } } +// Special case: Objective-C methods can override a parent class or +// protoco

[clang-tools-extra] [clangd] Store full decl/def range with symbol locations (PR #118102)

2025-02-17 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > My main motivation is to get DefineOutline I think if we're solely aiming for improvements to DefineOutline, I'd say the resource trade-off here isn't worth it. > I don't see how bracket matching can help us get from the name of the > function to the actual start of the decl

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

2025-02-17 Thread kadir çetinkaya via cfe-commits
@@ -430,6 +430,18 @@ locateASTReferent(SourceLocation CurLoc, const syntax::Token *TouchedIdentifier, continue; } } +// Special case: an Objective-C method can override a parent class or +// protocol. kadircet wrote: > I was thinking

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

2025-02-17 Thread kadir çetinkaya via cfe-commits
@@ -430,6 +439,22 @@ locateASTReferent(SourceLocation CurLoc, const syntax::Token *TouchedIdentifier, continue; } } +// Special case: - (void)^method; should jump to all overrides. Note that an +// Objective-C method can override a parent class or pr

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

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

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

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

[clang-tools-extra] [clangd] Store full decl/def range with symbol locations (PR #118102)

2025-02-17 Thread kadir çetinkaya via cfe-commits
kadircet wrote: I am a little hesitant on the memory growth implications, as this won't be a fixed cost we have in static index, but also a significant increase in dynamic-index memory footprint (which grows proportionally with number of touched files in an editing session). We're going to pay

[clang-tools-extra] [clangd] Enable parsing of forwarding functions in the preamble by default (PR #127359)

2025-02-17 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet commented: thanks, as long as we're keeping the underlying option I think this makes sense! we can flip it in production if we see big regressions https://github.com/llvm/llvm-project/pull/127359 ___ cfe-commits mailing lis

[clang-tools-extra] [clangd] Enable parsing of forwarding functions in the preamble by default (PR #127359)

2025-02-17 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, as long as we're keeping the underlying option I think this makes sense! we can flip it in production if we see big regressions https://github.com/llvm/llvm-project/pull/127359 ___ cfe-co

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

2025-02-14 Thread kadir çetinkaya via cfe-commits
@@ -430,6 +430,18 @@ locateASTReferent(SourceLocation CurLoc, const syntax::Token *TouchedIdentifier, continue; } } +// Special case: an Objective-C method can override a parent class or +// protocol. kadircet wrote: what about the i

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

2025-02-14 Thread kadir çetinkaya via cfe-commits
@@ -1283,6 +1295,17 @@ std::vector findImplementations(ParsedAST &AST, Position Pos, } else if (const auto *RD = dyn_cast(ND)) { IDs.insert(getSymbolID(RD)); QueryKind = RelationKind::BaseOf; +} else if (const auto *OMD = dyn_cast(ND)) { + IDs.insert(g

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

2025-02-14 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. can you also add some tests to `SymbolCollectorTests.cpp` to make sure we capture `overriddenby` relationships relevant to your use cases? index tests in `XRefsTests.cpp` uses rather dynamic-index hence can have different char

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

2025-02-14 Thread kadir çetinkaya via cfe-commits
@@ -1438,6 +1461,15 @@ ReferencesResult findReferences(ParsedAST &AST, Position Pos, uint32_t Limit, getOverriddenMethods(CMD, OverriddenMethods); } } +// Special case: Objective-C methods can override a parent class or +// protoco

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

2025-02-14 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/127109 ___ 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-13 Thread kadir çetinkaya via cfe-commits
@@ -380,30 +381,114 @@ llvm::SmallVector getAllRequiredModules(ProjectModules &MDB, return ModuleNames; } +class CachingProjectModules : public ProjectModules { +public: + CachingProjectModules(const GlobalCompilationDatabase &CDB) : CDB(CDB) {} + + std::vector getRequire

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

2025-02-13 Thread kadir çetinkaya via cfe-commits
@@ -380,30 +381,114 @@ llvm::SmallVector getAllRequiredModules(ProjectModules &MDB, return ModuleNames; } +class CachingProjectModules : public ProjectModules { +public: + CachingProjectModules(const GlobalCompilationDatabase &CDB) : CDB(CDB) {} + + std::vector getRequire

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

2025-02-13 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/125988 ___ 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-13 Thread kadir çetinkaya via cfe-commits
@@ -449,21 +534,17 @@ llvm::Error ModulesBuilder::ModulesBuilderImpl::getOrBuildModuleFile( std::unique_ptr ModulesBuilder::buildPrerequisiteModulesFor(PathRef File, const ThreadsafeFS &TFS) { - std::unique_ptr MDB = Impl->getCDB().

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

2025-02-13 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks, I think the biggest concern is about initial performance of this approach until cache warms up. also can we have some tests? it should be possible to unittest by injecting a custom CDB into modules builder. https://gi

[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] [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
@@ -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 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
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] [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-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] 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] 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] [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 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] 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] 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
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] [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] 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] [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-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-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] [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] [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] [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-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-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] 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] [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] [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-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 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] 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-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-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-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] [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] [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-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
@@ -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] [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-17 Thread kadir çetinkaya via cfe-commits
@@ -57,7 +61,7 @@ class ModuleDependencyScanner { /// a global module dependency scanner to monitor every file. Or we /// can simply require the build systems (or even the end users) /// to provide the map. - void globalScan(); + void globalScan(CommandProvider const &P

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

2025-01-17 Thread kadir çetinkaya via cfe-commits
@@ -39,7 +40,25 @@ 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-17 Thread kadir çetinkaya via cfe-commits
@@ -191,6 +211,29 @@ export module M; EXPECT_TRUE(MInfo->canReuse(*Invocation, FS.view(TestDir))); } +TEST_F(PrerequisiteModulesTests, ModuleWithArgumentPatch) { + MockDirectoryCompilationDatabase CDB(TestDir, FS); + + CDB.addExtraClangFlag("-invalid-unknown-flag"); + + C

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

2025-01-17 Thread kadir çetinkaya via cfe-commits
@@ -9,8 +9,10 @@ #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 "clang/Tooling/CompilationDatabase.h" -

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

2025-01-17 Thread kadir çetinkaya via cfe-commits
@@ -48,7 +51,8 @@ class ModuleDependencyScanner { }; /// Scanning the single file specified by \param FilePath. - std::optional scan(PathRef FilePath); + std::optional scan(PathRef FilePath, + CommandProvider const &Provider); --

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

2025-01-17 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks for working on this! 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

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

2025-01-17 Thread kadir çetinkaya via cfe-commits
@@ -191,6 +211,29 @@ export module M; EXPECT_TRUE(MInfo->canReuse(*Invocation, FS.view(TestDir))); } +TEST_F(PrerequisiteModulesTests, ModuleWithArgumentPatch) { + MockDirectoryCompilationDatabase CDB(TestDir, FS); + + CDB.addExtraClangFlag("-invalid-unknown-flag"); + + C

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

2025-01-17 Thread kadir çetinkaya via cfe-commits
@@ -32,6 +32,9 @@ namespace { /// interfere with each other. class ModuleDependencyScanner { public: + using CommandProvider = kadircet wrote: nit: let's use the one from `ProjectModules` rather than duplicating it here https://github.com/llvm/llvm-project/p

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

2025-01-17 Thread kadir çetinkaya via cfe-commits
@@ -36,11 +38,16 @@ namespace clangd { /// `[:partition-name]`. So module names covers partitions. class ProjectModules { public: + using CommandProvider = + llvm::unique_function; kadircet wrote: this looks like a command-mangler, rather than command-p

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

2025-01-17 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited 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] [diagtool] Make the BuiltinDiagnosticsByID table sorted (PR #120321)

2025-01-16 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks! 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] [diagtool] Make the BuiltinDiagnosticsByID table sorted (PR #120321)

2025-01-16 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,31 @@ +//===--- DiagnosticIDs.inc --*- C++ -*-===// +// +// 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] [diagtool] Make the BuiltinDiagnosticsByID table sorted (PR #120321)

2025-01-16 Thread kadir çetinkaya via cfe-commits
kadircet wrote: we already have a concept of `DiagnosticID`. can we rename this to `AllDiagnosticKinds.inc` ? https://github.com/llvm/llvm-project/pull/120321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

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

2025-01-16 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] [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

[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] [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
@@ -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-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2025-01-15 Thread kadir çetinkaya via cfe-commits
@@ -584,7 +582,9 @@ DiagnosticIDs::getDiagnosticSeverity(unsigned DiagID, SourceLocation Loc, const auto &SM = Diag.getSourceManager(); // Custom diagnostics always are emitted in system headers. kadircet wrote: can you also update the comment here to desc

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

2025-01-15 Thread kadir çetinkaya via cfe-commits
@@ -181,13 +182,96 @@ class DiagnosticMapping { class DiagnosticIDs : public RefCountedBase { public: /// The level of the diagnostic, after it has been through mapping. - enum Level { -Ignored, Note, Remark, Warning, Error, Fatal + enum Level : uint8_t { Ignored, Note,

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

2025-01-15 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.) + /

  1   2   3   4   5   6   7   8   9   >