History log of /llvm-project/clang/unittests/Tooling/CompilationDatabaseTest.cpp (Results 26 – 50 of 74)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 614a78c1 12-Jul-2019 Russell Gallop <russell.gallop@gmail.com>

Revert "[JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands."

New test is failing on Windows bot

This reverts commit 9c0391b36a76f8e3949588de3f44b7314c2318bf.

llvm-s

Revert "[JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands."

New test is failing on Windows bot

This reverts commit 9c0391b36a76f8e3949588de3f44b7314c2318bf.

llvm-svn: 365906

show more ...


# 9c0391b3 12-Jul-2019 Sam McCall <sam.mccall@gmail.com>

[JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands.

Summary:
It's common to use compiler wrappers by setting CC="gomacc clang++".
This results in both args appearing

[JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands.

Summary:
It's common to use compiler wrappers by setting CC="gomacc clang++".
This results in both args appearing in compile_commands.json, and clang's driver
can't handle this.

This patch attempts to recognize this pattern (by looking for well-known
wrappers) and dropping argv0 in this case.

It conservatively ignores other cases for now:
- wrappers with unknown names
- wrappers that accept -flags
- wrappers where the compiler to use is implied (usually cc or gcc)

This is done at the JSONCompilationDatabase level rather than somewhere more
fundamental, as (hopefully) this isn't a general conceptual problem, but a messy
aspect of the nature of the ecosystem around compile_commands.json.
i.e. compilation databases more tightly tied to the build system should not have
this problem.

Reviewers: phosek, klimek

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 365887

show more ...


Revision tags: llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3
# 0a43d1fa 26-Jun-2019 Kadir Cetinkaya <kadircet@google.com>

[clang][Tooling] Fix windows build-bots after rL364386

llvm-svn: 364396


# c3a73023 26-Jun-2019 Kadir Cetinkaya <kadircet@google.com>

[clang][Tooling] Infer target and mode from argv[0] when using JSONCompilationDatabase

Summary:
Wraps JSON compilation database with a target and mode adding database
wrapper. So that driver can cor

[clang][Tooling] Infer target and mode from argv[0] when using JSONCompilationDatabase

Summary:
Wraps JSON compilation database with a target and mode adding database
wrapper. So that driver can correctly figure out which toolchain to use.

Note that clients that wants to make use of this target discovery mechanism
needs to link in TargetsInfos and initialize them at startup.

Reviewers: ilya-biryukov

Subscribers: mgorny, cfe-commits

Tags: #clang

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

llvm-svn: 364386

show more ...


Revision tags: llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1
# 87ad30be 07-May-2019 Sam McCall <sam.mccall@gmail.com>

[Tooling] Add -x flags when inferring compile commands for files with no/invalid extension.

Summary: We treat them as headers, as the motivating case is C++ standard library.

Reviewers: kadircet

S

[Tooling] Add -x flags when inferring compile commands for files with no/invalid extension.

Summary: We treat them as headers, as the motivating case is C++ standard library.

Reviewers: kadircet

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 360153

show more ...


# 36913e3f 05-Apr-2019 Sam McCall <sam.mccall@gmail.com>

[Tooling] add a Heuristic field indicating that a CompileCommand was guessed.

Summary:
Use cases:
- a tool that dumps the heuristic used for each header in a project can
be used to evaluate chan

[Tooling] add a Heuristic field indicating that a CompileCommand was guessed.

Summary:
Use cases:
- a tool that dumps the heuristic used for each header in a project can
be used to evaluate changes to the heuristic
- we want to expose this information to users in clangd as it affects
accuracy/reliability of editor features
- express interpolation tests more directly

Reviewers: ilya-biryukov, klimek

Subscribers: ioeric, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 357770

show more ...


Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5
# 7ec1ec10 08-Mar-2019 Kadir Cetinkaya <kadircet@google.com>

[clang][Tooling] Delete dots and dotdots when generating absolute paths

Summary:
GetAllFiles interface returns absolute paths, but keeps dots and dot
dots. This patch makes those paths canonical by

[clang][Tooling] Delete dots and dotdots when generating absolute paths

Summary:
GetAllFiles interface returns absolute paths, but keeps dots and dot
dots. This patch makes those paths canonical by deleting them.

Reviewers: hokein

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 355678

show more ...


Revision tags: llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1
# 2946cd70 19-Jan-2019 Chandler Carruth <chandlerc@gmail.com>

Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the ne

Update the file headers across all of the LLVM projects in the monorepo
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

show more ...


# f2e25e70 16-Jan-2019 Sam McCall <sam.mccall@gmail.com>

Reapply [Tooling] Make clang-tool find libc++ dir on mac when running on a file without compilation database.

This reverts commit r351282, and re-lands r351222 and r351229 with the
use-after-free fi

Reapply [Tooling] Make clang-tool find libc++ dir on mac when running on a file without compilation database.

This reverts commit r351282, and re-lands r351222 and r351229 with the
use-after-free fixed.

llvm-svn: 351316

show more ...


# e3226737 16-Jan-2019 Vlad Tsyrklevich <vlad@tsyrklevich.net>

Revert "[Tooling] Make clang-tool find libc++ dir on mac when running on a file without compilation database."

This reverts commits r351222 and r351229, they were causing ASan/MSan failures
on the s

Revert "[Tooling] Make clang-tool find libc++ dir on mac when running on a file without compilation database."

This reverts commits r351222 and r351229, they were causing ASan/MSan failures
on the sanitizer bots.

llvm-svn: 351282

show more ...


# ccb98a63 15-Jan-2019 Haojian Wu <hokein@google.com>

[Tooling] Fix broken compliation databse tests.

I forgot to update the unittest in r351222.

llvm-svn: 351229


Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1, llvmorg-7.0.0, llvmorg-7.0.0-rc3
# e05bf606 09-Sep-2018 Hamza Sood <hamza_sood@me.com>

[Tooling] Improve handling of CL-style options

This patch fixes the handling of clang-cl options in InterpolatingCompilationDatabase.
They were previously ignored completely, which led to a lot of b

[Tooling] Improve handling of CL-style options

This patch fixes the handling of clang-cl options in InterpolatingCompilationDatabase.
They were previously ignored completely, which led to a lot of bugs:

Additional options were being added with the wrong syntax. E.g. a file was
specified as C++ by adding -x c++, which causes an error in CL mode.

The args were parsed and then rendered, which means that the aliasing information
was lost. E.g. /W4 was rendered to -Wall, which in CL mode means -Weverything.

CL options were ignored when checking things like -std=, so a lot of logic was
being bypassed.

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

llvm-svn: 341760

show more ...


# 5167e2d1 28-Aug-2018 Ilya Biryukov <ibiryukov@google.com>

Parse compile commands lazily in InterpolatingCompilationDatabase

Summary:
This greatly reduces the time to read 'compile_commands.json'.
For Chromium on my machine it's now 0.7 seconds vs 30 second

Parse compile commands lazily in InterpolatingCompilationDatabase

Summary:
This greatly reduces the time to read 'compile_commands.json'.
For Chromium on my machine it's now 0.7 seconds vs 30 seconds before the
change.

Reviewers: sammccall, jfb

Reviewed By: sammccall

Subscribers: mgrang, jfb, cfe-commits

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

llvm-svn: 340838

show more ...


Revision tags: llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1
# 6567c9e5 17-Jul-2018 Simon Marchi <simon.marchi@ericsson.com>

[Tooling] Add operator== to CompileCommand

Summary:
It does the obvious thing of comparing all fields. This will be needed
for a clangd patch I have in the pipeline.

Subscribers: dblaikie, ilya-bi

[Tooling] Add operator== to CompileCommand

Summary:
It does the obvious thing of comparing all fields. This will be needed
for a clangd patch I have in the pipeline.

Subscribers: dblaikie, ilya-biryukov, ioeric, cfe-commits

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

llvm-svn: 337284

show more ...


Revision tags: llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2, llvmorg-6.0.1-rc1
# 27695da9 11-Apr-2018 Haojian Wu <hokein@google.com>

[Tooling] Correct the "-std" compile command option.

Summary:
"-std c++11" is not valid in compiler, we have to use "-std=c++11".

Test in vscode with this patch, code completion for header works as

[Tooling] Correct the "-std" compile command option.

Summary:
"-std c++11" is not valid in compiler, we have to use "-std=c++11".

Test in vscode with this patch, code completion for header works as expected.

Reviewers: sammccall

Subscribers: cfe-commits, klimek

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

llvm-svn: 329786

show more ...


# ea9773ac 09-Apr-2018 Sam McCall <sam.mccall@gmail.com>

[Tooling] A CompilationDatabase wrapper that infers header commands.

Summary:
The wrapper finds the closest matching compile command using filename heuristics
and makes minimal tweaks so it can be u

[Tooling] A CompilationDatabase wrapper that infers header commands.

Summary:
The wrapper finds the closest matching compile command using filename heuristics
and makes minimal tweaks so it can be used with the header.

Subscribers: klimek, mgorny, cfe-commits

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

llvm-svn: 329580

show more ...


Revision tags: llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1
# e2863eca 29-Jun-2017 Alex Lorenz <arphaman@gmail.com>

[Tooling] FixedCompilationDatabase should be able to strip positional
arguments when `-fsyntax-only` is used

Previously, Clang failed to create a fixed compilation database when the
compilation argu

[Tooling] FixedCompilationDatabase should be able to strip positional
arguments when `-fsyntax-only` is used

Previously, Clang failed to create a fixed compilation database when the
compilation arguments use -fsyntax-only instead of -c. This commit fixes the
issue by forcing Clang to look at the compilation job when stripping the
positional arguments.

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

llvm-svn: 306659

show more ...


Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2
# c46064c2 24-May-2017 Serge Pavlov <sepavloff@gmail.com>

Method loadFromCommandLine should be able to report errors

Now FixedCompilationDatabase::loadFromCommandLine has no means to report
which error occurred if it fails to create compilation object. Thi

Method loadFromCommandLine should be able to report errors

Now FixedCompilationDatabase::loadFromCommandLine has no means to report
which error occurred if it fails to create compilation object. This is
a block for implementing D33013, because after that change driver will
refuse to create compilation if command line contains erroneous options.

This change adds additional argument to loadFromCommandLine, which is
assigned error message text if compilation object was not created. This is
the same way as other methods of CompilationDatabase report failure.

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

llvm-svn: 303741

show more ...


Revision tags: llvmorg-4.0.1-rc1
# 0fcbb289 26-Apr-2017 Rui Ueyama <ruiu@google.com>

Revert r301487: Replace HashString algorithm with xxHash64

This reverts commit r301487 to make buildbots green.

llvm-svn: 301491


# 87b30ac9 26-Apr-2017 Rui Ueyama <ruiu@google.com>

Replace HashString algorithm with xxHash64

The previous algorithm processed one character at a time, which is very
painful on a modern CPU. Replace it with xxHash64, which both already
exists in the

Replace HashString algorithm with xxHash64

The previous algorithm processed one character at a time, which is very
painful on a modern CPU. Replace it with xxHash64, which both already
exists in the codebase and is fairly fast.

Patch from Scott Smith!

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

llvm-svn: 301487

show more ...


Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2
# 399aea30 01-Dec-2016 Joerg Sonnenberger <joerg@bec.de>

Extend CompilationDatabase by a field for the output filename

In bigger projects like an Operating System, the same source code is
often compiled in slightly different ways. This could be the differ

Extend CompilationDatabase by a field for the output filename

In bigger projects like an Operating System, the same source code is
often compiled in slightly different ways. This could be the difference
between PIC and non-PIC code for static vs dynamic libraries, it could
also be the difference between size optimised versions of tools for
ramdisk images. At the moment, the compilation database has no way to
distinguish such cases. As first step, add a field in the JSON format
for it and process it accordingly.

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

llvm-svn: 288436

show more ...


Revision tags: llvmorg-3.9.1-rc1, llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2
# 9e60a2ad 18-Aug-2016 Zachary Turner <zturner@google.com>

Resubmit "[Tooling] Parse compilation database command lines on Windows."

This patch introduced the ability to decide at runtime whether to parse
JSON compilation database command lines using Gnu sy

Resubmit "[Tooling] Parse compilation database command lines on Windows."

This patch introduced the ability to decide at runtime whether to parse
JSON compilation database command lines using Gnu syntax or Windows
syntax. However, there were many existing unit tests written that
hardcoded Gnu-specific paths. These tests were now failing because
the auto-detection logic was choosing to parse them using Windows
rules.

This resubmission of the patch fixes this by introducing an enum
which defines the syntax mode, which defaults to auto-detect, but
for which the unit tests force Gnu style parsing.

Reviewed By: alexfh
Differential Revision: https://reviews.llvm.org/D23628

llvm-svn: 279120

show more ...


Revision tags: llvmorg-3.9.0-rc1
# 9670f847 18-Jul-2016 Mehdi Amini <mehdi.amini@apple.com>

[NFC] Header cleanup

Summary: Removed unused headers, replaced some headers with forward class declarations

Patch by: Eugene <claprix@yandex.ru>

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

[NFC] Header cleanup

Summary: Removed unused headers, replaced some headers with forward class declarations

Patch by: Eugene <claprix@yandex.ru>

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

llvm-svn: 275882

show more ...


Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1, llvmorg-3.8.0, llvmorg-3.8.0-rc3, llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1, llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1
# 637d1e66 20-Oct-2015 Angel Garcia Gomez <angelgarcia@google.com>

Roll-back r250822.

Summary: It breaks the build for the ASTMatchers

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D13893

llvm-svn: 250827


# b5250d34 20-Oct-2015 Angel Garcia Gomez <angelgarcia@google.com>

Apply modernize-use-default to clang.

Summary: Replace empty bodies of default constructors and destructors with '= default'.

Reviewers: bkramer, klimek

Subscribers: klimek, alexfh, cfe-commits

D

Apply modernize-use-default to clang.

Summary: Replace empty bodies of default constructors and destructors with '= default'.

Reviewers: bkramer, klimek

Subscribers: klimek, alexfh, cfe-commits

Differential Revision: http://reviews.llvm.org/D13890

llvm-svn: 250822

show more ...


123