[clang] [clang][modules] Separate parsing of modulemaps (PR #119740)

2025-01-10 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai commented: Overall the change makes sense and now `ModuleMap` works more like semantic analysis after the module map parsing. Didn't really delve into the parsing code and didn't compare the implementations side-by-side. Relying on the tests and expect most of the co

[clang] [clang][modules] Separate parsing of modulemaps (PR #119740)

2025-01-10 Thread Volodymyr Sapsai via cfe-commits
@@ -0,0 +1,141 @@ +//===- ModuleMapFile.h - Parsing and representation -*- 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: Ap

[clang] [clang][modules] Separate parsing of modulemaps (PR #119740)

2025-01-10 Thread Volodymyr Sapsai via cfe-commits
@@ -1575,305 +1494,45 @@ namespace clang { /// 'textual' to match the original intent. llvm::SmallPtrSet UsesRequiresExcludedHack; -/// Consume the current token and return its location. -SourceLocation consumeToken(); - -/// Skip tokens until we reach the

[clang] [clang][modules] Separate parsing of modulemaps (PR #119740)

2025-01-10 Thread Volodymyr Sapsai via cfe-commits
@@ -0,0 +1,141 @@ +//===- ModuleMapFile.h - Parsing and representation -*- 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: Ap

[clang] [clang][modules] Separate parsing of modulemaps (PR #119740)

2025-01-10 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai edited https://github.com/llvm/llvm-project/pull/119740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Modules] Fix modular build. (PR #122034)

2025-01-07 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/122034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Modules] Fix modular build. (PR #122034)

2025-01-07 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: Test failure "LLVM.tools/llvm-gsymutil/ARM_AArch64/macho-merged-funcs-dwarf.yaml" is unrelated to this change. https://github.com/llvm/llvm-project/pull/122034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [llvm] [Modules] Fix modular build. (PR #122034)

2025-01-07 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/122034 Add a new file to the module map and remove 2 missing files (migrated from .def to .td). >From cc9d4ebe3880810c8325f1fd6c7b9e2a49f2fe74 Mon Sep 17 00:00:00 2001 From: Volodymyr Sapsai Date: Tue, 7 Jan 2025 17:

[clang] [clang][ObjectiveC] Fix Parsing Method Parameter Types with the `::` Prefix (PR #119908)

2024-12-17 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: I don't know if we have a test for it but I've realized there are cases where you can have a legitimate double colon in Objective-C. For example, ```objective-c @interface NSObject @end @implementation NSObject - (void)performSelector:(SEL)selector {} - (void)double:(int)firstAr

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2024-12-16 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: Sorry for the delay. Will need to look at the change in a debugger. https://github.com/llvm/llvm-project/pull/114240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ObjectiveC] Fix Parsing Method Parameter Types with the `::` Prefix (PR #119908)

2024-12-16 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: How does it work in Objective-C++? I don't know even if we have a test but hope we do. https://github.com/llvm/llvm-project/pull/119908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

2024-10-22 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai approved this pull request. https://github.com/llvm/llvm-project/pull/112452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

2024-10-18 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: > > Have you checked the performance for incremental builds? > > I haven't, since I believe this change doesn't affect incremental builds at > all. Fair enough. I was thinking that you can achieve the same improvement by using some contentionless-update-mtime function. But I ha

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

2024-10-17 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai commented: I think the change makes sense. For example, for just-built .o files we assume they are valid and up-to-date, and don't need any extra verification. As far as I understand, your change helps with the clean builds. And I believe incremental builds can still

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

2024-10-17 Thread Volodymyr Sapsai via cfe-commits
@@ -4905,6 +4905,10 @@ ASTFileSignature ASTWriter::WriteAST(Sema &SemaRef, StringRef OutputFile, this->BaseDirectory.clear(); WritingAST = false; + + if (WritingModule) +updateModuleTimestamp(OutputFile); vsapsai wrote: Don't have a strong opinion a

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

2024-10-17 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai edited https://github.com/llvm/llvm-project/pull/112452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Mark CFProtectionOptions.def as a textual header because it is used for x-macro purposes. (PR #110780)

2024-10-01 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/110780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Mark CFProtectionOptions.def as a textual header because it is used for x-macro purposes. (PR #110780)

2024-10-01 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: CI error ``` Traceback (most recent call last): File "/var/lib/buildkite-agent/builds/linux-56-59b8f5d88-r8xzr-1/llvm-project/github-pull-requests/libcxx/utils/generate_iwyu_mapping.py", line 92, in main(sys.argv[1:]) File "/var/lib/buildkite-agent/builds/linux-56-59b8f

[clang] [Modules] Mark CFProtectionOptions.def as a textual header because it is used for x-macro purposes. (PR #110780)

2024-10-01 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/110780 None >From 030597a499d59b860cd14a6e5ba69b93a4b30290 Mon Sep 17 00:00:00 2001 From: Volodymyr Sapsai Date: Tue, 1 Oct 2024 18:46:04 -0700 Subject: [PATCH] [Modules] Mark CFProtectionOptions.def as a textual head

[clang] [clang] Remove 'PCH' from more diagnostics that were wrong or misleading NFC (PR #110724)

2024-10-01 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai approved this pull request. https://github.com/llvm/llvm-project/pull/110724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Fix build errors with a `LLVM_ENABLE_MODULES=ON` build (PR #107654)

2024-09-06 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai approved this pull request. Thanks for fixing these! https://github.com/llvm/llvm-project/pull/107654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules][Diagnostic] Mention which AST file's options differ from the current TU options. (PR #101413)

2024-08-08 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: Formatting change was #102484. https://github.com/llvm/llvm-project/pull/101413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [re-format][Modules] Follow-up formatting to "Mention which AST file's options differ from the current TU options." (PR #102484)

2024-08-08 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/102484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [re-format][Modules] Follow-up formatting to "Mention which AST file's options differ from the current TU options." (PR #102484)

2024-08-08 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/102484 Fix formatting for fdf8e3e31103bc81917cdb27150877f524bb2669. >From 4083dcf794e2a3d27966090e955433361b733ff8 Mon Sep 17 00:00:00 2001 From: Volodymyr Sapsai Date: Thu, 8 Aug 2024 11:51:53 -0300 Subject: [PATCH]

[clang] [Modules][Diagnostic] Mention which AST file's options differ from the current TU options. (PR #101413)

2024-08-08 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/101413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules][Diagnostic] Mention which AST file's options differ from the current TU options. (PR #101413)

2024-08-06 Thread Volodymyr Sapsai via cfe-commits
@@ -130,7 +130,7 @@ class ASTReaderListener { /// /// \returns true to indicate the options are invalid or false otherwise. virtual bool ReadLanguageOptions(const LangOptions &LangOpts, - bool Complain, +

[clang] Reland "[Modules] Fix using `va_list` with modules and a precompiled header. (#101752)" (PR #101762)

2024-08-06 Thread Volodymyr Sapsai via cfe-commits
@@ -0,0 +1,84 @@ +// Check how builtins using varargs behave with the modules. + +// REQUIRES: x86-registered-target +// RUN: rm -rf %t +// RUN: split-file %s %t + +// RUN: %clang_cc1 -triple x86_64-apple-darwin \ vsapsai wrote: The issue is reproducible on x86_6

[clang] Reland "[Modules] Fix using `va_list` with modules and a precompiled header. (#101752)" (PR #101762)

2024-08-02 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/101762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[Modules] Fix using `va_list` with modules and a precompiled header. (#101752)" (PR #101762)

2024-08-02 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/101762 Fix the false warning > incompatible pointer types passing 'va_list' (aka '__builtin_va_list') to > parameter of type 'struct __va_list_tag *' [-Wincompatible-pointer-types] The warning is wrong because both in

[clang] [Modules] Fix using `va_list` with modules and a precompiled header. (PR #100837)

2024-08-02 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: Looks like need something like `// REQUIRES: x86-registered-target` in the test. But still need to check the correct approach in other tests. https://github.com/llvm/llvm-project/pull/100837 ___ cfe-commits mailing list cfe-commits@list

[clang] [Modules][Diagnostic] Mention which AST file's options differ from the current TU options. (PR #101413)

2024-08-02 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai updated https://github.com/llvm/llvm-project/pull/101413 >From c474bcdc5155d3ca9f9d219444b70e6c0ba43a28 Mon Sep 17 00:00:00 2001 From: Volodymyr Sapsai Date: Wed, 31 Jul 2024 14:13:47 -0700 Subject: [PATCH 1/3] [Modules][Diagnostic] Mention which AST file's options d

[clang] [Modules][Diagnostic] Mention which AST file's options differ from the current TU options. (PR #101413)

2024-08-02 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai updated https://github.com/llvm/llvm-project/pull/101413 >From c474bcdc5155d3ca9f9d219444b70e6c0ba43a28 Mon Sep 17 00:00:00 2001 From: Volodymyr Sapsai Date: Wed, 31 Jul 2024 14:13:47 -0700 Subject: [PATCH 1/2] [Modules][Diagnostic] Mention which AST file's options d

[clang] [Modules] Fix using `va_list` with modules and a precompiled header. (PR #100837)

2024-08-02 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/100837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Fix using `va_list` with modules and a precompiled header. (PR #100837)

2024-08-02 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: > LGTM. Thanks for the review! https://github.com/llvm/llvm-project/pull/100837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules][Diagnostic] Mention which AST file's options differ from the current TU options. (PR #101413)

2024-08-02 Thread Volodymyr Sapsai via cfe-commits
@@ -130,7 +130,7 @@ class ASTReaderListener { /// /// \returns true to indicate the options are invalid or false otherwise. virtual bool ReadLanguageOptions(const LangOptions &LangOpts, - bool Complain, +

[clang] [Modules][Diagnostic] Mention which AST file's options differ from the current TU options. (PR #101413)

2024-08-02 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: > I'd suggest keeping this PR and the resulting commit free of any formatting > changes and then commit the results from `clang-format` as a separate commit. Will do that. > After #101280 I had the impression that we're trying to be very precise about > reporting whether an AST

[clang] [Modules][Diagnostic] Don't claim a METADATA mismatch is always in PCH file. (PR #101280)

2024-07-31 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/101280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules][Diagnostic] Don't claim a METADATA mismatch is always in PCH file. (PR #101280)

2024-07-30 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: I have more similar improvements when a diagnostic claims a mismatch is in PCH file while it is in a module file. Those would be separate PR(s) as the code change is quite different. https://github.com/llvm/llvm-project/pull/101280 ___

[clang] [Modules][Diagnostic] Don't claim a METADATA mismatch is always in PCH file. (PR #101280)

2024-07-30 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/101280 You can provide more than one AST file as an input. Emit a path for a file with a problem, so you can disambiguate between multiple files. rdar://65005546 >From c115a7f6b3e36682bfdd9768ab7969e0f11489bb Mon Sep

[clang] [Modules] Fix using `va_list` with modules and a precompiled header. (PR #100837)

2024-07-26 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/100837 Fix the false warning > incompatible pointer types passing 'va_list' (aka '__builtin_va_list') to > parameter of type 'struct __va_list_tag *' [-Wincompatible-pointer-types] The warning is wrong because both in

[clang] [Modules] Don't search for modulemaps in the immediate sub-directories of search paths for recent Apple SDKs. (PR #100005)

2024-07-23 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/15 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Don't search for modulemaps in the immediate sub-directories of search paths for recent Apple SDKs. (PR #100005)

2024-07-23 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: Failed test is "Profile-x86_64 :: check-same-common-code.test", the same as failed in #100011 for unrelated reasons. https://github.com/llvm/llvm-project/pull/15 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [Modules] Don't search for modulemaps in the immediate sub-directories of search paths for recent Apple SDKs. (PR #100005)

2024-07-23 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai updated https://github.com/llvm/llvm-project/pull/15 >From 8566865fd55a4634414f339a39c045aac637f374 Mon Sep 17 00:00:00 2001 From: Volodymyr Sapsai Date: Mon, 22 Jul 2024 15:40:15 -0700 Subject: [PATCH 1/2] [Modules] Don't search for modulemaps in the immediate s

[clang] [HeaderSearch] Make a test independent of the local environment. (PR #100011)

2024-07-23 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/100011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HeaderSearch] Make a test independent of the local environment. (PR #100011)

2024-07-23 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: Failed test is unrelated "Profile-x86_64 :: check-same-common-code.test". https://github.com/llvm/llvm-project/pull/100011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [HeaderSearch] Make a test independent of the local environment. (PR #100011)

2024-07-22 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: Noticed inconsistencies after #15 as I have pre-release Xcode locally. https://github.com/llvm/llvm-project/pull/100011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [HeaderSearch] Make a test independent of the local environment. (PR #100011)

2024-07-22 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/100011 Don't ask the driver to inspect the local environment but use `cc1` directly. >From 190e0a04afb71873c5d398ff08057684ca553d67 Mon Sep 17 00:00:00 2001 From: Volodymyr Sapsai Date: Mon, 22 Jul 2024 16:46:27 -0700

[clang] [Modules] Don't search for modulemaps in the immediate sub-directories of search paths for recent Apple SDKs. (PR #100005)

2024-07-22 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/15 Such searches can be costly and non-intuitive. We've seen complaints from developers that they don't expect clang to find modules on their own and not in search paths that developers provide. Keeping the search

[clang] [clang][modules] Fix use-after-free in header serialization (PR #96356)

2024-07-03 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai approved this pull request. https://github.com/llvm/llvm-project/pull/96356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Fix use-after-free in header serialization (PR #96356)

2024-07-03 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: Looked at this more and haven't found anything sketchy. `ASTWriter::WriteHeaderSearch` writes the same content both with and without `-fno-modules-prune-non-affecting-module-map-files`. `Preprocessor::alreadyIncluded` is called in reasonable places (as for me, ASTWriter is the

[clang] [clang][modules] Fix use-after-free in header serialization (PR #96356)

2024-06-27 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: Non-representative check for changes in the memory consumption doesn't show anything interesting for the added test case. Maximum resident set size and peak memory footprint with the change and without it are pretty close to each other, no statistic, just eyeballing. My main co

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-05-07 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: In C++ we reject mismatched types coming from different Clang modules. Haven't checked the behavior for C++20 modules as I'm not changing it. In C modules aren't a part of any standard as far as I know. But for Clang modules we reject most of the mismatched types coming from dif

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-05-02 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/90298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-05-01 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: @dwblaikie if you have no further comments, I'll merge this approved change some time soon (in a day or two). https://github.com/llvm/llvm-project/pull/90298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-04-29 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: > Not sure I'm following the response here - but I guess what I'm trying to > say, with more words, is that my understanding was that C doesn't have an > ODR, and you can have different definitions of a type, with the same name, in > C and that's OK. In different translation un

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-04-29 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: > C doesn't have an odr, does it? For non-C++ "ODR" has a meaning more like "ODR-inspired checks". But there is no language rule that would require enforcement and there is no impact on linkage (at least during deserialization). https://github.com/llvm/llvm-project/pull/90298 _

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-04-26 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/90298 There is no reason for C and Objective-C to differ from C++ in this matter. rdar://85531830 >From 8dafc9af06eef1a4b3fba8b5cffeece62967a6fd Mon Sep 17 00:00:00 2001 From: Volodymyr Sapsai Date: Fri, 26 Apr 2024

[clang] [unused-includes] PCHContainerOperations uses MemoryBufferRef, not MemoryBuffer. NFC. (PR #88794)

2024-04-16 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/88794 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [unused-includes][Serialization] Remove unused includes. NFC. (PR #88790)

2024-04-16 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/88790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [unused-includes] PCHContainerOperations uses MemoryBufferRef, not MemoryBuffer. NFC. (PR #88794)

2024-04-15 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/88794 None >From b95289569d0441ff799282e125e4f9ad16969f12 Mon Sep 17 00:00:00 2001 From: Volodymyr Sapsai Date: Mon, 15 Apr 2024 13:44:54 -0700 Subject: [PATCH] [unused-includes] PCHContainerOperations uses MemoryBuf

[clang] [unused-includes][Serialization] Remove unused includes. NFC. (PR #88790)

2024-04-15 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/88790 None >From 72f8208752d188aa32e9989faecd7c4b11779eb9 Mon Sep 17 00:00:00 2001 From: Volodymyr Sapsai Date: Mon, 15 Apr 2024 13:22:48 -0700 Subject: [PATCH] [unused-includes][Serialization] Remove unused includes.

[clang] [clang-scan-deps] Fix contention when updating `TrackingStatistic`s in hot code paths in `FileManager`. (PR #88427)

2024-04-12 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: The bigger idea is that not enabled stats should be negligibly cheap. As for me, the problem is in that not being true. Let me check how we have expensive stats all the time. Extra fixes are good but I'm concerned they help only with these specific stats while others might stil

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-12 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: I'm not excited by the complexity we are moving toward with the builtin headers. But I don't have any alternatives. Given the situation we are in, I think the change is ok. But I'd like someone else to look at it as it is tricky to reason about it. No blockers from me but want

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-03-12 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: > Sometimes it does confuse clang, at least I saw problems with a `typedef > enum` when I made an include-once header `textual`. Ok, I see. I would just consider it a bug, not a design decision. > That's correct. `#import` is an external source - often it comes from the > users

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-12 Thread Volodymyr Sapsai via cfe-commits
@@ -7,6 +7,11 @@ *===---=== */ -#ifndef offsetof +/* + * When -fbuiltin-headers-in-system-modules is set this is a non-modular header + * and needs to behave as if it was textual. + */ +#if !defined(offsetof

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-11 Thread Volodymyr Sapsai via cfe-commits
@@ -7,6 +7,11 @@ *===---=== */ -#ifndef offsetof +/* + * When -fbuiltin-headers-in-system-modules is set this is a non-modular header + * and needs to behave as if it was textual. + */ +#if !defined(offsetof

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-11 Thread Volodymyr Sapsai via cfe-commits
@@ -2498,9 +2498,12 @@ void ModuleMapParser::parseHeaderDecl(MMToken::TokenKind LeadingToken, } bool NeedsFramework = false; - // Don't add the top level headers to the builtin modules if the builtin headers - // belong to the system modules. - if (!Map.LangOpts.Built

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-11 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai commented: Still kinda confused. Have a few questions trying to improve my understanding. https://github.com/llvm/llvm-project/pull/84127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-11 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai edited https://github.com/llvm/llvm-project/pull/84127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-03-11 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: To clarify a little bit > [...] The "already included" state is global across all modules (which is > necessary so that non-modular headers don't get compiled into multiple > translation units and cause redeclaration errors). The necessity isn't actually true. The same definitio

[clang] [clang] Diagnose config_macros before building modules (PR #83641)

2024-03-04 Thread Volodymyr Sapsai via cfe-commits
@@ -22,7 +58,10 @@ #define WANT_BAR 1 // expected-note{{macro was defined here}} @import config; // expected-warning{{definition of configuration macro 'WANT_BAR' has no effect on the import of 'config'; pass '-DWANT_BAR=...' on the command line to configure the module}} -//

[clang] [clang] Diagnose config_macros before building modules (PR #83641)

2024-03-04 Thread Volodymyr Sapsai via cfe-commits
@@ -2006,6 +2021,11 @@ CompilerInstance::loadModule(SourceLocation ImportLoc, if (auto MaybeModule = MM.getCachedModuleLoad(*Path[0].first)) { // Use the cached result, which may be nullptr. Module = *MaybeModule; +// Config macros are already checked before build

[clang] [clang] Diagnose config_macros before building modules (PR #83641)

2024-03-04 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai approved this pull request. https://github.com/llvm/llvm-project/pull/83641 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Diagnose config_macros before building modules (PR #83641)

2024-03-04 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai edited https://github.com/llvm/llvm-project/pull/83641 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Diagnose config_macros before building modules (PR #83641)

2024-03-04 Thread Volodymyr Sapsai via cfe-commits
@@ -22,7 +58,10 @@ #define WANT_BAR 1 // expected-note{{macro was defined here}} @import config; // expected-warning{{definition of configuration macro 'WANT_BAR' has no effect on the import of 'config'; pass '-DWANT_BAR=...' on the command line to configure the module}} -//

[clang] [clang] Diagnose config_macros before building modules (PR #83641)

2024-03-04 Thread Volodymyr Sapsai via cfe-commits
@@ -1,3 +1,39 @@ +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: %clang_cc1 -std=c99 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -DWANT_FOO=1 -emit-module -fmodule-name=config %t/module.modulemap +// RUN: %clang_cc1 -std=c99 -fmodules -fimplicit

[clang] [clang] Diagnose config_macros before building modules (PR #83641)

2024-03-04 Thread Volodymyr Sapsai via cfe-commits
@@ -22,7 +58,10 @@ #define WANT_BAR 1 // expected-note{{macro was defined here}} @import config; // expected-warning{{definition of configuration macro 'WANT_BAR' has no effect on the import of 'config'; pass '-DWANT_BAR=...' on the command line to configure the module}} -//

[clang] [clang] Diagnose config_macros before building modules (PR #83641)

2024-03-04 Thread Volodymyr Sapsai via cfe-commits
@@ -2006,6 +2021,11 @@ CompilerInstance::loadModule(SourceLocation ImportLoc, if (auto MaybeModule = MM.getCachedModuleLoad(*Path[0].first)) { // Use the cached result, which may be nullptr. Module = *MaybeModule; +// Config macros are already checked before build

[clang] [clang] Diagnose config_macros before building modules (PR #83641)

2024-03-04 Thread Volodymyr Sapsai via cfe-commits
@@ -22,7 +58,10 @@ #define WANT_BAR 1 // expected-note{{macro was defined here}} @import config; // expected-warning{{definition of configuration macro 'WANT_BAR' has no effect on the import of 'config'; pass '-DWANT_BAR=...' on the command line to configure the module}} -//

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2024-01-23 Thread Volodymyr Sapsai via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t +// +// RUN: %clang_cc1 -std=c++20 %t/foo.cpp -I%t -fsyntax-only -verify + +//--- i.h +#ifndef FOO_H +#pragma once +struct S{}; +#endif + +//--- foo.cpp vsapsai wrote: Personally I

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2024-01-23 Thread Volodymyr Sapsai via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t +// +// RUN: %clang_cc1 -std=c++20 %t/foo.cpp -I%t -fsyntax-only -verify vsapsai wrote: You don't really need `-I%t`, the test works without it. But don't have a strong opinion.

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2024-01-23 Thread Volodymyr Sapsai via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t +// +// RUN: %clang_cc1 -std=c++20 %t/foo.cpp -I%t -fsyntax-only -verify + +//--- i.h +#ifndef FOO_H vsapsai wrote: The mismatch between i.h and FOO_H is slightly annoying but don'

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2024-01-23 Thread Volodymyr Sapsai via cfe-commits
@@ -1458,7 +1458,7 @@ bool HeaderSearch::ShouldEnterIncludeFile(Preprocessor &PP, } else { // Otherwise, if this is a #include of a file that was previously #import'd // or if this is the second #include of a #pragma once file, ignore it. -if ((FileInfo.isPragmaO

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2024-01-23 Thread Volodymyr Sapsai via cfe-commits
@@ -1458,7 +1458,7 @@ bool HeaderSearch::ShouldEnterIncludeFile(Preprocessor &PP, } else { // Otherwise, if this is a #include of a file that was previously #import'd // or if this is the second #include of a #pragma once file, ignore it. vsapsai wro

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2024-01-23 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai approved this pull request. Overall, the change works fine and it is pretty small. Have a few minor suggestion for the test but nothing blocking. https://github.com/llvm/llvm-project/pull/76119 ___ cfe-commits mailing list c

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2024-01-23 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai edited https://github.com/llvm/llvm-project/pull/76119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2024-01-23 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: So far the testing shows there are no regressions. https://github.com/llvm/llvm-project/pull/76119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2024-01-17 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: Started some of the tests. Expect to have results by the end of this week or early next week. https://github.com/llvm/llvm-project/pull/76119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [Modules] [HeaderSearch] Don't reenter headers if it is pragma once (PR #76119)

2023-12-23 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: I'll need to test this change on the real code to see the consequences. Sorry, I'll be able to do that in January only. https://github.com/llvm/llvm-project/pull/76119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] 52c62d4 - Reland "[modules] Fix error about the same module being defined in different .pcm files when using VFS overlays."

2023-08-16 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2023-08-16T18:27:17-07:00 New Revision: 52c62d46a0c8ebf6023233cabc5beb4ee2687c78 URL: https://github.com/llvm/llvm-project/commit/52c62d46a0c8ebf6023233cabc5beb4ee2687c78 DIFF: https://github.com/llvm/llvm-project/commit/52c62d46a0c8ebf6023233cabc5beb4ee2687c78.di

[clang] fe9c332 - Revert "Reland "[modules] Fix error about the same module being defined in different .pcm files when using VFS overlays.""

2023-08-10 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2023-08-10T15:14:26-07:00 New Revision: fe9c332408603e50ab846c1ad8aeb705df2950b1 URL: https://github.com/llvm/llvm-project/commit/fe9c332408603e50ab846c1ad8aeb705df2950b1 DIFF: https://github.com/llvm/llvm-project/commit/fe9c332408603e50ab846c1ad8aeb705df2950b1.di

[clang] b070be8 - Reland "[modules] Fix error about the same module being defined in different .pcm files when using VFS overlays."

2023-08-10 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2023-08-10T14:52:49-07:00 New Revision: b070be82bb8fb4414a8a6eb4fbfc77921d89fa4b URL: https://github.com/llvm/llvm-project/commit/b070be82bb8fb4414a8a6eb4fbfc77921d89fa4b DIFF: https://github.com/llvm/llvm-project/commit/b070be82bb8fb4414a8a6eb4fbfc77921d89fa4b.di

[clang] 91b10f6 - Revert "[modules] Fix error about the same module being defined in different .pcm files when using VFS overlays."

2023-08-10 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2023-08-10T11:27:08-07:00 New Revision: 91b10f69740ec91ca80ec45323d9807c39252334 URL: https://github.com/llvm/llvm-project/commit/91b10f69740ec91ca80ec45323d9807c39252334 DIFF: https://github.com/llvm/llvm-project/commit/91b10f69740ec91ca80ec45323d9807c39252334.di

[clang] 97dfaf4 - [modules] Fix error about the same module being defined in different .pcm files when using VFS overlays.

2023-08-10 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2023-08-10T10:47:51-07:00 New Revision: 97dfaf4cd27814bdf9aa9d2eafc21fdb4f76c56d URL: https://github.com/llvm/llvm-project/commit/97dfaf4cd27814bdf9aa9d2eafc21fdb4f76c56d DIFF: https://github.com/llvm/llvm-project/commit/97dfaf4cd27814bdf9aa9d2eafc21fdb4f76c56d.di

[clang] 32056aa - [docs] Fix doxygen markers for grouping methods. NFC.

2023-08-03 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2023-08-03T11:16:42-07:00 New Revision: 32056aa3443786822963e6e469d98deb7b857d79 URL: https://github.com/llvm/llvm-project/commit/32056aa3443786822963e6e469d98deb7b857d79 DIFF: https://github.com/llvm/llvm-project/commit/32056aa3443786822963e6e469d98deb7b857d79.di

[clang] d1e8df8 - [clang] Fix a typo "mdoule" in comments. NFC.

2023-07-06 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2023-07-06T17:19:26-07:00 New Revision: d1e8df85e6d1f9f823f2de5e0eb88d9a08d1763f URL: https://github.com/llvm/llvm-project/commit/d1e8df85e6d1f9f823f2de5e0eb88d9a08d1763f DIFF: https://github.com/llvm/llvm-project/commit/d1e8df85e6d1f9f823f2de5e0eb88d9a08d1763f.di

[clang] f7e0aae - [ODRHash] Stop hashing `ObjCMethodDecl::isPropertyAccessor` as it doesn't capture inherent method quality.

2023-07-05 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2023-07-05T18:04:50-07:00 New Revision: f7e0aae7284b7ad0cf3cc277c5ef8731f564443d URL: https://github.com/llvm/llvm-project/commit/f7e0aae7284b7ad0cf3cc277c5ef8731f564443d DIFF: https://github.com/llvm/llvm-project/commit/f7e0aae7284b7ad0cf3cc277c5ef8731f564443d.di

[clang] 18530e5 - [ODRHash] Stop hashing `ObjCMethodDecl::isOverriding` as it doesn't capture inherent method quality.

2023-07-05 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2023-07-05T18:04:32-07:00 New Revision: 18530e5d0770098bc33ff6f02a7b63ea887692a6 URL: https://github.com/llvm/llvm-project/commit/18530e5d0770098bc33ff6f02a7b63ea887692a6 DIFF: https://github.com/llvm/llvm-project/commit/18530e5d0770098bc33ff6f02a7b63ea887692a6.di

[clang] 2e16df3 - [ASTStructuralEquivalence] Fix crash when ObjCCategoryDecl doesn't have corresponding ObjCInterfaceDecl.

2023-06-09 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2023-06-09T17:09:28-07:00 New Revision: 2e16df352c7acb910313c80ac90b650ad9c14a3d URL: https://github.com/llvm/llvm-project/commit/2e16df352c7acb910313c80ac90b650ad9c14a3d DIFF: https://github.com/llvm/llvm-project/commit/2e16df352c7acb910313c80ac90b650ad9c14a3d.di

[clang] 24f36a2 - [Modules] Move modulemaps to header search directories. NFC intended.

2023-05-03 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2023-05-03T13:07:47-07:00 New Revision: 24f36a215b4eabd1d0e4abcce0c9277085d88a96 URL: https://github.com/llvm/llvm-project/commit/24f36a215b4eabd1d0e4abcce0c9277085d88a96 DIFF: https://github.com/llvm/llvm-project/commit/24f36a215b4eabd1d0e4abcce0c9277085d88a96.di

  1   2   3   >