steven_wu added a comment. I don't know too much about this. I guess have a DiagReceiver to force the emitting order is a good thing but it is kind of weird to have this just for unused warning.
I am guessing my suspect of removing decl from the scope is the cause of the slow down. Maybe we just force order on iteration? ================ Comment at: clang/include/clang/Sema/Scope.h:310 decl_range decls() const { return decl_range(DeclsInScope.begin(), DeclsInScope.end()); ---------------- I wonder if it would be easy if you just sort here and provide a consistent ordering when iterating? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135490/new/ https://reviews.llvm.org/D135490 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits