Revision tags: llvmorg-18.1.8, 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, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2 |
|
#
9478f661 |
| 02-Aug-2023 |
Justin Bogner <mail@justinbogner.com> |
[Driver] Refactor to use llvm Option's new Visibility flags
This is a big refactor of the clang driver's option handling to use the Visibility flags introduced in https://reviews.llvm.org/D157149. T
[Driver] Refactor to use llvm Option's new Visibility flags
This is a big refactor of the clang driver's option handling to use the Visibility flags introduced in https://reviews.llvm.org/D157149. There are a few distinct parts, but they can't really be split into separate commits and still be made to compile.
1. We split out some of the flags in ClangFlags to ClangVisibility. Note that this does not include any subtractive flags.
2. We update the Flag definitions and OptIn/OptOut constructs in Options.td by hand.
3. We introduce and use a script, update_options_td_flags, to ease migration of flag definitions in Options.td, and we run that on Options.td. I intend to remove this later, but I'm committing it so that downstream forks can use the script to simplify merging.
4. We update calls to OptTable in the clang driver, cc1as, flang, and clangd to use the visibility APIs instead of Include/Exclude flags.
5. We deprecate the Include/Exclude APIs and add a release note.
*if you are running into conflicts with this change:*
Note that https://reviews.llvm.org/D157150 may also be the culprit and if so it should be handled first.
The script in `clang/utils/update_options_td_flags.py` can help. Take the downstream side of all conflicts and then run the following:
``` % cd clang/include/clang/Driver % ../../../utils/update_options_td_flags.py Options.td > Options.td.new % mv Options.td.new Options.td ```
This will hopefully be sufficient, please take a look at the diff.
Differential Revision: https://reviews.llvm.org/D157151
show more ...
|
Revision tags: llvmorg-17.0.0-rc1, llvmorg-18-init |
|
#
990645f9 |
| 19-Jul-2023 |
Justin Bogner <mail@justinbogner.com> |
Revert "[OptTable] Make explicitly included options override excluded ones"
Looks like a couple of flang bots are broken by this change. Reverting to investigate.
This reverts commit b2eda85f047f27
Revert "[OptTable] Make explicitly included options override excluded ones"
Looks like a couple of flang bots are broken by this change. Reverting to investigate.
This reverts commit b2eda85f047f27788ccd7b9af9bd59c5d44b2051.
show more ...
|
#
b2eda85f |
| 19-Jul-2023 |
Justin Bogner <mail@justinbogner.com> |
[OptTable] Make explicitly included options override excluded ones
When we have both explicitly included and excluded option sets, we were excluding anything from the latter set regardless of what w
[OptTable] Make explicitly included options override excluded ones
When we have both explicitly included and excluded option sets, we were excluding anything from the latter set regardless of what was in the former. This doesn't compose well and led to an overly complicated design around DXC options where a third flag was introduced to handle options that overlapped between DXC and CL.
With this change we check the included options before excluding anything from the exclude list, which allows for options that are in multiple categories to be handled in a sensible way. This allows us to remove CLDXCOption but should otherwise be NFC.
Differential Revision: https://reviews.llvm.org/D155729
show more ...
|
Revision tags: 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 |
|
#
2d861436 |
| 14-Jan-2023 |
Kazu Hirata <kazu@google.com> |
[clang] Remove remaining uses of llvm::Optional (NFC)
This patch removes several "using" declarations and #include "llvm/ADT/Optional.h".
This is part of an effort to migrate from llvm::Optional to
[clang] Remove remaining uses of llvm::Optional (NFC)
This patch removes several "using" declarations and #include "llvm/ADT/Optional.h".
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 ...
|
#
6ad0788c |
| 14-Jan-2023 |
Kazu Hirata <kazu@google.com> |
[clang] Use std::optional instead of llvm::Optional (NFC)
This patch replaces (llvm::|)Optional< with std::optional<. I'll post a separate patch to remove #include "llvm/ADT/Optional.h".
This is p
[clang] Use std::optional instead of llvm::Optional (NFC)
This patch replaces (llvm::|)Optional< with std::optional<. I'll post a separate patch to remove #include "llvm/ADT/Optional.h".
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 ...
|
#
a1580d7b |
| 14-Jan-2023 |
Kazu Hirata <kazu@google.com> |
[clang] Add #include <optional> (NFC)
This patch adds #include <optional> to those files containing llvm::Optional<...> or Optional<...>.
I'll post a separate patch to actually replace llvm::Option
[clang] Add #include <optional> (NFC)
This patch adds #include <optional> to those files containing llvm::Optional<...> or Optional<...>.
I'll post a separate patch to actually replace llvm::Optional with 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.7 |
|
#
a3c248db |
| 06-Jan-2023 |
serge-sans-paille <sguelton@mozilla.com> |
Move from llvm::makeArrayRef to ArrayRef deduction guides - clang/ part
This is a follow-up to https://reviews.llvm.org/D140896, split into several parts as it touches a lot of files.
Differential
Move from llvm::makeArrayRef to ArrayRef deduction guides - clang/ part
This is a follow-up to https://reviews.llvm.org/D140896, split into several parts as it touches a lot of files.
Differential Revision: https://reviews.llvm.org/D141139
show more ...
|
#
5891420e |
| 03-Dec-2022 |
Kazu Hirata <kazu@google.com> |
[clang] 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 m
[clang] 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, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1 |
|
#
981cbfb5 |
| 19-Sep-2022 |
Kazu Hirata <kazu@google.com> |
[clang] Don't include StringSwitch.h (NFC)
These files don't seem to use StringSwitch.
|
#
23ace26e |
| 15-Sep-2022 |
Kadir Cetinkaya <kadircet@google.com> |
[clang(d)] Include/Exclude CLDXC options properly
This handles the new CLDXC options that was introduced in https://reviews.llvm.org/D128462 inside clang-tooling to make sure cl driver mode is not b
[clang(d)] Include/Exclude CLDXC options properly
This handles the new CLDXC options that was introduced in https://reviews.llvm.org/D128462 inside clang-tooling to make sure cl driver mode is not broken.
Fixes https://github.com/clangd/clangd/issues/1292.
Differential Revision: https://reviews.llvm.org/D133962
show more ...
|
Revision tags: llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2 |
|
#
87468e85 |
| 25-Apr-2022 |
Ishaan Gandhi <ishaangandhi@gmail.com> |
compile commands header to source heuristic lower-cases filenames before inferring file types
This leads to ".C" files being rewritten as ".c" files and being inferred to be "c" files as opposed to
compile commands header to source heuristic lower-cases filenames before inferring file types
This leads to ".C" files being rewritten as ".c" files and being inferred to be "c" files as opposed to "c++" files.
Fixes https://github.com/clangd/clangd/issues/1108
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D124262
show more ...
|
Revision tags: 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, llvmorg-13.0.1-rc2 |
|
#
4258d68d |
| 06-Jan-2022 |
Sam McCall <sam.mccall@gmail.com> |
[Tooling] When transferring compile commands between files, always use '--'
"driver <flags> -- <input>" is a particularly convenient form of the compile command to manipulate, with fewer special cas
[Tooling] When transferring compile commands between files, always use '--'
"driver <flags> -- <input>" is a particularly convenient form of the compile command to manipulate, with fewer special cases to handle.
Guaranteeing that the output command is of that form is cheap and makes it easier to consume the result in some cases.
Differential Revision: https://reviews.llvm.org/D116721
show more ...
|
Revision tags: llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init |
|
#
ce90b60b |
| 26-Jul-2021 |
Kadir Cetinkaya <kadircet@google.com> |
[clang][Driver] Expose driver mode detection logic
Also use it in other places that performed it on their own.
Differential Revision: https://reviews.llvm.org/D106789
|
Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3 |
|
#
e5c7c171 |
| 23-Jun-2021 |
Martin Storsjö <martin@martin.st> |
[clang] Rename StringRef _lower() method calls to _insensitive()
This is mostly a mechanical change, but a testcase that contains parts of the StringRef class (clang/test/Analysis/llvm-conventions.c
[clang] Rename StringRef _lower() method calls to _insensitive()
This is mostly a mechanical change, but a testcase that contains parts of the StringRef class (clang/test/Analysis/llvm-conventions.cpp) isn't touched.
show more ...
|
Revision tags: llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4 |
|
#
e030ce3e |
| 24-Mar-2021 |
Janusz Nykiel <janusz.nykiel@ubisoft.com> |
[Tooling] Handle compilation databases containing commands with double dashes
As of CMake commit https://gitlab.kitware.com/cmake/cmake/-/commit/d993ebd4, which first appeared in CMake 3.19.x series
[Tooling] Handle compilation databases containing commands with double dashes
As of CMake commit https://gitlab.kitware.com/cmake/cmake/-/commit/d993ebd4, which first appeared in CMake 3.19.x series, in the compile commands for clang-cl, CMake puts `--` before the input file. When operating on such a database, the `InterpolatingCompilationDatabase` - specifically, the `TransferableCommand` constructor - does not recognize that pattern and so, does not strip the input, or the double dash when 'transferring' the compile command. This results in a incorrect compile command - with the double dash and old input file left in, and the language options and new input file appended after them, where they're all treated as inputs, including the language version option.
Test files for some tests have names similar enough to be matched to commands from the database, e.g.:
`.../path-mappings.test.tmp/server/bar.cpp`
can be matched to:
`.../Driver/ToolChains/BareMetal.cpp`
etc. When that happens, the tool being tested tries to use the matched, and incorrectly 'transferred' compile command, and fails, reporting errors similar to:
`error: no such file or directory: '/std:c++14'; did you mean '/std:c++14'? [clang-diagnostic-error]`
This happens in at least 4 tests:
Clang Tools :: clang-tidy/checkers/performance-trivially-destructible.cpp Clangd :: check-fail.test Clangd :: check.test Clangd :: path-mappings.test
The fix for `TransferableCommand` removes the `--` and everything after it when determining the arguments that apply to the new file. `--` is inserted in the 'transferred' command if the new file name starts with `-` and when operating in clang-cl mode, also `/`. Additionally, other places in the code known to do argument adjustment without accounting for the `--` and causing the tests to fail are fixed as well.
Differential Revision: https://reviews.llvm.org/D98824
show more ...
|
Revision tags: llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2 |
|
#
588db1cc |
| 24-Feb-2021 |
Sam McCall <sam.mccall@gmail.com> |
[clangd] Use flags from open files when opening headers they include
Currently our strategy for getting header compile flags is something like:
A) look for flags for the header in compile_commands.
[clangd] Use flags from open files when opening headers they include
Currently our strategy for getting header compile flags is something like:
A) look for flags for the header in compile_commands.json This basically never works, build systems don't generate this info. B) try to match to an impl file in compile_commands.json and use its flags This only (mostly) works if the headers are in the same project. C) give up and use fallback flags This kind of works for stdlib in the default configuration, and otherwise doesn't.
Obviously there are big gaps here.
This patch inserts a new attempt between A and B: if the header is transitively included by any open file (whether same project or not), then we use its compile command.
This doesn't make any attempt to solve some related problems: - parsing non-self-contained header files in context (importing PP state) - using the compile flags of non-opened candidate files found in the index
Fixes https://github.com/clangd/clangd/issues/123 Fixes https://github.com/clangd/clangd/issues/695 See https://github.com/clangd/clangd/issues/519
Differential Revision: https://reviews.llvm.org/D97351
show more ...
|
Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1 |
|
#
2a1418f2 |
| 09-Apr-2020 |
Christopher Tetreault <ctetreau@quicinc.com> |
Fix syntax error
|
#
6ed88afd |
| 09-Apr-2020 |
ADRA <plugin2adra@gmail.com> |
[CUDA] Accept -x cu to indicate language is CUDA, transfer CUDA language flag to header-file arguments
Summary: * accept -x cu to indicate language is CUDA * transfer CUDA language flag to header-fi
[CUDA] Accept -x cu to indicate language is CUDA, transfer CUDA language flag to header-file arguments
Summary: * accept -x cu to indicate language is CUDA * transfer CUDA language flag to header-file arguments
Differential Revision: https://reviews.llvm.org/D77451
show more ...
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1 |
|
#
adcd0268 |
| 28-Jan-2020 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly m
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies.
This doesn't actually modify StringRef yet, I'll do that in a follow-up.
show more ...
|
Revision tags: llvmorg-11-init |
|
#
c2377eae |
| 19-Dec-2019 |
Kadir Cetinkaya <kadircet@google.com> |
[clang][Tooling] Prefer -x over -std when interpolating
Summary: Currently interpolation logic prefers -std over -x. But the latter is a more strong signal, so this patch inverts the order and only
[clang][Tooling] Prefer -x over -std when interpolating
Summary: Currently interpolation logic prefers -std over -x. But the latter is a more strong signal, so this patch inverts the order and only makes use of -std if -x didn't exist.
Fixes https://github.com/clangd/clangd/issues/185
Thanks @sammccall for tracking this down!
Reviewers: sammccall
Subscribers: ilya-biryukov, usaxena95, cfe-commits, sammccall
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71727
show more ...
|
Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1, llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4 |
|
#
43392759 |
| 04-Sep-2019 |
Ilya Biryukov <ibiryukov@google.com> |
[Driver] Use shared singleton instance of DriverOptTable
Summary: This significantly reduces the time required to run clangd tests, by ~10%.
Should also have an effect on other tests that run comma
[Driver] Use shared singleton instance of DriverOptTable
Summary: This significantly reduces the time required to run clangd tests, by ~10%.
Should also have an effect on other tests that run command-line parsing multiple times inside a single invocation.
Reviewers: gribozavr, sammccall
Reviewed By: sammccall
Subscribers: kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67163
llvm-svn: 370908
show more ...
|
Revision tags: llvmorg-9.0.0-rc3 |
|
#
2b3d49b6 |
| 14-Aug-2019 |
Jonas Devlieghere <jonas@devlieghere.com> |
[Clang] Migrate llvm::make_unique to std::make_unique
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 o
[Clang] Migrate llvm::make_unique to std::make_unique
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
show more ...
|
Revision tags: llvmorg-9.0.0-rc2 |
|
#
09d890d7 |
| 05-Aug-2019 |
Rainer Orth <ro@gcc.gnu.org> |
Move LangStandard*, InputKind::Language to Basic
This patch is a prerequisite for using LangStandard from Driver in https://reviews.llvm.org/D64793.
It moves LangStandard* and InputKind::Language t
Move LangStandard*, InputKind::Language to Basic
This patch is a prerequisite for using LangStandard from Driver in https://reviews.llvm.org/D64793.
It moves LangStandard* and InputKind::Language to Basic. It is mostly mechanical, with only a few changes of note:
- enum Language has been changed into enum class Language : uint8_t to avoid a clash between OpenCL in enum Language and OpenCL in enum LangFeatures and not to increase the size of class InputKind.
- Now that getLangStandardForName, which is currently unused, also checks both canonical and alias names, I've introduced a helper getLangKind which factors out a code pattern already used 3 times.
The patch has been tested on x86_64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu.
There's a companion patch for lldb which uses LangStandard.h (https://reviews.llvm.org/D65717).
While polly includes isl which in turn uses InputKind::C, that part of the code isn't even built inside the llvm tree. I've posted a patch to allow for both InputKind::C and Language::C upstream (https://groups.google.com/forum/#!topic/isl-development/6oEvNWOSQFE).
Differential Revision: https://reviews.llvm.org/D65562
llvm-svn: 367864
show more ...
|
Revision tags: llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4 |
|
#
7264a474 |
| 03-Jul-2019 |
Fangrui Song <maskray@google.com> |
Change std::{lower,upper}_bound to llvm::{lower,upper}_bound or llvm::partition_point. NFC
llvm-svn: 365006
|
Revision tags: llvmorg-8.0.1-rc3 |
|
#
60ca31a7 |
| 20-Jun-2019 |
Serge Guelton <sguelton@redhat.com> |
[clang-tidy] Fail gracefully upon empty database fields
Fix bz#42281
Differential Revision: https://reviews.llvm.org/D63613
llvm-svn: 363975
|