History log of /llvm-project/clang/unittests/Lex/HeaderSearchTest.cpp (Results 1 – 25 of 36)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4
# e494e269 31-Oct-2024 Jan Svoboda <jan_svoboda@apple.com>

[clang][lex] Remove `HeaderFileInfo::Framework` (#114460)

This PR removes the `HeaderFileInfo::Framework` member and reduces the
size of this data type from 32B to 16B. This should improve Clang's

[clang][lex] Remove `HeaderFileInfo::Framework` (#114460)

This PR removes the `HeaderFileInfo::Framework` member and reduces the
size of this data type from 32B to 16B. This should improve Clang's
memory usage in situations where it keeps track of lots of header files.
NFCI. Depends on #114459.

show more ...


# 19b4f17d 31-Oct-2024 Jan Svoboda <jan_svoboda@apple.com>

[clang][lex] Remove `-index-header-map` (#114459)

This PR removes the `-index-header-map` functionality from Clang. AFAIK
this was only used internally at Apple and is now dead code. The main
moti

[clang][lex] Remove `-index-header-map` (#114459)

This PR removes the `-index-header-map` functionality from Clang. AFAIK
this was only used internally at Apple and is now dead code. The main
motivation behind this change is to enable the removal of
`HeaderFileInfo::Framework` member and reducing the size of that data
structure.

rdar://84036149

show more ...


Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init
# f1eae81c 18-Jun-2024 Danial Klimkin <dklimkin@google.com>

[NFC]Fix memory leak in HeaderSearchTest (#95927)

AddressSanitizer: 56 byte(s) leaked in 1 allocation(s).
(clang/unittests:lex_tests)


Revision tags: llvmorg-18.1.8
# 29b0d575 15-Jun-2024 Ian Anderson <iana@apple.com>

[clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (#89005)

HeaderSearch::MarkFileModuleHeader is no longer properly checking for

[clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (#89005)

HeaderSearch::MarkFileModuleHeader is no longer properly checking for
no-changes, and so sets the HeaderFileInfo for every `textual header` to
non-external.

show more ...


# 8e0ba084 14-Jun-2024 kadir çetinkaya <kadircet@google.com>

[clang][HeaderSearch] Fix handling of relative file-paths in suggestPathToFileForDiagnostics (#95121)

Normalize header-to-be-spelled using WorkingDir, similar to search paths
themselves.

Address

[clang][HeaderSearch] Fix handling of relative file-paths in suggestPathToFileForDiagnostics (#95121)

Normalize header-to-be-spelled using WorkingDir, similar to search paths
themselves.

Addresses https://github.com/llvm/llvm-project/issues/81215.

show more ...


Revision tags: llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0
# f94695b6 10-Sep-2023 Jan Svoboda <jan_svoboda@apple.com>

[clang] NFCI: Use `FileEntryRef` in `FileManager::getBufferForFile()`


Revision tags: llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2
# 9fe632ba 31-Jul-2023 David Goldman <davg@google.com>

[clang][HeaderSearch] Treat framework headers as Angled for suggestPath

- Rename the IsSystem flag to be IsAngled since that's how callers
actually use the flag.

- Since frameworks by convention

[clang][HeaderSearch] Treat framework headers as Angled for suggestPath

- Rename the IsSystem flag to be IsAngled since that's how callers
actually use the flag.

- Since frameworks by convention use <> style includes, make sure
we treat them as Angled

Also update clangd's custom logic for frameworks accordingly.

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

show more ...


Revision tags: llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7
# 1e6adbad 17-Dec-2022 Fangrui Song <i@maskray.me>

[clang] llvm::Optional::value => operator*/operator->

std::optional::value() has undesired exception checking semantics and is
unavailable in older Xcode (see _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCES

[clang] llvm::Optional::value => operator*/operator->

std::optional::value() has undesired exception checking semantics and is
unavailable in older Xcode (see _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS). The
call sites block std::optional migration.

This makes `ninja check-clang` work in the absence of llvm::Optional::value.

show more ...


# a41fbb1f 03-Dec-2022 Kazu Hirata <kazu@google.com>

[clang/unittests] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated. The intent is to reduce
the a

[clang/unittests] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated. The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

show more ...


Revision tags: llvmorg-15.0.6
# 2c1fa734 25-Nov-2022 Sam McCall <sam.mccall@gmail.com>

Reland "[Lex] Fix suggested spelling of /usr/bin/../include/foo"

This reverts commit 1dc0a1e5d220b83c1074204bd3afd54f3bac4270.

Failures were caused by unintentional conversion to native slashes by

Reland "[Lex] Fix suggested spelling of /usr/bin/../include/foo"

This reverts commit 1dc0a1e5d220b83c1074204bd3afd54f3bac4270.

Failures were caused by unintentional conversion to native slashes by
remove_dots, so undo that: we always suggest posix slashes for includes.

This could potentially be a change in behavior on windows if people were
spelling headers with backslashes and headermaps contained backslashes,
but that's all underspecified and I don't think anyone uses headermaps
on windows.

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

show more ...


# 1dc0a1e5 25-Nov-2022 Sam McCall <sam.mccall@gmail.com>

Revert "[Lex] Fix suggested spelling of /usr/bin/../include/foo"

This reverts commit 8bed59c7e7da2fea41a9167e15c15a8f58a5ede7.

Breaks bots e.g. https://lab.llvm.org/buildbot/#/builders/216/builds/1

Revert "[Lex] Fix suggested spelling of /usr/bin/../include/foo"

This reverts commit 8bed59c7e7da2fea41a9167e15c15a8f58a5ede7.

Breaks bots e.g. https://lab.llvm.org/buildbot/#/builders/216/builds/13282

show more ...


# 8bed59c7 24-Nov-2022 Sam McCall <sam.mccall@gmail.com>

[Lex] Fix suggested spelling of /usr/bin/../include/foo

Since D60873 we remove dotdots from the search path entries, but not the
filenames we're matching against, so do the latter too.

Since this a

[Lex] Fix suggested spelling of /usr/bin/../include/foo

Since D60873 we remove dotdots from the search path entries, but not the
filenames we're matching against, so do the latter too.

Since this also removes (single) dots, drop the logic to skip over them.
(Some of this was already dead, some is newly dead).

See D138676 for motivation.

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

show more ...


Revision tags: llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init
# cb2c8f69 14-Jul-2022 Kazu Hirata <kazu@google.com>

[clang] Use value instead of getValue (NFC)


# 53daa177 13-Jul-2022 Kazu Hirata <kazu@google.com>

[clang, clang-tools-extra] Use has_value instead of hasValue (NFC)


# 3b7c3a65 25-Jun-2022 Kazu Hirata <kazu@google.com>

Revert "Don't use Optional::hasValue (NFC)"

This reverts commit aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.


# aa8feeef 25-Jun-2022 Kazu Hirata <kazu@google.com>

Don't use Optional::hasValue (NFC)


Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4
# b6c67c3c 04-May-2022 Cyndy Ishida <cyndy_ishida@apple.com>

[clang] Track how headers get included generally during lookup time

tapi & clang-extractapi both attempt to construct then check against
how a header was included to determine api information when w

[clang] Track how headers get included generally during lookup time

tapi & clang-extractapi both attempt to construct then check against
how a header was included to determine api information when working
against multiple search paths, headermap, and vfsoverlay mechanisms.
Validating this against what the preprocessor sees during lookup time
makes this check more reliable.

Reviewed By: zixuw, jansvoboda11

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

show more ...


Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3
# 9385ece9 20-Jan-2022 David Goldman <davg@google.com>

[HeaderSearch] Track framework name in LookupFile

Previously, the Framework name was only set if the file
came from a header mapped framework; now we'll always
set the framework name if the file is

[HeaderSearch] Track framework name in LookupFile

Previously, the Framework name was only set if the file
came from a header mapped framework; now we'll always
set the framework name if the file is in a framework.

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

show more ...


# 105c9131 18-Jan-2022 Jan Svoboda <jan_svoboda@apple.com>

[clang][lex] NFC: Simplify calls to `LookupFile`

The `{HeaderSearch,Preprocessor}::LookupFile()` functions take an out-parameter `const DirectoryLookup *&`. Most callers end up creating a `const Dir

[clang][lex] NFC: Simplify calls to `LookupFile`

The `{HeaderSearch,Preprocessor}::LookupFile()` functions take an out-parameter `const DirectoryLookup *&`. Most callers end up creating a `const DirectoryLookup *` variable that's otherwise unused.

This patch changes the out-parameter from reference to a pointer, making it possible to simply pass `nullptr` to the function without the ceremony.

Reviewed By: ahoppen

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

show more ...


# ccd7e783 13-Jan-2022 Jan Svoboda <jan_svoboda@apple.com>

Revert "[clang][lex] Keep references to `DirectoryLookup` objects up-to-date"

This reverts commit 8503c688. This patch causes some issues with `#include_next`: https://github.com/llvm/llvm-project/i

Revert "[clang][lex] Keep references to `DirectoryLookup` objects up-to-date"

This reverts commit 8503c688. This patch causes some issues with `#include_next`: https://github.com/llvm/llvm-project/issues/53161

show more ...


Revision tags: llvmorg-13.0.1-rc2
# f77d115c 11-Jan-2022 Jan Svoboda <jan_svoboda@apple.com>

[clang] Move `ApplyHeaderSearchOptions` from Frontend to Lex

In D116750, the `clangFrontend` library was added as a dependency of `LexTests` in order to make `clang::ApplyHeaderSearchOptions()` avai

[clang] Move `ApplyHeaderSearchOptions` from Frontend to Lex

In D116750, the `clangFrontend` library was added as a dependency of `LexTests` in order to make `clang::ApplyHeaderSearchOptions()` available. This increased the number of TUs the test depends on.

This patch moves the function into `clangLex` and removes dependency of `LexTests` on `clangFrontend`.

Reviewed By: thakis

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

show more ...


# 8503c688 11-Jan-2022 Jan Svoboda <jan_svoboda@apple.com>

[clang][lex] Keep references to `DirectoryLookup` objects up-to-date

The elements of `SearchPath::SearchDirs` are being referenced to by their indices. This proved to be error-prone: `HeaderSearch::

[clang][lex] Keep references to `DirectoryLookup` objects up-to-date

The elements of `SearchPath::SearchDirs` are being referenced to by their indices. This proved to be error-prone: `HeaderSearch::SearchDirToHSEntry` was accidentally not being updated in `HeaderSearch::AddSearchPath()`. This patch fixes that by referencing `SearchPath::SearchDirs` elements by their address instead, which is stable thanks to the bump-ptr-allocation strategy.

Reviewed By: ahoppen

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

show more ...


# 0cf7e61a 06-Dec-2021 David Goldman <davg@google.com>

[clang][HeaderSearch] Support framework includes in suggestPath...

Clang will now search through the framework includes to identify
the framework include path to a file, and then suggest a framework

[clang][HeaderSearch] Support framework includes in suggestPath...

Clang will now search through the framework includes to identify
the framework include path to a file, and then suggest a framework
style include spelling for the file.

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

show more ...


Revision tags: llvmorg-13.0.1-rc1
# 99023627 22-Oct-2021 Duncan P. N. Exon Smith <dexonsmith@apple.com>

Support: Use sys::path::is_style_{posix,windows}() in a few places

Use the new sys::path::is_style_posix() and is_style_windows() in a few
places that need to detect the system's native path style.

Support: Use sys::path::is_style_{posix,windows}() in a few places

Use the new sys::path::is_style_posix() and is_style_windows() in a few
places that need to detect the system's native path style.

In llvm/lib/Support/Path.cpp, this patch removes most uses of the
private `real_style()`, where is_style_posix() and is_style_windows()
are just a little tidier.

Elsewhere, this removes `_WIN32` macro checks. Added a FIXME to a
FileManagerTest that seemed fishy, but maintained the existing
behaviour.

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

show more ...


# 395e1fe3 15-Oct-2021 Cyndy Ishida <cyndy_ishida@apple.com>

[clang] Capture Framework when HeaderSearch is resolved via headermap

When building frameworks, headermaps responsible for mapping angle-included headers to their source file location are passed via

[clang] Capture Framework when HeaderSearch is resolved via headermap

When building frameworks, headermaps responsible for mapping angle-included headers to their source file location are passed via
`-I` and not `-index-header-map`. Also, `-index-header-map` is only used for indexing purposes and not during most builds.
This patch holds on to the framework's name in HeaderFileInfo as this is retrieveable for cases outside of IndexHeaderMaps and
still represents the framework that is being built.

resolves: rdar://84046893

Reviewed By: jansvoboda11

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

show more ...


12