[PATCH] D106201: [clangd] Add tests covering existing header-guard behavior. NFC

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 16 17:10:31 PDT 2021


sammccall created this revision.
sammccall added a reviewer: kadircet.
Herald added subscribers: usaxena95, arphaman.
sammccall requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.

A few different mechanisms here that will need some work to untangle:

- self-include in a preamble being an error even if the file is ifdef-guarded
- the is-include-guarded flag not being propagated from preamble to main ast
- preambles containing the first half on an include guard discard that info

For now just record current behavior.

Relevant to:

- https://github.com/clangd/clangd/issues/811
- https://github.com/clangd/clangd/issues/377
- https://github.com/clangd/clangd/issues/262


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106201

Files:
  clang-tools-extra/clangd/unittests/ParsedASTTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106201.359493.patch
Type: text/x-patch
Size: 6259 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210717/21d9e62f/attachment-0001.bin>


More information about the cfe-commits mailing list