[cfe-commits] [PATCH] Foundation for Transform registration infrastructure

Dmitri Gribenko gribozavr at gmail.com
Mon Dec 17 13:03:18 PST 2012



================
Comment at: cpp11-migrate/Transform.h:14-15
@@ +13,4 @@
+//===----------------------------------------------------------------------===//
+#ifndef _LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_TRANSFORM_H_
+#define _LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_TRANSFORM_H_
+
----------------
Identifiers starting with an underscore and an uppercase letter are reserved.

================
Comment at: cpp11-migrate/TransformSupport.h:41
@@ +40,3 @@
+template <typename TransformType>
+Transform* createTransform() { return new TransformType(); }
+
----------------
Space should be before the star.

================
Comment at: cpp11-migrate/TransformRegistry.cpp:41
@@ +40,3 @@
+  }
+  Impl->StringInfoMap[TI.getName()] = &TI;
+
----------------
Should this function take a pointer to TransformInfo so that we don't accidentally store a pointer to a temporary?  (Since a const ref can bind to a temporary.)


http://llvm-reviews.chandlerc.com/D221



More information about the cfe-commits mailing list