[PATCH] Adding user documentation for UseAuto transform

Sean Silva silvas at purdue.edu
Fri Mar 8 14:13:02 PST 2013


  One rewording (+ dmitri's comments) but otherwise lgtm.

  one random idea: if the type that is replaced by a transform is the only use of a certain typedef, then we should also remove the typedef; e.g. in

  ```
  typedef std::vector<Widget>::iterator iter;
  for (iter b = v.begin(), e = v.end(); b != e; ++b)```


================
Comment at: docs/UseAutoTransform.rst:105-106
@@ +104,4 @@
+
+* The type specifier uses no less *type sugar* than the type specifiers given
+  in the specification. Consider the following examples:
+
----------------
This is user documentation. "type sugar" is a concept internal to the implementation of clang, so you will need to define it if you want to use it. Even better, don't say "type sugar" and just say "typedefs and other ways of referencing the std::foo<T>::iterator type are transformed. It may happen that the std::foo<T>::iterator type itself is a typedef to an underlying implementation-specific type; explicit mentions of the implementation-specific type will *not* be changed, as in the following example:".

Additionally, this sentence is really difficult to understand (what is "the specification"? "no less" makes this sound incredibly technical. ).


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

BRANCH
  docs

ARCANIST PROJECT
  clang-tools-extra



More information about the cfe-commits mailing list