[clang-format] throws an incorrect assertion in consumeToken() formatting the MSVC stl
authorPaul Hoad <mydeveloperday@gmail.com>
Thu, 10 Oct 2019 17:54:47 +0000 (17:54 +0000)
committerPaul Hoad <mydeveloperday@gmail.com>
Thu, 10 Oct 2019 17:54:47 +0000 (17:54 +0000)
commit3b4c8f6807123c5e4d5a84f560599c9585ccb471
tree48a2790cc93f63e86db6e2e231a9f26ed2b7e8fe
parent4c145df6a7fbf643dc9483c2945aae44e58f5920
[clang-format] throws an incorrect assertion in consumeToken() formatting the MSVC stl

Summary:
An incorrect assertion is thrown when clang-formatting MSVC's STL library

```
Assertion failed: !Line.startsWith(tok::hash), file C:/llvm/llvm-project/clang/lib/Format/TokenAnnotator.cpp, line 847
Stack dump:
0.      Program arguments: C:\llvm\build\bin\clang-format.exe -i -n ./stl/inc/xkeycheck.h
```

```
Enable warning C4005 to find the forbidden define.
```

Reviewers: mitchell-stellar, STL_MSFT, klimek, krasimir

Reviewed By: mitchell-stellar

Subscribers: cfe-commits

Tags: #clang-format, #clang-tools-extra, #clang

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

llvm-svn: 374399
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTest.cpp