forked from OSchip/llvm-project
[clang] NFC: add line break at the end of if expressions
Hi, In function TransformTemplateArgument, would it be better to add line break at the end of "if" expressions? I use clang-format to do the job for me. Thanks a lot Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D104604
This commit is contained in:
parent
a7ed55f64c
commit
2fd75507d1
|
@ -4322,10 +4322,10 @@ void TreeTransform<Derived>::InventTemplateArgumentLoc(
|
|||
Arg, QualType(), getDerived().getBaseLocation());
|
||||
}
|
||||
|
||||
template<typename Derived>
|
||||
template <typename Derived>
|
||||
bool TreeTransform<Derived>::TransformTemplateArgument(
|
||||
const TemplateArgumentLoc &Input,
|
||||
TemplateArgumentLoc &Output, bool Uneval) {
|
||||
const TemplateArgumentLoc &Input, TemplateArgumentLoc &Output,
|
||||
bool Uneval) {
|
||||
const TemplateArgument &Arg = Input.getArgument();
|
||||
switch (Arg.getKind()) {
|
||||
case TemplateArgument::Null:
|
||||
|
@ -4374,7 +4374,8 @@ bool TreeTransform<Derived>::TransformTemplateArgument(
|
|||
DI = InventTypeSourceInfo(Input.getArgument().getAsType());
|
||||
|
||||
DI = getDerived().TransformType(DI);
|
||||
if (!DI) return true;
|
||||
if (!DI)
|
||||
return true;
|
||||
|
||||
Output = TemplateArgumentLoc(TemplateArgument(DI->getType()), DI);
|
||||
return false;
|
||||
|
@ -4390,9 +4391,8 @@ bool TreeTransform<Derived>::TransformTemplateArgument(
|
|||
|
||||
CXXScopeSpec SS;
|
||||
SS.Adopt(QualifierLoc);
|
||||
TemplateName Template
|
||||
= getDerived().TransformTemplateName(SS, Arg.getAsTemplate(),
|
||||
Input.getTemplateNameLoc());
|
||||
TemplateName Template = getDerived().TransformTemplateName(
|
||||
SS, Arg.getAsTemplate(), Input.getTemplateNameLoc());
|
||||
if (Template.isNull())
|
||||
return true;
|
||||
|
||||
|
@ -4414,11 +4414,13 @@ bool TreeTransform<Derived>::TransformTemplateArgument(
|
|||
Sema::ExpressionEvaluationContextRecord::EK_TemplateArgument);
|
||||
|
||||
Expr *InputExpr = Input.getSourceExpression();
|
||||
if (!InputExpr) InputExpr = Input.getArgument().getAsExpr();
|
||||
if (!InputExpr)
|
||||
InputExpr = Input.getArgument().getAsExpr();
|
||||
|
||||
ExprResult E = getDerived().TransformExpr(InputExpr);
|
||||
E = SemaRef.ActOnConstantExpression(E);
|
||||
if (E.isInvalid()) return true;
|
||||
if (E.isInvalid())
|
||||
return true;
|
||||
Output = TemplateArgumentLoc(TemplateArgument(E.get()), E.get());
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue