title: clang_parseTranslationUnit crash while using llvm clang for ctags
body: <p>i am think about generating seastar's ctags by libclang,
  so, i had write some demos which crash and i need help.</p>
  
  <p>for seastar project, i got it from 
  <a href="https://github.com/scylladb/seastar" rel="nofollow noreferrer">https://github.com/scylladb/seastar</a></p>
  
  <p>seastar setup: install-dependencies.sh; cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1
  (gerentating then compile_commands.json)</p>
  
  <p>for clang-ctags, i got from <a href="https://github.com/ginoblue/clang-tags" rel="nofollow noreferrer">https://github.com/ginoblue/clang-tags</a> (it's my current demo)
  firstly: yum install clang-libs clang-devel
  just: make</p>
  
  <p>then finally run the demo:
  /bin/clang-tags -d . -s chfiles //currently chfiles is ignored, '-d' it's the compile_commands.json's dir</p>
  
  <pre><code>Starting program: /usr/bin/clang-tags -d . -s chfiles
  Missing separate debuginfos, use: dnf debuginfo-install glibc-2.30-5.fc31.x86_64
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library "/lib64/libthread_db.so.1".
  db_path: .
  src_files_list_file: chfiles
  parse: (null)
  [New Thread 0x7fffef179700 (LWP 1885)]
  
  Thread 2 "clang-tags" received signal SIGSEGV, Segmentation fault.
  [Switching to Thread 0x7fffef179700 (LWP 1885)]
  0x00007ffff6814200 in clang::NestedNameSpecifier::getKind() const () from /lib64/libclangAST.so.9
  Missing separate debuginfos, use: dnf debuginfo-install clang-libs-9.0.1-2.fc31.x86_64 libedit-3.1-30.20191211cvs.fc31.x86_64 libffi-3.1-23.fc31.x86_64 libgcc-9.2.1-1.fc31.x86_64 libstdc++-9.2.1-1.fc31.x86_64 llvm-libs-9.0.1-5.fc31.x86_64 ncurses-libs-6.1-12.20190803.fc31.x86_64 zlib-1.2.11-19.fc31.x86_64
  (gdb) c
  Continuing.
  libclang: crash detected during parsing: {
    'source_filename' : '(null)'
    'command_line_args' : ['clang', '/usr/bin/c++', '--driver-mode=g++', '-DBOOST_TEST_DYN_LINK', '-DFMT_SHARED', '-DSEASTAR_API_LEVEL=2', '-DSEASTAR_DEBUG', '-DSEASTAR_DEBUG_SHARED_PTR', '-DSEASTAR_DEFAULT_ALLOCATOR', '-DSEASTAR_HAS_MEMBARRIER', '-DSEASTAR_HAVE_ASAN_FIBER_SUPPORT', '-DSEASTAR_HAVE_GCC6_CONCEPTS', '-DSEASTAR_HAVE_HWLOC', '-DSEASTAR_HAVE_LZ4_COMPRESS_DEFAULT', '-DSEASTAR_HAVE_NUMA', '-DSEASTAR_SHUFFLE_TASK_QUEUE', '-DSEASTAR_THREAD_STACK_GUARDS', '-DSEASTAR_TYPE_ERASE_MORE', '-I/mnt/hgfs/seastar/include', '-I/mnt/hgfs/seastar/gen/include', '-g', '-fvisibility=hidden', '-UNDEBUG', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-gz', '-std=gnu++17', '-U_FORTIFY_SOURCE'[Thread 0x7fffef179700 (LWP 1885) exited]
  , '-Wno-maybe-uninitialized', '-Wno-error=unused-result', '-fsanitize=address', '-fsanitize=undefined', '-fno-sanitize=vptr', '-fconcepts', '-o', 'CMakeFiles/seastar_testing.dir/src/testing/entry_point.cc.o', '-c', '/mnt/hgfs/seastar/src/testing/entry_point.cc'],
    'unsaved_files' : [],
    'options' : 0,
  }
  clang-tags.c:376 err:1 
  [Inferior 1 (process 1881) exited with code 01]
  bt:
  0x00007ffff6814200 in clang::NestedNameSpecifier::getKind() const () from /lib64/libclangAST.so.9
  (gdb) bt
  #0  0x00007ffff6814200 in clang::NestedNameSpecifier::getKind() const () from /lib64/libclangAST.so.9
  #1  0x00007ffff6b6158d in clang::Sema::ShouldEnterDeclaratorScope(clang::Scope*, clang::CXXScopeSpec const&amp;) () from /lib64/libclangSema.so.9
  #2  0x00007fffefdba1c2 in clang::Parser::ParseDirectDeclarator(clang::Declarator&amp;) () from /lib64/libclangParse.so.9
  #3  0x00007fffefdaaa03 in clang::Parser::ParseDeclaratorInternal(clang::Declarator&amp;, void (clang::Parser::*)(clang::Declarator&amp;)) () from /lib64/libclangParse.so.9
  #4  0x00007fffefdbc22a in clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&amp;, clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*) ()
     from /lib64/libclangParse.so.9
  #5  0x00007fffefe55c02 in clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&amp;, clang::ParsingDeclSpec&amp;, clang::AccessSpecifier) ()
     from /lib64/libclangParse.so.9
  #6  0x00007fffefe561d7 in clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&amp;, clang::ParsingDeclSpec*, clang::AccessSpecifier) ()
     from /lib64/libclangParse.so.9
  ....
  </code></pre>
  
  <p>the problem i had meet while using the python clang(<a href="https://github.com/drothlis/clang-ctags" rel="nofollow noreferrer">https://github.com/drothlis/clang-ctags</a>)
  what can i do??</p>