From 59c30cd804c162dcc1c156bd3bab5c8f1dfd4749 Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Wed, 20 Jun 2012 20:39:04 +0000 Subject: [PATCH] Remove unused ASTContext& arg in RawCommentList::addComment, as pointed out by Chandler in commit message for r158807. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158845 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/ASTContext.h | 2 +- include/clang/AST/RawCommentList.h | 3 +-- lib/AST/RawCommentList.cpp | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index cc2d98736f..a3678780f6 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -435,7 +435,7 @@ public: public: void addComment(const RawComment &RC) { - Comments.addComment(RC, *this); + Comments.addComment(RC); } /// \brief Return the Doxygen-style comment attached to a given declaration. diff --git a/include/clang/AST/RawCommentList.h b/include/clang/AST/RawCommentList.h index bf0b616383..666a3e6859 100644 --- a/include/clang/AST/RawCommentList.h +++ b/include/clang/AST/RawCommentList.h @@ -15,7 +15,6 @@ namespace clang { -class ASTContext; class ASTReader; class RawComment { @@ -143,7 +142,7 @@ public: RawCommentList(SourceManager &SourceMgr) : SourceMgr(SourceMgr), OnlyWhitespaceSeen(true) { } - void addComment(const RawComment &RC, ASTContext &Context); + void addComment(const RawComment &RC); ArrayRef getComments() const { return Comments; diff --git a/lib/AST/RawCommentList.cpp b/lib/AST/RawCommentList.cpp index 07776779e8..06510294e7 100644 --- a/lib/AST/RawCommentList.cpp +++ b/lib/AST/RawCommentList.cpp @@ -8,7 +8,6 @@ //===----------------------------------------------------------------------===// #include "clang/AST/RawCommentList.h" -#include "clang/AST/ASTContext.h" #include "llvm/ADT/STLExtras.h" using namespace clang; @@ -155,7 +154,7 @@ bool onlyWhitespaceBetweenComments(SourceManager &SM, } } // unnamed namespace -void RawCommentList::addComment(const RawComment &RC, ASTContext &Context) { +void RawCommentList::addComment(const RawComment &RC) { if (RC.isInvalid()) return; -- 2.40.0