File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -151,16 +151,10 @@ class SwiftDispatcher {
151
151
// TODO: this needs more testing
152
152
// TODO: check canonicaliztion of names on a case insensitive filesystems
153
153
// TODO: make symlink resolution conditional on CODEQL_PRESERVE_SYMLINKS=true
154
- std::string displayName = sourceManager.getDisplayNameForLoc (loc).str ();
155
- llvm::SmallString<PATH_MAX> filePath (displayName);
156
- if (std::error_code ec = llvm::sys::fs::make_absolute (filePath)) {
157
- std::cerr << " Cannot make absolute path: '" << displayName << " ': " << ec.message () << " \n " ;
158
- return {};
159
- }
154
+ auto displayName = sourceManager.getDisplayNameForLoc (loc);
160
155
llvm::SmallString<PATH_MAX> realPath;
161
- if (std::error_code ec = llvm::sys::fs::real_path (filePath, realPath)) {
162
- std::cerr << " Cannot get real path: '" << filePath.str ().str () << " ': " << ec.message ()
163
- << " \n " ;
156
+ if (std::error_code ec = llvm::sys::fs::real_path (displayName, realPath)) {
157
+ std::cerr << " Cannot get real path: '" << displayName.str () << " ': " << ec.message () << " \n " ;
164
158
return {};
165
159
}
166
160
return realPath.str ().str ();
You can’t perform that action at this time.
0 commit comments