[clang] 864593b - [clang][api-notes] NFC: Upstream some documentation

Jan Svoboda via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 1 16:53:24 PST 2024


Author: Jan Svoboda
Date: 2024-03-01T16:53:12-08:00
New Revision: 864593b91d289c57c64a0f12658b9ff415da1ad8

URL: https://github.com/llvm/llvm-project/commit/864593b91d289c57c64a0f12658b9ff415da1ad8
DIFF: https://github.com/llvm/llvm-project/commit/864593b91d289c57c64a0f12658b9ff415da1ad8.diff

LOG: [clang][api-notes] NFC: Upstream some documentation

Added: 
    

Modified: 
    clang/include/clang/APINotes/APINotesWriter.h
    clang/lib/APINotes/APINotesReader.cpp

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/APINotes/APINotesWriter.h b/clang/include/clang/APINotes/APINotesWriter.h
index dad44623e16aeb..c5ca3e4617796e 100644
--- a/clang/include/clang/APINotes/APINotesWriter.h
+++ b/clang/include/clang/APINotes/APINotesWriter.h
@@ -5,7 +5,13 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-
+//
+// This file defines the \c APINotesWriter class that writes out source
+// API notes data providing additional information about source code as
+// a separate input, such as the non-nil/nilable annotations for
+// method parameters.
+//
+//===----------------------------------------------------------------------===//
 #ifndef LLVM_CLANG_APINOTES_WRITER_H
 #define LLVM_CLANG_APINOTES_WRITER_H
 
@@ -20,11 +26,16 @@ namespace clang {
 class FileEntry;
 
 namespace api_notes {
+
+/// A class that writes API notes data to a binary representation that can be
+/// read by the \c APINotesReader.
 class APINotesWriter {
   class Implementation;
   std::unique_ptr<Implementation> Implementation;
 
 public:
+  /// Create a new API notes writer with the given module name and
+  /// (optional) source file.
   APINotesWriter(llvm::StringRef ModuleName, const FileEntry *SF);
   ~APINotesWriter();
 

diff  --git a/clang/lib/APINotes/APINotesReader.cpp b/clang/lib/APINotes/APINotesReader.cpp
index 55ea4bae81e6e8..fbbe9c32ce1258 100644
--- a/clang/lib/APINotes/APINotesReader.cpp
+++ b/clang/lib/APINotes/APINotesReader.cpp
@@ -5,7 +5,13 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-
+//
+// This file implements the \c APINotesReader class that reads source
+// API notes data providing additional information about source code as
+// a separate input, such as the non-nil/nilable annotations for
+// method parameters.
+//
+//===----------------------------------------------------------------------===//
 #include "clang/APINotes/APINotesReader.h"
 #include "APINotesFormat.h"
 #include "llvm/ADT/Hashing.h"


        


More information about the cfe-commits mailing list