Skip to content

Conversation

@ahoppen
Copy link
Member

@ahoppen ahoppen commented May 14, 2024

Fixes #1253
rdar://127474135

Fixes swiftlang#1253
rdar://127474135
@ahoppen ahoppen requested review from bnbarham and hamishknight May 14, 2024 00:51
@ahoppen ahoppen requested a review from benlangmuir as a code owner May 14, 2024 00:51
@ahoppen
Copy link
Member Author

ahoppen commented May 14, 2024

@swift-ci Please test

@ahoppen ahoppen merged commit 0f097e6 into swiftlang:main May 14, 2024
@ahoppen ahoppen deleted the index-c-files branch May 14, 2024 13:14
"-MP",
// Don't writ out compilation databases
"-MJ",
// Continue in the presence of errors during indexing
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the reason? Or is it just that we don't have a decent timestamp to use for the "build session" here? Or does having this enable verification where we wouldn't otherwise?

Copy link
Member Author

Choose a reason for hiding this comment

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

Honestly, I don’t know. I was trying to infer it but maybe I was wrong. I just removed the explanation for now.

result.reserveCapacity(compilerArguments.count)
var iterator = compilerArguments.makeIterator()
while let argument = iterator.next() {
if removeFlags.contains(argument) || argument.starts(with: "-fbuild-session-file=") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does serailize-diagnostics also allow =? Does -fbuild-session-file allow a separate arg rather than =?

Copy link
Member Author

Choose a reason for hiding this comment

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

So, serailize-diagnostics does not allow = and -fbuild-session-file requires a =. But eg. -MT doesn’t require a space. And serialize-diagnostics can be spelled with a single or multiple spaces.

I ended up generalizing the entire command line argument matching in #1314

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Indexing of C-family languages

3 participants