Skip to content

Commit 4852569

Browse files
clang format
1 parent 4503b11 commit 4852569

File tree

10 files changed

+32
-31
lines changed

10 files changed

+32
-31
lines changed

clang/include/clang/AST/ExprCXX.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5505,14 +5505,13 @@ class CXXReflectExpr : public Expr {
55055505
CXXReflectExpr(EmptyShell Empty);
55065506

55075507
public:
5508-
55095508
static CXXReflectExpr *Create(ASTContext &C, SourceLocation OperatorLoc,
55105509
SourceLocation ArgLoc, QualType Operand);
55115510

55125511
static CXXReflectExpr *Create(ASTContext &C, SourceLocation OperatorLoc,
55135512
SourceLocation OperandLoc, Decl *Operand);
55145513

5515-
static CXXReflectExpr *CreateEmpty(ASTContext& C);
5514+
static CXXReflectExpr *CreateEmpty(ASTContext &C);
55165515

55175516
SourceLocation getBeginLoc() const LLVM_READONLY { return OperatorLoc; }
55185517
SourceLocation getEndLoc() const LLVM_READONLY {

clang/include/clang/AST/RecursiveASTVisitor.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2883,9 +2883,7 @@ DEF_TRAVERSE_STMT(CXXUnresolvedConstructExpr, {
28832883
TRY_TO(TraverseTypeLoc(S->getTypeSourceInfo()->getTypeLoc()));
28842884
})
28852885

2886-
DEF_TRAVERSE_STMT(CXXReflectExpr, {
2887-
// TODO
2888-
})
2886+
DEF_TRAVERSE_STMT(CXXReflectExpr, {/*TODO*/})
28892887

28902888
// These expressions all might take explicit template arguments.
28912889
// We traverse those if so. FIXME: implement these.

clang/include/clang/Parse/Parser.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5169,9 +5169,9 @@ class Parser : public CodeCompletionHandler {
51695169
///@{
51705170

51715171

5172-
//===--------------------------------------------------------------------===//
5173-
// C++2c: Reflection [P2996]
5174-
ExprResult ParseCXXReflectExpression(SourceLocation OpLoc);
5172+
//===--------------------------------------------------------------------===//
5173+
// C++2c: Reflection [P2996]
5174+
ExprResult ParseCXXReflectExpression(SourceLocation OpLoc);
51755175

51765176
private:
51775177
bool MaybeParseHLSLAnnotations(Declarator &D,
@@ -7683,7 +7683,7 @@ class Parser : public CodeCompletionHandler {
76837683
/// [GNU] asm-clobbers:
76847684
/// asm-string-literal
76857685
/// asm-clobbers ',' asm-string-literal
7686-
/// \endverbatim
7686+
/// \endverbatim
76877687
///
76887688
StmtResult ParseAsmStatement(bool &msAsm);
76897689

clang/include/clang/Sema/Sema.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14665,14 +14665,14 @@ class Sema final : public SemaBase {
1466514665

1466614666
public:
1466714667

14668-
ExprResult ActOnCXXReflectExpr(SourceLocation OpLoc, TypeSourceInfo* T);
14669-
ExprResult ActOnCXXReflectExpr(SourceLocation OpLoc,
14670-
SourceLocation ArgLoc, Decl *D);
14671-
14672-
ExprResult BuildCXXReflectExpr(SourceLocation OperatorLoc,
14673-
SourceLocation OperandLoc, QualType T);
14674-
ExprResult BuildCXXReflectExpr(SourceLocation OperatorLoc,
14675-
SourceLocation OperandLoc, Decl *D);
14668+
ExprResult ActOnCXXReflectExpr(SourceLocation OpLoc, TypeSourceInfo* T);
14669+
ExprResult ActOnCXXReflectExpr(SourceLocation OpLoc, SourceLocation ArgLoc,
14670+
Decl *D);
14671+
14672+
ExprResult BuildCXXReflectExpr(SourceLocation OperatorLoc,
14673+
SourceLocation OperandLoc, QualType T);
14674+
ExprResult BuildCXXReflectExpr(SourceLocation OperatorLoc,
14675+
SourceLocation OperandLoc, Decl *D);
1467614676

1467714677
public:
1467814678
void PushSatisfactionStackEntry(const NamedDecl *D,

clang/lib/AST/ExprCXX.cpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1940,16 +1940,19 @@ TypeTraitExpr *TypeTraitExpr::CreateDeserialized(const ASTContext &C,
19401940
}
19411941

19421942
CXXReflectExpr::CXXReflectExpr(const ASTContext &C, QualType T, QualType Ty)
1943-
: Expr(CXXReflectExprClass, T, VK_PRValue, OK_Ordinary) {}
1943+
: Expr(CXXReflectExprClass, T, VK_PRValue, OK_Ordinary) {}
19441944

1945-
CXXReflectExpr::CXXReflectExpr(const ASTContext &C, QualType T, Decl *Arg, bool IsNamespace)
1946-
: Expr(CXXReflectExprClass, T, VK_PRValue, OK_Ordinary) {}
1945+
CXXReflectExpr::CXXReflectExpr(const ASTContext &C, QualType T, Decl *Arg,
1946+
bool IsNamespace)
1947+
: Expr(CXXReflectExprClass, T, VK_PRValue, OK_Ordinary) {}
19471948

19481949
CXXReflectExpr::CXXReflectExpr(EmptyShell Empty)
1949-
: Expr(CXXReflectExprClass, Empty) {}
1950+
: Expr(CXXReflectExprClass, Empty) {}
19501951

1951-
CXXReflectExpr *CXXReflectExpr::Create(ASTContext &C, SourceLocation OperatorLoc,
1952-
SourceLocation OperandLoc, QualType Operand) {
1952+
CXXReflectExpr *CXXReflectExpr::Create(ASTContext &C,
1953+
SourceLocation OperatorLoc,
1954+
SourceLocation OperandLoc,
1955+
QualType Operand) {
19531956
CXXReflectExpr *E = new (C) CXXReflectExpr(C, C.DependentTy, Operand);
19541957
E->setOperatorLoc(OperatorLoc);
19551958
E->setOperandRange(OperandLoc);
@@ -1962,8 +1965,9 @@ CXXReflectExpr *CXXReflectExpr::Create(ASTContext &C,
19621965
Decl *Operand) {
19631966
bool IsNamespace = isa<TranslationUnitDecl>(Operand);
19641967

1965-
CXXReflectExpr *E = new (C) CXXReflectExpr(C, C.DependentTy, Operand,
1966-
IsNamespace);
1968+
CXXReflectExpr *E =
1969+
new (C) CXXReflectExpr(C, C.DependentTy, Operand, IsNamespace);
1970+
19671971
E->setOperatorLoc(OperatorLoc);
19681972
E->setOperandRange(OperandLoc);
19691973
return E;

clang/lib/AST/StmtPrinter.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2566,7 +2566,6 @@ void StmtPrinter::VisitCXXUnresolvedConstructExpr(
25662566
OS << ')';
25672567
}
25682568

2569-
25702569
void StmtPrinter::VisitCXXReflectExpr(CXXReflectExpr *S) {
25712570
// TODO: Make this better.
25722571
OS << "^(...)";

clang/lib/AST/StmtProfile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2166,7 +2166,7 @@ StmtProfiler::VisitLambdaExpr(const LambdaExpr *S) {
21662166

21672167
void StmtProfiler::VisitCXXReflectExpr(const CXXReflectExpr *E) {
21682168
VisitExpr(E);
2169-
// TODO:
2169+
// TODO:
21702170
}
21712171

21722172
void

clang/lib/Parse/ParseReflect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ ExprResult Parser::ParseCXXReflectExpression(SourceLocation OpLoc) {
3636
TentativeParsingAction TPA(*this);
3737

3838
if (SS.isValid() &&
39-
SS.getScopeRep().getKind() == NestedNameSpecifier::Kind::Global) {
39+
SS.getScopeRep().getKind() == NestedNameSpecifier::Kind::Global) {
4040
// Check for global namespace '^^::'
4141
TPA.Commit();
4242
Decl *TUDecl = Actions.getASTContext().getTranslationUnitDecl();

clang/lib/Sema/SemaExpr.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17760,8 +17760,10 @@ void Sema::PushExpressionEvaluationContextForFunction(
1776017760
}
1776117761
}
1776217762

17763-
ExprResult Sema::ActOnCXXReflectExpr(SourceLocation OpLoc, TypeSourceInfo* TSI) {
17764-
return BuildCXXReflectExpr(OpLoc, TSI->getTypeLoc().getBeginLoc(), TSI->getType());
17763+
ExprResult Sema::ActOnCXXReflectExpr(SourceLocation OpLoc,
17764+
TypeSourceInfo *TSI) {
17765+
return BuildCXXReflectExpr(OpLoc, TSI->getTypeLoc().getBeginLoc(),
17766+
TSI->getType());
1776517767
}
1776617768

1776717769
ExprResult Sema::ActOnCXXReflectExpr(SourceLocation OpLoc,

clang/lib/Serialization/ASTReaderStmt.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,6 @@ void ASTStmtReader::VisitCapturedStmt(CapturedStmt *S) {
529529
}
530530
}
531531

532-
533532
void ASTStmtReader::VisitCXXReflectExpr(CXXReflectExpr *E) {
534533
llvm_unreachable("unimplemented");
535534
}

0 commit comments

Comments
 (0)