UHT will fail during build in Visual Studio if a function tries to return a UEnum pointer. Adding a valid keyword before the return type will compile successfully.
The build fails with the following error: error : 'Enum' is not allowed here
The build completes successfully.
Add any valid keyword before the return type (eg. const UEnum* SomeFunc() const;) and the build will complete successfully.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-55924 in the post.