[PATCH] D44294: [clangd] Fix diagnostic errors in the test code, NFC.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 9 02:12:49 PST 2018

hokein created this revision.
hokein added a reviewer: ilya-biryukov.
Herald added subscribers: ioeric, jkorous-apple, klimek.

  rCTE Clang Tools Extra



Index: unittests/clangd/XRefsTests.cpp
--- unittests/clangd/XRefsTests.cpp
+++ unittests/clangd/XRefsTests.cpp
@@ -584,7 +584,11 @@
   auto FooH = testPath("foo.h");
   auto FooHUri = URIForFile{FooH};
-  const char *HeaderContents = R"cpp([[]]int a;)cpp";
+  const char *HeaderContents = R"cpp([[]]#ifndef TEST_H_
+                                     #define TEST_H_
+                                     int a;
+                                     #endif
+                                     )cpp";
   Annotations HeaderAnnotations(HeaderContents);
   FS.Files[FooH] = HeaderAnnotations.code();

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44294.137709.patch
Type: text/x-patch
Size: 672 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180309/0bbc8693/attachment-0001.bin>

More information about the cfe-commits mailing list