[PATCH] D26637: [change-namespace] handle constructor initializer: Derived : Base::Base() {} and added conflict detections

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 16 06:57:47 PST 2016


hokein added inline comments.


================
Comment at: test/change-namespace/lambda-function.cpp:2
+// RUN: clang-change-namespace -old_namespace "na::nb" -new_namespace "x::y" --file_pattern ".*" %s -- -std=c++11 | sed 's,// CHECK.*,,' | FileCheck %s
+#include <functional>
+// CHECK: namespace x {
----------------
hokein wrote:
> In practise, we don't use std headers directly in llvm lit test. You need to mock it by yourself...
Hint: here is a simple fake `function code`, should be compiled.

```
template<class T> class function;
template<class R, class... ArgTypes> class function<R(ArgTypes...)> {
 public:
  template <typename Functor>
  function(Functor f) {}
};

void B(function<void(int)> t) {};

void g() {
  B([](int x){});
}

```


https://reviews.llvm.org/D26637





More information about the cfe-commits mailing list