Change "odd flag" criteria on preprocessor command flags (#57)
The assert on libclang/preprocessor.cpp:263 fails with common flags such as "-g", because the assertion says valid flags must have at least three characters. I've changed that condition to accept two char flags like -g
This commit is contained in:
parent
e0e78c0a3e
commit
c341ae01f1
1 changed files with 2 additions and 2 deletions
|
|
@ -226,8 +226,8 @@ namespace
|
|||
// other flags
|
||||
for (const auto& flag : detail::libclang_compile_config_access::flags(c))
|
||||
{
|
||||
DEBUG_ASSERT(flag.size() > 2u && flag[0] == '-', detail::assert_handler{},
|
||||
"that's an odd flag");
|
||||
DEBUG_ASSERT(flag.size() >= 2u && flag[0] == '-', detail::assert_handler{},
|
||||
("\"" + flag + "\" that's an odd flag").c_str());
|
||||
if (!macro_file_path || flag[1] != 'I')
|
||||
{
|
||||
// only add this flag if it is not an include or we're not doing fast preprocessing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue