]> granicus.if.org Git - clang/commitdiff
[CommonOptionsParser] Return source paths as const ref.
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 31 May 2016 10:17:46 +0000 (10:17 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 31 May 2016 10:17:46 +0000 (10:17 +0000)
This saves a superfluous copy and makes managing the lifetime of the
returned strings a bit easier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271262 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Tooling/CommonOptionsParser.h

index 1e8462c631c3e864433bc1a49901164cfd1715cc..3d630c5f7609cddae5a2163d673d06287827fce3 100644 (file)
@@ -98,7 +98,7 @@ public:
   }
 
   /// Returns a list of source file paths to process.
-  std::vector<std::string> getSourcePathList() {
+  const std::vector<std::string> &getSourcePathList() const {
     return SourcePathList;
   }