]> granicus.if.org Git - clang/commitdiff
Fix PR 6725. It looks like the copy constructor gets elided during inlining.
authorZhongxing Xu <xuzhongxing@gmail.com>
Tue, 6 Apr 2010 03:01:56 +0000 (03:01 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Tue, 6 Apr 2010 03:01:56 +0000 (03:01 +0000)
This bug only shows up with GCC 4.4.1 Release-Asserts build.

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

lib/Checker/BugReporter.cpp

index 12e61afa1010b1420c0a60e9d92c710f19b1cd71..4475872ee2dca154a07901c6bd0582e729e95c13 100644 (file)
@@ -58,7 +58,7 @@ void BugReporterContext::addVisitor(BugReporterVisitor* visitor) {
 // 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))