[clang] 7042417 - [NFC][clang] Bring `and_present` and `if_present` casting functions to clang namespace

Nathan James via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 8 00:39:04 PDT 2022


Author: Nathan James
Date: 2022-08-08T08:38:50+01:00
New Revision: 7042417ef11ce34300908c53ee9659bf8f2ab9ec

URL: https://github.com/llvm/llvm-project/commit/7042417ef11ce34300908c53ee9659bf8f2ab9ec
DIFF: https://github.com/llvm/llvm-project/commit/7042417ef11ce34300908c53ee9659bf8f2ab9ec.diff

LOG: [NFC][clang] Bring `and_present` and `if_present` casting functions to clang namespace

This should enable simpler migration when the `and_nonnull` and `or_null` functions are deprecated.

Added: 
    

Modified: 
    clang/include/clang/Basic/LLVM.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/LLVM.h b/clang/include/clang/Basic/LLVM.h
index 4ac2d744af3c3..955299504ece7 100644
--- a/clang/include/clang/Basic/LLVM.h
+++ b/clang/include/clang/Basic/LLVM.h
@@ -58,10 +58,13 @@ namespace clang {
   // Casting operators.
   using llvm::isa;
   using llvm::isa_and_nonnull;
+  using llvm::isa_and_present;
   using llvm::cast;
   using llvm::dyn_cast;
   using llvm::dyn_cast_or_null;
+  using llvm::dyn_cast_if_present;
   using llvm::cast_or_null;
+  using llvm::cast_if_present;
 
   // ADT's.
   using llvm::ArrayRef;


        


More information about the cfe-commits mailing list