[all-commits] [llvm/llvm-project] 5bc13f: [clang-tidy] ProBoundsConstantArrayIndexCheck::che...
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Sat Feb 12 02:48:37 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5bc13f9d9471adc81c8bf2b62775b6e2fd72f8e6
https://github.com/llvm/llvm-project/commit/5bc13f9d9471adc81c8bf2b62775b6e2fd72f8e6
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2022-02-12 (Sat, 12 Feb 2022)
Changed paths:
M clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp
Log Message:
-----------
[clang-tidy] ProBoundsConstantArrayIndexCheck::check - use cast<> instead of dyn_cast<> to avoid dereference of nullptr
The pointer is referenced immediately, so assert the cast is correct instead of returning nullptr
More information about the All-commits
mailing list