aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/CommentLexer.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2013-02-10 11:54:22 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2013-02-10 11:54:22 +0000
commit0ff4f8bf47c924b4b01d989a53432a95471a068d (patch)
treeb41162d13e76551e4313dcc249e9c4110aca83f4 /lib/AST/CommentLexer.cpp
parent2afbe523648eb591709ac9262f024457eb019bd6 (diff)
Use static functions instead of an unnamed namespace
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174835 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/CommentLexer.cpp')
-rw-r--r--lib/AST/CommentLexer.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/AST/CommentLexer.cpp b/lib/AST/CommentLexer.cpp
index e4010bc22b..cee086e103 100644
--- a/lib/AST/CommentLexer.cpp
+++ b/lib/AST/CommentLexer.cpp
@@ -15,21 +15,21 @@ void Token::dump(const Lexer &L, const SourceManager &SM) const {
llvm::errs() << " " << Length << " \"" << L.getSpelling(*this, SM) << "\"\n";
}
-namespace {
-bool isHTMLNamedCharacterReferenceCharacter(char C) {
+static inline bool isHTMLNamedCharacterReferenceCharacter(char C) {
return isLetter(C);
}
-bool isHTMLDecimalCharacterReferenceCharacter(char C) {
+static inline bool isHTMLDecimalCharacterReferenceCharacter(char C) {
return isDigit(C);
}
-bool isHTMLHexCharacterReferenceCharacter(char C) {
+static inline bool isHTMLHexCharacterReferenceCharacter(char C) {
return isHexDigit(C);
}
-StringRef convertCodePointToUTF8(llvm::BumpPtrAllocator &Allocator,
- unsigned CodePoint) {
+static inline StringRef convertCodePointToUTF8(
+ llvm::BumpPtrAllocator &Allocator,
+ unsigned CodePoint) {
char *Resolved = Allocator.Allocate<char>(UNI_MAX_UTF8_BYTES_PER_CODE_POINT);
char *ResolvedPtr = Resolved;
if (llvm::ConvertCodePointToUTF8(CodePoint, ResolvedPtr))
@@ -38,6 +38,8 @@ StringRef convertCodePointToUTF8(llvm::BumpPtrAllocator &Allocator,
return StringRef();
}
+namespace {
+
#include "clang/AST/CommentHTMLTags.inc"
#include "clang/AST/CommentHTMLNamedCharacterReferences.inc"