Flags with spaces in them are not parsed correctly
See original GitHub issueWhat happens:
ECC seems to ignore the -include
argument in .clang_complete
file, while it takes care of other arguments, like -I
, properly. I created a minimal test case to help you diagnose the issue:
test.zip
One should build this example via something like:
clang -include types.h -Iinclude code.c
- include directory contains header files (e.g. other.h)
- types.h is supposed to be automatically prepended to every compiled source by the preprocessor
- sample.h is a local include with a struct definition
- code.c is the code sample using the definitions from all the three
ECC does see MYINT
from other.h, has no issues with struct S
from sample.h, yet it fails with BOOLEAN
, which is supposed to be automatically included from types.h:
This issue affects me most when working with EDK2, which relies heavily on being able to include Base.h with UEFI type definitions.
Thanks
System info:
- Sublime Text version: 3.1.1 (3176)
- Which system are you on: macOS 10.13
- Clang version: Apple LLVM version 10.0.0 (clang-1000.11.45.5)
User settings:
{
"common_flags" : [
"-I/usr/include",
"-I$project_base_path/src",
"-I$project_base_path/include",
// this is needed to include the correct headers for clang
"-I/usr/lib/clang/$clang_version/include",
],
"lang_flags": {
"C": ["-std=c11"],
"CPP": ["-std=c++14"],
"OBJECTIVE_C": ["-std=c11"],
"OBJECTIVE_CPP": ["-std=c++14"],
}
}
<bountysource-plugin>
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>
Issue Analytics
- State:
- Created 5 years ago
- Comments:31 (12 by maintainers)
Top Results From Across the Web
Use a space in a flag value in a Golang directive
The arguments to go run are parsed by your shell. The go:generate directive does its own parsing and that parsing is different from...
Read more >How to pass argument with spaces to a shell script function?
Closed 8 years ago. I'm trying to pass multiple argument to a function, but one of them is consist of two words and...
Read more >How To Use the Flag Package in Go - DigitalOcean
The parsing phase is handled by the Parse() function. ... If no flag is provided, the message will be printed without any color....
Read more >Command line argument parsing in Rust using Clap
Issues with the arguments and flags ... We can fix this by checking that the file_name is not empty on line 27 above,...
Read more >Dockerfile reference - Docker Documentation
However, convention is for them to be UPPERCASE to distinguish them from arguments ... Leading whitespace is not preserved in these cases, and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Should be fixed now.
Sorry about that. I did not have time recently and the stale bot has closed the issue.