[PATCH] D69427: Fix compilation error in clangd/refactor/tweaks/ExpandAutoType.cpp
Pavel Samolysov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 25 03:52:41 PDT 2019
psamolysov created this revision.
psamolysov added projects: clang, clang-tools-extra.
Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov.
During the compilation of the `clangd/refactor/tweaks/ExpandAutoType.cpp`, MSVC returns the following error:
llvm-monorepo\llvm\tools\clang\tools\extra\clangd\refactor\tweaks\ExpandAutoType.cpp(85): error C2146: syntax error: missing ')' before identifier 'and'
llvm-monorepo\llvm\tools\clang\tools\extra\clangd\refactor\tweaks\ExpandAutoType.cpp(85): error C2065: 'and': undeclared identifier
llvm-monorepo\llvm\tools\clang\tools\extra\clangd\refactor\tweaks\ExpandAutoType.cpp(86): error C2143: syntax error: missing ';' before '<template-id>'
llvm-monorepo\llvm\tools\clang\tools\extra\clangd\refactor\tweaks\ExpandAutoType.cpp(73): fatal error C1075: '{': no matching token found
So, && must be used instead of `and`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D69427
Files:
clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp
Index: clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp
===================================================================
--- clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp
+++ clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp
@@ -82,7 +82,7 @@
}
// if it's a lambda expression, return an error message
- if (isa<RecordType>(*DeducedType) and
+ if (isa<RecordType>(*DeducedType) &&
dyn_cast<RecordType>(*DeducedType)->getDecl()->isLambda()) {
return createErrorMessage("Could not expand type of lambda expression",
Inputs);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69427.226402.patch
Type: text/x-patch
Size: 613 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191025/756691e7/attachment.bin>
More information about the cfe-commits
mailing list