Skip to content

Commit ff63eae

Browse files
committed
Remove \brief commands from doxygen comments.
We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done
1 parent b3ca057 commit ff63eae

File tree

287 files changed

+2051
-2051
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+2051
-2051
lines changed

benchmark/single-source/Hash.swift

+8-8
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ public let HashTest = BenchmarkInfo(
2121
tags: [.validation, .algorithm])
2222

2323
class Hash {
24-
/// \brief C'tor.
24+
/// C'tor.
2525
init(_ bs: Int) {
2626
blocksize = bs
2727
messageLength = 0
2828
dataLength = 0
2929
assert(blocksize <= 64, "Invalid block size")
3030
}
3131

32-
/// \brief Add the bytes in \p Msg to the hash.
32+
/// Add the bytes in \p Msg to the hash.
3333
func update(_ Msg: String) {
3434
for c in Msg.unicodeScalars {
3535
data[dataLength] = UInt8(ascii: c)
@@ -39,7 +39,7 @@ class Hash {
3939
}
4040
}
4141

42-
/// \brief Add the bytes in \p Msg to the hash.
42+
/// Add the bytes in \p Msg to the hash.
4343
func update(_ Msg: [UInt8]) {
4444
for c in Msg {
4545
data[dataLength] = c
@@ -65,7 +65,7 @@ class Hash {
6565
final var data = [UInt8](repeating: 0, count: 64)
6666
final var blocksize: Int
6767

68-
/// \brief Hash the internal data.
68+
/// Hash the internal data.
6969
func hash() {
7070
fatalError("Pure virtual")
7171
}
@@ -78,7 +78,7 @@ class Hash {
7878
fatalError("Pure virtual")
7979
}
8080

81-
/// \brief Blow the data to fill the block.
81+
/// Blow the data to fill the block.
8282
func fillBlock() {
8383
fatalError("Pure virtual")
8484
}
@@ -87,7 +87,7 @@ class Hash {
8787
final
8888
var HexTblFast : [UInt8] = [48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102]
8989

90-
/// \brief Convert a 4-byte integer to a hex string.
90+
/// Convert a 4-byte integer to a hex string.
9191
final
9292
func toHex(_ In: UInt32) -> String {
9393
var In = In
@@ -110,13 +110,13 @@ class Hash {
110110
}
111111
}
112112

113-
/// \brief Left-rotate \p x by \p c.
113+
/// Left-rotate \p x by \p c.
114114
final
115115
func rol(_ x: UInt32, _ c: UInt32) -> UInt32 {
116116
return x &<< c | x &>> (32 &- c)
117117
}
118118

119-
/// \brief Right-rotate \p x by \p c.
119+
/// Right-rotate \p x by \p c.
120120
final
121121
func ror(_ x: UInt32, _ c: UInt32) -> UInt32 {
122122
return x &>> c | x &<< (32 &- c)

docs/TextFormatting.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ Via compiler magic, *everything* conforms to the ``CustomDebugStringConvertible`
131131
protocol. To change the debug representation for a type, you don't
132132
need to declare conformance: simply give the type a ``debugFormat()``::
133133

134-
/// \brief A thing that can be printed in the REPL and the Debugger
134+
/// A thing that can be printed in the REPL and the Debugger
135135
protocol CustomDebugStringConvertible {
136136
typealias DebugRepresentation : TextOutputStreamable = String
137137

138-
/// \brief Produce a textual representation for the REPL and
138+
/// Produce a textual representation for the REPL and
139139
/// Debugger.
140140
func debugFormat() -> DebugRepresentation
141141
}
@@ -169,19 +169,19 @@ Conformance to ``CustomStringConvertible`` is explicit, but if you want to use t
169169
need to do is declare conformance to ``CustomStringConvertible``; there's nothing to
170170
implement::
171171

172-
/// \brief A thing that can be print()ed and toString()ed.
172+
/// A thing that can be print()ed and toString()ed.
173173
protocol CustomStringConvertible : CustomDebugStringConvertible {
174174
typealias PrintRepresentation : TextOutputStreamable = DebugRepresentation
175175

176-
/// \brief produce a "pretty" textual representation.
176+
/// produce a "pretty" textual representation.
177177
///
178178
/// In general you can return a String here, but if you need more
179179
/// control, return a custom TextOutputStreamable type
180180
func format() -> PrintRepresentation {
181181
return debugFormat()
182182
}
183183

184-
/// \brief Simply convert to String
184+
/// Simply convert to String
185185
///
186186
/// You'll never want to reimplement this
187187
func toString() -> String {

docs/doxygen.cfg.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ SHORT_NAMES = NO
138138
# comments will behave just like the Qt-style comments (thus requiring an
139139
# explicit @brief command for a brief description.
140140

141-
JAVADOC_AUTOBRIEF = NO
141+
JAVADOC_AUTOBRIEF = YES
142142

143143
# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
144144
# treat a multi-line C++ special comment block (i.e. a block of //! or ///

include/swift/ABI/Metadata.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1957,7 +1957,7 @@ struct TargetGenericBoxHeapMetadata : public TargetBoxHeapMetadata<Runtime> {
19571957
};
19581958
using GenericBoxHeapMetadata = TargetGenericBoxHeapMetadata<InProcess>;
19591959

1960-
/// \brief The control structure of a generic or resilient protocol
1960+
/// The control structure of a generic or resilient protocol
19611961
/// conformance witness.
19621962
///
19631963
/// Resilient conformances must use a pattern where new requirements
@@ -2008,7 +2008,7 @@ struct TargetResilientWitnessTable final
20082008
};
20092009
using ResilientWitnessTable = TargetResilientWitnessTable<InProcess>;
20102010

2011-
/// \brief The control structure of a generic or resilient protocol
2011+
/// The control structure of a generic or resilient protocol
20122012
/// conformance, which is embedded in the protocol conformance descriptor.
20132013
///
20142014
/// Witness tables need to be instantiated at runtime in these cases:

include/swift/AST/ASTContext.h

+24-24
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,16 @@ namespace syntax {
112112
class SyntaxArena;
113113
}
114114

115-
/// \brief The arena in which a particular ASTContext allocation will go.
115+
/// The arena in which a particular ASTContext allocation will go.
116116
enum class AllocationArena {
117-
/// \brief The permanent arena, which is tied to the lifetime of
117+
/// The permanent arena, which is tied to the lifetime of
118118
/// the ASTContext.
119119
///
120120
/// All global declarations and types need to be allocated into this arena.
121121
/// At present, everything that is not a type involving a type variable is
122122
/// allocated in this arena.
123123
Permanent,
124-
/// \brief The constraint solver's temporary arena, which is tied to the
124+
/// The constraint solver's temporary arena, which is tied to the
125125
/// lifetime of a particular instance of the constraint solver.
126126
///
127127
/// Any type involving a type variable is allocated in this arena.
@@ -144,14 +144,14 @@ enum class KnownFoundationEntity {
144144
/// entity name.
145145
Optional<KnownFoundationEntity> getKnownFoundationEntity(StringRef name);
146146

147-
/// \brief Introduces a new constraint checker arena, whose lifetime is
147+
/// Introduces a new constraint checker arena, whose lifetime is
148148
/// tied to the lifetime of this RAII object.
149149
class ConstraintCheckerArenaRAII {
150150
ASTContext &Self;
151151
void *Data;
152152

153153
public:
154-
/// \brief Introduces a new constraint checker arena, supplanting any
154+
/// Introduces a new constraint checker arena, supplanting any
155155
/// existing constraint checker arena.
156156
///
157157
/// \param self The ASTContext into which this constraint checker arena
@@ -216,13 +216,13 @@ class ASTContext final {
216216
/// it before being set to null.
217217
UnifiedStatsReporter *Stats = nullptr;
218218

219-
/// \brief The language options used for translation.
219+
/// The language options used for translation.
220220
LangOptions &LangOpts;
221221

222-
/// \brief The search path options used by this AST context.
222+
/// The search path options used by this AST context.
223223
SearchPathOptions &SearchPathOpts;
224224

225-
/// \brief The source manager object.
225+
/// The source manager object.
226226
SourceManager &SourceMgr;
227227

228228
/// Diags - The diagnostics engine.
@@ -252,7 +252,7 @@ class ASTContext final {
252252
#define IDENTIFIER_WITH_NAME(Name, IdStr) Identifier Id_##Name;
253253
#include "swift/AST/KnownIdentifiers.def"
254254

255-
/// \brief The list of external definitions imported by this context.
255+
/// The list of external definitions imported by this context.
256256
llvm::SetVector<Decl *> ExternalDefinitions;
257257

258258
/// FIXME: HACK HACK HACK
@@ -270,7 +270,7 @@ class ASTContext final {
270270
llvm::StringMap<Type> RemappedTypes;
271271

272272
private:
273-
/// \brief The current generation number, which reflects the number of
273+
/// The current generation number, which reflects the number of
274274
/// times that external modules have been loaded.
275275
///
276276
/// Various places in the AST, such as the set of extensions associated with
@@ -289,7 +289,7 @@ class ASTContext final {
289289
/// Cache of module names that fail the 'canImport' test in this context.
290290
llvm::SmallPtrSet<Identifier, 8> FailedModuleImportNames;
291291

292-
/// \brief Retrieve the allocator for the given arena.
292+
/// Retrieve the allocator for the given arena.
293293
llvm::BumpPtrAllocator &
294294
getAllocator(AllocationArena arena = AllocationArena::Permanent) const;
295295

@@ -630,7 +630,7 @@ class ASTContext final {
630630
/// Does any proper bookkeeping to keep all module loaders up to date as well.
631631
void addSearchPath(StringRef searchPath, bool isFramework, bool isSystem);
632632

633-
/// \brief Adds a module loader to this AST context.
633+
/// Adds a module loader to this AST context.
634634
///
635635
/// \param loader The new module loader, which will be added after any
636636
/// existing module loaders.
@@ -640,7 +640,7 @@ class ASTContext final {
640640
void addModuleLoader(std::unique_ptr<ModuleLoader> loader,
641641
bool isClang = false);
642642

643-
/// \brief Load extensions to the given nominal type from the external
643+
/// Load extensions to the given nominal type from the external
644644
/// module loaders.
645645
///
646646
/// \param nominal The nominal type whose extensions should be loaded.
@@ -650,7 +650,7 @@ class ASTContext final {
650650
/// one.
651651
void loadExtensions(NominalTypeDecl *nominal, unsigned previousGeneration);
652652

653-
/// \brief Load the methods within the given class that produce
653+
/// Load the methods within the given class that produce
654654
/// Objective-C class or instance methods with the given selector.
655655
///
656656
/// \param classDecl The class in which we are searching for @objc methods.
@@ -675,7 +675,7 @@ class ASTContext final {
675675
unsigned previousGeneration,
676676
llvm::TinyPtrVector<AbstractFunctionDecl *> &methods);
677677

678-
/// \brief Retrieve the Clang module loader for this ASTContext.
678+
/// Retrieve the Clang module loader for this ASTContext.
679679
///
680680
/// If there is no Clang module loader, returns a null pointer.
681681
/// The loader is owned by the AST context.
@@ -686,7 +686,7 @@ class ASTContext final {
686686
/// Does nothing in non-asserts (NDEBUG) builds.
687687
void verifyAllLoadedModules() const;
688688

689-
/// \brief Check whether the module with a given name can be imported without
689+
/// Check whether the module with a given name can be imported without
690690
/// importing it.
691691
///
692692
/// Note that even if this check succeeds, errors may still occur if the
@@ -700,7 +700,7 @@ class ASTContext final {
700700

701701
ModuleDecl *getLoadedModule(Identifier ModuleName) const;
702702

703-
/// \brief Attempts to load a module into this ASTContext.
703+
/// Attempts to load a module into this ASTContext.
704704
///
705705
/// If a module by this name has already been loaded, the existing module will
706706
/// be returned.
@@ -720,7 +720,7 @@ class ASTContext final {
720720
return const_cast<ASTContext *>(this)->getStdlibModule(false);
721721
}
722722

723-
/// \brief Retrieve the current generation number, which reflects the
723+
/// Retrieve the current generation number, which reflects the
724724
/// number of times a module import has caused mass invalidation of
725725
/// lookup tables.
726726
///
@@ -729,14 +729,14 @@ class ASTContext final {
729729
/// with a nominal type.
730730
unsigned getCurrentGeneration() const { return CurrentGeneration; }
731731

732-
/// \brief Increase the generation number, implying that various lookup
732+
/// Increase the generation number, implying that various lookup
733733
/// tables have been significantly altered by the introduction of a new
734734
/// module import.
735735
///
736736
/// \returns the previous generation number.
737737
unsigned bumpGeneration() { return CurrentGeneration++; }
738738

739-
/// \brief Produce a "normal" conformance for a nominal type.
739+
/// Produce a "normal" conformance for a nominal type.
740740
NormalProtocolConformance *
741741
getConformance(Type conformingType,
742742
ProtocolDecl *protocol,
@@ -785,7 +785,7 @@ class ASTContext final {
785785
std::vector<ValueDecl*>
786786
takeDelayedMissingWitnesses(NormalProtocolConformance *conformance);
787787

788-
/// \brief Produce a specialized conformance, which takes a generic
788+
/// Produce a specialized conformance, which takes a generic
789789
/// conformance and substitutions written in terms of the generic
790790
/// conformance's signature.
791791
///
@@ -800,7 +800,7 @@ class ASTContext final {
800800
ProtocolConformance *generic,
801801
SubstitutionMap substitutions);
802802

803-
/// \brief Produce an inherited conformance, for subclasses of a type
803+
/// Produce an inherited conformance, for subclasses of a type
804804
/// that already conforms to a protocol.
805805
///
806806
/// \param type The type for which we are retrieving the conformance.
@@ -848,10 +848,10 @@ class ASTContext final {
848848
const IterableDeclContext *idc,
849849
LazyMemberLoader *lazyLoader);
850850

851-
/// \brief Returns memory usage of this ASTContext.
851+
/// Returns memory usage of this ASTContext.
852852
size_t getTotalMemory() const;
853853

854-
/// \brief Returns memory used exclusively by constraint solver.
854+
/// Returns memory used exclusively by constraint solver.
855855
size_t getSolverMemory() const;
856856

857857
/// Complain if @objc or dynamic is used without importing Foundation.

include/swift/AST/ASTMangler.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class ASTMangler : public Mangler {
198198

199199
void bindGenericParameters(CanGenericSignature sig);
200200

201-
/// \brief Mangles a sugared type iff we are mangling for the debugger.
201+
/// Mangles a sugared type iff we are mangling for the debugger.
202202
template <class T> void appendSugaredType(Type type) {
203203
assert(DWARFMangling &&
204204
"sugared types are only legal when mangling for the debugger");

include/swift/AST/ASTNode.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ namespace swift {
3838

3939
SourceRange getSourceRange() const;
4040

41-
/// \brief Return the location of the start of the statement.
41+
/// Return the location of the start of the statement.
4242
SourceLoc getStartLoc() const;
4343

44-
/// \brief Return the location of the end of the statement.
44+
/// Return the location of the end of the statement.
4545
SourceLoc getEndLoc() const;
4646

4747
void walk(ASTWalker &Walker);
4848
void walk(ASTWalker &&walker) { walk(walker); }
4949

50-
/// \brief get the underlying entity as a decl context if it is one,
50+
/// get the underlying entity as a decl context if it is one,
5151
/// otherwise, return nullptr;
5252
DeclContext *getAsDeclContext() const;
5353

0 commit comments

Comments
 (0)