mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 09:36:06 +00:00

Summary: When someone writes #include "<some_file>" or #include " some_file " the compiler returns "file not fuond..." with fonts and quotes that may make it hard to see there are excess quotes or surprising bytes in the filename. Assuming that files are usually logically named and start and end with an alphanumeric character, we can check for the file's existence by stripping the non-alphanumeric leading or trailing characters. If the file is found, emit a non-fatal error with a FixItHint. Patch by Christy Lee! Reviewers: aaron.ballman, erikjv, rsmith Reviewed By: rsmith Subscribers: lebedev.ri, xbolva00, sammccall, modocache, erikjv, aaron.ballman, cfe-commits Differential Revision: https://reviews.llvm.org/D51333 llvm-svn: 342177
8 lines
88 B
C
8 lines
88 B
C
|
|
#ifndef EMPTY_FILE_TO_INCLUDE_H
|
|
#define EMPTY_FILE_TO_INCLUDE_H
|
|
|
|
// empty file
|
|
|
|
#endif
|