Skip to content

[analysis] FunctionAnalysisBase's parameter SILAnalysisTy is actually… #17966

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

Conversation

gottesmm
Copy link
Contributor

… a FunctionInfoTy.

I believe that this was just a typo from a long time ago. Calling this parameter
a SILAnalysisTy is actively misleading since as a result it seems to a naive
reading that one should be writing a recursive template:

class MyAnalysis : public FunctionAnalysisBase<MyAnalysis> { ... }

Instead of passing in the function info of the derived analysis, i.e.:

class MyAnalysisFunctionInfo { ... }
class MyAnalysis : public FunctionAnalysisBase<MyAnalysisFunctionInfo> { ... }

I also added some documentation to that effect onto FunctionAnalysisBase.

… a FunctionInfoTy.

I believe that this was just a typo from a long time ago. Calling this parameter
a SILAnalysisTy is actively misleading since as a result it seems to a naive
reading that one should be writing a recursive template:

```
class MyAnalysis : public FunctionAnalysisBase<MyAnalysis> { ... }
```

Instead of passing in the function info of the derived analysis, i.e.:

```
class MyAnalysisFunctionInfo { ... }
class MyAnalysis : public FunctionAnalysisBase<MyAnalysisFunctionInfo> { ... }
```

I also added some documentation to that affect onto FunctionAnalysisBase.
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit adf79f9 into swiftlang:master Jul 15, 2018
@gottesmm gottesmm deleted the pr-8e223e52c236511292a5c500090dd712f8a265d4 branch July 15, 2018 22:34
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