aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
diff options
context:
space:
mode:
authorAleksandr Platonov <platonov.aleksandr@huawei.com>2020-08-10 15:11:25 +0300
committerAleksandr Platonov <platonov.aleksandr@huawei.com>2020-08-10 15:12:03 +0300
commitdcb8d3b72234ea557df2af1141ad30bf1670a03a (patch)
treefb739a531711c77a53f777a69cedf1efeeab1dc8 /llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
parentbebca662d4ff77a69f5f492dc7b14dcc5208840a (diff)
downloadllvm-dcb8d3b72234ea557df2af1141ad30bf1670a03a.zip
llvm-dcb8d3b72234ea557df2af1141ad30bf1670a03a.tar.gz
llvm-dcb8d3b72234ea557df2af1141ad30bf1670a03a.tar.bz2
[clang-tidy] Fix a crash in bugprone-not-null-terminated-result check when `__STDC_WANT_LIB_EXT1__` is not a literal.
If `__STDC_WANT_LIB_EXT1__` is not a literal (e.g. `#define __STDC_WANT_LIB_EXT1__ ((unsigned)1)`) bugprone-not-null-terminated-result check crashes. Stack dump: ``` #0 0x0000000002185e6a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/llvm-project/build/bin/clang-tidy+0x2185e6a) #1 0x0000000002183e8c llvm::sys::RunSignalHandlers() (/llvm-project/build/bin/clang-tidy+0x2183e8c) #2 0x0000000002183ff3 SignalHandler(int) (/llvm-project/build/bin/clang-tidy+0x2183ff3) #3 0x00007f08d91b1390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390) #4 0x00000000021338bb llvm::StringRef::getAsInteger(unsigned int, llvm::APInt&) const (/llvm-project/build/bin/clang-tidy+0x21338bb) #5 0x000000000052051c clang::tidy::bugprone::NotNullTerminatedResultCheck::check(clang::ast_matchers::MatchFinder::MatchResult const&) (/llvm-project/build/bin/clang-tidy+0x52051c) ``` Reviewed By: hokein Differential Revision: https://reviews.llvm.org/D85525
Diffstat (limited to 'llvm/lib/CodeGen/LocalStackSlotAllocation.cpp')
0 files changed, 0 insertions, 0 deletions