[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-10 Thread Gábor Spaits via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-10 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/76580 From a19329050600d4d89cc698b686d7aaa13e0c22c2 Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Fri, 29 Dec 2023 17:54:34 +0100 Subject: [PATCH 01/20] [analyzer] Add std::any checker --- clang/docs/analyzer/chec

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-10 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/76580 From a19329050600d4d89cc698b686d7aaa13e0c22c2 Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Fri, 29 Dec 2023 17:54:34 +0100 Subject: [PATCH 01/19] [analyzer] Add std::any checker --- clang/docs/analyzer/chec

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-04 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/76580 From a19329050600d4d89cc698b686d7aaa13e0c22c2 Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Fri, 29 Dec 2023 17:54:34 +0100 Subject: [PATCH 01/18] [analyzer] Add std::any checker --- clang/docs/analyzer/chec

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-04 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/76580 From 98b52eb390438402562de96a74771b0132fc71cb Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Fri, 29 Dec 2023 17:54:34 +0100 Subject: [PATCH 01/18] [analyzer] Add std::any checker --- clang/docs/analyzer/chec

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-04 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/76580 From 98b52eb390438402562de96a74771b0132fc71cb Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Fri, 29 Dec 2023 17:54:34 +0100 Subject: [PATCH 01/16] [analyzer] Add std::any checker --- clang/docs/analyzer/chec

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-04 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/76580 From 98b52eb390438402562de96a74771b0132fc71cb Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Fri, 29 Dec 2023 17:54:34 +0100 Subject: [PATCH 01/15] [analyzer] Add std::any checker --- clang/docs/analyzer/chec

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-04 Thread via cfe-commits
=?utf-8?q?Gábor?= Spaits,=?utf-8?q?Gábor?= Spaits, =?utf-8?q?Gábor?= Spaits,=?utf-8?q?Gábor?= Spaits, =?utf-8?q?Gábor?= Spaits Message-ID: In-Reply-To: @@ -87,6 +85,28 @@ bool isStdVariant(const Type *Type) { return isStdType(Type, llvm::StringLiteral("variant")); } +bool

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-03 Thread via cfe-commits
=?utf-8?q?Gábor?= Spaits,=?utf-8?q?Gábor?= Spaits, =?utf-8?q?Gábor?= Spaits,=?utf-8?q?Gábor?= Spaits, =?utf-8?q?Gábor?= Spaits Message-ID: In-Reply-To: @@ -87,6 +85,28 @@ bool isStdVariant(const Type *Type) { return isStdType(Type, llvm::StringLiteral("variant")); } +bool

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-03 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/76580 From 98b52eb390438402562de96a74771b0132fc71cb Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Fri, 29 Dec 2023 17:54:34 +0100 Subject: [PATCH 01/12] [analyzer] Add std::any checker --- clang/docs/analyzer/chec

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-03 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/76580 From 98b52eb390438402562de96a74771b0132fc71cb Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Fri, 29 Dec 2023 17:54:34 +0100 Subject: [PATCH 01/11] [analyzer] Add std::any checker --- clang/docs/analyzer/chec

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-03 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/76580 From 98b52eb390438402562de96a74771b0132fc71cb Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Fri, 29 Dec 2023 17:54:34 +0100 Subject: [PATCH 01/10] [analyzer] Add std::any checker --- clang/docs/analyzer/chec

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-03 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/76580 From 98b52eb390438402562de96a74771b0132fc71cb Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Fri, 29 Dec 2023 17:54:34 +0100 Subject: [PATCH 1/9] [analyzer] Add std::any checker --- clang/docs/analyzer/checke

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-03 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/76580 From 98b52eb390438402562de96a74771b0132fc71cb Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Fri, 29 Dec 2023 17:54:34 +0100 Subject: [PATCH 1/8] [analyzer] Add std::any checker --- clang/docs/analyzer/checke

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-02 Thread via cfe-commits
@@ -87,6 +85,28 @@ bool isStdVariant(const Type *Type) { return isStdType(Type, llvm::StringLiteral("variant")); } +bool isStdAny(const Type *Type) { + return isStdType(Type, llvm::StringLiteral("any")); +} + +bool isVowel(char a) { + switch (a) { + case 'a': + case 'e':

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-02 Thread Gábor Spaits via cfe-commits
@@ -87,6 +85,28 @@ bool isStdVariant(const Type *Type) { return isStdType(Type, llvm::StringLiteral("variant")); } +bool isStdAny(const Type *Type) { + return isStdType(Type, llvm::StringLiteral("any")); +} + +bool isVowel(char a) { + switch (a) { + case 'a': + case 'e':

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-02 Thread via cfe-commits
@@ -0,0 +1,170 @@ +// RUN: %clang %s -std=c++17 -Xclang -verify --analyze \ +// RUN: -Xclang -analyzer-checker=core \ +// RUN: -Xclang -analyzer-checker=debug.ExprInspection \ +// RUN: -Xclang -analyzer-checker=core,alpha.core.StdAny + +#include "Inputs/system-header-simulat

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-02 Thread via cfe-commits
@@ -87,6 +85,28 @@ bool isStdVariant(const Type *Type) { return isStdType(Type, llvm::StringLiteral("variant")); } +bool isStdAny(const Type *Type) { + return isStdType(Type, llvm::StringLiteral("any")); +} + +bool isVowel(char a) { + switch (a) { + case 'a': + case 'e':

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread Gábor Spaits via cfe-commits
@@ -0,0 +1,200 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread Gábor Spaits via cfe-commits
@@ -87,6 +85,28 @@ bool isStdVariant(const Type *Type) { return isStdType(Type, llvm::StringLiteral("variant")); } +bool isStdAny(const Type *Type) { + return isStdType(Type, llvm::StringLiteral("any")); +} + +bool isVowel(char a) { + switch (a) { + case 'a': + case 'e':

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread Gábor Spaits via cfe-commits
@@ -58,6 +58,14 @@ void wontConfuseStdGets() { //// // std::get //// +void stdGetType2() { spaits wrote: O

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,200 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
@@ -0,0 +1,200 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
@@ -2095,6 +2095,27 @@ This checker is a part of ``core.StackAddressEscape``, but is temporarily disabl // returned block } +.. _alpha-core-StdAny: + +alpha.core.StdAny (C++) +""" +Check if a value of active type is retrieved from a

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
@@ -0,0 +1,200 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
@@ -30,6 +24,9 @@ bool isMoveAssignmentCall(const CallEvent &Call); bool isMoveConstructorCall(const CallEvent &Call); bool isStdType(const Type *Type, const std::string &TypeName); bool isStdVariant(const Type *Type); +bool isStdAny(const Type *Type); whisperi

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
@@ -0,0 +1,200 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
@@ -58,6 +58,14 @@ void wontConfuseStdGets() { //// // std::get //// +void stdGetType2() { whisperity wrote

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
@@ -0,0 +1,200 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
@@ -87,6 +85,28 @@ bool isStdVariant(const Type *Type) { return isStdType(Type, llvm::StringLiteral("variant")); } +bool isStdAny(const Type *Type) { + return isStdType(Type, llvm::StringLiteral("any")); +} + +bool isVowel(char a) { + switch (a) { + case 'a': + case 'e':

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
@@ -0,0 +1,200 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
https://github.com/whisperity edited https://github.com/llvm/llvm-project/pull/76580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
@@ -0,0 +1,200 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
@@ -0,0 +1,200 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
@@ -0,0 +1,170 @@ +// RUN: %clang %s -std=c++17 -Xclang -verify --analyze \ +// RUN: -Xclang -analyzer-checker=core \ +// RUN: -Xclang -analyzer-checker=debug.ExprInspection \ +// RUN: -Xclang -analyzer-checker=core,alpha.core.StdAny + +#include "Inputs/system-header-simulat

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
@@ -0,0 +1,200 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
https://github.com/whisperity requested changes to this pull request. https://github.com/llvm/llvm-project/pull/76580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-30 Thread via cfe-commits
https://github.com/whisperity edited https://github.com/llvm/llvm-project/pull/76580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Gábor Spaits via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Gábor Spaits via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 90802e652db348fd3218fcbfc3e6ac9e90702acd 1a96db3c48782b0ec6f2de403ce862b9a95917bf --

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Gábor Spaits via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/76580 From 98b52eb390438402562de96a74771b0132fc71cb Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Fri, 29 Dec 2023 17:54:34 +0100 Subject: [PATCH 1/7] [analyzer] Add std::any checker --- clang/docs/analyzer/checke

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/76580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. First batch of review. https://github.com/llvm/llvm-project/pull/76580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- StdAnyChecker.cpp -*- C++ -*===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/76580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Gábor Spaits (spaits) Changes Add a checker to detect bad `std::any` type accesses. It warns, when the active type is different from the requested type when calling `std::any_cast`: ```cpp void anyCast() { std::any a = 5; char c = std:

[clang] [analyzer] Add std::any checker (PR #76580)

2023-12-29 Thread Gábor Spaits via cfe-commits
https://github.com/spaits created https://github.com/llvm/llvm-project/pull/76580 Add a checker to detect bad `std::any` type accesses. It warns, when the active type is different from the requested type when calling `std::any_cast`: ```cpp void anyCast() { std::any a = 5; char c = std::any