-
Notifications
You must be signed in to change notification settings - Fork 5
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
clean up tests without calls to clang #348
clean up tests without calls to clang #348
Conversation
I needed to reorder some statements in |
Yes, users will have to make this change manually. It's a "feature" of 3C to infer the length even for variables that are defined in the wrong order. Fine to move them in this case. |
We should delete
Is this another test that we are expecting to fail?
Same question? Perhaps make an issue for addressing/fixing these tests. |
clang/test/3C/allarrays.c
Outdated
@@ -1,4 +1,5 @@ | |||
// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s | |||
// RUN: 3c -alltypes %s | FileCheck -match-full-lines --check-prefixes="CHECK" %s | |||
// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o /dev/null - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we discussed dropping use of /dev/null
entirely and using %t
instead? Doing so is to enhance Windows compatibility. This way, we would be indicating this is a temp file, it will get removed by FileCheck automatically, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't realize it was more than a bugfix when piping on windows. But this seems reasonable. I'll change it and add it to the other list of test changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think /dev/null
is a problem here. llvm-lit
is supposed to automatically substitute temp files for /dev/null
on Windows, but was not doing this correctly when dealing with pipes and io redirection.
clang/test/3C/checkedregionvoid.c
Outdated
// RUN: 3c -addcr %s | FileCheck -match-full-lines --check-prefixes="CHECK" %s | ||
|
||
// Currently not running clang on the output, | ||
// since it cannot find "dummy.h", even with -L%S |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no dummy.h
in the test directory? If that's right, I think we should delete its usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a dummy.h
in the test directory, required for the test as it is. I couldn't get clang to recognize it from the testing harness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's a problem then we should just get rid of it. I don't see the benefit of having it when you can just inline its contents in the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question and comment; might require small changes.
@kyleheadley I hope you're OK with me editing your PR title so people aren't misled that it only adds |
@kyleheadley Please follow these instructions to ensure that all your future commits for CCI get your CCI email address. If it were me, I would go ahead and fix this PR branch too via the "Using Interactive Rebase" method here and a force-push, but since the default branch already has a few commits from you with the other email address and it's impractical to do anything about them now, I don't feel strongly about adding a few more. |
after using -f3c-tool, the files I highlighted above compile. The reasons were to do with array bounds, though not directly, and they were older tests, so I've rolled them into the rest and dealt with them. I also updated for the recent comments here and changes in #346. This is ready for review again. |
@@ -1,5 +1,5 @@ | |||
// RUN: 3c -alltypes %s | FileCheck -match-full-lines --check-prefixes="CHECK" %s | |||
// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o /dev/null - | |||
// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need the .unused
bit at the end? I presume you've confirmed that this file is deleted after all the tests are run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't need it, but I wanted an indication of what this particular temp file is used for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Merge when ready (be sure to use your correctcomputation.com address).
I added calls to clang in tests returned by
grep -L "clang" *
, or an explanation of why it cannot be done at this time. I also removed some dashes as requested in #346 while there, and removed commented lines inlit.local.cfg
since they referred to a private file system. Post-merge tests were run on my local Mac.There were some files that I did not (yet) change: