[PATCH] D25427: [Analysis] Use unique_ptr for CallGraph::FunctionMap.

2016-10-10 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added a reviewer: jlebar. jlebar marked an inline comment as done. jlebar added a comment. This revision is now accepted and ready to land. https://github.com/llvm-mirror/clang/commit/b28828e8b38c7e208386f783e6502305c42cb479 https://reviews.llvm.org/D25427

[PATCH] D25427: [Analysis] Use unique_ptr for CallGraph::FunctionMap.

2016-10-10 Thread Justin Lebar via cfe-commits
jlebar marked an inline comment as done. jlebar added inline comments. Comment at: clang/include/clang/Analysis/CallGraph.h:204 + static clang::CallGraphNode * + CGGetValue(decltype(*std::declval()) &P) { +return P.second.get(); timshen wrote: > Does clang:

[PATCH] D25427: [Analysis] Use unique_ptr for CallGraph::FunctionMap.

2016-10-10 Thread Tim Shen via cfe-commits
timshen added inline comments. Comment at: clang/include/clang/Analysis/CallGraph.h:204 + static clang::CallGraphNode * + CGGetValue(decltype(*std::declval()) &P) { +return P.second.get(); Does clang::CallGraph::const_iterator::value_type work? https://re

[PATCH] D25427: [Analysis] Use unique_ptr for CallGraph::FunctionMap.

2016-10-09 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: timshen. jlebar added a subscriber: cfe-commits. The decltype(declval) dance in the iterator traits is necessary because DenseMap iterators aren't over std::pairs, but rather are over a pair-like type defined in DenseMap. It used to work beca