/external/llvm-project/clang/test/SemaCXX/ |
D | attr-gsl-owner-pointer.cpp | 4 int [[gsl::Owner]] i; 6 void [[gsl::Owner]] f(); 9 [[gsl::Owner]] void f(); 12 union [[gsl::Owner(int)]] Union{}; 18 S [[gsl::Owner]] Instance; 21 class [[gsl::Owner(7)]] OwnerDerefNoType{}; 24 class [[gsl::Pointer("int")]] PointerDerefNoType{}; 27 class [[gsl::Owner(int)]] [[gsl::Pointer(int)]] BothOwnerPointer{}; 33 class [[gsl::Owner(void)]] OwnerVoidDerefType{}; 36 class [[gsl::Pointer(void)]] PointerVoidDerefType{}; [all …]
|
D | suppress.cpp | 3 [[gsl::suppress("globally")]]; 6 [[gsl::suppress("in-a-namespace")]]; 9 [[gsl::suppress("readability-identifier-naming")]] 12 [[gsl::suppress("type", "bounds")]] { in f_() 16 [[gsl::suppress]] int x; // expected-error {{'suppress' attribute takes at least 1 argument}} in f_() 17 [[gsl::suppress()]] int y; // expected-error {{'suppress' attribute takes at least 1 argument}} in f_() 18 …int [[gsl::suppress("r")]] z; // expected-error {{'suppress' attribute cannot be applied to types}} in f_() 19 [[gsl::suppress(f_)]] float f; // expected-error {{'suppress' attribute requires a string}} in f_() 22 union [[gsl::suppress("type.1")]] U {
|
D | attr-gsl-owner-pointer-std.cpp | 151 class [[gsl::Pointer]] list{};
|
/external/llvm-project/clang-tools-extra/test/clang-tidy/checkers/ |
D | cppcoreguidelines-owning-memory.cpp | 3 namespace gsl { namespace 11 unique_ptr(gsl::owner<T> resource) : memory(resource) {} in unique_ptr() 17 gsl::owner<T> memory; 20 void takes_owner(gsl::owner<int *> owned_int) { in takes_owner() 26 void takes_owner_and_more(int some_int, gsl::owner<int *> owned_int, float f) { in takes_owner_and_more() 30 void takes_templated_owner(gsl::owner<T> owned_T) { in takes_templated_owner() 33 gsl::owner<int *> returns_owner1() { return gsl::owner<int *>(new int(42)); } // Ok in returns_owner1() 34 gsl::owner<int *> returns_owner2() { return new int(42); } // Ok in returns_owner2() 47 gsl::owner<int *> owner = new int(42); in returns_no_owner4() 59 gsl::owner<int *> o1 = new int(42); // Ok in csa_not_finding_leak() [all …]
|
D | cppcoreguidelines-owning-memory-legacy-functions.cpp | 7 namespace gsl { namespace 47 void consumesResource(gsl::owner<int *> Resource, size_t Size) {} in consumesResource() 48 void consumesResource(gsl::owner<FILE *> Resource) {} in consumesResource() 52 void testNonCastedOwner(gsl::owner<void *> Resource) {} in testNonCastedOwner() 56 gsl::owner<FILE *> fileFactory2() { return std::fopen("new_file.txt", "w"); } // Ok in fileFactory2() 60 gsl::owner<int *> arrayFactory2() { return (int *)std::malloc(100); } // Ok in arrayFactory2() 63 gsl::owner<void *> dataFactory2() { return std::malloc(100); } // Ok in dataFactory2() 83 gsl::owner<int *> IntArray7 = (int *)malloc(ByteCount); // Ok in test_resource_creators() 84 gsl::owner<void *> IntArray8 = malloc(ByteCount); // Ok in test_resource_creators() 86 gsl::owner<int *> IntArray9 = &Bad; in test_resource_creators() [all …]
|
D | cppcoreguidelines-pro-bounds-array-to-pointer-decay.cpp | 4 namespace gsl { namespace 15 void arrayviewfun(gsl::array_view<int> &p); 29 gsl::array_view<int> av(a); in f()
|
D | cppcoreguidelines-pro-bounds-constant-array-index-gslheader.cpp | 16 namespace gsl { namespace 37 gsl::at(a, pos-1) = 2; // OK, gsl::at() instead of [] in f() 59 gsl::at(a, i) = i; // OK, gsl::at() instead of [] in g()
|
D | cppcoreguidelines-pro-bounds-constant-array-index.cpp | 14 namespace gsl { namespace 33 gsl::at(a, pos-1) = 2; // OK, gsl::at() instead of [] in f() 55 gsl::at(a, i) = i; // OK, gsl::at() instead of [] in g()
|
D | cppcoreguidelines-owning-memory-containers.cpp | 3 namespace gsl { namespace 35 std::vector<gsl::owner<int *>> OwnerStdVector(100, nullptr); in main()
|
/external/llvm-project/clang-tools-extra/docs/clang-tidy/checks/ |
D | cppcoreguidelines-owning-memory.rst | 6 This check implements the type-based semantics of ``gsl::owner<T*>``, which allows 11 The definition of a ``gsl::owner<T*>`` is straight forward 15 namespace gsl { template <typename T> owner = T; } 18 …tps://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#gsl-guideline-support-l… 29 gsl::owner<int*> function_that_returns_owner() { return gsl::owner<int*>(new int(42)); } 33 gsl::owner<int*> Owner = new int(42); // Good 34 gsl::owner<int*> Owner = new int[42]; // Good as well 38 gsl::owner<int*> Owner = function_that_returns_owner(); // Good, result lands in owner 42 gsl::owner<int*> Owned = &Stack; // Bad, not a resource assigned 44 In the case of dynamic memory as resource, only ``gsl::owner<T*>`` variables are allowed [all …]
|
D | cppcoreguidelines-pro-bounds-constant-array-index.rst | 20 the include file that contains ``gsl::at()``, e.g. `"gsl/gsl.h"`.
|
D | modernize-use-auto.rst | 165 ``gsl::narrow_cast``. Calls to function templates are considered to behave as
|
/external/llvm-project/clang/test/AST/ |
D | ast-dump-attr.cpp | 204 [[gsl::suppress("at-namespace")]]; 208 [[gsl::suppress("on-decl")]] 216 [[gsl::suppress("on-stmt")]] { in f() 226 class [[gsl::Owner(int)]] AOwner{}; 229 class [[gsl::Pointer(int)]] APointer{}; 233 class [[gsl::Pointer]] PointerWithoutArgument{}; 237 class [[gsl::Owner]] OwnerWithoutArgument{};
|
/external/eigen/cmake/ |
D | FindGSL.cmake | 3 # http://www.gnu.org/software/gsl/ and 4 # http://gnuwin32.sourceforge.net/packages/gsl.htm 11 # on Unix/Linux with additional linker flags from "gsl-config --libs" 13 # CMAKE_GSL_CXX_FLAGS = Unix compiler flags for GSL, essentially "`gsl-config --cxxflags`" 27 # JW tested with gsl-1.8, Windows XP, MSVS 7.1 39 NAMES gsl/gsl_cdf.h gsl/gsl_randist.h 46 NAMES libgsl.dll.a gsl libgsl 89 CACHE STRING "preferred path to GSL (gsl-config)") 90 FIND_PROGRAM(GSL_CONFIG gsl-config 157 … MESSAGE("FindGSL.cmake: gsl-config not found. Please set it manually. GSL_CONFIG=${GSL_CONFIG}")
|
/external/llvm-project/clang/test/Sema/ |
D | warn-lifetime-analysis-nocfg-disabled.cpp | 3 struct [[gsl::Owner(int)]] MyIntOwner { 8 struct [[gsl::Pointer(int)]] MyIntPointer {
|
D | warn-lifetime-analysis-nocfg.cpp | 2 struct [[gsl::Owner(int)]] MyIntOwner { 7 struct [[gsl::Pointer(int)]] MyIntPointer { 22 struct [[gsl::Owner(int)]] MyOwnerIntPointer : MyIntPointer { 25 struct [[gsl::Pointer(long)]] MyLongPointerFromConversion { 30 struct [[gsl::Owner(long)]] MyLongOwnerWithConversion {
|
/external/llvm-project/llvm/include/llvm/Support/ |
D | Compiler.h | 294 #if LLVM_HAS_CPP_ATTRIBUTE(gsl::Owner) 295 #define LLVM_GSL_OWNER [[gsl::Owner]] 302 #if LLVM_HAS_CPP_ATTRIBUTE(gsl::Pointer) 303 #define LLVM_GSL_POINTER [[gsl::Pointer]]
|
/external/llvm-project/clang/test/CodeGenCXX/ |
D | stmtexpr.cpp | 219 ({[[gsl::suppress("foo")]] n;}); in volatile_load() 256 ({[[gsl::suppress("foo")]] n;}); in volatile_load_template()
|
/external/igt-gpu-tools/ |
D | configure.ac | 164 PKG_CHECK_MODULES(GSL, [gsl], [gsl=yes], [gsl=no]) 165 AM_CONDITIONAL(HAVE_GSL, [test "x$gsl" = xyes]) 190 if test x"$gsl" != xyes; then 191 AC_MSG_ERROR([Failed to find gsl, required by chamelium.])
|
D | meson.build | 158 gsl = dependency('gsl', required : build_chamelium) variable 162 if xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found() and gsl.found() and alsa.found(… 168 gsl,
|
D | Dockerfile.fedora | 16 'pkgconfig(gsl)' \
|
/external/igt-gpu-tools/lib/ |
D | meson.build | 100 if gsl.found() 101 lib_deps += gsl
|
/external/llvm-project/clang/include/clang/Basic/ |
D | AttrDocs.td | 4437 The ``[[gsl::suppress]]`` attribute suppresses specific 4444 [[gsl::suppress("Rh-public")]] 4447 [[gsl::suppress("type")]] { 5296 The attribute ``[[gsl::Owner(T)]]`` applies to structs and classes that own an 5301 class [[gsl::Owner(int)]] IntOwner { 5322 The attribute ``[[gsl::Pointer(T)]]`` applies to structs and classes that behave 5327 class [[gsl::Pointer(int)]] IntPointer { 5340 an instance of a class annotated with ``[[gsl::Owner]]`` (an Owner),
|
D | Attr.td | 2363 let Spellings = [CXX11<"gsl", "suppress">]; 3140 let Spellings = [CXX11<"gsl", "Owner">]; 3147 let Spellings = [CXX11<"gsl", "Pointer">];
|
D | DiagnosticGroups.td | 357 def DanglingGsl : DiagGroup<"dangling-gsl">;
|