sammccall added inline comments.
================
Comment at: clangd/include-mapping/gen_std.py:90
+ # Decl may not be for the symbol name we're looking for.
+ if not re.search("\\b%s\\b" % symbol_name, text):
+ continue
----------------
kadircet wrote:
> does this also work with functions? For example floor will be written as:
> ```constexpr ToDuration floor(const duration<Rep, Period>& d);```
> which does not contain floor as a word.
> https://en.cppreference.com/w/cpp/chrono/duration/floor
> which does not contain floor as a word
`\b` matches between a word character and non-word character.
Both ` ` and `(` are non-word characters, so we should be fine?
================
Comment at: clangd/include-mapping/gen_std.py:95
+ if was_decl:
+ current_headers = []
+ was_decl = False
----------------
kadircet wrote:
> why not perform clean-up unconditionally?
This isn't cleanup.
```
header1
header2
declX
```
declX is associated with header1 and header2
```
header1
declY
header2
declX
```
declX is associated with header2 only. We reset current_headers when we see
header2 because it was preceded by a decl. I'll add a comment.
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61316/new/
https://reviews.llvm.org/D61316
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits