Reported by Static Analyzer Tool:
- Inside "Format.cpp" file, in clang::format::internal::reformat(clang::format::FormatStyle const &, llvm::StringRef, llvm::ArrayRef<clang::tooling::Range>, unsigned int, unsigned int, unsigned int, llvm::StringRef, clang::format::FormattingAttemptStatus *)::[lambda(clang::format::Environment const &) (instance 4)]::operator ()(clang::format::Environment const &): A very large function call parameter exceeding the high threshold is passed by value.
pass_by_value: Capturing variable S of type clang::format::FormatStyle (size 800 bytes) by value, which exceeds the high threshold of 512 bytes
This patch removes redundant capturing variable S and uses type clang::format::FormatStyle Expanded instead.
- Inside "ClangAttrEmitter.cpp" file, in clang::GenerateMutualExclusionsChecks(llvm::Record const &, llvm::RecordKeeper const &, llvm::raw_ostream &, llvm::raw_ostream &, llvm::raw_ostream &)::[lambda(llvm::Record const *) (instance 1)]::operator ()(llvm::Record const *): A large function call parameter exceeding the low threshold is passed by value.
pass_by_value: Capturing variable Attr of type llvm::Record const (size 176 bytes) by value, which exceeds the low threshold of 128 bytes.
This patch passes const Record by reference in IsCurAttr lambda capture.