From c892f14b89623d6e479f8d69f30ae34a4e631417 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Fri, 29 Jul 2016 20:01:12 +0000 Subject: [PATCH] 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277206 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Parse/Parser.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index a780eceaab..f442bd7474 100644 --- a/lib/Parse/Parser.cpp +++ b/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"); -- 2.40.0