MaskRay / ccls

C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting
Apache License 2.0
3.73k stars 255 forks source link

Ability to suppress errors about unimplemented features #822

Open dk949 opened 3 years ago

dk949 commented 3 years ago

Observed behavior

Use of std::source_location (and presumably any other feature not yet implemented in clang) is flagged as an error.

Expected behavior

Use of these features is not flagged as an error.

Steps to reproduce

  1. Create a minimal application that uses a feature clang has not implemeted yet
    
    #include <source_location>
    #include <iostream>

int main(){ std::cout << std::source_location::current().function_name();

}

2. Make sure it compiles with gcc
```sh
g++ test.cpp -std=c++20
  1. run ccls on it (see minimal compile_commands.json below)
    [
    {
    "directory": ".",
    "command": "/usr/bin/c++ -std=gnu++20 -o test test.cpp",
    "file": "test.cpp"
    }
    ]

System information


I did try it with --gcc-toolchain=/usr (and various other directories) but that didn't work either.
Thanks in advance.