[clang] 16fdc5d - APINotes: annotate dump methods (NFC)

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 8 12:49:47 PST 2021


Author: Saleem Abdulrasool
Date: 2021-01-08T20:49:28Z
New Revision: 16fdc5da89068f646c153c6bd6c493b1d666bfbf

URL: https://github.com/llvm/llvm-project/commit/16fdc5da89068f646c153c6bd6c493b1d666bfbf
DIFF: https://github.com/llvm/llvm-project/commit/16fdc5da89068f646c153c6bd6c493b1d666bfbf.diff

LOG: APINotes: annotate dump methods (NFC)

This annotates the dump methods in APINotes to indicate that they are
unused as they are meant for debugging purposes.  This avoids an
unnecessary warning.

Added: 
    

Modified: 
    clang/lib/APINotes/APINotesTypes.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/APINotes/APINotesTypes.cpp b/clang/lib/APINotes/APINotesTypes.cpp
index 3d50ea96f144..c0bb726ea72b 100644
--- a/clang/lib/APINotes/APINotesTypes.cpp
+++ b/clang/lib/APINotes/APINotesTypes.cpp
@@ -11,7 +11,7 @@
 
 namespace clang {
 namespace api_notes {
-void CommonEntityInfo::dump(llvm::raw_ostream &OS) const {
+LLVM_DUMP_METHOD void CommonEntityInfo::dump(llvm::raw_ostream &OS) const {
   if (Unavailable)
     OS << "[Unavailable] (" << UnavailableMsg << ")" << ' ';
   if (UnavailableInSwift)
@@ -23,7 +23,7 @@ void CommonEntityInfo::dump(llvm::raw_ostream &OS) const {
   OS << '\n';
 }
 
-void CommonTypeInfo::dump(llvm::raw_ostream &OS) const {
+LLVM_DUMP_METHOD void CommonTypeInfo::dump(llvm::raw_ostream &OS) const {
   static_cast<const CommonEntityInfo &>(*this).dump(OS);
   if (SwiftBridge)
     OS << "Swift Briged Type: " << *SwiftBridge << ' ';
@@ -32,7 +32,7 @@ void CommonTypeInfo::dump(llvm::raw_ostream &OS) const {
   OS << '\n';
 }
 
-void ObjCContextInfo::dump(llvm::raw_ostream &OS) {
+LLVM_DUMP_METHOD void ObjCContextInfo::dump(llvm::raw_ostream &OS) {
   static_cast<CommonTypeInfo &>(*this).dump(OS);
   if (HasDefaultNullability)
     OS << "DefaultNullability: " << DefaultNullability << ' ';
@@ -45,7 +45,7 @@ void ObjCContextInfo::dump(llvm::raw_ostream &OS) {
   OS << '\n';
 }
 
-void VariableInfo::dump(llvm::raw_ostream &OS) const {
+LLVM_DUMP_METHOD void VariableInfo::dump(llvm::raw_ostream &OS) const {
   static_cast<const CommonEntityInfo &>(*this).dump(OS);
   if (NullabilityAudited)
     OS << "Audited Nullability: " << Nullable << ' ';
@@ -54,14 +54,14 @@ void VariableInfo::dump(llvm::raw_ostream &OS) const {
   OS << '\n';
 }
 
-void ObjCPropertyInfo::dump(llvm::raw_ostream &OS) const {
+LLVM_DUMP_METHOD void ObjCPropertyInfo::dump(llvm::raw_ostream &OS) const {
   static_cast<const VariableInfo &>(*this).dump(OS);
   if (SwiftImportAsAccessorsSpecified)
     OS << (SwiftImportAsAccessors ? "[SwiftImportAsAccessors] " : "");
   OS << '\n';
 }
 
-void ParamInfo::dump(llvm::raw_ostream &OS) const {
+LLVM_DUMP_METHOD void ParamInfo::dump(llvm::raw_ostream &OS) const {
   static_cast<const VariableInfo &>(*this).dump(OS);
   if (NoEscapeSpecified)
     OS << (NoEscape ? "[NoEscape] " : "");
@@ -69,7 +69,7 @@ void ParamInfo::dump(llvm::raw_ostream &OS) const {
   OS << '\n';
 }
 
-void FunctionInfo::dump(llvm::raw_ostream &OS) const {
+LLVM_DUMP_METHOD void FunctionInfo::dump(llvm::raw_ostream &OS) const {
   static_cast<const CommonEntityInfo &>(*this).dump(OS);
   OS << (NullabilityAudited ? "[NullabilityAudited] " : "")
      << "RawRetainCountConvention: " << RawRetainCountConvention << ' ';
@@ -81,13 +81,13 @@ void FunctionInfo::dump(llvm::raw_ostream &OS) const {
     PI.dump(OS);
 }
 
-void ObjCMethodInfo::dump(llvm::raw_ostream &OS) {
+LLVM_DUMP_METHOD void ObjCMethodInfo::dump(llvm::raw_ostream &OS) {
   static_cast<FunctionInfo &>(*this).dump(OS);
   OS << (DesignatedInit ? "[DesignatedInit] " : "")
      << (RequiredInit ? "[RequiredInit] " : "") << '\n';
 }
 
-void TagInfo::dump(llvm::raw_ostream &OS) {
+LLVM_DUMP_METHOD void TagInfo::dump(llvm::raw_ostream &OS) {
   static_cast<CommonTypeInfo &>(*this).dump(OS);
   if (HasFlagEnum)
     OS << (IsFlagEnum ? "[FlagEnum] " : "");
@@ -97,7 +97,7 @@ void TagInfo::dump(llvm::raw_ostream &OS) {
   OS << '\n';
 }
 
-void TypedefInfo::dump(llvm::raw_ostream &OS) const {
+LLVM_DUMP_METHOD void TypedefInfo::dump(llvm::raw_ostream &OS) const {
   static_cast<const CommonTypeInfo &>(*this).dump(OS);
   if (SwiftWrapper)
     OS << "Swift Type: " << static_cast<long>(*SwiftWrapper) << ' ';


        


More information about the cfe-commits mailing list