Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

How to add flags to the clang? #23

Open
DKarampistis opened this issue Nov 17, 2020 · 1 comment
Open

How to add flags to the clang? #23

DKarampistis opened this issue Nov 17, 2020 · 1 comment

Comments

@DKarampistis
Copy link

I am trying to add the -std=c++17 flag to the clang command. Adding the option in the main.js like this:
const args = ["-std=c++17"]
Make the the plugin not to work. Diagnoses show no errors any more no matter what the error is even when the syntax is wrong. Pressing ctrl will no longer allow me to find the reference of the highlighted word. Atom's developer console show no errors. Running the command clang -std=c++17 *.cpp in the project folder works like a charm.

OS: Fedora 33
Atom: 1.53.0
Electron: 6.1.12
Chrome: 76.0.3809.146
Node: 12.4.0
Clang: 11.0.0

@ell1e
Copy link

ell1e commented Jan 14, 2021

You probably want to try a compile_flags.txt file: https://clang.llvm.org/docs/JSONCompilationDatabase.html#alternatives (not specific to this Atom plugin)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants