[clang] [include-cleaner] Support multi-header symbols in mapping generator (PR #147720)

2025-07-18 Thread kadir çetinkaya via cfe-commits
@@ -690,6 +1391,23 @@ SYMBOL(atol, None, ) SYMBOL(atoll, std::, ) SYMBOL(atoll, None, ) SYMBOL(atoll, None, ) +SYMBOL(atomic, std::, ) +SYMBOL(atomic, std::, ) +SYMBOL(atomic_bool, std::, ) +SYMBOL(atomic_bool, std::, ) +SYMBOL(atomic_bool, std::, ) kadircet wr

[clang] [include-cleaner] Support multi-header symbols in mapping generator (PR #147720)

2025-07-18 Thread kadir çetinkaya via cfe-commits
@@ -232,4 +247,4 @@ def GetSymbols(parse_pages): finally: pool.terminate() pool.join() -return sorted(symbols) +return sorted(set(symbols)) kadircet wrote: each symbol should already have a unique name, why do we need this conversio

[clang] [include-cleaner] Support multi-header symbols in mapping generator (PR #147720)

2025-07-18 Thread kadir çetinkaya via cfe-commits
@@ -2525,6 +3589,10 @@ SYMBOL(remainderf, None, ) SYMBOL(remainderl, std::, ) SYMBOL(remainderl, None, ) SYMBOL(remainderl, None, ) +SYMBOL(remove, std::, ) +SYMBOL(remove, std::, ) kadircet wrote: so we mainly had two reasons for multiple headers per symbol:

[clang] [include-cleaner] Support multi-header symbols in mapping generator (PR #147720)

2025-07-18 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks a lot for working on this, i think this is a great improvement in general! https://github.com/llvm/llvm-project/pull/147720 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [include-cleaner] Support multi-header symbols in mapping generator (PR #147720)

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

[clang-tools-extra] [clangd] Add tweak to override pure virtuals (PR #139348)

2025-07-09 Thread kadir çetinkaya via cfe-commits
@@ -70,6 +70,16 @@ Code completion Code actions +- New ``clangd`` code action: "Override pure virtual methods". When invoked on a kadircet wrote: nit: i'd drop `clangd`, it's already under clangd section. https://github.com/llvm/llvm-project/pu

[clang-tools-extra] [clangd] Add tweak to override pure virtuals (PR #139348)

2025-07-09 Thread kadir çetinkaya via cfe-commits
@@ -70,6 +70,16 @@ Code completion Code actions +- New ``clangd`` code action: "Override pure virtual methods". When invoked on a + class definition, this action automatically generates C++ ``override`` + declarations for all pure virtual methods inherited from

[clang-tools-extra] [clangd] Add tweak to override pure virtuals (PR #139348)

2025-07-09 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks and sorry for not getting back to this for so long. i don't think i'll get to follow up and looks like others are also busy. i have some usability concerns like: - Generating method bodies in class definitions instead of out-of-line

[clang-tools-extra] [clangd] Add tweak to override pure virtuals (PR #139348)

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

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

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

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-07-08 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/137163 From 3453a392b98e05c7d259ebf1741767f7e36a6be9 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 24 Apr 2025 11:12:00 +0200 Subject: [PATCH 1/7] [clang][CompundLiteralExpr] Don't defer evaluation for CL

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-07-08 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/137163 From 3453a392b98e05c7d259ebf1741767f7e36a6be9 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 24 Apr 2025 11:12:00 +0200 Subject: [PATCH 1/6] [clang][CompundLiteralExpr] Don't defer evaluation for CL

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-07-07 Thread kadir çetinkaya via cfe-commits
kadircet wrote: @AaronBallman @ilya-biryukov ping here, I am planning to merge this soon. please LMK if you still have any concerns. https://github.com/llvm/llvm-project/pull/137163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-07-07 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/137163 From 3453a392b98e05c7d259ebf1741767f7e36a6be9 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 24 Apr 2025 11:12:00 +0200 Subject: [PATCH 1/5] [clang][CompundLiteralExpr] Don't defer evaluation for CL

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-07-07 Thread kadir çetinkaya via cfe-commits
@@ -9125,9 +9126,25 @@ bool LValueExprEvaluator::VisitCompoundLiteralExpr(const CompoundLiteralExpr *E) { assert((!Info.getLangOpts().CPlusPlus || E->isFileScope()) && "lvalue compound literal in c++?"); - // Defer visiting the literal until the lvalue-to-rvalue con

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-06-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/137163 From 55976eaeac5bba9c36b92d7aa99f8f589d6c9ef5 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 24 Apr 2025 11:12:00 +0200 Subject: [PATCH 1/4] [clang][CompundLiteralExpr] Don't defer evaluation for CL

[clang] [clang-format] Fix an off-by-1 bug with -length option (PR #143302)

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

[clang] [clang-format] Fix an off-by-1 bug with -length option (PR #143302)

2025-06-26 Thread kadir çetinkaya via cfe-commits
@@ -296,12 +296,16 @@ static bool fillRanges(MemoryBuffer *Code, } if (!EmptyLengths) Length = Lengths[I]; +if (Length == 0) { + errs() << "error: length should be at least 1\n"; + return true; +} if (Offset + Length > CodeSize) { err

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-06-26 Thread kadir çetinkaya via cfe-commits
@@ -9125,9 +9126,25 @@ bool LValueExprEvaluator::VisitCompoundLiteralExpr(const CompoundLiteralExpr *E) { assert((!Info.getLangOpts().CPlusPlus || E->isFileScope()) && "lvalue compound literal in c++?"); - // Defer visiting the literal until the lvalue-to-rvalue con

[clang] [clang-format] Fix an off-by-1 bug with -length option (PR #143302)

2025-06-25 Thread kadir çetinkaya via cfe-commits
@@ -296,12 +296,16 @@ static bool fillRanges(MemoryBuffer *Code, } if (!EmptyLengths) Length = Lengths[I]; +if (Length == 0) { + errs() << "error: length should be at least 1\n"; + return true; +} if (Offset + Length > CodeSize) { err

[clang-tools-extra] Use spelling for clangd missing includes filtering (PR #143411)

2025-06-20 Thread kadir çetinkaya via cfe-commits
kadircet wrote: sorry for silence here, i was mostly waiting for some replies to https://github.com/llvm/llvm-project/pull/140594#issuecomment-2958066558. as it stands, i feel like we'll likely limit users with a spelling based filter. unless people have concerns/disagreement, i'd suggest we r

[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)

2025-06-20 Thread kadir çetinkaya via cfe-commits
@@ -117,6 +117,7 @@ get_property(LINK_LIBS GLOBAL PROPERTY CLANG_UNITTEST_LINK_LIBS) get_property(LLVM_COMPONENTS GLOBAL PROPERTY CLANG_UNITTEST_LLVM_COMPONENTS) add_distinct_clang_unittest(AllClangUnitTests ${SRCS} + AllClangUnitTests.cpp kadircet wrote:

[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)

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

[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)

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

[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)

2025-06-17 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks for the quick fix! https://github.com/llvm/llvm-project/pull/144428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)

2025-06-17 Thread kadir çetinkaya via cfe-commits
@@ -117,6 +117,7 @@ get_property(LINK_LIBS GLOBAL PROPERTY CLANG_UNITTEST_LINK_LIBS) get_property(LLVM_COMPONENTS GLOBAL PROPERTY CLANG_UNITTEST_LLVM_COMPONENTS) add_distinct_clang_unittest(AllClangUnitTests ${SRCS} + AllClangUnitTests.cpp kadircet wrote:

[clang-tools-extra] [clangd] Implement LSP 3.17 positionEncoding (PR #142903)

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

[clang-tools-extra] [clangd] Implement LSP 3.17 positionEncoding (PR #142903)

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

[clang-tools-extra] [clangd] Implement LSP 3.17 positionEncoding (PR #142903)

2025-06-16 Thread kadir çetinkaya via cfe-commits
@@ -497,6 +497,12 @@ bool fromJSON(const llvm::json::Value &Params, ClientCapabilities &R, if (auto Cancel = StaleRequestSupport->getBoolean("cancel")) R.CancelsStaleRequests = *Cancel; } +if (auto *OffsetEncoding = General->get("positionEncodings")) { +

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-06-16 Thread kadir çetinkaya via cfe-commits
kadircet wrote: Do you or @petrhosek have some free cycles to follow up on that soon? Because as things stand, unit test execution is currently in a very fragile state. Anyone that adds a unittest to clang currently runs the risk of braking something completely unrelated (I do agree that it's

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-06-13 Thread kadir çetinkaya via cfe-commits
kadircet wrote: hi folks, this change triggered some other failures in a distance, you can see detailed analysis in https://github.com/llvm/llvm-project/pull/143695#issuecomment-2970691063. but tl;dr; LLVM shares some state throughout a process. This isn't something new with this change, unit

[clang] [clang] Reset FileID based diag state mappings (PR #143695)

2025-06-13 Thread kadir çetinkaya via cfe-commits
kadircet wrote: ok so I did a little more investigation here, and tl;dr is: - LLVM's target registry mechanism relies on static initialization of variables by the main driver program (usually clang driver takes care of this for real world runs). - There are some tests (especially the ones that

[clang] [clang] Reset FileID based diag state mappings (PR #143695)

2025-06-13 Thread kadir çetinkaya via cfe-commits
kadircet wrote: hi @nathanchance, I can't seem to reproduce the failure, and I couldn't find any buildbots with this failure (also the assertion you're seeing conceptually shouldn't be triggered by state in diagnostics engine). I am not sure how to proceed here but can you at least verify if t

[clang] [clang-tools-extra] Remove delayed typo expressions (PR #143423)

2025-06-12 Thread kadir çetinkaya via cfe-commits
@@ -974,7 +974,7 @@ class Foo final {})cpp"; HI.Name = "abc"; HI.Kind = index::SymbolKind::Variable; HI.NamespaceScope = ""; - HI.Definition = "int abc = ()"; kadircet wrote: despite typoexprs fragile and complicated nature,

[clang] [clang-tools-extra] [clangd] Collect references in array designators (PR #140356)

2025-06-12 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. sorry for the late response and thanks a lot! https://github.com/llvm/llvm-project/pull/140356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang-tools-extra] [clangd] Add languages as server capabilities (PR #75633)

2025-06-12 Thread kadir çetinkaya via cfe-commits
kadircet wrote: I am afraid exposing this in server capabilities might be too convoluted. IIUC, we're trying to figure out if clangd should be used for documents for language `X`. We need to figure this out **before** clangd's proper initialization, so that we can decide which `documentSelecto

[clang-tools-extra] [clangd] Implement LSP 3.17 positionEncoding (PR #142903)

2025-06-12 Thread kadir çetinkaya via cfe-commits
@@ -497,6 +497,12 @@ bool fromJSON(const llvm::json::Value &Params, ClientCapabilities &R, if (auto Cancel = StaleRequestSupport->getBoolean("cancel")) R.CancelsStaleRequests = *Cancel; } +if (auto *OffsetEncoding = General->get("positionEncodings")) { +

[clang-tools-extra] [clangd] Implement LSP 3.17 positionEncoding (PR #142903)

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

[clang] [clang] Reset FileID based diag state mappings (PR #143695)

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

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-06-10 Thread kadir çetinkaya via cfe-commits
kadircet wrote: I am rather worried that we'll lose ability to filter effectively when we match against spelled headers. Maybe the actual use cases in the wild and what I have mind are different, but I would expect users to have a situation like; - they pass a `-Ithird_party/qt/include` in thei

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-27 Thread kadir çetinkaya via cfe-commits
@@ -151,6 +164,11 @@ std::vector generateMissingIncludeDiagnostics( if (!Replacement.has_value()) continue; +if (Angled && Spelling.front() == '\"') { kadircet wrote: yikes, we also need to do this transformation in the other way as well :/ Mig

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

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

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

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

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, mostly LGTM, please wait on a final look from @HighCommander4 though, he has more context about this feature overall, maybe the discrepancy on path vs spelling based match has a story. https://github.com/llvm/llvm-project/pull/140

[clang-tools-extra] [clang-tidy] Fix formatting and add release notes entry (PR #141584)

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

[clang-tools-extra] [clang-tidy] Fix formatting and add release notes entry (PR #141584)

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

[clang] Fix tests of lookup table generator (PR #139463)

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

[clang-tools-extra] [clang-tidy] readability-redundant-smartptr-get: disable for smart pointers to arrays (PR #141092)

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

[clang-tools-extra] [clang-tidy] readability-redundant-smartptr-get: disable for smart pointers to arrays (PR #141092)

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

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-26 Thread kadir çetinkaya via cfe-commits
@@ -141,16 +143,41 @@ std::vector generateMissingIncludeDiagnostics( AST.getPreprocessor().getHeaderSearchInfo(), MainFile}); llvm::StringRef HeaderRef{Spelling}; -bool Angled = HeaderRef.starts_with("<"); + +bool IsAngled = false; kadirce

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

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

[clang] [Clang] Add resource_dir_EQ flag to CC1Option group (PR #140870)

2025-05-26 Thread kadir çetinkaya via cfe-commits
kadircet wrote: LGTM, but cc @llvm/clang-area-team, in case they have any concerns here https://github.com/llvm/llvm-project/pull/140870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix tests of lookup table generator (PR #139463)

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

[clang-tools-extra] [clang-tidy] readability-redundant-smartptr-get: disable for smart pointers to arrays (PR #141092)

2025-05-26 Thread kadir çetinkaya via cfe-commits
@@ -43,10 +43,18 @@ internal::Matcher callToGet(const internal::Matcher &OnClass) { .bind("redundant_get"); } -internal::Matcher knownSmartptr() { +internal::Matcher knownSmartptrAny() { return recordDecl(hasAnyName("::std::unique_ptr", "::std::shared_ptr")); } +i

[clang-tools-extra] [clang-tidy] readability-redundant-smartptr-get: disable for smart pointers to arrays (PR #141092)

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

[clang-tools-extra] [NFC][clangd][test] add clang-tidy config to ensure test cases sandbox (PR #141410)

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

[clang] [ClangTool] Use CC1Option flag resource-dir in injectResourceDir (PR #140870)

2025-05-26 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. do we know why https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Driver/Options.td#L5894-L5901 doesn't declare _EQ version for cc1? i think instead of working around this in various places, we should unify the

[clang-tools-extra] [NFC][clangd][test] add clang-tidy config to ensure test cases sandbox (PR #141410)

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

[clang-tools-extra] [NFC][clangd][test] add clang-tidy config to ensure test cases sandbox (PR #141410)

2025-05-26 Thread kadir çetinkaya via cfe-commits
@@ -32,6 +32,9 @@ # RUN: echo 'printf "End of search list.\r\n" >&2' >> %t.dir/bin/my_driver.sh # RUN: chmod +x %t.dir/bin/my_driver.sh +# Create fake clang-tidy config to ensure sandbox +# RUN: echo 'InheritParentConfig: false' >> %t.dir/.clang-tidy kadircet

[clang-tools-extra] [NFC][clangd][test] add clang-tidy config to ensure test cases sandbox (PR #141410)

2025-05-26 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1 @@ +InheritParentConfig: false kadircet wrote: are we running any tests in this directory? these inputs are usually copied to temp test directories, since you're not copying this over in any of the tests, is this really needed? (or do we have some te

[clang-tools-extra] [clang-tidy] readability-redundant-smartptr-get: disable for smart pointers to arrays (PR #141092)

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

[clang-tools-extra] [clang-tidy] readability-redundant-smartptr-get: disable for smart pointers to arrays (PR #141092)

2025-05-23 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks a lot for taking a lookg here! https://github.com/llvm/llvm-project/pull/141092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang-tools-extra] [clang-tidy] readability-redundant-smartptr-get: disable for smart pointers to arrays (PR #141092)

2025-05-23 Thread kadir çetinkaya via cfe-commits
@@ -44,7 +44,10 @@ internal::Matcher callToGet(const internal::Matcher &OnClass) { } internal::Matcher knownSmartptr() { - return recordDecl(hasAnyName("::std::unique_ptr", "::std::shared_ptr")); + return recordDecl( + hasAnyName("::std::unique_ptr", "::std::shared_ptr

[clang-tools-extra] [clang-tools-extra] Add include mappings for (PR #141216)

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

[clang-tools-extra] [clang-tools-extra] Add include mappings for (PR #141216)

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

[clang-tools-extra] [clang-tidy] Don't run use-nullptr check on objective-c code. (PR #141229)

2025-05-23 Thread kadir çetinkaya via cfe-commits
@@ -19,7 +19,7 @@ class UseNullptrCheck : public ClangTidyCheck { bool isLanguageVersionSupported(const LangOptions &LangOpts) const override { // FIXME this should be CPlusPlus11 but that causes test cases to // erroneously fail. -return LangOpts.CPlusPlus || Lan

[clang-tools-extra] [clang-tidy] Don't run use-nullptr check on objective-c code. (PR #141229)

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

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-23 Thread kadir çetinkaya via cfe-commits
kadircet wrote: just a high level question, I wasn't following the recent developments closely, but we seem to have both an `AngledHeaders` and `QuotedHeaders` option. Why are we only following one here? I guess the signals for angled includes are much stricter (search paths need to be marked

[clang-tools-extra] [clang-tools-extra] Add include mappings for getopt.h (PR #140726)

2025-05-21 Thread kadir çetinkaya via cfe-commits
kadircet wrote: unfortunately neither is used by include-cleaner. we only support mappings for c++ STL, through https://github.com/llvm/llvm-project/blob/main/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc and friends. we didn't want to add any system specific libraries, especially base

[clang] [clang-tools-extra] [clang-include-cleaner] Make cleanup attr report expr location (PR #140233)

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

[clang] [clang-tools-extra] [clang-include-cleaner] Make cleanup attr report expr location (PR #140233)

2025-05-21 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet commented: LG for include-cleaner changes. https://github.com/llvm/llvm-project/pull/140233 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add UnusedIncludes/MissingIncludes options to misc-include-cleaner (PR #140600)

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

[clang-tools-extra] [clangd] Drop the optimization where only shards for modified files are updated in the background index (PR #140651)

2025-05-20 Thread kadir çetinkaya via cfe-commits
kadircet wrote: I am afraid this doesn't address clangd/clangd#1104 to a useful extent :/. Whenever a header `foo.h` changes, clangd will schedule indexing of only a **single** translation unit that depends on it, not all of them. So if there are other TUs that reference `foo`, they'll still s

[clang] [clang-tools-extra] [clang-include-cleaner] Make cleanup attr report expr location (PR #140233)

2025-05-19 Thread kadir çetinkaya via cfe-commits
kadircet wrote: changes in include-cleaner LG, but I am not sure about the canonical way of tracking this location in clang (i.e. if we're going to track an expression within the attribute, do we still need to tract the underlying decl as well? can't we just extract it from expr when needed?)

[clang] [Clang] Allow parsing arbitrary order of attributes for declarations (PR #133107)

2025-05-19 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > I think we need to understand what we want before we can make decisions on > what needs changing, though. Are there invariants we want to introduce, like > the source range for the AST node should encompass the source locations > tracked within the AST node? Or are we fine wi

[clang] [Clang] Allow parsing arbitrary order of attributes for declarations (PR #133107)

2025-05-16 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > We're currently inconsistent regarding attributes; sometimes we include the > attributes in the range, sometimes we don't. But declaration source ranges > are tough to reason about in general because there's many different moving > parts. I totally agree. I was asking to cha

[clang] [Clang] Allow parsing arbitrary order of attributes for declarations (PR #133107)

2025-05-15 Thread kadir çetinkaya via cfe-commits
kadircet wrote: I'd like to highlight that many tools still only care about declarations themselves and not the attributes. The ones that fiddle with attributes need to do it in a special and complicated way already. Making this less complicated definitely creates some value. But I think the

[clang] [Clang] Allow parsing arbitrary order of attributes for declarations (PR #133107)

2025-05-15 Thread kadir çetinkaya via cfe-commits
kadircet wrote: I'd like to chime in for the issue with source locations and its implications. Seems like it has been brought up already along the thread. These might not be as crucial for diagnostic locations (or other clang purposes) when they're slightly off, but they actually result in big

[clang-tools-extra] include-cleaner: Report function decls from __cleanup__ as used (PR #138669)

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

[clang-tools-extra] include-cleaner: Report function decls from __cleanup__ as used (PR #138669)

2025-05-13 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, sorry for missing this! https://github.com/llvm/llvm-project/pull/138669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate ObjC `* __autoreleasing *` (PR #138799)

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

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-05-06 Thread kadir çetinkaya via cfe-commits
kadircet wrote: ping @AaronBallman @efriedma-quic if you don't have more concerns here, I'd like to move forward with this patch https://github.com/llvm/llvm-project/pull/137163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-05-05 Thread kadir çetinkaya via cfe-commits
@@ -9125,9 +9126,25 @@ bool LValueExprEvaluator::VisitCompoundLiteralExpr(const CompoundLiteralExpr *E) { assert((!Info.getLangOpts().CPlusPlus || E->isFileScope()) && "lvalue compound literal in c++?"); - // Defer visiting the literal until the lvalue-to-rvalue con

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

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

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-05-04 Thread kadir çetinkaya via cfe-commits
@@ -158,6 +159,42 @@ TEST(StdLibTests, EndToEnd) { UnorderedElementsAre(StdlibSymbol("list"), StdlibSymbol("vector"))); } +TEST(StdLibTests, StdLibDocComments) { + Config Cfg; + Cfg.Index.StandardLibrary = true; + WithContextValue Enabled(Config::Key, std::move(Cfg));

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-05-04 Thread kadir çetinkaya via cfe-commits
@@ -158,6 +158,43 @@ TEST(StdLibTests, EndToEnd) { UnorderedElementsAre(StdlibSymbol("list"), StdlibSymbol("vector"))); } +TEST(StdLibTests, StdLibDocComments) { + Config Cfg; + Cfg.Index.StandardLibrary = true; + WithContextValue Enabled(Config::Key, std::move(Cfg));

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

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

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-04-29 Thread kadir çetinkaya via cfe-commits
@@ -9125,9 +9126,25 @@ bool LValueExprEvaluator::VisitCompoundLiteralExpr(const CompoundLiteralExpr *E) { assert((!Info.getLangOpts().CPlusPlus || E->isFileScope()) && "lvalue compound literal in c++?"); - // Defer visiting the literal until the lvalue-to-rvalue con

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-04-28 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/137163 From 99fa9a1f5fb74401c790871e6eb1ce473d048d74 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 24 Apr 2025 11:12:00 +0200 Subject: [PATCH 1/3] [clang][CompundLiteralExpr] Don't defer evaluation for CL

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-04-28 Thread kadir çetinkaya via cfe-commits
@@ -9125,9 +9126,25 @@ bool LValueExprEvaluator::VisitCompoundLiteralExpr(const CompoundLiteralExpr *E) { assert((!Info.getLangOpts().CPlusPlus || E->isFileScope()) && "lvalue compound literal in c++?"); - // Defer visiting the literal until the lvalue-to-rvalue con

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-04-28 Thread kadir çetinkaya via cfe-commits
@@ -4522,6 +4523,38 @@ static CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, BaseVal = MTE->getOrCreateValue(false); assert(BaseVal && "got reference to unevaluated temporary"); + } else if (const CompoundLiteralExpr *CLE = +

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-04-28 Thread kadir çetinkaya via cfe-commits
@@ -4522,6 +4523,38 @@ static CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, BaseVal = MTE->getOrCreateValue(false); assert(BaseVal && "got reference to unevaluated temporary"); + } else if (const CompoundLiteralExpr *CLE = +

[clang] [clang-format] Fix a bug in annotating TT_PointerOrReference (PR #136073)

2025-04-28 Thread kadir çetinkaya via cfe-commits
kadircet wrote: this didn't seem to restore the desired formatting, re-openning #135972 with additional context https://github.com/llvm/llvm-project/pull/136073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-04-28 Thread kadir çetinkaya via cfe-commits
@@ -158,6 +158,43 @@ TEST(StdLibTests, EndToEnd) { UnorderedElementsAre(StdlibSymbol("list"), StdlibSymbol("vector"))); } +TEST(StdLibTests, StdLibDocComments) { + Config Cfg; + Cfg.Index.StandardLibrary = true; + WithContextValue Enabled(Config::Key, std::move(Cfg));

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-04-28 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks a lot, implementation LG, just a small hurdle with the test (sorry for not checking that out earlier) https://github.com/llvm/llvm-project/pull/133681 ___ cfe-commits mailing l

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

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

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-04-28 Thread kadir çetinkaya via cfe-commits
@@ -223,33 +226,26 @@ SymbolSlab indexStandardLibrary(llvm::StringRef HeaderSources, return Symbols; } - SymbolCollector::Options IndexOpts; - IndexOpts.Origin = SymbolOrigin::StdLib; - IndexOpts.CollectMainFileSymbols = false; - IndexOpts.CollectMainFileRefs = fals

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-04-25 Thread kadir çetinkaya via cfe-commits
@@ -9125,9 +9126,25 @@ bool LValueExprEvaluator::VisitCompoundLiteralExpr(const CompoundLiteralExpr *E) { assert((!Info.getLangOpts().CPlusPlus || E->isFileScope()) && "lvalue compound literal in c++?"); - // Defer visiting the literal until the lvalue-to-rvalue con

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-04-25 Thread kadir çetinkaya via cfe-commits
@@ -4622,7 +4618,12 @@ handleLValueToRValueConversion(EvalInfo &Info, const Expr *Conv, QualType Type, } } - CompleteObject LitObj(LVal.Base, &Lit, Base->getType()); + APValue *Lit = + CLE->hasStaticStorage() + ? &CLE->getStaticVa

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-04-25 Thread kadir çetinkaya via cfe-commits
@@ -3489,6 +3489,11 @@ class CompoundLiteralExpr : public Expr { /// The int part of the pair stores whether this expr is file scope. llvm::PointerIntPair TInfoAndScope; Stmt *Init; + + /// Value of constant literals with static storage duration. Used only for + /// con

  1   2   3   4   5   6   7   8   9   10   >