summaryrefslogtreecommitdiffstats
path: root/clang/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
commit74f4d0287f589909e7b763d4b946e5b0da872d06 (patch)
treebf91db16f12facb9bb14d24aea12740f67423e54 /clang/lib/AST/CommentLexer.cpp
parent0a4373058cc27236c5d7691f2e7ac016cd8e1c37 (diff)
downloadbcm5719-llvm-74f4d0287f589909e7b763d4b946e5b0da872d06.tar.gz
bcm5719-llvm-74f4d0287f589909e7b763d4b946e5b0da872d06.zip
Use static functions instead of an unnamed namespace
llvm-svn: 174835
Diffstat (limited to 'clang/lib/AST/CommentLexer.cpp')
-rw-r--r--clang/lib/AST/CommentLexer.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/clang/lib/AST/CommentLexer.cpp b/clang/lib/AST/CommentLexer.cpp
index e4010bc22ba..cee086e1032 100644
--- a/clang/lib/AST/CommentLexer.cpp
+++ b/clang/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"
OpenPOWER on IntegriCloud