[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

Aleksandr Platonov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 2 14:55:34 PDT 2021


ArcsinX added a comment.

In D107304#2920960 <https://reviews.llvm.org/D107304#2920960>, @joerg wrote:

> What do you mean with "GCC macros are correct"?

Imagine that we have a project and we build it with GCC, we have `compile_commands.json` file which  contains all compile command used to build this project.
Now we are trying to use clangd for this project, but as it turns, `__GNUC__` is equal to 4, but we expect it to be equal to compiler version which was used during the build.

> Clang is *not* GCC

We are talking about clangd -- tool, which provides IDE features, I expect it to be compatible (as much as possible) with a project which was built with GCC


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107304/new/

https://reviews.llvm.org/D107304



More information about the cfe-commits mailing list