[PATCH] D105498: [clang] Remove assumption about SourceLocation alignment.

Tomas Matheson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 16 03:01:30 PDT 2021


tmatheson added inline comments.


================
Comment at: clang/lib/AST/DeclObjC.cpp:880-882
-  unsigned Size = sizeof(ParmVarDecl *) * NumParams +
-                  sizeof(SourceLocation) * SelLocs.size();
   ParamsAndSelLocs = C.Allocate(Size);
----------------
Since we know the number of parameters and number of sellocs when we do the allocation, is there a reason we can't we split it into two separate allocations and reduce the complexity?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105498



More information about the cfe-commits mailing list