From 8dc70bdcd0fe4efb65876dce0144d9c3386a2f07 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 26 Feb 2021 12:54:42 +0100 Subject: [clang][cli] Fix build failure in CompilerInvocation There is a report that https://reviews.llvm.org/D96280 causes a build failure with error: too few template arguments for class template 'SmallVector'. This patch attempts to fix that by explicitly specifying N for SmallVector. --- clang/lib/Frontend/CompilerInvocation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 4d4b942..dac6418 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -663,7 +663,7 @@ static bool RoundTrip(ParseFn Parse, GenerateFn Generate, // Generate arguments from the dummy invocation. If Generate is the // inverse of Parse, the newly generated arguments must have the same // semantics as the original. - SmallVector GeneratedArgs1; + SmallVector GeneratedArgs1; Generate(DummyInvocation, GeneratedArgs1, SA); // Run the second parse, now on the generated arguments, and with the real @@ -683,7 +683,7 @@ static bool RoundTrip(ParseFn Parse, GenerateFn Generate, // Generate arguments again, this time from the options we will end up using // for the rest of the compilation. - SmallVector GeneratedArgs2; + SmallVector GeneratedArgs2; Generate(RealInvocation, GeneratedArgs2, SA); // Compares two lists of generated arguments. -- cgit v1.1