[llvm] r200352 - Convert to the inner enum so the compiler can warn about it in switches.

David Blaikie dblaikie at gmail.com
Tue Jan 28 15:31:44 PST 2014


Do we really need a type called '_'... that seems rather unhelpful, even in
such a small scope.


On Tue, Jan 28, 2014 at 3:15 PM, Rafael Espindola <
rafael.espindola at gmail.com> wrote:

> Author: rafael
> Date: Tue Jan 28 17:15:56 2014
> New Revision: 200352
>
> URL: http://llvm.org/viewvc/llvm-project?rev=200352&view=rev
> Log:
> Convert to the inner enum so the compiler can warn about it in switches.
>
> Modified:
>     llvm/trunk/include/llvm/Support/FileSystem.h
>
> Modified: llvm/trunk/include/llvm/Support/FileSystem.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/FileSystem.h?rev=200352&r1=200351&r2=200352&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/Support/FileSystem.h (original)
> +++ llvm/trunk/include/llvm/Support/FileSystem.h Tue Jan 28 17:15:56 2014
> @@ -66,11 +66,10 @@ struct file_type {
>    };
>
>    file_type(_ v) : v_(v) {}
> -  explicit file_type(int v) : v_(_(v)) {}
> -  operator int() const {return v_;}
> +  operator _() const {return v_;}
>
>  private:
> -  int v_;
> +  _ v_;
>  };
>
>  /// space_info - Self explanatory.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140128/6fb2db5d/attachment.html>


More information about the llvm-commits mailing list