Skip to content

Conversation

@HighCommander4
Copy link
Collaborator

@llvmbot
Copy link
Member

llvmbot commented Feb 16, 2025

@llvm/pr-subscribers-clangd

@llvm/pr-subscribers-clang-tools-extra

Author: Nathan Ridge (HighCommander4)

Changes

Fixes clangd/clangd#2324


Full diff: https://github.com/llvm/llvm-project/pull/127359.diff

1 Files Affected:

  • (modified) clang-tools-extra/clangd/Compiler.h (+1-1)
diff --git a/clang-tools-extra/clangd/Compiler.h b/clang-tools-extra/clangd/Compiler.h
index 4e68da7610ca2..e513e4c40794a 100644
--- a/clang-tools-extra/clangd/Compiler.h
+++ b/clang-tools-extra/clangd/Compiler.h
@@ -40,7 +40,7 @@ class IgnoreDiagnostics : public DiagnosticConsumer {
 
 // Options to run clang e.g. when parsing AST.
 struct ParseOptions {
-  bool PreambleParseForwardingFunctions = false;
+  bool PreambleParseForwardingFunctions = true;
 
   bool ImportInsertions = false;
 };

Copy link
Contributor

@upsj upsj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe for consistency we should also change the other defaults that IIRC are used to configure tests:

bool PreambleParseForwardingFunctions = false;

bool PreambleParseForwardingFunctions = false;

@HighCommander4 HighCommander4 force-pushed the users/HighCommander4/issue-2324 branch from 0ff0680 to fd189ad Compare February 17, 2025 00:05
@HighCommander4
Copy link
Collaborator Author

Maybe for consistency we should also change the other defaults that IIRC are used to configure tests:

bool PreambleParseForwardingFunctions = false;

bool PreambleParseForwardingFunctions = false;

Done

Copy link
Contributor

@upsj upsj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Collaborator

@hokein hokein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good. We should be mindful of the potential performance regression due to this (1% increase in preamble size, as noted https://reviews.llvm.org/D124688#3483895).

I’ll leave the final approval to @kadircet.

Copy link
Member

@kadircet kadircet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, as long as we're keeping the underlying option I think this makes sense! we can flip it in production if we see big regressions

Copy link
Member

@kadircet kadircet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, as long as we're keeping the underlying option I think this makes sense! we can flip it in production if we see big regressions

@HighCommander4 HighCommander4 merged commit 0b719d3 into main Feb 18, 2025
8 checks passed
@HighCommander4 HighCommander4 deleted the users/HighCommander4/issue-2324 branch February 18, 2025 05:59
wldfngrs pushed a commit to wldfngrs/llvm-project that referenced this pull request Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parameter hint forwarding does not work with factory functions defined in header files

6 participants