Remove comments in macro invocations
Just breaks to much.
This commit is contained in:
parent
1b468ea476
commit
b3885bbb68
2 changed files with 9 additions and 12 deletions
|
|
@ -36,9 +36,9 @@ namespace
|
|||
// -x c++: force C++ as input language
|
||||
// -I.: add current working directory to include search path
|
||||
// -E: print preprocessor output
|
||||
// -CC: keep comments, even in macro
|
||||
// -C: keep comments
|
||||
// -dD: print macro definitions as well
|
||||
auto flags = std::string("-x c++ -I. -E -CC -dD");
|
||||
auto flags = std::string("-x c++ -I. -E -C -dD");
|
||||
if (detail::libclang_compile_config_access::clang_version(c) >= 40000)
|
||||
// -Xclang -dI: print include directives as well (clang >= 4.0.0)
|
||||
flags += " -Xclang -dI";
|
||||
|
|
@ -735,7 +735,7 @@ detail::preprocessor_output detail::preprocess(const libclang_compile_config& co
|
|||
{
|
||||
case linemarker::line_directive:
|
||||
break; // ignore
|
||||
// no need to handle it, preprocessed output doesn't need to match line numbers precisely
|
||||
// no need to handle it, preprocessed output doesn't need to match line numbers precisely
|
||||
|
||||
case linemarker::enter_new:
|
||||
if (file_depth == 0u && lm.value().file.front() != '<')
|
||||
|
|
|
|||
|
|
@ -173,23 +173,20 @@ f **/
|
|||
#define g(name) \
|
||||
class name \
|
||||
{ \
|
||||
/** i
|
||||
i */ \
|
||||
void i(); \
|
||||
};
|
||||
|
||||
/// h
|
||||
/// h
|
||||
g(h)
|
||||
|
||||
/// j
|
||||
/// j
|
||||
using j = int;
|
||||
/// i
|
||||
/// i
|
||||
using i = int;
|
||||
|
||||
/// k
|
||||
/// k
|
||||
/// j
|
||||
/// j
|
||||
template <typename T/**/>
|
||||
void k();
|
||||
void j();
|
||||
)";
|
||||
|
||||
auto file = parse({}, "comment-matching.cpp", code);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue