[PATCH] D99231: [AST] Add introspection support for more base nodes

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 14 05:43:19 PDT 2021


aaron.ballman added inline comments.


================
Comment at: clang/include/clang/AST/DeclCXX.h:2270
   SourceLocation getEllipsisLoc() const {
-    assert(isPackExpansion() && "Initializer is not a pack expansion");
+    if (!isPackExpansion())
+      return {};
----------------
steveire wrote:
> njames93 wrote:
> > steveire wrote:
> > > njames93 wrote:
> > > > I'm not sure about this change, but I'm guessing there's not a nice way to predicate these kinds of things
> > > Yep.
> > @rsmith @aaron.ballman Any issues with changing the contract of these functions to not assert for the purpose of this feature?
> This was really just missing from https://github.com/llvm/llvm-project/commit/54272e5b , as in the commit message.
I'm fine with such a change, thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99231



More information about the cfe-commits mailing list