[PATCH] D70357: [clangd] Untangle Hover from XRefs, move into own file.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 18 02:46:57 PST 2019
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/Hover.cpp:374
+ } else {
+ auto Offset = positionToOffset(SM.getBufferData(SM.getMainFileID()), Pos);
+ if (!Offset) {
----------------
nit: `SM.getFileOffset(SourceLocationBeg)` ?
================
Comment at: clang-tools-extra/clangd/Hover.cpp:374
+ } else {
+ auto Offset = positionToOffset(SM.getBufferData(SM.getMainFileID()), Pos);
+ if (!Offset) {
----------------
kadircet wrote:
> nit: `SM.getFileOffset(SourceLocationBeg)` ?
why not just expose getDeclAtPosition in `AST.h` ?
================
Comment at: clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp:80
// if we can't resolve the type, return an error message
- if (DeducedType == llvm::None || DeducedType->isNull()) {
+ if (DeducedType == llvm::None) {
return createErrorMessage("Could not deduce type for 'auto' type", Inputs);
----------------
nit: while there, maybe get rid of braces as well?
================
Comment at: clang-tools-extra/clangd/unittests/ASTTests.cpp:13
+#include "TestTU.h"
+
+#include "clang/Basic/SourceManager.h"
----------------
unintended newline ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70357/new/
https://reviews.llvm.org/D70357
More information about the cfe-commits
mailing list