Closed Bug 1625003 Opened 5 years ago Closed 5 years ago

clang-plugin build failure with clang trunk, converting StringRef to std::string

Categories

(Developer Infrastructure :: Source Code Analysis, task, P2)

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1646158

People

(Reporter: away, Unassigned)

References

(Blocks 1 open bug)

Details

0:05.62 /home/vm/src/mc/build/clang-plugin/Utils.h:153:10: error: no viable conversion from returned value of type 'const llvm::StringRef' to function return type 'std::string' (aka 'basic_string<char>')
 0:05.62   return Name;
 0:05.62          ^~~~

After https://github.com/llvm/llvm-project/commit/777180a32b61070a10dd330b4f038bf24e916af1 we'll need to explicitly write std::string(Name).

Here's another one (there may be more still):

 0:05.71 /home/vm/src/mc/build/clang-plugin/CanRunScriptChecker.cpp:361:23: error: no viable conversion from 'llvm::StringRef' to 'const std::string' (aka 'const basic_string<char>')
 0:05.71     const std::string invalidArgText = Lexer::getSourceText(
 0:05.72                       ^                ~~~~~~~~~~~~~~~~~~~~~
Type: defect → task
Priority: -- → P3
Priority: P3 → P2
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.