From: Benjamin Kramer Date: Tue, 31 May 2016 10:17:46 +0000 (+0000) Subject: [CommonOptionsParser] Return source paths as const ref. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1f8f9e09a1b4f2137ab31867ad1c2298370a200;p=clang [CommonOptionsParser] Return source paths as const ref. 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 --- diff --git a/include/clang/Tooling/CommonOptionsParser.h b/include/clang/Tooling/CommonOptionsParser.h index 1e8462c631..3d630c5f76 100644 --- a/include/clang/Tooling/CommonOptionsParser.h +++ b/include/clang/Tooling/CommonOptionsParser.h @@ -98,7 +98,7 @@ public: } /// Returns a list of source file paths to process. - std::vector getSourcePathList() { + const std::vector &getSourcePathList() const { return SourcePathList; }