[all-commits] [llvm/llvm-project] 419001: [clangd] Add tests covering existing header-guard ...

Sam McCall via All-commits all-commits at lists.llvm.org
Tue Jul 20 05:12:43 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 419001724542d4b0d3423a71f0d42857af6a6227
      https://github.com/llvm/llvm-project/commit/419001724542d4b0d3423a71f0d42857af6a6227
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2021-07-20 (Tue, 20 Jul 2021)

  Changed paths:
    M clang-tools-extra/clangd/unittests/ParsedASTTests.cpp

  Log Message:
  -----------
  [clangd] Add tests covering existing header-guard behavior. NFC

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

Differential Revision: https://reviews.llvm.org/D106201




More information about the All-commits mailing list