Author: jrose
Date: Thu Dec  6 19:54:38 2012
New Revision: 169570

URL: http://llvm.org/viewvc/llvm-project?rev=169570&view=rev
Log:
[analyzer] Remove possible pessimizations from r169563.

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.

Modified:
    cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
    cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h?rev=169570&r1=169569&r2=169570&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h 
(original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h Thu 
Dec  6 19:54:38 2012
@@ -142,12 +142,10 @@
 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

Modified: 
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h?rev=169570&r1=169569&r2=169570&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h 
(original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h 
Thu Dec  6 19:54:38 2012
@@ -122,7 +122,7 @@
 
 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);


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to