mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-10 17:14:10 +00:00
cmSystemTools: Suppress clang-analyzer false positive
`clang-analyzer` cannot see that a moved-from value is re-assigned via an output argument.
This commit is contained in:
@@ -2084,6 +2084,9 @@ std::string cmSystemTools::ToNormalizedPathOnDisk(std::string p)
|
||||
static Resolver<Policies::LogicalPath> const resolver(RealOS);
|
||||
#endif
|
||||
resolver.Resolve(std::move(p), p);
|
||||
#ifdef __clang_analyzer__ /* cplusplus.Move */
|
||||
p.clear();
|
||||
#endif
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user