Summary: | path completion does not escape special characters | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Barade <barade.barade> |
Component: | Build tools: CMake | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ajoshi6, alexander |
Priority: | LO | Keywords: | junior-jobs |
Version: | 4.5.2 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://cgit.kde.org/kdevelop.git/commit/?id=db14d0e4989e790b341a88ebc3f8c28896cc58ea | Version Fixed In: | 5.1.2 |
Description
Barade
2014-08-11 13:54:52 UTC
please check whether this has been fixed in the latest versions of Kdevelop. @Barade: Which compiler supports this? Citing https://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html: "However, if backslashes occur within file, they are considered ordinary text characters, not escape characters. None of the character escape sequences appropriate to string constants in C are processed. Thus, #include "x\n\\y" specifies a filename containing three backslashes. (Some systems interpret ‘\’ as a pathname separator. All of these also interpret ‘/’ the same way. It is most portable to use only ‘/’.)" Considering this invalid. Did you even read that it is about the CMake completion tool and not about C++? Cough, no. Sorry, I was in C++ mode here :) Reproduced the problem in a CMakeLists.txt. MWE: Create a file foo(.cpp. Then in the accompanying CMakeLists.txt file: set(FOO foo<CURSOR> ) => Will insert foo(.cpp. => CMake reports: Parse error. Function missing ending ")". End of file reached. Hint: Have a look at CMakeCodeCompletionModel::completionInvoked in kdevelop.git Git commit db14d0e4989e790b341a88ebc3f8c28896cc58ea by Kevin Funk, on behalf of Geetam Chawla. Committed on 13/07/2017 at 19:56. Pushed by kfunk into branch '5.1'. CMake code completion: Add missing chars to be escaped Summary: List of chars to be escaped is taken from: https://cmake.org/Wiki/CMake/Language_Syntax > To use literally any of "()#$^, escape the character with a backslash Test Plan: created a file foo"()#$^.cpp, the chars are escaped properly. Reviewers: #kdevelop, kfunk Reviewed By: #kdevelop, kfunk Subscribers: kdevelop-devel Differential Revision: https://phabricator.kde.org/D6689 M +4 -3 projectmanagers/cmake/cmakecodecompletionmodel.cpp https://commits.kde.org/kdevelop/db14d0e4989e790b341a88ebc3f8c28896cc58ea |