Skip to content
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

Fix regression on anonymous namespaces. #175

Merged
merged 1 commit into from
May 30, 2020
Merged

Conversation

SoftwareApe
Copy link
Contributor

I remembered this morning that there was a special case on anonymous namespaces in C++, and indeed I had accidentally removed that. Since there was no unit test for it I added a unit test for anonymous namespaces on tidy_generic so this regression shouldn't happen again.

While at it I saw that there was a different kind of special case stack entry in C++ with lambdas written as {lambda(int, int)#2}, which again got truncated. So I also made the bracket detection in tidy_generic more generic, of course with tests 😄.

@codecov
Copy link

codecov bot commented May 30, 2020

Codecov Report

Merging #175 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #175      +/-   ##
==========================================
+ Coverage   90.19%   90.23%   +0.04%     
==========================================
  Files          16       16              
  Lines        2224     2223       -1     
==========================================
  Hits         2006     2006              
+ Misses        218      217       -1     
Impacted Files Coverage Δ
src/collapse/perf.rs 97.36% <100.00%> (-0.01%) ⬇️
src/collapse/common.rs 62.87% <0.00%> (+0.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update abd628f...5084bc1. Read the comment docs.

@jonhoo
Copy link
Owner

jonhoo commented May 30, 2020

Oh, nice catch!
This does assume that brackets are balanced, but that seems like an okay assumption to make.

@jonhoo jonhoo merged commit 998415a into jonhoo:master May 30, 2020
jonhoo added a commit that referenced this pull request May 30, 2020
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