[PATCH] D80525: [clangd] Fix crash-bug in preamble indexing when using modules.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 5 08:18:45 PDT 2020


sammccall added a comment.

So this is late in the game but... maybe we should just not report this case as a reference?

`#undef foo` is valid if `foo` was never defined, and doesn't refer to anything. If we similarly don't resolve the reference in this case as we only import macros that were used and undef doesn't count as a use... I think that's defensible as a weird edge case.

In practice, I doubt anyone cares - AIUI the cases we've seen this, it's defensive claiming of the macro namespace, and not a targeted undef of a particular known macro at all.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80525





More information about the cfe-commits mailing list