SureYeaah added inline comments.

================
Comment at: clang-tools-extra/clangd/unittests/SourceCodeTests.cpp:410
+// Test for functions toHalfOpenFileRange and getHalfOpenFileRange
+// FIXME: Need better testing support to be able to check more than just Decls.
+TEST(SourceCodeTests, HalfOpenFileRange) {
----------------
sammccall wrote:
> this is a function on ranges, so only using decls isn't a limitation per se.
> 
> Is there a type of range you're unable to test because you can't construct it 
> as the source range of a decl? If so, please say which. If not I think we 
> should just drop this comment.
e.g. Nested template instantiation (TemplateSpecializationTypeLoc)


================
Comment at: clang-tools-extra/clangd/unittests/SourceCodeTests.cpp:421
+      $c[[FOO(b, c)]]; 
+      $d[[FOO(BAR(BAR(b)), d)]];
+    }
----------------
sammccall wrote:
> some tests where the expansion range is a macro arg? e.g.
> ```
> #define ECHO(X) X
> ECHO($e[[ECHO(int) ECHO(e)]])
> ```
> 
> (if I'm understanding right)
In this case, the FileRange would be

```
ECHO(ECHO($e[[int) ECHO(e]]));
```

So the code works correctly. But it's not how we want it to behave right?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64562/new/

https://reviews.llvm.org/D64562



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to