[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#979577: qtcreator: Clang Code Model no longer finds 'stddef.h' since version 4.14.0-2



I'm also experiencing this problem.

On Fri, 08 Jan 2021 16:52:02 +0100 Michael Weghorn <m.weghorn@posteo.de> wrote:
> Package: qtcreator
> Version: 4.14.0-2
> Severity: normal
> X-Debbugs-Cc: m.weghorn@posteo.de
>
> Dear Maintainer,
>
> since version 4.14.0-2, Qt Creator's Clang Code Model is unable to find the
> 'stddef.h' header. It still works OK with version 4.14.0-1.
>
> Sample steps to reproduce:
>
> * create a simple C++ project with a source file that
>   (directly or indirectly) includes 'stddef.h',
>   e.g. via "File" -> "New File or Project" -> "Plain C++ Application"
>   (or use files from sample project at the end)
> * open the source file 'main.cpp'
> * if not present yet, add an '#include <iostream>' or '#include stddef.h'
>
> Result:
>
> A warning shows up:
>
> > Warning: The code model could not parse an included file, which might lead to
> incorrect code completion and highlighting, for example.
> >
> > wchar.h:35:10: error: 'stddef.h' file not found
> > [...]
>
> and the Code Model does not work properly.
>
> It works again as expected when downgrading to qtcreator 4.14.0-1.
>
>
> Files for sample project to reproduce the issue:
>
> main.cpp:
>
>         #include <iostream>
>
>         using namespace std;
>
>         int main()
>         {
>             cout << "Hello World!" << endl;
>             return 0;
>         }
>
> CMakeLists.txt:
>
>         cmake_minimum_required(VERSION 3.5)
>
>         project(testp-project LANGUAGES CXX)
>
>         set(CMAKE_CXX_STANDARD 11)
>         set(CMAKE_CXX_STANDARD_REQUIRED ON)
>
>         add_executable(testp-project main.cpp)
>
>


Reply to: