erichkeane added a subscriber: rsmith.
erichkeane added inline comments.

================
Comment at: include/clang/AST/Type.h:1527
+    /// The number of parameters this function has, not counting '...'.
+    unsigned NumParams : 12;
+
----------------
This concerns me a bit with variadic templates.  I realize implimits says 256 
but IMO variadic templates makes this a fairly easy limit to hit.  I guess that 
4096 is probably sufficient, though I'd like to hear someone else's opinion.


================
Comment at: include/clang/AST/Type.h:1530
+    /// The number of types in the exception spec, if any.
+    unsigned NumExceptions : 9;
+
----------------
IMO (and @rsmith should respond here instead), if we were looking to steal bits 
from anywhere, this would be it.  Exception-specifications that use types ares 
are deprecated in the language and I'm not sure anyone ever used them anyway.


================
Comment at: lib/AST/Type.cpp:2863
   auto *argSlot = reinterpret_cast<QualType *>(this+1);
-  for (unsigned i = 0; i != NumParams; ++i) {
+  for (unsigned i = 0, N = getNumParams(); i != N; ++i) {
     if (params[i]->isDependentType())
----------------
I would be unbelievably surprised if this change is worth-while.  I can't see a 
situation where this getNumParams call doesn't get inlined.


Repository:
  rC Clang

https://reviews.llvm.org/D50631



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to