Skip to content

Commit 930c488

Browse files
authored
Merge pull request #8893 from practicalswift/gardening-20170420b
2 parents 583d567 + 86140d0 commit 930c488

29 files changed

+42
-42
lines changed

lib/AST/ASTPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,7 @@ struct RequirementPrintLocation {
12661266
/// Whether the requirement needs to be in a where clause.
12671267
bool InWhereClause;
12681268
};
1269-
} // namespace
1269+
} // end anonymous namespace
12701270

12711271
/// Heuristically work out a good place for \c req to be printed inside \c
12721272
/// proto.

lib/AST/GenericSignature.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ namespace {
759759

760760
template<typename T>
761761
using GSBConstraint = GenericSignatureBuilder::Constraint<T>;
762-
} // namespace
762+
} // end anonymous namespace
763763

764764
/// Retrieve the best requirement source from the list
765765
static const RequirementSource *

lib/AST/GenericSignatureBuilder.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,7 +1519,7 @@ namespace {
15191519
}
15201520
}
15211521
};
1522-
} // namespace
1522+
} // end anonymous namespace
15231523

15241524
// Give a nested type the appropriately resolved concrete type, based off a
15251525
// parent PA that has a concrete type.
@@ -3534,7 +3534,7 @@ namespace {
35343534

35353535
return representativeConstraint;
35363536
}
3537-
} // namespace
3537+
} // end anonymous namespace
35383538

35393539
void
35403540
GenericSignatureBuilder::finalize(SourceLoc loc,
@@ -3920,7 +3920,7 @@ namespace {
39203920
assert(!constraints.empty() && "All constraints were self-derived!");
39213921
return anyDerivedViaConcrete;
39223922
}
3923-
} // namespace
3923+
} // end anonymous namespace
39243924

39253925
template<typename T, typename DiagT>
39263926
Constraint<T> GenericSignatureBuilder::checkConstraintList(
@@ -4264,7 +4264,7 @@ namespace {
42644264
return lhs.constraint < rhs.constraint;
42654265
}
42664266
};
4267-
} // namespace
4267+
} // end anonymous namespace
42684268

42694269
void GenericSignatureBuilder::checkSameTypeConstraints(
42704270
ArrayRef<GenericTypeParamType *> genericParams,
@@ -4668,7 +4668,7 @@ namespace {
46684668
}
46694669
return bestSource;
46704670
}
4671-
} // namespace
4671+
} // end anonymous namespace
46724672

46734673
void GenericSignatureBuilder::enumerateRequirements(llvm::function_ref<
46744674
void (RequirementKind kind,

lib/AST/ProtocolConformance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ namespace {
391391
out << "\n";
392392
}
393393
};
394-
} // namespace
394+
} // end anonymous namespace
395395

396396
bool NormalProtocolConformance::hasTypeWitness(AssociatedTypeDecl *assocType,
397397
LazyResolver *resolver) const {

lib/IDE/Utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ class ClangFileRewriterHelper {
905905
RewriteBuf.write(OS);
906906
}
907907
};
908-
} // namespace
908+
} // end anonymous namespace
909909
struct swift::ide::SourceEditOutputConsumer::Implementation {
910910
ClangFileRewriterHelper Rewriter;
911911
Implementation(SourceManager &SM, unsigned BufferId, llvm::raw_ostream &OS)

lib/Immediate/REPL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class PrettyStackTraceREPL : public llvm::PrettyStackTraceEntry {
224224

225225
void print(llvm::raw_ostream &out) const override;
226226
};
227-
} // namespace
227+
} // end anonymous namespace
228228

229229
/// EditLine wrapper that implements the user interface behavior for reading
230230
/// user input to the REPL. All of its methods must be usable from a separate

lib/Migrator/EditorAdapter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- EditorAdapter.cpp --------------------------------------*- C++ -*-===//
1+
//===--- EditorAdapter.cpp ------------------------------------------------===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

lib/Migrator/RewriteBufferEditsReceiver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- RewriteBufferEditsReceiver.cpp -------------------------*- C++ -*-===//
1+
//===--- RewriteBufferEditsReceiver.cpp -----------------------------------===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

lib/SILGen/SILGenType.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ class SILGenVTable : public SILVTableVisitor<SILGenVTable> {
205205
}
206206
};
207207

208-
} // namespace
208+
} // end anonymous namespace
209209

210210
static void emitTypeMemberGlobalVariable(SILGenModule &SGM,
211211
VarDecl *var) {

lib/SILOptimizer/Mandatory/AddressLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ class ApplyRewriter {
726726
SILValue materializeIndirectResultAddress(SILInstruction *origDirectResultVal,
727727
SILType argTy);
728728
};
729-
} // namespace
729+
} // end anonymous namespace
730730

731731
/// Rewrite any indirect parameter in place.
732732
void ApplyRewriter::rewriteParameters() {

lib/Syntax/RawSyntax.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void dumpSyntaxKind(llvm::raw_ostream &OS, const SyntaxKind Kind) {
3333
case SyntaxKind::Token: OS << "Token"; break;
3434
}
3535
}
36-
} // namespace
36+
} // end anonymous namespace
3737

3838
void RawSyntax::print(llvm::raw_ostream &OS) const {
3939
if (const auto Tok = dyn_cast<TokenSyntax>(this)) {

lib/Syntax/Trivia.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void escapeNewlines(std::string &S) {
3333
Index += 3;
3434
}
3535
}
36-
} // namespace
36+
} // end anonymous namespace
3737

3838
void TriviaPiece::dump(llvm::raw_ostream &OS, unsigned Indent) const {
3939
printRepeated(OS, ' ', Indent);

lib/TBDGen/TBDGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class TBDGenVisitor : public ASTVisitor<TBDGenVisitor> {
136136

137137
void visitDecl(Decl *D) { visitMembers(D); }
138138
};
139-
} // namespace
139+
} // end anonymous namespace
140140

141141
static bool isGlobalOrStaticVar(VarDecl *VD) {
142142
return VD->isStatic() || VD->getDeclContext()->isModuleScopeContext();

tools/SourceKit/lib/Support/Concurrency-libdispatch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ struct ExecuteOnLargeStackInfo {
9494
Block_release(BlockToRun);
9595
}
9696
};
97-
} // namespace
97+
} // end anonymous namespace
9898

9999
static void executeBlock(void *Data) {
100100
auto ExecuteInfo = (ExecuteOnLargeStackInfo*)Data;

tools/SourceKit/lib/Support/UIDRegistry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class UIDRegistryImpl {
3434
static void setTag(void *Ptr, void *Tag);
3535
static void *getTag(void *Ptr);
3636
};
37-
} // namespace
37+
} // end anonymous namespace
3838

3939
static UIDRegistryImpl *getGlobalRegistry() {
4040
static UIDRegistryImpl *GlobalRegistry = 0;

tools/SourceKit/lib/SwiftLang/SwiftDocSupport.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ struct SourceTextInfo {
252252
std::vector<TextReference> References;
253253
};
254254

255-
} // namespace
255+
} // end anonymous namespace
256256

257257
static void initDocGenericParams(const Decl *D, DocEntityInfo &Info) {
258258
auto *DC = dyn_cast<DeclContext>(D);
@@ -760,7 +760,7 @@ class DocSyntaxWalker : public SyntaxModelWalker {
760760
}
761761
}
762762
};
763-
} // namespace
763+
} // end anonymous namespace
764764

765765
static bool makeParserAST(CompilerInstance &CI, StringRef Text) {
766766
CompilerInvocation Invocation;
@@ -894,7 +894,7 @@ class FuncWalker : public ASTWalker {
894894
return false; // skip body.
895895
}
896896
};
897-
} // namespace
897+
} // end anonymous namespace
898898

899899
static void addParameterEntities(CompilerInstance &CI,
900900
SourceTextInfo &IFaceInfo) {
@@ -1055,7 +1055,7 @@ class SourceDocASTWalker : public SourceEntityWalker {
10551055
return TextRange{ Start, End-Start };
10561056
}
10571057
};
1058-
} // namespace
1058+
} // end anonymous namespace
10591059

10601060
static bool getSourceTextInfo(CompilerInstance &CI,
10611061
SourceTextInfo &Info) {

tools/SourceKit/lib/SwiftLang/SwiftEditorInterfaceGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ class DocSyntaxWalker : public SyntaxModelWalker {
223223
}
224224
};
225225

226-
} // namespace
226+
} // end anonymous namespace
227227

228228
static bool makeParserAST(CompilerInstance &CI, StringRef Text) {
229229
CompilerInvocation Invocation;

tools/SourceKit/lib/SwiftLang/SwiftSourceDocInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1671,7 +1671,7 @@ class RelatedIdScanner : public SourceEntityWalker {
16711671
}
16721672
};
16731673

1674-
} // namespace
1674+
} // end anonymous namespace
16751675

16761676
void SwiftLangSupport::findRelatedIdentifiersInFile(
16771677
StringRef InputFile, unsigned Offset,

tools/SourceKit/tools/complete-test/complete-test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct TestOptions {
5757
bool structureOutput = false;
5858
ArrayRef<const char *> compilerArgs;
5959
};
60-
} // namespace
60+
} // end anonymous namespace
6161
static int handleTestInvocation(TestOptions &options);
6262

6363
static sourcekitd_uid_t KeyRequest;
@@ -548,7 +548,7 @@ class ResponsePrinter {
548548
return OS;
549549
}
550550
};
551-
} // namespace
551+
} // end anonymous namespace
552552

553553
static void printResponse(sourcekitd_response_t resp, bool raw, bool structure,
554554
unsigned indentation) {

tools/SourceKit/tools/sourcekitd-repl/sourcekitd-repl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static void convertToUTF8(llvm::ArrayRef<wchar_t> wide,
114114
(void)res;
115115
out.set_size(utf8_begin - out.begin());
116116
}
117-
} // namespace
117+
} // end anonymous namespace
118118

119119
/// An arbitrary, otherwise-unused char value that editline interprets as
120120
/// entering/leaving "literal mode", meaning it passes prompt characters through
@@ -560,7 +560,7 @@ class REPLInput {
560560
}
561561

562562
};
563-
} // namespace
563+
} // end anonymous namespace
564564

565565
static bool handleRequest(StringRef Req, std::string &Error);
566566

tools/SourceKit/tools/sourcekitd-test/sourcekitd-test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ struct AsyncResponseInfo {
189189
std::string sourceFilename;
190190
std::unique_ptr<llvm::MemoryBuffer> sourceBuffer;
191191
};
192-
} // namespace
192+
} // end anonymous namespace
193193

194194
static std::vector<AsyncResponseInfo> asyncResponses;
195195

tools/SourceKit/tools/sourcekitd/lib/API/CodeCompletionResultsArray.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class CodeCompletionResultsArray {
153153
}
154154
};
155155

156-
} // namespace
156+
} // end anonymous namespace
157157

158158
VariantFunctions *
159159
sourcekitd::getVariantFunctionsForCodeCompletionResultsArray() {

tools/SourceKit/tools/sourcekitd/lib/API/DocStructureArray.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ struct Node {
5151
SmallVector<Element, 4> elements;
5252
SmallVector<unsigned, 4> childIndices;
5353
};
54-
} // namespace
54+
} // end anonymous namespace
5555

5656
struct DocStructureArrayBuilder::Implementation {
5757
typedef CompactArrayBuilder<StringRef> InheritedTypesBuilder;
@@ -342,7 +342,7 @@ class DocStructureArrayReader {
342342
>
343343
StructureReader;
344344
};
345-
} // namespace
345+
} // end anonymous namespace
346346

347347
DocStructureArrayReader::DocStructureArrayReader(void *buffer)
348348
: buffer(buffer) {}

tools/SourceKit/tools/sourcekitd/lib/API/DocSupportAnnotationArray.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class DocSupportAnnotationArray {
106106
}
107107
};
108108

109-
} // namespace
109+
} // end anonymous namespace
110110

111111
VariantFunctions *
112112
sourcekitd::getVariantFunctionsForDocSupportAnnotationArray() {

tools/SourceKit/tools/sourcekitd/lib/API/Requests.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ class SKIndexingConsumer : public IndexingConsumer {
906906

907907
bool finishSourceEntity(UIdent Kind) override;
908908
};
909-
} // namespace
909+
} // end anonymous namespace
910910

911911
static sourcekitd_response_t indexSource(StringRef Filename,
912912
ArrayRef<const char *> Args,
@@ -1114,7 +1114,7 @@ class SKDocConsumer : public DocInfoConsumer {
11141114

11151115
bool handleDiagnostic(const DiagnosticEntryInfo &Info) override;
11161116
};
1117-
} // namespace
1117+
} // end anonymous namespace
11181118

11191119
static bool isSwiftPrefixed(StringRef MangledName) {
11201120
if (MangledName.size() < 2)
@@ -1563,7 +1563,7 @@ class SKCodeCompletionConsumer : public CodeCompletionConsumer {
15631563

15641564
bool handleResult(const CodeCompletionInfo &Info) override;
15651565
};
1566-
} // namespace
1566+
} // end anonymous namespace
15671567

15681568
static sourcekitd_response_t codeComplete(llvm::MemoryBuffer *InputBuf,
15691569
int64_t Offset,
@@ -1940,7 +1940,7 @@ class SKEditorConsumer : public EditorConsumer {
19401940
}
19411941
};
19421942

1943-
} // namespace
1943+
} // end anonymous namespace
19441944

19451945
static sourcekitd_response_t
19461946
editorOpen(StringRef Name, llvm::MemoryBuffer *Buf, bool EnableSyntaxMap,

tools/SourceKit/tools/sourcekitd/lib/API/TokenAnnotationsArray.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class TokenAnnotationsArray {
137137
}
138138
};
139139

140-
} // namespace
140+
} // end anonymous namespace
141141

142142
namespace sourcekitd {
143143

tools/SourceKit/tools/sourcekitd/lib/API/sourcekitdAPI-Common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ class VariantPrinter : public VariantVisitor<VariantPrinter>,
330330
VariantPrinter(raw_ostream &OS, unsigned Indent = 0, bool PrintAsJSON = false)
331331
: RequestResponsePrinterBase(OS, Indent, PrintAsJSON) { }
332332
};
333-
} // namespace
333+
} // end anonymous namespace
334334

335335
void sourcekitd::writeEscaped(llvm::StringRef Str, llvm::raw_ostream &OS) {
336336
for (unsigned i = 0, e = Str.size(); i != e; ++i) {

tools/sil-opt/SILOpt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ enum EnforceExclusivityMode {
9090
DynamicOnly,
9191
None
9292
};
93-
} // namespace
93+
} // end anonymous namespace
9494

9595
static cl::opt<EnforceExclusivityMode> EnforceExclusivity(
9696
"enforce-exclusivity", cl::desc("Enforce law of exclusivity "

unittests/Syntax/ExprSyntaxTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ FunctionCallArgumentListSyntax getLabellessArgumentList() {
287287
.appending(ThreeArg)
288288
.castTo<FunctionCallArgumentListSyntax>();
289289
}
290-
} // namespace
290+
} // end anonymous namespace
291291

292292
TEST(ExprSyntaxTests, FunctionCallArgumentListGetAPIs) {
293293
auto X = SyntaxFactory::makeIdentifier("x", {}, {});

0 commit comments

Comments
 (0)