llvm-project/clang/lib/Parse
Joe Loser 1b3a78d1d5 [clang] Use std::size instead of llvm::array_lengthof
LLVM contains a helpful function for getting the size of a C-style
array: `llvm::array_lengthof`. This is useful prior to C++17, but not as
helpful for C++17 or later: `std::size` already has support for C-style
arrays.

Change call sites to use `std::size` instead. Leave the few call sites that
use a locally defined `array_lengthof` that are meant to test previous bugs
with NTTPs in clang analyzer and SemaTemplate.

Differential Revision: https://reviews.llvm.org/D133520
2022-09-08 17:20:25 -06:00
..
CMakeLists.txt [HLSL] Add Semantic syntax, and SV_GroupIndex 2022-04-14 10:21:58 -05:00
ParseAST.cpp re-land [C++20][Modules] Build module static initializers per P1874R1. 2022-07-22 08:38:07 +01:00
ParseCXXInlineMethods.cpp [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00
ParseDecl.cpp [clang] Use std::size instead of llvm::array_lengthof 2022-09-08 17:20:25 -06:00
ParseDeclCXX.cpp Diagnosing the Future Keywords 2022-08-26 09:20:05 -04:00
ParseExpr.cpp [clang] adds unary type transformations as compiler built-ins 2022-08-22 03:03:32 +00:00
ParseExprCXX.cpp [NFC][clang] LLVM_FALLTHROUGH => [[fallthrough]] 2022-09-01 09:19:00 +00:00
ParseHLSL.cpp [HLSL] Add Semantic syntax, and SV_GroupIndex 2022-04-14 10:21:58 -05:00
ParseInit.cpp [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00
ParseObjc.cpp [clang] Reject non-declaration C++11 attributes on declarations 2022-06-15 11:58:26 +02:00
ParseOpenMP.cpp [OpenMP][NFC] Use OMPInteropInfo in the OMPDeclareVariantAttr attribute 2022-08-22 10:41:16 -07:00
ParsePragma.cpp [RISCV] Lazily add RVV C intrinsics. 2022-07-26 15:47:47 +08:00
ParseStmt.cpp [NFC][clang] LLVM_FALLTHROUGH => [[fallthrough] 2022-09-03 08:58:31 +08:00
ParseStmtAsm.cpp [clang] Fix bugprone argument comments (NFC) 2022-01-09 00:19:49 -08:00
ParseTemplate.cpp [clang] Add cxx scope if needed for requires clause. 2022-08-26 10:15:54 +02:00
ParseTentative.cpp [clang] adds unary type transformations as compiler built-ins 2022-08-22 03:03:32 +00:00
Parser.cpp [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00