From 9aecfabe3f2821c58421df1ef7dfff7b54f11b74 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 12 Mar 2009 18:42:02 +0000 Subject: [PATCH] Driver: Value initialization is nicer than memset. - Who wouldn't want correctness to hang critically on two easily ignored characters? Thanks Doug! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66819 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/OptTable.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Driver/OptTable.cpp b/lib/Driver/OptTable.cpp index d0124057c5..54e5ee1b6a 100644 --- a/lib/Driver/OptTable.cpp +++ b/lib/Driver/OptTable.cpp @@ -44,8 +44,7 @@ static Info &getInfo(unsigned id) { return OptionInfos[id - 1]; } -OptTable::OptTable() : Options(new Option*[numOptions]) { - memset(Options, 0, sizeof(*Options) * numOptions); +OptTable::OptTable() : Options(new Option*[numOptions]()) { } OptTable::~OptTable() { -- 2.50.1