[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-29 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/86358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-29 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/86358 >From 109e6039abe8bd3b598f1fdc2dbd7bca783ff4e6 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 22 Mar 2024 15:54:14 -0700 Subject: [PATCH 1/5] [clang] Move state out of `PreprocessorOptions` (1/n) An

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/86358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/86358 >From 109e6039abe8bd3b598f1fdc2dbd7bca783ff4e6 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 22 Mar 2024 15:54:14 -0700 Subject: [PATCH 1/4] [clang] Move state out of `PreprocessorOptions` (1/n) An

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Jan Svoboda via cfe-commits
@@ -34,12 +34,17 @@ class InitOnlyAction : public FrontendAction { /// Preprocessor-based frontend action that also loads PCH files. class ReadPCHAndPreprocessAction : public FrontendAction { + llvm::function_ref OnCI; jansvoboda11 wrote: Sounds good.

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/86358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Ben Langmuir via cfe-commits
@@ -34,12 +34,17 @@ class InitOnlyAction : public FrontendAction { /// Preprocessor-based frontend action that also loads PCH files. class ReadPCHAndPreprocessAction : public FrontendAction { + llvm::function_ref OnCI; benlangmuir wrote: My concern is that

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Jan Svoboda via cfe-commits
@@ -736,6 +736,19 @@ class Preprocessor { State ConditionalStackState = Off; } PreambleConditionalStack; + /// Function for getting the dependency preprocessor directives of a file. + /// + /// These are directives derived from a special form of lexing where the +

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Jan Svoboda via cfe-commits
@@ -34,12 +34,17 @@ class InitOnlyAction : public FrontendAction { /// Preprocessor-based frontend action that also loads PCH files. class ReadPCHAndPreprocessAction : public FrontendAction { + llvm::function_ref OnCI; jansvoboda11 wrote: `function_ref` is

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Jan Svoboda via cfe-commits
@@ -34,12 +34,17 @@ class InitOnlyAction : public FrontendAction { /// Preprocessor-based frontend action that also loads PCH files. class ReadPCHAndPreprocessAction : public FrontendAction { + llvm::function_ref OnCI; jansvoboda11 wrote: The function acts

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Ben Langmuir via cfe-commits
@@ -736,6 +736,19 @@ class Preprocessor { State ConditionalStackState = Off; } PreambleConditionalStack; + /// Function for getting the dependency preprocessor directives of a file. + /// + /// These are directives derived from a special form of lexing where the +

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Ben Langmuir via cfe-commits
@@ -34,12 +34,17 @@ class InitOnlyAction : public FrontendAction { /// Preprocessor-based frontend action that also loads PCH files. class ReadPCHAndPreprocessAction : public FrontendAction { + llvm::function_ref OnCI; benlangmuir wrote: What does `OnCI`

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Ping. https://github.com/llvm/llvm-project/pull/86358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-22 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/86358 >From 109e6039abe8bd3b598f1fdc2dbd7bca783ff4e6 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 22 Mar 2024 15:54:14 -0700 Subject: [PATCH 1/3] [clang] Move state out of `PreprocessorOptions` (1/n) An

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-22 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/86358 >From 109e6039abe8bd3b598f1fdc2dbd7bca783ff4e6 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 22 Mar 2024 15:54:14 -0700 Subject: [PATCH 1/2] [clang] Move state out of `PreprocessorOptions` (1/n) An

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-22 Thread via cfe-commits
github-actions[bot] wrote: :white_check_mark: With the latest revision this PR passed the Python code formatter. https://github.com/llvm/llvm-project/pull/86358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-22 Thread via cfe-commits
github-actions[bot] wrote: :white_check_mark: With the latest revision this PR passed the C/C++ code formatter. https://github.com/llvm/llvm-project/pull/86358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes An instance of `PreprocessorOptions` is part of `CompilerInvocation` which is supposed to be a value type. The `DependencyDirectivesForFile` member is problematic, since it holds an owning reference of

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-22 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/86358 An instance of `PreprocessorOptions` is part of `CompilerInvocation` which is supposed to be a value type. The `DependencyDirectivesForFile` member is problematic, since it holds an owning reference of the