- User Since
- Aug 27 2014, 8:34 PM (251 w, 6 d)
For a generic tool, this seems to be an okay fix; however, this is an API test driver. I would like to hear from other reviewers as to whether there is an intent to test the API for the AttrCount == 0 case. If there is, then I believe that allocation should not be attempted, and the API should work with a null pointer.
LGTM. I have some minor style comments that could be fixed as part of the commit.
LGTM with minor comment (that can be applied when committing).
Just a quick grep of only safe_malloc, it seems like none of its clients would ever call it with 0 in a normal circumstance, although I may be wrong here.
Sun, Jun 23
I don't believe this is the right way to go, however. As you point out malloc(0) is undefined behavior
It isn't. It is implementation-defined whether or not it returns a null pointer. In either case, it returns a value on which free can be safely called.
Sat, Jun 22
Fri, Jun 21
Wed, Jun 19
Tue, Jun 18
I believe that all comments have been addressed. LGTM.
There'd be no atrocious RUN line if we went with modifying the expected files beforehand and having the tool output a newline.
Tue, Jun 11
Mon, Jun 10
Sat, Jun 8
Fri, Jun 7
@aaron.ballman, for similar cases in the plist output, it has been proposed
I've tested the pre-normalization and it looks like I can commit it tomorrow. I noticed that the following three files appear to be unreferenced:
clang/test/Analysis/Inputs/expected-plists/cstring-plist.c.plist clang/test/Analysis/Inputs/expected-plists/plist-stats-output.c.plist clang/test/Analysis/Inputs/expected-plists/yaccignore.c.plist
Fix grep pattern in cuda-types.cu
I think it should be safe to at least commit the pre-normalization directly first. I'll take a look, and update the patch if the pre-normalization lands.
Thu, Jun 6
Okay; I think this might be possible to do in a separate patch that does not depend on this set.
I think everyone's comments have been addressed. Thanks again, Xiangling.
Wed, Jun 5
Thanks Xiangling. Just a further minor comment.
I think the name ppc_wrappers is accurate to describe its meaning that wrapping the headers under standard library path or standard header search path.