[PATCH] D141625: [DeclContext] Sort the Decls before adding into DeclContext
Volodymyr Sapsai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 13 17:28:30 PST 2023
vsapsai accepted this revision.
vsapsai added a comment.
Confirm that for me on macOS without the fix the test is failing every time, so the test seems to be totally sufficient.
================
Comment at: clang/lib/Parse/ParseDecl.cpp:6997
+ D2->getLocation().getRawEncoding();
+ });
}
----------------
I was slightly concerned about it affecting build times for non-modular builds. But I don't think that we have in practice enough declarations in prototypes for it to matter, so that's not a real concern.
And we don't need to do anything special for declarations brought in by macros as we are not aiming for any particular order, just for the deterministic one.
================
Comment at: clang/test/Modules/decl-params-determinisim.m:15-16
+//--- headers/a.h
+void f(struct A1 *a0,
+ struct A1 *a1,
+ struct A2 *a2,
----------------
Is there any reason you are using `struct A1` twice? I haven't noticed any difference in my testing, so decided to ask.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141625/new/
https://reviews.llvm.org/D141625
More information about the cfe-commits
mailing list