r272465 - [clang-format] pass Style by reference instead of value.

Eric Liu via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 11 04:45:08 PDT 2016


Author: ioeric
Date: Sat Jun 11 06:45:08 2016
New Revision: 272465

URL: http://llvm.org/viewvc/llvm-project?rev=272465&view=rev
Log:
[clang-format] pass Style by reference instead of value.

Modified:
    cfe/trunk/lib/Format/Format.cpp

Modified: cfe/trunk/lib/Format/Format.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=272465&r1=272464&r2=272465&view=diff
==============================================================================
--- cfe/trunk/lib/Format/Format.cpp (original)
+++ cfe/trunk/lib/Format/Format.cpp Sat Jun 11 06:45:08 2016
@@ -1457,7 +1457,7 @@ bool checkAndConsumeDirectiveWithName(Le
 
 unsigned getOffsetAfterHeaderGuardsAndComments(StringRef FileName,
                                                StringRef Code,
-                                               FormatStyle Style) {
+                                               const FormatStyle &Style) {
   std::unique_ptr<Environment> Env =
       Environment::CreateVirtualEnvironment(Code, FileName, /*Ranges=*/{});
   const SourceManager &SourceMgr = Env->getSourceManager();




More information about the cfe-commits mailing list