Skip to content

clangd: include -std=c++98 in compile_commands.json#760

Open
SquareMan wants to merge 1 commit into
mainfrom
clangd-fix
Open

clangd: include -std=c++98 in compile_commands.json#760
SquareMan wants to merge 1 commit into
mainfrom
clangd-fix

Conversation

@SquareMan

Copy link
Copy Markdown
Member

DTK parses the gc compiler c flags to convert them to equivalent clang flags for the purposes of generating a compile_commands.json file. However, it only recognized language flags if they're lowercase.

bfbb/tools/project.py

Lines 1628 to 1636 in 7ea69ef

# Language configuration
(
"-lang",
{
"c": ("--language=c", "--std=c99"),
"c99": ("--language=c", "--std=c99"),
"c++": ("--language=c++", "--std=c++98"),
"cplus": ("--language=c++", "--std=c++98"),
},

This lowercases our -lang=c++ flag so that clangd will use the correct c++ version while analyzing the codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant