https://bugs.kde.org/show_bug.cgi?id=371565

--- Comment #4 from Bernhard Scheirle <bernhard+...@scheirle.de> ---
KDevelop: 5.0.4 from KDE Neon
Clang: 3.8.0

After importing the project KDevelop found the header file with no
errors/warnings.
But then after pruning the project the header file can't be found anymore.

After importing the project:

compile_commands.json:
[
{
  "directory": "/path with spaces/build",
  "command": "/usr/bin/c++    -I. -I../  -g   -o
CMakeFiles/space.dir/main.cpp.o -c \"/path with spaces/main.cpp\"",
  "file": "/path with spaces/main.cpp"
},

{
  "directory": "/path with spaces/build",
  "command": "/usr/bin/c++    -I. -I../  -g   -o
CMakeFiles/space.dir/folder/header.cpp.o -c \"/path with
spaces/folder/header.cpp\"",
  "file": "/path with spaces/folder/header.cpp"
}
]

Log:
Invocation: clang -ferror-limit=100 -fspell-checking -Wdocumentation
-Wunused-parameter -Wunreachable-code -Wall -std=c++11 -nostdinc -nostdinc++
-xc++ -isystem/usr/include/c++/5 -isystem/usr/include/x86_64-linux-gnu/c++/5
-isystem/usr/include/c++/5/backward -isystem/usr/local/include
-isystem/usr/lib/llvm-3.8/lib/clang/3.8.0/include
-isystem/usr/include/x86_64-linux-gnu -isystem/usr/include -I/path with
spaces/build -I/path with spaces -imacros /tmp/kdevelop.XM8558 /path with
spaces/folder/header.cpp


Every (especially quoting) looks right.

Now prune the project (Project->Prune Selection) and reload header.cpp (Hit
F5):

compile_commands.json:
[
{
  "directory": "/path with spaces/build",
  "command": "/usr/bin/c++    -I\"/path with spaces/build\" -I\"/path with
spaces\"  -g   -o CMakeFiles/space.dir/main.cpp.o -c \"/path with
spaces/main.cpp\"",
  "file": "/path with spaces/main.cpp"
},
{
  "directory": "/path with spaces/build",
  "command": "/usr/bin/c++    -I\"/path with spaces/build\" -I\"/path with
spaces\"  -g   -o CMakeFiles/space.dir/folder/header.cpp.o -c \"/path with
spaces/folder/header.cpp\"",
  "file": "/path with spaces/folder/header.cpp"
}
]

Log:
Invocation: clang -ferror-limit=100 -fspell-checking -Wdocumentation
-Wunused-parameter -Wunreachable-code -Wall -std=c++11 -nostdinc -nostdinc++
-xc++ -isystem/usr/include/c++/5 -isystem/usr/include/x86_64-linux-gnu/c++/5
-isystem/usr/include/c++/5/backward -isystem/usr/local/include
-isystem/usr/lib/llvm-3.8/lib/clang/3.8.0/include
-isystem/usr/include/x86_64-linux-gnu -isystem/usr/include -I/path with
spaces/build" -I"/path with spaces -imacros /tmp/kdevelop.UJ9631 /path with
spaces/folder/header.cpp


Note:
* compile_commands.json uses absolute paths after pruning the project for the
build and project root directory.
* After pruning the quoting is wrong (build" -I"/path)
* The KDevelop-5.0.4-x86_64.AppImage behaves exactly the same.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to