Merge r100516 from mainline.
Fix PR 6725. It looks like the copy constructor gets elided during inlining.
This bug only shows up with GCC 4.4.1 Release-Asserts build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_27@100520 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Checker/BugReporter.cpp b/lib/Checker/BugReporter.cpp
index 0cf593b..7c8f7d0 100644
--- a/lib/Checker/BugReporter.cpp
+++ b/lib/Checker/BugReporter.cpp
@@ -40,7 +40,7 @@
// Helper routines for walking the ExplodedGraph and fetching statements.
//===----------------------------------------------------------------------===//
-static inline const Stmt* GetStmt(ProgramPoint P) {
+static inline const Stmt* GetStmt(const ProgramPoint &P) {
if (const StmtPoint* SP = dyn_cast<StmtPoint>(&P))
return SP->getStmt();
else if (const BlockEdge* BE = dyn_cast<BlockEdge>(&P))