r234591 - Initializing an uninitialized data member; should be NFC.

David Blaikie dblaikie at gmail.com
Fri Apr 10 08:03:19 PDT 2015


On Fri, Apr 10, 2015 at 6:05 AM, Aaron Ballman <aaron at aaronballman.com>
wrote:

> Author: aaronballman
> Date: Fri Apr 10 08:05:04 2015
> New Revision: 234591
>
> URL: http://llvm.org/viewvc/llvm-project?rev=234591&view=rev
> Log:
> Initializing an uninitialized data member; should be NFC.
>

Was this being used uninitialized? Where?

It's actually rather helpful to keep uninitialized members uninitiialized
if they aren't intended to be used, so MSan et, al, can catch their use.


>
> Modified:
>     cfe/trunk/include/clang/Sema/ScopeInfo.h
>
> Modified: cfe/trunk/include/clang/Sema/ScopeInfo.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/ScopeInfo.h?rev=234591&r1=234590&r2=234591&view=diff
>
> ==============================================================================
> --- cfe/trunk/include/clang/Sema/ScopeInfo.h (original)
> +++ cfe/trunk/include/clang/Sema/ScopeInfo.h Fri Apr 10 08:05:04 2015
> @@ -698,9 +698,9 @@ public:
>    LambdaScopeInfo(DiagnosticsEngine &Diag)
>      : CapturingScopeInfo(Diag, ImpCap_None), Lambda(nullptr),
>        CallOperator(nullptr), NumExplicitCaptures(0), Mutable(false),
> -      ExprNeedsCleanups(false), ContainsUnexpandedParameterPack(false),
> -      AutoTemplateParameterDepth(0), GLTemplateParameterList(nullptr)
> -  {
> +      ExplicitParams(false), ExprNeedsCleanups(false),
> +      ContainsUnexpandedParameterPack(false),
> AutoTemplateParameterDepth(0),
> +      GLTemplateParameterList(nullptr) {
>      Kind = SK_Lambda;
>    }
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150410/6fc19586/attachment.html>


More information about the cfe-commits mailing list