From 40c049fa77a8b213a3ca0913116e4dcbf6f87936 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Sat, 8 Oct 2016 19:41:06 +0000 Subject: Turn cl::values() (for enum) from a vararg function to using C++ variadic template The core of the change is supposed to be NFC, however it also fixes what I believe was an undefined behavior when calling: va_start(ValueArgs, Desc); with Desc being a StringRef. Differential Revision: https://reviews.llvm.org/D25342 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@283671 91177308-0d34-0410-b5e6-96231b3b80d8 --- include-fixer/tool/ClangIncludeFixer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include-fixer') diff --git a/include-fixer/tool/ClangIncludeFixer.cpp b/include-fixer/tool/ClangIncludeFixer.cpp index 6084ff64..ed1ab204 100644 --- a/include-fixer/tool/ClangIncludeFixer.cpp +++ b/include-fixer/tool/ClangIncludeFixer.cpp @@ -90,8 +90,7 @@ enum DatabaseFormatTy { cl::opt DatabaseFormat( "db", cl::desc("Specify input format"), cl::values(clEnumVal(fixed, "Hard-coded mapping"), - clEnumVal(yaml, "Yaml database created by find-all-symbols"), - clEnumValEnd), + clEnumVal(yaml, "Yaml database created by find-all-symbols")), cl::init(yaml), cl::cat(IncludeFixerCategory)); cl::opt Input("input", -- cgit v1.2.3