aaron.ballman added inline comments.

================
Comment at: clang/include/clang/AST/Decl.h:1928
+  /// macro. Otherwise, it returns the location of the end of the ellipsis.
+  SourceRange getEllipsisSourceRange() const {
+    const auto *FPT = getType()->getAs<FunctionProtoType>();
----------------
Why a source range? The ellipsis is a single token, so a range should be 
unnecessary. I would just have this return `FPT->getEllipsisLoc()`.


================
Comment at: clang/include/clang/AST/Decl.h:2353
+  /// Attempt to compute an informative source range covering the
+  /// function parameters. The source range is invalid if there are no
+  /// parameters.
----------------
Can you add "excluding the parentheses" to this as well, to make it crystal 
clear what is covered?


================
Comment at: clang/lib/AST/Decl.cpp:3307
+  unsigned NP = getNumParams();
+  auto EllipsisRange = getEllipsisSourceRange();
+
----------------
Don't use `auto` unless the type is explicitly spelled out in the 
initialization (elsewhere as well).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63276/new/

https://reviews.llvm.org/D63276



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

Reply via email to