r174835 - Use static functions instead of an unnamed namespace

Dmitri Gribenko gribozavr at gmail.com
Sun Feb 10 03:54:22 PST 2013


Author: gribozavr
Date: Sun Feb 10 05:54:22 2013
New Revision: 174835

URL: http://llvm.org/viewvc/llvm-project?rev=174835&view=rev
Log:
Use static functions instead of an unnamed namespace

Modified:
    cfe/trunk/lib/AST/CommentLexer.cpp

Modified: cfe/trunk/lib/AST/CommentLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CommentLexer.cpp?rev=174835&r1=174834&r2=174835&view=diff
==============================================================================
--- cfe/trunk/lib/AST/CommentLexer.cpp (original)
+++ cfe/trunk/lib/AST/CommentLexer.cpp Sun Feb 10 05:54:22 2013
@@ -15,21 +15,21 @@ void Token::dump(const Lexer &L, const S
   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::B
     return StringRef();
 }
 
+namespace {
+
 #include "clang/AST/CommentHTMLTags.inc"
 #include "clang/AST/CommentHTMLNamedCharacterReferences.inc"
 





More information about the cfe-commits mailing list