r268129 - [NFC] Initialize a variable to make buildbot green.

Denis Zobnin via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 29 15:50:17 PDT 2016


Author: dzobnin
Date: Fri Apr 29 17:50:16 2016
New Revision: 268129

URL: http://llvm.org/viewvc/llvm-project?rev=268129&view=rev
Log:
[NFC] Initialize a variable to make buildbot green.

In r268085 "[MS] Make #pragma pack use PragmaStack<> class." there was an
uninitialized variable 'Alignment', which caused the following failure:
  http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/1758
Zero-initialize the variable to fix this failure.

Modified:
    cfe/trunk/lib/Sema/SemaAttr.cpp

Modified: cfe/trunk/lib/Sema/SemaAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaAttr.cpp?rev=268129&r1=268128&r2=268129&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaAttr.cpp Fri Apr 29 17:50:16 2016
@@ -78,7 +78,7 @@ void Sema::AddMsStructLayoutForRecord(Re
 void Sema::ActOnPragmaOptionsAlign(PragmaOptionsAlignKind Kind,
                                    SourceLocation PragmaLoc) {
   PragmaMsStackAction Action = Sema::PSK_Reset;
-  unsigned Alignment;
+  unsigned Alignment = 0;
   switch (Kind) {
     // For all targets we support native and natural are the same.
     //




More information about the cfe-commits mailing list