[all-commits] [llvm/llvm-project] 0a32d9: [clang-format] Avoid considering include directive...

Marek Kurdej via All-commits all-commits at lists.llvm.org
Fri Jan 29 21:45:58 PST 2021


  Branch: refs/heads/release/12.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 0a32d93bd95b7ad0a4c7f91955c6c815150df84c
      https://github.com/llvm/llvm-project/commit/0a32d93bd95b7ad0a4c7f91955c6c815150df84c
  Author: Marek Kurdej <marek.kurdej at gmail.com>
  Date:   2021-01-29 (Fri, 29 Jan 2021)

  Changed paths:
    M clang/lib/Format/UnwrappedLineFormatter.cpp
    M clang/unittests/Format/FormatTest.cpp

  Log Message:
  -----------
  [clang-format] Avoid considering include directive as a template closer.

This fixes a bug [[ http://llvm.org/PR48891 | PR48891 ]] introduced in D93839 where:
```
#include <stdint.h>
namespace rep {}
```
got formatted as
```
#include <stdint.h>
namespace rep {
}
```

Reviewed By: MyDeveloperDay, leonardchan

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

(cherry picked from commit e3713f156b8cb65a2b74f150afb824ce1e2a2fab)




More information about the All-commits mailing list