If the function or instruction doesn't have any attributes, AttributeSetNode::get returns a null pointer.
Details
Diff Detail
- Build Status
Buildable 1115 Build 1115: arc lint + arc unit
Event Timeline
tools/llvm-c-test/echo.cpp | ||
---|---|---|
382 | It isn't, I added it as a means of a test, as it segfaults without the proposed nullptr checks. |
tools/llvm-c-test/echo.cpp | ||
---|---|---|
382 | Yes but on the other hand, it doesn't test this case for all the functions inside the test. I think this is the wrong tradeof. However, that'd be great to add tests for these function somewhere else. |
tools/llvm-c-test/main.c | ||
---|---|---|
91–94 ↗ | (On Diff #77990) | I would create just one, but if you think that's better that way, I'm good with it. |
tools/llvm-c-test/main.c | ||
---|---|---|
91–94 ↗ | (On Diff #77990) | No real preference at my side. I modeled it after the metadata tests, which also seemed pretty fine grained. |
Why is this necessary ?