[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-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] 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-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-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] [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
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] [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] 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-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] [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] [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] 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] [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-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] [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] [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] [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-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] 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] 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] [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] [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-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-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
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] [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] 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-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
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] 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

<    5   6   7   8   9   10