diff --git a/clang/include/clang/AST/ASTDiagnostic.h b/clang/include/clang/AST/ASTDiagnostic.h --- a/clang/include/clang/AST/ASTDiagnostic.h +++ b/clang/include/clang/AST/ASTDiagnostic.h @@ -34,7 +34,8 @@ ArrayRef 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 diff --git a/clang/lib/AST/ASTDiagnostic.cpp b/clang/lib/AST/ASTDiagnostic.cpp --- a/clang/lib/AST/ASTDiagnostic.cpp +++ b/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;