clang/lib/Lex
Volodymyr Sapsai 30d3f201ef Add a callback for `__has_include` and use it for dependency scanning.
This adds a preprocessor callback for the `__has_include` and
`__has_include_next` directives.

Successful checking for the presence of a header should add it to the list of
header dependencies so this overrides the callback in the dependency scanner.

Patch by Pete Cooper with some additions by me.

rdar://problem/39545636

Differential Revision: https://reviews.llvm.org/D30882


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342517 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-18 23:27:02 +00:00
..
CMakeLists.txt [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
HeaderMap.cpp [Lex] Make HeaderMaps a unique_ptr vector 2018-08-20 19:15:02 +00:00
HeaderSearch.cpp [VFS] vfs::directory_iterator yields path and file type instead of full Status 2018-09-14 12:47:38 +00:00
Lexer.cpp [CodeComplete] Add completions for filenames in #include directives. 2018-09-18 08:40:41 +00:00
LiteralSupport.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
MacroArgs.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
MacroInfo.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
ModuleMap.cpp [modules] Frontend support for building a header module from a list of 2018-09-15 01:21:15 +00:00
PPCaching.cpp [Lex] Fix crash on code completion in comment in included file. 2018-01-19 23:41:47 +00:00
PPCallbacks.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
PPConditionalDirectiveRecord.cpp Switch PPCallbacks to take the new MacroDefinition instead of MacroDirective*, in order to preserve full information on module macro expansion. 2015-05-04 03:15:40 +00:00
PPDirectives.cpp Diagnose likely typos in #include directives. 2018-09-13 21:10:08 +00:00
PPExpressions.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
PPLexerChange.cpp [VFS] vfs::directory_iterator yields path and file type instead of full Status 2018-09-14 12:47:38 +00:00
PPMacroExpansion.cpp Add a callback for `__has_include` and use it for dependency scanning. 2018-09-18 23:27:02 +00:00
PTHLexer.cpp Fix typos in clang 2018-04-06 15:14:32 +00:00
Pragma.cpp [clang-cl, PCH] Support for /Yc and /Yu without filename and #pragma hdrstop 2018-09-11 17:10:44 +00:00
PreprocessingRecord.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
Preprocessor.cpp [CodeComplete] Add completions for filenames in #include directives. 2018-09-18 08:40:41 +00:00
PreprocessorLexer.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
ScratchBuffer.cpp [Lex] Use WritableMemoryBuffer in ScratchBuffer.cpp 2018-01-11 10:43:45 +00:00
TokenConcatenation.cpp Now that C++17 is official (https://www.iso.org/standard/68564.html), start changing the C++1z terminology over to C++17. NFC intended, these are all mechanical changes. 2017-12-04 20:27:34 +00:00
TokenLexer.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
UnicodeCharSets.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00