Skip to content

Commit b6d053e

Browse files
committed
apply suggestions from git-clang-format
1 parent 748c3b5 commit b6d053e

23 files changed

+80
-78
lines changed

clang/include/clang/AST/Expr.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4819,13 +4819,12 @@ class PPEmbedExpr final : public Expr {
48194819
Expanded,
48204820
};
48214821

4822-
PPEmbedExpr(const ASTContext &Ctx, QualType ResultTy, StringLiteral* Filename, StringLiteral* BinaryData,
4823-
SourceLocation BLoc, SourceLocation RParenLoc,
4824-
DeclContext *Context);
4822+
PPEmbedExpr(const ASTContext &Ctx, QualType ResultTy, StringLiteral *Filename,
4823+
StringLiteral *BinaryData, SourceLocation BLoc,
4824+
SourceLocation RParenLoc, DeclContext *Context);
48254825

48264826
/// Build an empty call expression.
4827-
explicit PPEmbedExpr(EmptyShell Empty)
4828-
: Expr(SourceLocExprClass, Empty) {}
4827+
explicit PPEmbedExpr(EmptyShell Empty) : Expr(SourceLocExprClass, Empty) {}
48294828

48304829
/// If the PPEmbedExpr has been resolved return the subexpression
48314830
/// representing the resolved value. Otherwise return null.

clang/include/clang/Basic/FileManager.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,9 @@ class FileManager : public RefCountedBase<FileManager> {
282282
getBufferForFile(StringRef Filename, bool isVolatile = false,
283283
bool RequiresNullTerminator = true,
284284
std::optional<int64_t> MaybeLimit = std::nullopt) {
285-
return getBufferForFileImpl(Filename, /*FileSize=*/(MaybeLimit ? *MaybeLimit : -1), isVolatile,
286-
RequiresNullTerminator);
285+
return getBufferForFileImpl(Filename,
286+
/*FileSize=*/(MaybeLimit ? *MaybeLimit : -1),
287+
isVolatile, RequiresNullTerminator);
287288
}
288289

289290
private:

clang/include/clang/Frontend/PreprocessorOutputOptions.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ class PreprocessorOutputOptions {
2222
unsigned ShowMacroComments : 1; ///< Show comments, even in macros.
2323
unsigned ShowMacros : 1; ///< Print macro definitions.
2424
unsigned ShowIncludeDirectives : 1; ///< Print includes, imports etc. within preprocessed output.
25-
unsigned ShowEmbedDirectives : 1; ///< Print embeds, etc. within preprocessed output.
25+
unsigned ShowEmbedDirectives : 1; ///< Print embeds, etc. within preprocessed
26+
///< output.
2627
unsigned RewriteIncludes : 1; ///< Preprocess include directives only.
2728
unsigned RewriteImports : 1; ///< Include contents of transitively-imported modules.
2829
unsigned MinimizeWhitespace : 1; ///< Ignore whitespace from input.

clang/include/clang/Lex/PPEmbedParameters.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#ifndef LLVM_CLANG_LEX_PPEMBEDPARAMETERS_H
1414
#define LLVM_CLANG_LEX_PPEMBEDPARAMETERS_H
1515

16-
#include "clang/Lex/Token.h"
1716
#include "clang/Lex/PPDirectiveParameter.h"
17+
#include "clang/Lex/Token.h"
1818
#include "llvm/ADT/SmallVector.h"
1919

2020
namespace clang {
@@ -25,7 +25,8 @@ class PPEmbedParameterOffset : public PPDirectiveParameter {
2525
public:
2626
size_t Offset;
2727

28-
PPEmbedParameterOffset(size_t Offset, SourceLocation Start, SourceLocation End)
28+
PPEmbedParameterOffset(size_t Offset, SourceLocation Start,
29+
SourceLocation End)
2930
: Offset(Offset), PPDirectiveParameter(Start, End) {}
3031
};
3132

@@ -35,8 +36,7 @@ class PPEmbedParameterLimit : public PPDirectiveParameter {
3536
public:
3637
size_t Limit;
3738

38-
PPEmbedParameterLimit(size_t Limit, SourceLocation Start,
39-
SourceLocation End)
39+
PPEmbedParameterLimit(size_t Limit, SourceLocation Start, SourceLocation End)
4040
: Limit(Limit), PPDirectiveParameter(Start, End) {}
4141
};
4242

@@ -47,7 +47,7 @@ class PPEmbedParameterPrefix : public PPDirectiveParameter {
4747
SmallVector<Token, 2> Tokens;
4848

4949
PPEmbedParameterPrefix(SmallVector<Token, 2> Tokens, SourceLocation Start,
50-
SourceLocation End)
50+
SourceLocation End)
5151
: Tokens(std::move(Tokens)), PPDirectiveParameter(Start, End) {}
5252
};
5353

@@ -58,7 +58,7 @@ class PPEmbedParameterSuffix : public PPDirectiveParameter {
5858
SmallVector<Token, 2> Tokens;
5959

6060
PPEmbedParameterSuffix(SmallVector<Token, 2> Tokens, SourceLocation Start,
61-
SourceLocation End)
61+
SourceLocation End)
6262
: Tokens(std::move(Tokens)), PPDirectiveParameter(Start, End) {}
6363
};
6464

clang/include/clang/Lex/Preprocessor.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1816,7 +1816,8 @@ class Preprocessor {
18161816
/// Parses a simple integer literal to get its numeric value. Floating
18171817
/// point literals and user defined literals are rejected. Used primarily to
18181818
/// handle pragmas that accept integer arguments.
1819-
bool parseSimpleIntegerLiteral(Token &Tok, uint64_t &Value, bool WithLex = true);
1819+
bool parseSimpleIntegerLiteral(Token &Tok, uint64_t &Value,
1820+
bool WithLex = true);
18201821

18211822
/// Disables macro expansion everywhere except for preprocessor directives.
18221823
void SetMacroExpansionOnlyInDirectives() {

clang/include/clang/Sema/Sema.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6130,7 +6130,8 @@ class Sema final {
61306130
StringRef GetLocationName(PPEmbedExprContext Context) const;
61316131

61326132
bool DiagnosePPEmbedExpr(Expr *&E, SourceLocation ContextLocation,
6133-
PPEmbedExprContext Context, bool SingleAllowed = true);
6133+
PPEmbedExprContext Context,
6134+
bool SingleAllowed = true);
61346135

61356136
// Build a potentially resolved SourceLocExpr.
61366137
ExprResult BuildSourceLocExpr(SourceLocExpr::IdentKind Kind,

clang/lib/AST/Expr.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2330,19 +2330,18 @@ APValue SourceLocExpr::EvaluateInContext(const ASTContext &Ctx,
23302330
}
23312331

23322332
PPEmbedExpr::PPEmbedExpr(const ASTContext &Ctx, QualType ResultTy,
2333-
StringLiteral *Filename,
2334-
StringLiteral *BinaryData,
2335-
SourceLocation BLoc,
2336-
SourceLocation RParenLoc,
2337-
DeclContext *ParentContext)
2333+
StringLiteral *Filename, StringLiteral *BinaryData,
2334+
SourceLocation BLoc, SourceLocation RParenLoc,
2335+
DeclContext *ParentContext)
23382336
: Expr(PPEmbedExprClass, ResultTy, VK_PRValue, OK_Ordinary),
2339-
BuiltinLoc(BLoc), RParenLoc(RParenLoc), ParentContext(ParentContext), Filename(Filename), BinaryData(BinaryData) {
2337+
BuiltinLoc(BLoc), RParenLoc(RParenLoc), ParentContext(ParentContext),
2338+
Filename(Filename), BinaryData(BinaryData) {
23402339
setDependence(ExprDependence::None);
23412340
}
23422341

23432342
size_t PPEmbedExpr::getDataElementCount(ASTContext &Context) const {
2344-
return getDataStringLiteral()->getByteLength() /
2345-
(Context.getTypeSize(getType()) / Context.getTypeSize(Context.CharTy));
2343+
return getDataStringLiteral()->getByteLength() /
2344+
(Context.getTypeSize(getType()) / Context.getTypeSize(Context.CharTy));
23462345
}
23472346

23482347
InitListExpr::InitListExpr(const ASTContext &C, SourceLocation lbraceloc,

clang/lib/AST/ExprClassification.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ static Cl::Kinds ClassifyInternal(ASTContext &Ctx, const Expr *E) {
205205
return Cl::CL_PRValue;
206206

207207
case Expr::PPEmbedExprClass:
208-
// Nominally, this just goes through as a PRValue until we actually expand it and check it.
208+
// Nominally, this just goes through as a PRValue until we actually expand
209+
// it and check it.
209210
return Cl::CL_PRValue;
210211

211212
// Make HLSL this reference-like

clang/lib/AST/StmtProfile.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2284,9 +2284,7 @@ void StmtProfiler::VisitSourceLocExpr(const SourceLocExpr *E) {
22842284
VisitExpr(E);
22852285
}
22862286

2287-
void StmtProfiler::VisitPPEmbedExpr(const PPEmbedExpr *E) {
2288-
VisitExpr(E);
2289-
}
2287+
void StmtProfiler::VisitPPEmbedExpr(const PPEmbedExpr *E) { VisitExpr(E); }
22902288

22912289
void StmtProfiler::VisitRecoveryExpr(const RecoveryExpr *E) { VisitExpr(E); }
22922290

clang/lib/Basic/FileManager.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,6 @@ FileManager::getBufferForFile(FileEntryRef FE, bool isVolatile,
549549
if (MaybeLimit)
550550
FileSize = *MaybeLimit;
551551

552-
553552
// If there's a high enough chance that the file have changed since we
554553
// got its size, force a stat before opening it.
555554
if (isVolatile || Entry->isNamedPipe())

0 commit comments

Comments
 (0)