HomePhabricator

[clangd] Add tweak to convert normal to raw string literal, when it contains…

Description

[clangd] Add tweak to convert normal to raw string literal, when it contains escapes.

Reviewers: ilya-biryukov

Subscribers: mgorny, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62151

Event Timeline

anil9 added a subscriber: anil9.May 22 2019, 5:30 PM

Hello, your patch seems to be causing a failure in the following buildbot.

http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage?numbuilds=100

It seems the error was hidden by other errors.

Looking inside http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage/builds/9905. we see:

FAILED: lib/libclangDaemonTweaks.so.9svn
: && /home/fedora/gcc/install/gcc-7.1.0/bin/g++ -fPIC -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O2 -L/home/fedora/gcc/install/gcc-7.1.0/lib64 -Wl,-z,defs -Wl,-z,nodelete -Wl,-rpath-link,/home/buildbots/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/./lib -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname,libclangDaemonTweaks.so.9svn -o lib/libclangDaemonTweaks.so.9svn tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/RawStringLiteral.cpp.o tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/SwapIfBranches.cpp.o lib/libclangAST.so.9svn lib/libclangDaemon.so.9svn lib/libclangToolingCore.so.9svn lib/libLLVMSupport.so.9svn -Wl,-rpath,"\$ORIGIN/../lib" && :
tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/RawStringLiteral.cpp.o: In function `clang::clangd::(anonymous namespace)::RawStringLiteral::prepare(clang::clangd::Tweak::Selection const&)':
RawStringLiteral.cpp:(.text._ZN5clang6clangd12_GLOBALN_116RawStringLiteral7prepareERKNS0_5Tweak9SelectionE+0xec): undefined reference to `clang::SourceManager::getCharacterData(clang::SourceLocation, bool*) const'
RawStringLiteral.cpp:(.text._ZN5clang6clangd12_GLOBAL
N_116RawStringLiteral7prepareERKNS0_5Tweak9SelectionE+0x2a0): undefined reference to `clang::SourceManager::isBeforeInTranslationUnit(clang::SourceLocation, clang::SourceLocation) const'
collect2: error: ld returned 1 exit status