[clang] 9a7f54b - [clang-fuzzer-dictionary] Skip EmptySpellingName after #89358

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Thu May 16 11:53:20 PDT 2024


Author: Fangrui Song
Date: 2024-05-16T11:53:15-07:00
New Revision: 9a7f54ba4878c4e66c99430b52d8c014ab7b2a03

URL: https://github.com/llvm/llvm-project/commit/9a7f54ba4878c4e66c99430b52d8c014ab7b2a03
DIFF: https://github.com/llvm/llvm-project/commit/9a7f54ba4878c4e66c99430b52d8c014ab7b2a03.diff

LOG: [clang-fuzzer-dictionary] Skip EmptySpellingName after #89358

The dictionary entry `=""` is invalid.

Added: 
    

Modified: 
    clang/tools/clang-fuzzer/dictionary/dictionary.c

Removed: 
    


################################################################################
diff  --git a/clang/tools/clang-fuzzer/dictionary/dictionary.c b/clang/tools/clang-fuzzer/dictionary/dictionary.c
index 90490477f70c8..de1defb236acc 100644
--- a/clang/tools/clang-fuzzer/dictionary/dictionary.c
+++ b/clang/tools/clang-fuzzer/dictionary/dictionary.c
@@ -21,6 +21,8 @@
 
 static void emit(const char *Name, const char *Spelling) {
   static char Hex[] = "0123456789abcdef";
+  // Skip EmptySpellingName for IsDeducible.
+  if (!Name[0]) return;
 
   printf("%s=\"", Name);
   unsigned char C;


        


More information about the cfe-commits mailing list