Skip to content

Commit 1237a15

Browse files
committed
clang-format
1 parent ac894bf commit 1237a15

File tree

2 files changed

+22
-23
lines changed

2 files changed

+22
-23
lines changed

clang/lib/Sema/SemaDeclCXX.cpp

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,9 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D,
747747
if (!getLangOpts().CPlusPlus17)
748748
DiagID = diag::compat_pre_cxx17_decomp_decl;
749749
else if (D.getContext() == DeclaratorContext::Condition)
750-
DiagID = getLangOpts().CPlusPlus26 ? diag::compat_cxx26_decomp_decl_cond
751-
: diag::compat_pre_cxx26_decomp_decl_cond;
750+
DiagID = getLangOpts().CPlusPlus26
751+
? diag::compat_cxx26_decomp_decl_cond
752+
: diag::compat_pre_cxx26_decomp_decl_cond;
752753
else
753754
DiagID = diag::compat_cxx17_decomp_decl;
754755

@@ -2105,9 +2106,9 @@ static bool CheckConstexprDeclStmt(Sema &SemaRef, const FunctionDecl *Dcl,
21052106
if (Kind == Sema::CheckConstexprKind::Diagnose) {
21062107
SemaRef.Diag(VD->getLocation(),
21072108
SemaRef.getLangOpts().CPlusPlus14
2108-
? diag::compat_cxx14_constexpr_local_var
2109-
: diag::compat_pre_cxx14_constexpr_local_var)
2110-
<< isa<CXXConstructorDecl>(Dcl);
2109+
? diag::compat_cxx14_constexpr_local_var
2110+
: diag::compat_pre_cxx14_constexpr_local_var)
2111+
<< isa<CXXConstructorDecl>(Dcl);
21112112
} else if (!SemaRef.getLangOpts().CPlusPlus14) {
21122113
return false;
21132114
}
@@ -2427,16 +2428,16 @@ static bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl,
24272428
<< isa<CXXConstructorDecl>(Dcl);
24282429
} else if (Cxx2aLoc.isValid()) {
24292430
SemaRef.Diag(Cxx2aLoc,
2430-
SemaRef.getLangOpts().CPlusPlus20
2431-
? diag::compat_cxx20_constexpr_body_invalid_stmt
2432-
: diag::compat_pre_cxx20_constexpr_body_invalid_stmt)
2433-
<< isa<CXXConstructorDecl>(Dcl);
2431+
SemaRef.getLangOpts().CPlusPlus20
2432+
? diag::compat_cxx20_constexpr_body_invalid_stmt
2433+
: diag::compat_pre_cxx20_constexpr_body_invalid_stmt)
2434+
<< isa<CXXConstructorDecl>(Dcl);
24342435
} else if (Cxx1yLoc.isValid()) {
24352436
SemaRef.Diag(Cxx1yLoc,
2436-
SemaRef.getLangOpts().CPlusPlus14
2437-
? diag::compat_cxx14_constexpr_body_invalid_stmt
2438-
: diag::compat_pre_cxx14_constexpr_body_invalid_stmt)
2439-
<< isa<CXXConstructorDecl>(Dcl);
2437+
SemaRef.getLangOpts().CPlusPlus14
2438+
? diag::compat_cxx14_constexpr_body_invalid_stmt
2439+
: diag::compat_pre_cxx14_constexpr_body_invalid_stmt)
2440+
<< isa<CXXConstructorDecl>(Dcl);
24402441
}
24412442

24422443
if (const CXXConstructorDecl *Constructor

clang/lib/Sema/SemaTemplate.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10635,11 +10635,10 @@ TypeResult Sema::ActOnTypenameType(Scope *S, SourceLocation TypenameLoc,
1063510635
return true;
1063610636

1063710637
if (TypenameLoc.isValid() && S && !S->getTemplateParamParent())
10638-
Diag(TypenameLoc,
10639-
getLangOpts().CPlusPlus11 ?
10640-
diag::compat_cxx11_typename_outside_of_template :
10641-
diag::compat_pre_cxx11_typename_outside_of_template)
10642-
<< FixItHint::CreateRemoval(TypenameLoc);
10638+
Diag(TypenameLoc, getLangOpts().CPlusPlus11
10639+
? diag::compat_cxx11_typename_outside_of_template
10640+
: diag::compat_pre_cxx11_typename_outside_of_template)
10641+
<< FixItHint::CreateRemoval(TypenameLoc);
1064310642

1064410643
NestedNameSpecifierLoc QualifierLoc = SS.getWithLocInContext(Context);
1064510644
TypeSourceInfo *TSI = nullptr;
@@ -10663,11 +10662,10 @@ Sema::ActOnTypenameType(Scope *S, SourceLocation TypenameLoc,
1066310662
ASTTemplateArgsPtr TemplateArgsIn,
1066410663
SourceLocation RAngleLoc) {
1066510664
if (TypenameLoc.isValid() && S && !S->getTemplateParamParent())
10666-
Diag(TypenameLoc,
10667-
getLangOpts().CPlusPlus11 ?
10668-
diag::compat_cxx11_typename_outside_of_template :
10669-
diag::compat_pre_cxx11_typename_outside_of_template)
10670-
<< FixItHint::CreateRemoval(TypenameLoc);
10665+
Diag(TypenameLoc, getLangOpts().CPlusPlus11
10666+
? diag::compat_cxx11_typename_outside_of_template
10667+
: diag::compat_pre_cxx11_typename_outside_of_template)
10668+
<< FixItHint::CreateRemoval(TypenameLoc);
1067110669

1067210670
// Strangely, non-type results are not ignored by this lookup, so the
1067310671
// program is ill-formed if it finds an injected-class-name.

0 commit comments

Comments
 (0)