AaronBallman wrote:
> > let's handle C++ separately to keep the patch reasonable?
>
> ~What about Objective-C then?~
>
> ```c
> void f() {
> ^ typeof((void)0) {}; // Ok
> ^ typeof(void) {}; // Error but should probably be ok
> }
> ```
>
> But yeah, doing all of that in this pr might be too much—unless the changes
> you’ve already made happen to already fix these cases.
C++ cases are not changed by this patch, but the Objective-C ones are:
```
F:\source\llvm-project>llvm\out\build\x64-Debug\bin\clang.exe -cc1
-fsyntax-only -fblocks -x objective-c "C:\Users\aballman\OneDrive - Intel
Corporation\Desktop\test.cpp"
C:\Users\aballman\OneDrive - Intel Corporation\Desktop\test.cpp:2:5: warning:
expression result unused [-Wunused-value]
2 | ^ typeof((void)0) {}; // Ok
| ^~~~~~~~~~~~~~~~~~~~
C:\Users\aballman\OneDrive - Intel Corporation\Desktop\test.cpp:3:5: warning:
expression result unused [-Wunused-value]
3 | ^ typeof(void) {}; // Error but should probably be ok
| ^~~~~~~~~~~~~~~~~
2 warnings generated.
```
So good call on adding test coverage there.
https://github.com/llvm/llvm-project/pull/146394
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits