[all-commits] [llvm/llvm-project] 2767f4: [Lex] Migrate away from PointerUnion::dyn_cast (NF...
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Sun Feb 2 09:31:45 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2767f4bf0d5a70aa990dbfb3341a1bc03effcdbd
https://github.com/llvm/llvm-project/commit/2767f4bf0d5a70aa990dbfb3341a1bc03effcdbd
Author: Kazu Hirata <kazu at google.com>
Date: 2025-02-02 (Sun, 02 Feb 2025)
Changed paths:
M clang/include/clang/Lex/Preprocessor.h
Log Message:
-----------
[Lex] Migrate away from PointerUnion::dyn_cast (NFC) (#125380)
Note that PointerUnion::dyn_cast has been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
// isa<T>, cast<T> and the llvm::dyn_cast<T>
This patch migrates the use of PointerUnion::dyn_cast to
dyn_cast_if_present because State is not guaranteed to be nonnull
elsewhere in this class. See:
commit 563c7c5539f05e7f8cbb42565c1f24466019f38b
Author: Kazu Hirata <kazu at google.com>
Date: Sat Jan 25 14:05:01 2025 -0800
FWIW, I am not aware of any test case in check-clang that triggers
null here.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list