[PATCH] D33125: Introduce isoneof<T0, T1, ...> as an extension of isa<T>

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 20 16:53:58 PDT 2017


chandlerc added a comment.

Another high-level comment: I don't like the name `isoneof`. To me, that parses to the relationship being tested `is` rather than `isa` which loses an important distinction. I'm not really sure what would be the best name though.



================
Comment at: include/llvm/Support/Casting.h:145-153
+// isoneof<X...> - Return true if the parameter to the template is an instance
+// of one of the template type argument.  Used like this:
+//
+//  if (isa<Type0, Type1, Type2>(myVal)) { ... }
+//
+//  which is equivalent to
+//
----------------
Please make this a doxygen comment, and no need to repeat the name in it.

Also, your example code calls this `isa` instead of `isonef`.


Repository:
  rL LLVM

https://reviews.llvm.org/D33125





More information about the llvm-commits mailing list