[PATCH] D67039: [ELF] Add a spell corrector for "undefined symbol" diagnostics

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 31 09:19:20 PDT 2019


MaskRay created this revision.
MaskRay added reviewers: grimar, peter.smith, ruiu, thakis.
Herald added subscribers: llvm-commits, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.

Non-undefined symbols with Levenshtein distance 1 are suggestion
candidates. This is probably good enough and it can suggest some
missing/superfluous qualifiers: const, restrict, volatile, & and &&
ref-qualifier, e.g.

   error: undefined symbol: foo(int*)
   >>> referenced by b.o:(.text+0x1)
  +>>> did you mean: foo(int const*)
  +>>> defined in: a.o
  
   error: undefined symbol: foo(int&*)
   >>> referenced by b.o:(.text+0x1)
  +>>> did you mean: foo(int*)
  +>>> defined in: b.o


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D67039

Files:
  ELF/Relocations.cpp
  test/ELF/undef-spell-corrector.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67039.218225.patch
Type: text/x-patch
Size: 5417 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190831/5cb59432/attachment.bin>


More information about the llvm-commits mailing list