From: David Majnemer Date: Fri, 29 Jul 2016 20:01:12 +0000 (+0000) Subject: Ensure Ident_GNU_final is properly initialized in the Parser Initialize function X-Git-Tag: llvmorg-4.0.0-rc1~13784 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a6b68bf0b91cde70e085b22bc8840df2b8db7470;p=platform%2Fupstream%2Fllvm.git Ensure Ident_GNU_final is properly initialized in the Parser Initialize function The recent change implementing __final forgot to initialize a variable. This was caught by the Memory Sanitizer. Properly initialize the value to nullptr to ensure proper memory reads. Patch by Erich Keane! Differential Revision: https://reviews.llvm.org/D22970 llvm-svn: 277206 --- diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index a780ece..f442bd7 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -473,6 +473,7 @@ void Parser::Initialize() { Ident_final = nullptr; Ident_sealed = nullptr; Ident_override = nullptr; + Ident_GNU_final = nullptr; Ident_super = &PP.getIdentifierTable().get("super");