Skip to content

Turn on FileCheck Variables #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 22, 2017
Merged

Conversation

CodaFi
Copy link
Member

@CodaFi CodaFi commented Jan 21, 2017

Includes a simple demonstration of what variable definitions look like that can be reverted upon request.

@CodaFi CodaFi requested a review from harlanhaskins January 22, 2017 00:07
Copy link
Member

@harlanhaskins harlanhaskins left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -416,7 +431,7 @@ private func check(input b : String, against checkStrings : [CheckString]) -> Bo
var failedChecks = false

// This holds all the current filecheck variables.
var variableTable = [String:String]()
var variableTable = BoxedTable()
Copy link
Member

Choose a reason for hiding this comment

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

No Box<T>?

Copy link
Member Author

Choose a reason for hiding this comment

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

I considered it, then realized I only wrote this thing because the C++ just throws a reference to this dictionary everywhere so I only need reference semantics until I can find a way to remove the abstraction altogether.

// VariableTable[VariableDef.0] = MatchInfo[VariableDef.second]
for (v, index) in self.variableDefs {
assert(index < fullMatch.numberOfRanges, "Internal paren error")
#if os(macOS)
Copy link
Member

Choose a reason for hiding this comment

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

Sad!

@CodaFi
Copy link
Member Author

CodaFi commented Jan 22, 2017

Besides pretty diagnostics, the last thing to do here to get feature parity with file check is to support implicit-not.

@harlanhaskins
Copy link
Member

:shipit:

@CodaFi
Copy link
Member Author

CodaFi commented Jan 22, 2017

⛵️

@CodaFi CodaFi merged commit 20173ff into llvm-swift:master Jan 22, 2017
@CodaFi CodaFi deleted the varmint-grease branch January 22, 2017 00:13
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.

2 participants