]> granicus.if.org Git - clang/commitdiff
[analyzer] Remove possible pessimizations from r169563.
authorJordan Rose <jordan_rose@apple.com>
Fri, 7 Dec 2012 01:54:38 +0000 (01:54 +0000)
committerJordan Rose <jordan_rose@apple.com>
Fri, 7 Dec 2012 01:54:38 +0000 (01:54 +0000)
Thanks for reminding me about copy-elision, David. Passing references here
doesn't help when we could get move construction in C++11. If we really
cared, we'd use std::swap to steal the reference from the temporary arg,
but it's probably not /that/ critical outside of Profile anyway.

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

include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h

index 1570d95737fed6cd8c3c3744e2c7de9bae55def6..1000646841bae686e89062bd694b9689d9e5fce1 100644 (file)
@@ -142,12 +142,10 @@ private:
 protected:
   friend class CallEventManager;
 
-  CallEvent(const Expr *E, const ProgramStateRef &state,
-            const LocationContext *lctx)
+  CallEvent(const Expr *E, ProgramStateRef state, const LocationContext *lctx)
     : State(state), LCtx(lctx), Origin(E), RefCount(0) {}
 
-  CallEvent(const Decl *D, const ProgramStateRef &state,
-            const LocationContext *lctx)
+  CallEvent(const Decl *D, ProgramStateRef state, const LocationContext *lctx)
     : State(state), LCtx(lctx), Origin(D), RefCount(0) {}
 
   // DO NOT MAKE PUBLIC
index 35b65645078aa9863f836247be9cbdabb93d86c8..519924d1414f1e239a8e8a45e4fb51e0a254665f 100644 (file)
@@ -122,7 +122,7 @@ class ExplodedNode : public llvm::FoldingSetNode {
 
 public:
 
-  explicit ExplodedNode(const ProgramPoint &loc, const ProgramStateRef &state,
+  explicit ExplodedNode(const ProgramPoint &loc, ProgramStateRef state,
                         bool IsSink)
     : Location(loc), State(state), Succs(IsSink) {
     assert(isSink() == IsSink);