2424#include " clang/Sema/ParsedTemplate.h"
2525#include " clang/Sema/Scope.h"
2626#include " clang/Sema/SemaCodeCompletion.h"
27+ #include " llvm/ADT/STLForwardCompat.h"
2728#include " llvm/Support/Path.h"
2829#include " llvm/Support/TimeProfiler.h"
2930using namespace clang ;
@@ -213,7 +214,7 @@ void Parser::ConsumeExtraSemi(ExtraSemiKind Kind, DeclSpec::TST TST) {
213214
214215 // C++11 allows extra semicolons at namespace scope, but not in any of the
215216 // other contexts.
216- if (Kind == OutsideFunction && getLangOpts ().CPlusPlus ) {
217+ if (Kind == ExtraSemiKind:: OutsideFunction && getLangOpts ().CPlusPlus ) {
217218 if (getLangOpts ().CPlusPlus11 )
218219 Diag (StartLoc, diag::warn_cxx98_compat_top_level_semi)
219220 << FixItHint::CreateRemoval (SourceRange (StartLoc, EndLoc));
@@ -223,10 +224,11 @@ void Parser::ConsumeExtraSemi(ExtraSemiKind Kind, DeclSpec::TST TST) {
223224 return ;
224225 }
225226
226- if (Kind != AfterMemberFunctionDefinition || HadMultipleSemis)
227+ if (Kind != ExtraSemiKind:: AfterMemberFunctionDefinition || HadMultipleSemis)
227228 Diag (StartLoc, diag::ext_extra_semi)
228- << Kind << DeclSpec::getSpecifierName (TST,
229- Actions.getASTContext ().getPrintingPolicy ())
229+ << llvm::to_underlying (Kind)
230+ << DeclSpec::getSpecifierName (
231+ TST, Actions.getASTContext ().getPrintingPolicy ())
230232 << FixItHint::CreateRemoval (SourceRange (StartLoc, EndLoc));
231233 else
232234 // A single semicolon is valid after a member function definition.
@@ -902,7 +904,7 @@ Parser::ParseExternalDeclaration(ParsedAttributes &Attrs,
902904 // Either a C++11 empty-declaration or attribute-declaration.
903905 SingleDecl =
904906 Actions.ActOnEmptyDeclaration (getCurScope (), Attrs, Tok.getLocation ());
905- ConsumeExtraSemi (OutsideFunction);
907+ ConsumeExtraSemi (ExtraSemiKind:: OutsideFunction);
906908 break ;
907909 case tok::r_brace:
908910 Diag (Tok, diag::err_extraneous_closing_brace);
0 commit comments