[llvm-branch-commits] [flang] 6bbbe4a - [flang][driver] Fix a small bug (auto vs auto&)

Andrzej Warzynski via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Dec 14 08:14:56 PST 2020


Author: Andrzej Warzynski
Date: 2020-12-14T16:10:07Z
New Revision: 6bbbe4a5746e65fb9b7efc8d525961994406a338

URL: https://github.com/llvm/llvm-project/commit/6bbbe4a5746e65fb9b7efc8d525961994406a338
DIFF: https://github.com/llvm/llvm-project/commit/6bbbe4a5746e65fb9b7efc8d525961994406a338.diff

LOG: [flang][driver] Fix a small bug (auto vs auto&)

This bug hasn't affected us yet as our usage is too basic, i.e. we don't
rely on the defaults provided by `SetDefaultFortranOpts` just yet. This
will change shortly.

Added: 
    

Modified: 
    flang/lib/Frontend/CompilerInvocation.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index 85c2234da63c..8a6f66151324 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -185,7 +185,7 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &res,
 }
 
 void CompilerInvocation::SetDefaultFortranOpts() {
-  auto fortranOptions = fortranOpts();
+  auto &fortranOptions = fortranOpts();
 
   // These defaults are based on the defaults in f18/f18.cpp.
   std::vector<std::string> searchDirectories{"."s};


        


More information about the llvm-branch-commits mailing list