Parse feature flags in compilation database
This commit is contained in:
parent
c6aae718bd
commit
336a00946d
2 changed files with 4 additions and 4 deletions
|
|
@ -237,7 +237,7 @@ libclang_compile_config::libclang_compile_config(const libclang_compilation_data
|
|||
else if (flag == "-std")
|
||||
// standard
|
||||
add_flag(std::move(flag) + "=" + std::move(args));
|
||||
else if (flag == "-f" && (args == "ms-compatibility" || args == "ms-extensions"))
|
||||
else if (flag == "-f")
|
||||
// other options
|
||||
add_flag(std::move(flag) + std::move(args));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ TEST_CASE("libclang_compile_config")
|
|||
},
|
||||
{
|
||||
"directory": "",
|
||||
"command": "/usr/bin/clang++ -std=c++14 -fms-extensions -fms-compatibility -c -o c.o c.cpp",
|
||||
"command": "/usr/bin/clang++ -std=c++14 -fms-extensions -fms-compatibility -fno-strict-aliasing -c -o c.o c.cpp",
|
||||
"file": "C:/c.cpp",
|
||||
}
|
||||
])";
|
||||
|
|
@ -84,7 +84,7 @@ TEST_CASE("libclang_compile_config")
|
|||
},
|
||||
{
|
||||
"directory": "",
|
||||
"command": "/usr/bin/clang++ -std=c++14 -fms-extensions -fms-compatibility -c -o c.o c.cpp",
|
||||
"command": "/usr/bin/clang++ -std=c++14 -fms-extensions -fms-compatibility -fno-strict-aliasing -c -o c.o c.cpp",
|
||||
"file": "/c.cpp",
|
||||
}
|
||||
])";
|
||||
|
|
@ -104,5 +104,5 @@ TEST_CASE("libclang_compile_config")
|
|||
"/absolute -DB(X)=X");
|
||||
|
||||
libclang_compile_config c(database, CPPAST_DETAIL_DRIVE "/c.cpp");
|
||||
require_flags(c, "-std=c++14 -fms-extensions -fms-compatibility");
|
||||
require_flags(c, "-std=c++14 -fms-extensions -fms-compatibility -fno-strict-aliasing");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue