================
@@ -636,23 +656,28 @@ void USRGenerator::GenExtSymbolContainer(const NamedDecl
*D) {
}
bool USRGenerator::GenLoc(const Decl *D, bool IncludeOffset) {
- if (generatedLoc)
- return IgnoreResults;
- generatedLoc = true;
-
// Guard against null declarations in invalid code.
if (!D) {
IgnoreResults = true;
return true;
}
+ // Do nothing if file entry has been printed and no need to print the offset.
+ if (GeneratedFileEntry && !IncludeOffset)
----------------
steakhal wrote:
For me, it would make more sense to swap the order of these conditions.
For example, I'd read this as:
if we didn't ask for offsets, then well, we are done.
Otherwise, if we have already generated then we don't need to print again.
https://github.com/llvm/llvm-project/pull/205430
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits