[PATCH] D55676: [Modules] Fix decl order for DeclsInPrototype

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 22 11:22:59 PST 2019


rsmith added inline comments.


================
Comment at: lib/Parse/ParseDecl.cpp:6237
+    llvm::sort(SortedDecls, [](const Decl *L, const Decl *R) {
+      return L->getID() < R->getID();
+    });
----------------
I would prefer that we use `getID` only for debug dumping purposes. Can we change `Scope::DeclsInContext` to be a `SetVector` instead? (How much does that cost us memory-wise?)


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

https://reviews.llvm.org/D55676





More information about the cfe-commits mailing list