@@ -49,7 +49,7 @@ static StringRef getReplacementFor(StringRef FunctionName,
4949 // Try to find a better replacement from Annex K first.
5050 StringRef AnnexKReplacementFunction =
5151 StringSwitch<StringRef>(FunctionName)
52- .Cases (" asctime" , " asctime_r" , " asctime_s" )
52+ .Cases ({ " asctime" , " asctime_r" } , " asctime_s" )
5353 .Case (" gets" , " gets_s" )
5454 .Default ({});
5555 if (!AnnexKReplacementFunction.empty ())
@@ -59,7 +59,7 @@ static StringRef getReplacementFor(StringRef FunctionName,
5959 // FIXME: Some of these functions are available in C++ under "std::", and
6060 // should be matched and suggested.
6161 return StringSwitch<StringRef>(FunctionName)
62- .Cases (" asctime" , " asctime_r" , " strftime" )
62+ .Cases ({ " asctime" , " asctime_r" } , " strftime" )
6363 .Case (" gets" , " fgets" )
6464 .Case (" rewind" , " fseek" )
6565 .Case (" setbuf" , " setvbuf" );
@@ -90,13 +90,13 @@ static StringRef getReplacementForAdditional(StringRef FunctionName,
9090// / safer alternative.
9191static StringRef getRationaleFor (StringRef FunctionName) {
9292 return StringSwitch<StringRef>(FunctionName)
93- .Cases (" asctime" , " asctime_r" , " ctime" ,
93+ .Cases ({ " asctime" , " asctime_r" , " ctime" } ,
9494 " is not bounds-checking and non-reentrant" )
95- .Cases (" bcmp" , " bcopy" , " bzero" , " is deprecated" )
96- .Cases (" fopen" , " freopen" , " has no exclusive access to the opened file" )
95+ .Cases ({ " bcmp" , " bcopy" , " bzero" } , " is deprecated" )
96+ .Cases ({ " fopen" , " freopen" } , " has no exclusive access to the opened file" )
9797 .Case (" gets" , " is insecure, was deprecated and removed in C11 and C++14" )
9898 .Case (" getpw" , " is dangerous as it may overflow the provided buffer" )
99- .Cases (" rewind" , " setbuf" , " has no error detection" )
99+ .Cases ({ " rewind" , " setbuf" } , " has no error detection" )
100100 .Case (" vfork" , " is insecure as it can lead to denial of service "
101101 " situations in the parent process" )
102102 .Default (" is not bounds-checking" );
0 commit comments