[PATCH] D152880: [clang][NFC] Add a notice to desugarForDiagnostic

Younan Zhang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 14 20:55:28 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0e08374abb2c: [clang][NFC] Add a notice to desugarForDiagnostic (authored by zyounan).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152880/new/

https://reviews.llvm.org/D152880

Files:
  clang/include/clang/AST/ASTDiagnostic.h
  clang/lib/AST/ASTDiagnostic.cpp


Index: clang/lib/AST/ASTDiagnostic.cpp
===================================================================
--- clang/lib/AST/ASTDiagnostic.cpp
+++ clang/lib/AST/ASTDiagnostic.cpp
@@ -25,7 +25,8 @@
 using namespace clang;
 
 // Returns a desugared version of the QualType, and marks ShouldAKA as true
-// whenever we remove significant sugar from the type.
+// whenever we remove significant sugar from the type. Make sure ShouldAKA
+// is initialized before passing it in.
 QualType clang::desugarForDiagnostic(ASTContext &Context, QualType QT,
                                      bool &ShouldAKA) {
   QualifierCollector QC;
Index: clang/include/clang/AST/ASTDiagnostic.h
===================================================================
--- clang/include/clang/AST/ASTDiagnostic.h
+++ clang/include/clang/AST/ASTDiagnostic.h
@@ -34,7 +34,8 @@
       ArrayRef<intptr_t> QualTypeVals);
 
   /// Returns a desugared version of the QualType, and marks ShouldAKA as true
-  /// whenever we remove significant sugar from the type.
+  /// whenever we remove significant sugar from the type. Make sure ShouldAKA
+  /// is initialized before passing it in.
   QualType desugarForDiagnostic(ASTContext &Context, QualType QT,
                                 bool &ShouldAKA);
 }  // end namespace clang


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152880.531601.patch
Type: text/x-patch
Size: 1299 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230615/f0fd8365/attachment-0001.bin>


More information about the cfe-commits mailing list