Skip to content

Commit

Permalink
Ensure Ident_GNU_final is properly initialized in the Parser Initiali…
Browse files Browse the repository at this point in the history
…ze 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
  • Loading branch information
majnemer committed Jul 29, 2016
1 parent f4ac6a3 commit c892f14
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Parse/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit c892f14

Please sign in to comment.