question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flags with spaces in them are not parsed correctly

See original GitHub issue

What 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: 2019-01-16 11 50 08

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:closed
  • Created 5 years ago
  • Comments:31 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
niosuscommented, May 15, 2019

Should be fixed now.

1reaction
niosuscommented, Apr 14, 2019

Sorry about that. I did not have time recently and the stale bot has closed the issue.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found