]> granicus.if.org Git - clang/commitdiff
[NFC] Initialize a variable to make buildbot green.
authorDenis Zobnin <d.zobnin.bugzilla@gmail.com>
Fri, 29 Apr 2016 22:50:16 +0000 (22:50 +0000)
committerDenis Zobnin <d.zobnin.bugzilla@gmail.com>
Fri, 29 Apr 2016 22:50:16 +0000 (22:50 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268129 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaAttr.cpp

index 7387b66c0ccc823e108e8cb8bce14373154c39ec..8933399340d7913dad3dcfabc792a6debf805909 100644 (file)
@@ -78,7 +78,7 @@ void Sema::AddMsStructLayoutForRecord(RecordDecl *RD) {
 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.
     //