diff --git a/clang/utils/TableGen/ClangOptionDocEmitter.cpp b/clang/utils/TableGen/ClangOptionDocEmitter.cpp index 86835611b84218..d0cb7f203c231a 100644 --- a/clang/utils/TableGen/ClangOptionDocEmitter.cpp +++ b/clang/utils/TableGen/ClangOptionDocEmitter.cpp @@ -217,7 +217,7 @@ bool canSphinxCopeWithOption(const Record *Option) { return false; } -void emitHeading(int Depth, std::string Heading, raw_ostream &OS) { +void emitHeading(int Depth, const std::string &Heading, raw_ostream &OS) { assert(Depth < 8 && "groups nested too deeply"); OS << Heading << '\n' << std::string(Heading.size(), "=~-_'+<>"[Depth]) << "\n";