[llvm-bugs] [Bug 27920] New: ToolChains.cpp: suspicious "const string" variables
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri May 27 18:16:02 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27920
Bug ID: 27920
Summary: ToolChains.cpp: suspicious "const string" variables
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Driver
Assignee: unassignedclangbugs at nondot.org
Reporter: zhanglei.april at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
I found the following line suspicious in the constructor Linux::Linux(...):
const std::string OSLibDir = getOSLibDir(Triple, Args);
It seems OSLibDir is used to capture the return value of a function, thus
should be a const string reference rather than a const string. I guess the
original writer omitted the '&' symbol somehow.
The same type of issue appears a few times in this file and other files like
Tools.cpp.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160528/93d17c89/attachment.html>
More information about the llvm-bugs
mailing list