summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPDirectives.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Allow /D flags absent during PCH creation under msvc-compatZachary Henkel2020-01-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this patch adding a new /D flag when compiling a source file that consumed a PCH with clang-cl would issue a diagnostic and then fail. With the patch, the diagnostic is still issued but the definition is accepted. This matches the msvc behavior. The fuzzy-pch-msvc.c is a clone of the existing fuzzy-pch.c tests with some msvc specific rework. msvc diagnostic: warning C4605: '/DBAR=int' specified on current command line, but was not specified when precompiled header was built Output of the CHECK-BAR test prior to the code change: <built-in>(1,9): warning: definition of macro 'BAR' does not match definition in precompiled header [-Wclang-cl-pch] #define BAR int ^ D:\repos\llvm\llvm-project\clang\test\PCH\fuzzy-pch-msvc.c(12,1): error: unknown type name 'BAR' BAR bar = 17; ^ D:\repos\llvm\llvm-project\clang\test\PCH\fuzzy-pch-msvc.c(23,4): error: BAR was not defined # error BAR was not defined ^ 1 warning and 2 errors generated. Reviewers: rnk, thakis, hans, zturner Subscribers: mikerice, aganea, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72405
* Move normalization of `\` in #includes from -fms-compatibility to ↵Reid Kleckner2019-09-261-15/+21
| | | | | | | | | -fms-extensions Handling backslashes in include paths in the implementation isn't non-conforming. llvm-svn: 372999
* Simplify -fms-compatibility include lookup logic, NFCReid Kleckner2019-09-251-10/+11
| | | | | | | | | | | This include search logic has an extra parameter to deal with Windows includes with backslashes, which get normalized to forward slashes on non-Windows under -fms-compatibility. Hoist the conditional operator out of LookupHeaderIncludeOrImport and pass the result in instead of repeating the ?: expression everywhere. llvm-svn: 372926
* do not emit -Wunused-macros warnings in -frewrite-includes mode (PR15614)Lubos Lunak2019-09-161-1/+2
| | | | | | | | | | | -frewrite-includes calls PP.SetMacroExpansionOnlyInDirectives() to avoid macro expansions that are useless in that mode, but this can lead to -Wunused-macros false positives. As -frewrite-includes does not emit normal warnings, block -Wunused-macros too. Differential Revision: https://reviews.llvm.org/D65371 llvm-svn: 372026
* [NFCI]Create CommonAttributeInfo Type as base type of *Attr and ParsedAttr.Erich Keane2019-09-131-3/+3
| | | | | | | | | | | | In order to enable future improvements to our attribute diagnostics, this moves info from ParsedAttr into CommonAttributeInfo, then makes this type the base of the *Attr and ParsedAttr types. Quite a bit of refactoring took place, including removing a bunch of redundant Spelling Index propogation. Differential Revision: https://reviews.llvm.org/D67368 llvm-svn: 371875
* [clang-scan-deps] add skip excluded conditional preprocessor block ↵Alex Lorenz2019-09-111-0/+36
| | | | | | | | | | | | | | | preprocessing optimization This commit adds an optimization to clang-scan-deps and clang's preprocessor that skips excluded preprocessor blocks by bumping the lexer pointer, and not lexing the tokens until reaching appropriate #else/#endif directive. The skip positions and lexer offsets are computed when the file is minimized, directly from the minimized tokens. On an 18-core iMacPro with macOS Catalina Beta I got 10-15% speed-up from this optimization when running clang-scan-deps on the compilation database for a recent LLVM and Clang (3511 files). Differential Revision: https://reviews.llvm.org/D67127 llvm-svn: 371656
* Introduce a DirectoryEntryRef that stores both a reference and anAlex Lorenz2019-08-311-1/+1
| | | | | | | | | | | | | | accessed name to the directory entry This commit introduces a parallel API that returns a DirectoryEntryRef to the FileManager, similar to the parallel FileEntryRef API. All uses will have to be update in follow-up patches. The immediate use of the new API in this patch fixes the issue where a file manager was reused in clang-scan-deps, but reported an different file path whenever a framework lookup was done through a symlink. Differential Revision: https://reviews.llvm.org/D67026 llvm-svn: 370562
* [preprocessor] Add an opportunity to retain excluded conditional blocksEvgeny Mankov2019-08-271-4/+16
| | | | | | | | | | | | | | It is handy for clang tooling, for instance, in source to source transformation. Reviewers: vpykhtin (Valery Pykhtin), erichkeane (Erich Keane) Subscribers: rsmith (Richard Smith), akyrtzi (Argyrios Kyrtzidis) Tags: #clang Differential Revision: https://reviews.llvm.org/D66597 llvm-svn: 370123
* Use FileEntryRef for PPCallbacks::FileSkippedAlex Lorenz2019-08-271-1/+1
| | | | | | | | This fixes the issue where a filename dependendency was missing if the file that was skipped was included through a symlink in an earlier run, if the file manager was reused between runs. llvm-svn: 369998
* Introduce FileEntryRef and use it when handling includes to report correct ↵Alex Lorenz2019-08-221-137/+156
| | | | | | | | | | | | | | | | | | | | | | | dependencies when the FileManager is reused across invocations This commit introduces a parallel API to FileManager's getFile: getFileEntryRef, which returns a reference to the FileEntry, and the name that was used to access the file. In the case of a VFS with 'use-external-names', the FileEntyRef contains the external name of the file, not the filename that was used to access it. The new API is adopted only in the HeaderSearch and Preprocessor for include file lookup, so that the accessed path can be propagated to SourceManager's FileInfo. SourceManager's FileInfo now can report this accessed path, using the new getName method. This API is then adopted in the dependency collector, which now correctly reports dependencies when a file is included both using a symlink and a real path in the case when the FileManager is reused across multiple Preprocessor invocations. Note that this patch does not fix all dependency collector issues, as the same problem is still present in other cases when dependencies are obtained using FileSkipped, InclusionDirective, and HasInclude. This will be fixed in follow-up commits. Differential Revision: https://reviews.llvm.org/D65907 llvm-svn: 369680
* [Clang] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-141-2/+2
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368942
* [clang] Adopt new FileManager error-returning APIsHarlan Haskins2019-08-011-3/+3
| | | | | | | Update the callers of FileManager::getFile and FileManager::getDirectory to handle the new llvm::ErrorOr-returning methods. Signed-off-by: Harlan Haskins <harlan@apple.com> llvm-svn: 367616
* [Preprocessor] Always discard body of #define if we failed to parse itIlya Biryukov2019-08-011-5/+9
| | | | | | | | | | | | | | | | | | | | Summary: Preivously we would only discard it if we failed to parse parameter lists. If we do not consume the body, parser sees tokens inside directive. In turn, this leads to spurious diagnostics and a crash in TokenBuffer, see the added tests. Reviewers: sammccall Reviewed By: sammccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65517 llvm-svn: 367530
* Fix parameter name comments using clang-tidy. NFC.Rui Ueyama2019-07-161-3/+3
| | | | | | | | | | | | | | | | | | | | | This patch applies clang-tidy's bugprone-argument-comment tool to LLVM, clang and lld source trees. Here is how I created this patch: $ git clone https://github.com/llvm/llvm-project.git $ cd llvm-project $ mkdir build $ cd build $ cmake -GNinja -DCMAKE_BUILD_TYPE=Debug \ -DLLVM_ENABLE_PROJECTS='clang;lld;clang-tools-extra' \ -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DLLVM_ENABLE_LLD=On \ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ../llvm $ ninja $ parallel clang-tidy -checks='-*,bugprone-argument-comment' \ -config='{CheckOptions: [{key: StrictMode, value: 1}]}' -fix \ ::: ../llvm/lib/**/*.{cpp,h} ../clang/lib/**/*.{cpp,h} ../lld/**/*.{cpp,h} llvm-svn: 366177
* [PragmaHandler] Expose `#pragma` locationJoel E. Denny2019-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Currently, a pragma AST node's recorded location starts at the namespace token (such as `omp` in the case of OpenMP) after the `#pragma` token, and the `#pragma` location isn't available. However, the `#pragma` location can be useful when, for example, rewriting a directive using Clang's Rewrite facility. This patch makes `#pragma` locations available in any `PragmaHandler` but it doesn't yet make use of them. This patch also uses the new `struct PragmaIntroducer` to simplify `Preprocessor::HandlePragmaDirective`. It doesn't do the same for `PPCallbacks::PragmaDirective` because that changes the API documented in `clang-tools-extra/docs/pp-trace.rst`, and I'm not sure about backward compatibility guarantees there. Reviewed By: ABataev, lebedev.ri, aaron.ballman Differential Revision: https://reviews.llvm.org/D61643 llvm-svn: 361335
* [Lex] Allow to consume tokens while preprocessingIlya Biryukov2019-05-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: By adding a hook to consume all tokens produced by the preprocessor. The intention of this change is to make it possible to consume the expanded tokens without re-runnig the preprocessor with minimal changes to the preprocessor and minimal performance penalty when preprocessing without recording the tokens. The added hook is very low-level and reconstructing the expanded token stream requires more work in the client code, the actual algorithm to collect the tokens using this hook can be found in the follow-up change. Reviewers: rsmith Reviewed By: rsmith Subscribers: eraman, nemanjai, kbarton, jsji, riccibruno, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59885 llvm-svn: 361007
* [Preamble] Stop circular inclusion of main file when building preambleNikolai Kosjar2019-05-101-0/+12
| | | | | | | | | | | | | | | If a header file was processed for the second time, we could end up with a wrong conditional stack and skipped ranges: In the particular example, if the header guard is evaluated the second time and it is decided to skip the conditional block, the corresponding "#endif" is never seen since the preamble does not include it and we end up in the Tok.is(tok::eof) case with a wrong conditional stack. Detect the circular inclusion, emit a diagnostic and stop processing the inclusion. llvm-svn: 360418
* [c++2a] Improve diagnostic for use of declaration from another TU'sRichard Smith2019-04-181-1/+15
| | | | | | | | | | global module fragment. We know that the declaration in question should have been introduced by a '#include', so try to figure out which one and suggest it. Don't suggest importing the global module fragment itself! llvm-svn: 358631
* [c++20] Parsing support for module-declarations, import-declarations,Richard Smith2019-04-141-0/+4
| | | | | | | | | and the global and private module fragment. For now, the private module fragment introducer is ignored, but use of the global module fragment introducer should be properly enforced. llvm-svn: 358353
* [C++20] Implement context-sensitive header-name lexing and pp-import parsing ↵Richard Smith2019-04-111-55/+115
| | | | | | in the preprocessor. llvm-svn: 358231
* Remove use of lookahead from _Pragma handling and from all otherRichard Smith2019-04-111-3/+3
| | | | | | | | | | | | | | | internal lexing steps in the preprocessor. It is not safe to use the preprocessor's token lookahead except when operating on the final sequence of tokens that would be produced by phase 4 of translation. Doing so corrupts the token lookahead cache used by the parser. (See added testcase for an example.) Lookahead should instead be viewed as a layer on top of the normal lexer. Added assertions to catch any further incorrect uses of lookahead within lexing actions. llvm-svn: 358230
* Range-style std::find{,_if} -> llvm::find{,_if}. NFCFangrui Song2019-03-311-2/+1
| | | | llvm-svn: 357359
* [OpenCL] Allow variadic macros as Clang feature.Anastasia Stulova2019-03-261-2/+1
| | | | llvm-svn: 356987
* Improve the diagnostic for #include_next occurring in a file not foundRichard Smith2019-03-211-0/+4
| | | | | | | | | | | in the include path. Instead of making the incorrect claim that the included file has an absolute path, describe the actual problem: the including file was found either by absolute path, or relative to such a file, or relative to the primary source file. llvm-svn: 356712
* Refactor handling of #include directives to cleanly separate theRichard Smith2019-03-211-33/+49
| | | | | | | "skipped header because it should be imported as a module" cases from the "skipped header because of some other reason" cases. llvm-svn: 356704
* Replace tok::angle_string_literal with new tok::header_name.Richard Smith2019-03-191-1/+9
| | | | | | | | | | Use the new kind for both angled header-name tokens and for double-quoted header-name tokens. This is in preparation for C++20's context-sensitive header-name token formation rules. llvm-svn: 356530
* Factor out repeated code parsing and concatenating header-names fromRichard Smith2019-03-191-106/+24
| | | | | | | | | | | tokens. We now actually form an angled_string_literal token for a header name by concatenation rather than just working out what its contents would be. This substantially simplifies downstream processing and is necessary for C++20 header unit imports. llvm-svn: 356433
* Don't apply the include depth limit until we actually decide to enterRichard Smith2019-03-191-7/+7
| | | | | | | | | the file. NFC unless a skipped #include is found at the final permitted #include level. llvm-svn: 356432
* Print a note to the called macro when diagnosing err_embedded_directiveNico Weber2019-02-141-0/+2
| | | | | | | | Fixes PR40713, see there for the motivation for this. Differential Revision: https://reviews.llvm.org/D58161 llvm-svn: 354009
* [Preprocessor] Add a note with framework location for "file not found" error.Volodymyr Sapsai2019-02-051-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | | When a framework with the same name is available at multiple framework search paths, we use the first matching location. If a framework at this location doesn't have all the headers, it can be confusing for developers because they see only an error `'Foo/Foo.h' file not found`, can find the complete framework with required header, and don't know the incomplete framework was used instead. Add a note explaining a framework without required header was found. Also mention framework directory path to make it easier to find the incomplete framework. rdar://problem/39246514 Reviewers: arphaman, erik.pilkington, jkorous Reviewed By: jkorous Subscribers: jkorous, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D56561 llvm-svn: 353231
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Remove random windows line endings that snuck into the middle of thisChandler Carruth2019-01-191-124/+124
| | | | | | code. llvm-svn: 351633
* Revert r351209 (which was a revert of r350891) with a fix.Aaron Ballman2019-01-171-112/+124
| | | | | | The test case had a parse error that was causing the condition string to be misreported. We now have better fallback code for error cases. llvm-svn: 351470
* [MSVC Compat] Fix typo correction for inclusion directives.Volodymyr Sapsai2019-01-151-1/+9
| | | | | | | | | | | | | | | In MSVC compatibility mode we were checking not the typo corrected filename but the original filename. Reviewers: christylee, compnerd Reviewed By: christylee Subscribers: jkorous, dexonsmith, sammccall, hokein, cfe-commits Differential Revision: https://reviews.llvm.org/D56631 llvm-svn: 351232
* Revert "Correct the source range returned from preprocessor callbacks."Benjamin Kramer2019-01-151-43/+31
| | | | | | | This reverts commit r350891. Also add a test case that would return an empty string with r350891. llvm-svn: 351209
* Correct the source range returned from preprocessor callbacks.Aaron Ballman2019-01-101-31/+43
| | | | | | This adjusts the source range passed in to the preprocessor callbacks to only include the condition range itself, rather than all of the conditionally skipped tokens. llvm-svn: 350891
* Misc typos fixes in ./lib folderRaphael Isemann2018-12-101-2/+2
| | | | | | | | | | | | | | Summary: Found via `codespell -q 3 -I ../clang-whitelist.txt -L uint,importd,crasher,gonna,cant,ue,ons,orign,ned` Reviewers: teemperor Reviewed By: teemperor Subscribers: teemperor, jholewinski, jvesely, nhaehnle, whisperity, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D55475 llvm-svn: 348755
* [Preprocessor] Don't avoid entering included files after hitting a fatal error.Volodymyr Sapsai2018-12-071-4/+6
| | | | | | | | | | | | | | | | | | | | | | | Change in r337953 violated the contract for `CXTranslationUnit_KeepGoing`: > Do not stop processing when fatal errors are encountered. Use different approach to fix long processing times with multiple inclusion cycles. Instead of stopping preprocessing for fatal errors, do this after reaching the max allowed include depth and only for the files that were processed already. It is likely but not guaranteed those files cause a cycle. rdar://problem/46108547 Reviewers: erik.pilkington, arphaman Reviewed By: erik.pilkington Subscribers: jkorous, dexonsmith, ilya-biryukov, Dmitry.Kozhevnikov Differential Revision: https://reviews.llvm.org/D55095 llvm-svn: 348641
* PTH-- Remove feature entirely-Erich Keane2018-12-041-95/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When debugging a boost build with a modified version of Clang, I discovered that the PTH implementation stores TokenKind in 8 bits. However, we currently have 368 TokenKinds. The result is that the value gets truncated and the wrong token gets picked up when including PTH files. It seems that this will go wrong every time someone uses a token that uses the 9th bit. Upon asking on IRC, it was brought up that this was a highly experimental features that was considered a failure. I discovered via googling that BoostBuild (mostly Boost.Math) is the only user of this feature, using the CC1 flag directly. I believe that this can be transferred over to normal PCH with minimal effort: https://github.com/boostorg/build/issues/367 Based on advice on IRC and research showing that this is a nearly completely unused feature, this patch removes it entirely. Note: I considered leaving the build-flags in place and making them emit an error/warning, however since I've basically identified and warned the only user, it seemed better to just remove them. Differential Revision: https://reviews.llvm.org/D54547 Change-Id: If32744275ef1f585357bd6c1c813d96973c4d8d9 llvm-svn: 348266
* NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects)Erik Pilkington2018-10-301-5/+5
| | | | | | | | | | We haven't supported compiling ObjC1 for a long time (and never will again), so there isn't any reason to keep these separate. This patch replaces LangOpts::ObjC1 and LangOpts::ObjC2 with LangOpts::ObjC. Differential revision: https://reviews.llvm.org/D53547 llvm-svn: 345637
* [Preprocesssor] Filename should fall back to the written name when typo ↵Haojian Wu2018-10-021-8/+12
| | | | | | | | | | | | | | | | | | correction fails. Summary: The test is added in Testcase is at https://reviews.llvm.org/D52775. I tried to add the test to clang's code completion test, it doesn't reproduce the crash. Reviewers: sammccall, kristina Reviewed By: sammccall Subscribers: kristina, ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52774 llvm-svn: 343592
* [Preprocessor] Hide include typo correction behind SpellChecking.Haojian Wu2018-10-021-1/+1
| | | | | | | | | | | | | | Summary: Similar to Sema typo correction, the Preprocessor typo correction should also be hidden behind the SpellChecking flag. Reviewers: sammccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52778 llvm-svn: 343591
* [Preprocessor] Fix a crash when handling non-alpha include header.Haojian Wu2018-10-011-7/+10
| | | | | | | | | | | | | Summary: the crash is casued by an assertion in StringRef. (llvm::StringRef::front() const: Assertion `!empty()' failed.) Reviewers: sammccall Subscribers: jsji, cfe-commits Differential Revision: https://reviews.llvm.org/D52721 llvm-svn: 343481
* r342177 introduced a hint in cases where an #included file is not found. It ↵Eric Christopher2018-09-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | tries to find a suggestion by removing leading or trailing non-alphanumeric characters and checking if a matching file exists, then it reports an error like: include-likely-typo.c:3:10: error: '<empty_file_to_include.h>' file not found, did you mean 'empty_file_to_include.h'? ^~~~~~~~~~~~~~~~~~~~~~~~~~~ "empty_file_to_include.h" 1 error generated. However, if a hint is not found, the error message will show only the trimmed name we use to look for a hint, so: will result in: include-leading-nonalpha-no-suggest.c:3:10: fatal error: 'non_existing_file_to_include.h' file not found ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. where the name reported after "fatal error:" doesn't match what the user wrote. Patch by Jorge Gorbe! Differential Revision: https://reviews.llvm.org/D52280 This change reports the original file name instead of the trimmed one when a suggestion is not found. llvm-svn: 342667
* Diagnose likely typos in #include directives.Richard Smith2018-09-131-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [clang-cl, PCH] Support for /Yc and /Yu without filename and #pragma hdrstopMike Rice2018-09-111-10/+21
| | | | | | | | | | | | | With clang-cl, when the user specifies /Yc or /Yu without a filename the compiler uses a #pragma hdrstop in the main source file to determine the end of the PCH. If a header is specified with /Yc or /Yu #pragma hdrstop has no effect. The optional #pragma hdrstop filename argument is not yet supported. Differential Revision: https://reviews.llvm.org/D51391 llvm-svn: 341963
* Remove trailing spaceFangrui Song2018-07-301-3/+3
| | | | | | sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h} llvm-svn: 338291
* [Preprocessor] Stop entering included files after hitting a fatal error.Volodymyr Sapsai2018-07-251-0/+6
| | | | | | | | | | | | | | | | | Fixes a problem when we have multiple inclusion cycles and try to enumerate all possible ways to reach the max inclusion depth. rdar://problem/38871876 Reviewers: bruno, rsmith, jkorous, aaron.ballman Reviewed By: bruno, jkorous, aaron.ballman Subscribers: dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D48786 llvm-svn: 337953
* [clang-cl, PCH] Implement support for MS-style PCH through headersErich Keane2018-07-051-1/+34
| | | | | | | | | | | | | | | | | | | | | Implement support for MS-style PCH through headers. This enables support for /Yc and /Yu where the through header is either on the command line or included in the source. It replaces the current support the requires the header also be specified with /FI. This change adds a -cc1 option -pch-through-header that is used to either start or stop compilation during PCH create or use. When creating a PCH, the compilation ends after compilation of the through header. When using a PCH, tokens are skipped until after the through header is seen. Patch By: mikerice Differential Revision: https://reviews.llvm.org/D46652 llvm-svn: 336379
* Reland '[clang] Adding CharacteristicKind to PPCallbacks::InclusionDirective'Julie Hockett2018-05-101-1/+1
| | | | | | | | | | | | | | This commit relands r331904. Adding a SrcMgr::CharacteristicKind parameter to the InclusionDirective in PPCallbacks, and updating calls to that function. This will be useful in https://reviews.llvm.org/D43778 to determine which includes are system headers. Differential Revision: https://reviews.llvm.org/D46614 llvm-svn: 332021
OpenPOWER on IntegriCloud