[PATCH] D70235: [clangd] Add isHeaderFile helper.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 15 06:22:22 PST 2019
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang-tools-extra/clangd/SourceCode.cpp:1133
+ Lang != types::TY_INVALID && types::onlyPrecompileType(Lang);
+ if (!LangOpts)
+ return IsHeaderFromExtension;
----------------
This structure seems confusing.
Why not at the top:
```
if (LangOpts && LangOpts->IsHeaderFile)
return true;
```
and then do the extension check and return the result?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70235/new/
https://reviews.llvm.org/D70235
More information about the cfe-commits
mailing list