[all-commits] [llvm/llvm-project] 775ca3: [clang-tidy] Fix a crash for raw-string-literal ch...
Haojian Wu via All-commits
all-commits at lists.llvm.org
Thu May 20 00:17:23 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 775ca3a89cba104d7c0dc762a0c5c5624c1d397c
https://github.com/llvm/llvm-project/commit/775ca3a89cba104d7c0dc762a0c5c5624c1d397c
Author: Haojian Wu <hokein.wu at gmail.com>
Date: 2021-05-20 (Thu, 20 May 2021)
Changed paths:
M clang-tools-extra/clang-tidy/modernize/RawStringLiteralCheck.cpp
Log Message:
-----------
[clang-tidy] Fix a crash for raw-string-literal check.
getSourceText could return an empty string for error cases (e.g. invalid
source locaiton), this patch makes the code more robust.
The crash did happen in our internal codebase, but unfortunately I
didn't manage to get a reproduce case. One thing I can confirm from
the core dump is that the crash is caused by calling isRawStringLiteral
on an empty Text.
Differential Revision: https://reviews.llvm.org/D102770
More information about the All-commits
mailing list