[cfe-commits] r94674 - /cfe/trunk/include/clang/Analysis/Support/Optional.h
Ted Kremenek
kremenek at apple.com
Wed Jan 27 08:30:34 PST 2010
Thanks Chandler!
On Jan 27, 2010, at 2:28 AM, Chandler Carruth wrote:
> Author: chandlerc
> Date: Wed Jan 27 04:28:04 2010
> New Revision: 94674
>
> URL: http://llvm.org/viewvc/llvm-project?rev=94674&view=rev
> Log:
> Silence a GCC warning about uninitialized variables. The first user of this
> showed up with a primitive type.
>
> Modified:
> cfe/trunk/include/clang/Analysis/Support/Optional.h
>
> Modified: cfe/trunk/include/clang/Analysis/Support/Optional.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Support/Optional.h?rev=94674&r1=94673&r2=94674&view=diff
>
> ==============================================================================
> --- cfe/trunk/include/clang/Analysis/Support/Optional.h (original)
> +++ cfe/trunk/include/clang/Analysis/Support/Optional.h Wed Jan 27 04:28:04 2010
> @@ -23,7 +23,7 @@
> T x;
> unsigned hasVal : 1;
> public:
> - explicit Optional() : hasVal(false) {}
> + explicit Optional() : x(), hasVal(false) {}
> Optional(const T &y) : x(y), hasVal(true) {}
>
> static inline Optional create(const T* y) {
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list