[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/84133 >From 9c3a4ab81e931f43104fa0ac26de56595f43c6b4 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 25 Feb 2024 19:55:10 -0500 Subject: [PATCH] [clangd] Avoid libFormat's objective-c guessing heuristic

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-11 Thread Nathan Ridge via cfe-commits
@@ -166,14 +166,29 @@ TextEdit toTextEdit(const FixItHint &FixIt, const SourceManager &M, std::optional getCanonicalPath(const FileEntryRef F, FileManager &FileMgr); +/// A flag passed to getFormatStyleForFile() that specifies what

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-11 Thread Nathan Ridge via cfe-commits
@@ -166,14 +166,29 @@ TextEdit toTextEdit(const FixItHint &FixIt, const SourceManager &M, std::optional getCanonicalPath(const FileEntryRef F, FileManager &FileMgr); +/// A flag passed to getFormatStyleForFile() that specifies what

[clang-tools-extra] 3093d73 - [clangd] Avoid libFormat's objective-c guessing heuristic where possible (#84133)

2024-03-11 Thread via cfe-commits
Author: Nathan Ridge Date: 2024-03-11T04:16:45-04:00 New Revision: 3093d731dff93df02899dcc62f5e7ba02461ff2a URL: https://github.com/llvm/llvm-project/commit/3093d731dff93df02899dcc62f5e7ba02461ff2a DIFF: https://github.com/llvm/llvm-project/commit/3093d731dff93df02899dcc62f5e7ba02461ff2a.diff

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/84133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Comment parsing: add argument parsing for @throw @throws @exception (PR #84726)

2024-03-11 Thread via cfe-commits
https://github.com/hdoc created https://github.com/llvm/llvm-project/pull/84726 Doxygen allows for the @throw, @throws, and @exception commands to have an attached argument indicating the type being thrown. Currently, Clang's AST parsing doesn't support parsing out this argument from doc commen

[clang] Comment parsing: add argument parsing for @throw @throws @exception (PR #84726)

2024-03-11 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-03-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/78925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-03-11 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Thanks. I've written the clangd patch and posted it for review at #84133. > > If that gets approved, I will abandon this PR. #84133 has merged now. I'll accordingly close this. Thank you @owenca for your feedback and helping reach a solution that accomplished the goals

[clang] Comment parsing: add argument parsing for @throw @throws @exception (PR #84726)

2024-03-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: hdoc (hdoc) Changes Doxygen allows for the @throw, @throws, and @exception commands to have an attached argument indicating the type being thrown. Currently, Clang's AST parsing doesn't support parsing out this argument from doc comments

[clang] [Clang][Comments] Add argument parsing for @throw @throws @exception (PR #84726)

2024-03-11 Thread via cfe-commits
https://github.com/hdoc edited https://github.com/llvm/llvm-project/pull/84726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][NFC] Eliminate the IsCpp parameter in all functions (PR #84599)

2024-03-11 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. This looks good to me https://github.com/llvm/llvm-project/pull/84599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-11 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: This commit breaks our coroutines library async_simple `https://github.com/alibaba/async_simple` and here is a (relative) minimal reproducer: https://godbolt.org/z/sG5jzcGEz The reproducer comes from an implementation for async_simple::Generator (https://github.com/alibaba/a

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-03-11 Thread via cfe-commits
mahtohappy wrote: Ping @AaronBallman @cor3ntin @Endilll https://github.com/llvm/llvm-project/pull/83124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0f501c3 - Revert "[C++20][Coroutines] Lambda-coroutine with operator new in promise_type (#84193)"

2024-03-11 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-03-11T17:02:43+08:00 New Revision: 0f501c30b9601627c236f9abca8a3befba5dc161 URL: https://github.com/llvm/llvm-project/commit/0f501c30b9601627c236f9abca8a3befba5dc161 DIFF: https://github.com/llvm/llvm-project/commit/0f501c30b9601627c236f9abca8a3befba5dc161.diff LO

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-11 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > to fail, which I think is not intentional? No, it is not. Fails only for c++23 now. I'm looking. https://github.com/llvm/llvm-project/pull/77753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-11 Thread Andreas Fertig via cfe-commits
andreasfertig wrote: Interesting! I'll see what I can do. https://github.com/llvm/llvm-project/pull/84193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Comments] Add argument parsing for @throw @throws @exception (PR #84726)

2024-03-11 Thread via cfe-commits
https://github.com/hdoc edited https://github.com/llvm/llvm-project/pull/84726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Mention possibility of underflow in array overflow errors (PR #84201)

2024-03-11 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -83,6 +83,8 @@ class StateUpdateReporter { AssumedUpperBound = UpperBoundVal; } + bool assumedNonNegative() { return AssumedNonNegative; } NagyDonat wrote: I'd prefer to keep the current name becaus

[clang] [analyzer] Mention possibility of underflow in array overflow errors (PR #84201)

2024-03-11 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy ,NagyDonat Message-ID: In-Reply-To: https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/84201 >From 74c7c04cb456c0a058ca36a2ca4ffa4d70d576e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Wed, 6 Mar 2024 18:09:02 +0100 Su

[clang] [Clang][Sema] Allow access to a public template alias declaration that refers to friend's private nested type (PR #83847)

2024-03-11 Thread Qizhi Hu via cfe-commits
jcsxky wrote: gently ping~ https://github.com/llvm/llvm-project/pull/83847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-11 Thread YAMAMOTO Takashi via cfe-commits
yamt wrote: > > Given that we don't need `setjmpTableSize` anymore and `setjmpTable` > > doesn't change, we don't need the whole block here from line 1463 ~ line > > 1503 doing SSA updates anymore: > > i get errors like the following if i simply put the SSA update things in > `!EnableWasmAltS

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-11 Thread Bhuminjay Soni via cfe-commits
https://github.com/11happy updated https://github.com/llvm/llvm-project/pull/84481 >From 8fdf6306085ed4cf0f77b7e718e374e9f65fedf9 Mon Sep 17 00:00:00 2001 From: 11happy Date: Fri, 8 Mar 2024 19:02:47 +0530 Subject: [PATCH 1/2] add clang-tidy check readability-math-missing-parentheses Signed-of

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-11 Thread Bhuminjay Soni via cfe-commits
11happy wrote: Are there any more changes for this PR required from my end? Thank you https://github.com/llvm/llvm-project/pull/82872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-11 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,167 @@ +//===--- MathMissingParenthesesCheck.cpp - clang-tidy -===// +// +// 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-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-11 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,167 @@ +//===--- MathMissingParenthesesCheck.cpp - clang-tidy -===// +// +// 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-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-11 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,167 @@ +//===--- MathMissingParenthesesCheck.cpp - clang-tidy -===// +// +// 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-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-11 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,167 @@ +//===--- MathMissingParenthesesCheck.cpp - clang-tidy -===// +// +// 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-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-11 Thread Bhuminjay Soni via cfe-commits
@@ -100,6 +100,12 @@ Improvements to clang-tidy New checks ^^ +- New :doc:`readability-math-missing-parentheses + ` check. + + Checks for mathematical expressions that involve operators + of different priorities. 11happy wrote: done https://github

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-11 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %check_clang_tidy %s readability-math-missing-parentheses %t + +// FIXME: Add something that triggers the check here. +void f(){ +//CHECK-MESSAGES: :[[@LINE+2]]:13: warning: add parantheses to clarify the precedence of operations [readability-math-mi

[clang] [clang] Fix OMPT ident flag in combined distribute parallel for pragma (PR #80987)

2024-03-11 Thread via cfe-commits
mikaoP wrote: Tests passing now https://github.com/llvm/llvm-project/pull/80987 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-11 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ok, now I looked at it a bit more, and I think this is expected due to the change and how clang behaved before this patch. After this patch implicit destructor of S, i.e. `~S` becomes `constexpr`. It used to be not `constexpr` because neither `P` nor `B` had `constexpr` destru

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-11 Thread YAMAMOTO Takashi via cfe-commits
https://github.com/yamt updated https://github.com/llvm/llvm-project/pull/84137 >From 1283ae6b5536810f8fbe183eda80997aa9f5cdc3 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 9 Feb 2024 15:49:55 +0900 Subject: [PATCH 1/7] [WebAssembly] Implement an alternative translation for -wasm-e

[clang] [clang-format] adds a space after not inside macros (PR #78176)

2024-03-11 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: I just wanted to bring up that using `WhitespaceSensitiveMacros` here is a little tricky because the macro name one would need to put there is `V` (the name is taken directly from the code that hit this). Having a more sophisticated option to say "parameter `V` of macro `M

[clang] ec2875c - [clang-repl] Expose RuntimeInterfaceBuilder to allow customization (#83126)

2024-03-11 Thread via cfe-commits
Author: Stefan Gränitz Date: 2024-03-11T12:15:11+01:00 New Revision: ec2875ce2690010f7dd894c9b56802297dd6cb84 URL: https://github.com/llvm/llvm-project/commit/ec2875ce2690010f7dd894c9b56802297dd6cb84 DIFF: https://github.com/llvm/llvm-project/commit/ec2875ce2690010f7dd894c9b56802297dd6cb84.diff

[clang] [clang-repl] Expose RuntimeInterfaceBuilder to allow customization (PR #83126)

2024-03-11 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail closed https://github.com/llvm/llvm-project/pull/83126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] adds a space after not inside macros (PR #78176)

2024-03-11 Thread Ilya Biryukov via cfe-commits
@@ -4842,7 +4842,7 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, return true; } if (Left.is(TT_UnaryOperator)) { -if (Right.isNot(tok::l_paren)) { +if (!Right.isOneOf(tok::r_paren, tok::l_paren, tok::exclaim)) { ilya-bi

[clang] [Clang][Comments] Add argument parsing for @throw @throws @exception (PR #84726)

2024-03-11 Thread Krystian Stasiowski via cfe-commits
@@ -149,6 +191,76 @@ class TextTokenRetokenizer { addToken(); } + /// Extract a type argument + bool lexDataType(Token &Tok) { +if (isEnd()) + return false; +Position SavedPos = Pos; +consumeWhitespace(); +SmallString<32> NextToken; +SmallStrin

[clang] [Clang][Sema] Fix crash when using name of UnresolvedUsingValueDecl with template arguments (PR #83842)

2024-03-11 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @wlei-llvm Thank you! I've reduced the repro to this: ```cpp struct A { }; template void f(A); struct B { void f(); void g() { f(A()); } }; ``` https://github.com/llvm/llvm-project/pull/83842 ___ cfe-commits mailing list

[clang] [APINotes] Fix failing tests after a PCM logic change (PR #84556)

2024-03-11 Thread Egor Zhdan via cfe-commits
egorzhdan wrote: The clang-format CI failure is unrelated to this patch. https://github.com/llvm/llvm-project/pull/84556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 878097d - [APINotes] Fix failing tests after a PCM logic change

2024-03-11 Thread via cfe-commits
Author: Egor Zhdan Date: 2024-03-11T12:02:29Z New Revision: 878097dff3ea4bad6b7f50017224a84bbf2af406 URL: https://github.com/llvm/llvm-project/commit/878097dff3ea4bad6b7f50017224a84bbf2af406 DIFF: https://github.com/llvm/llvm-project/commit/878097dff3ea4bad6b7f50017224a84bbf2af406.diff LOG: [A

[clang] [APINotes] Fix failing tests after a PCM logic change (PR #84556)

2024-03-11 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan closed https://github.com/llvm/llvm-project/pull/84556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Fix JSON conversion for symbol tags (PR #84747)

2024-03-11 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler created https://github.com/llvm/llvm-project/pull/84747 The wrong constructor of json::Value got called, making every tag an array instead of a number. >From f67994902314acd8ae0f0c561b07b8c014172e17 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 11 M

[clang-tools-extra] [clangd] Fix JSON conversion for symbol tags (PR #84747)

2024-03-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd @llvm/pr-subscribers-clang-tools-extra Author: Christian Kandeler (ckandeler) Changes The wrong constructor of json::Value got called, making every tag an array instead of a number. --- Full diff: https://github.com/llvm/llvm-project/pull/84747.

[clang-tools-extra] [clangd] Fix JSON conversion for symbol tags (PR #84747)

2024-03-11 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall closed https://github.com/llvm/llvm-project/pull/84747 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 9b2386e - [clangd] Fix JSON conversion for symbol tags (#84747)

2024-03-11 Thread via cfe-commits
Author: Christian Kandeler Date: 2024-03-11T13:16:58+01:00 New Revision: 9b2386e82dedafade233c8871637ee76da9ebe0e URL: https://github.com/llvm/llvm-project/commit/9b2386e82dedafade233c8871637ee76da9ebe0e DIFF: https://github.com/llvm/llvm-project/commit/9b2386e82dedafade233c8871637ee76da9ebe0e.

[clang-tools-extra] [clangd] Fix JSON conversion for symbol tags (PR #84747)

2024-03-11 Thread Sam McCall via cfe-commits
sam-mccall wrote: Thanks! (And sorry, that json::Value constructor is my fault too...) https://github.com/llvm/llvm-project/pull/84747 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-11 Thread via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/80029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-11 Thread via cfe-commits
https://github.com/NagyDonat commented: Seems to be a good change overall and I like that you implemented this with some nice helper classes. However, there is some code duplication that could be reduced (see inline comments). Also, I feel that (especially after these extensions) this checker

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-11 Thread via cfe-commits
@@ -20,48 +20,180 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/Progra

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-11 Thread via cfe-commits
@@ -20,48 +20,180 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/Progra

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-11 Thread via cfe-commits
@@ -70,73 +202,121 @@ class BlockInCriticalSectionChecker : public Checker { } // end anonymous namespace -REGISTER_TRAIT_WITH_PROGRAMSTATE(MutexCounter, unsigned) +REGISTER_LIST_WITH_PROGRAMSTATE(ActiveCritSections, CritSectionMarker) -void BlockInCriticalSectionChecker::

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-11 Thread via cfe-commits
@@ -20,48 +20,180 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/Progra

[clang] aec9283 - [clang-repl] Refactor locking of runtime PTU stack (NFC) (#84176)

2024-03-11 Thread via cfe-commits
Author: Stefan Gränitz Date: 2024-03-11T13:39:23+01:00 New Revision: aec92830b79a8c49cdce0d592627d5f18bb6370b URL: https://github.com/llvm/llvm-project/commit/aec92830b79a8c49cdce0d592627d5f18bb6370b DIFF: https://github.com/llvm/llvm-project/commit/aec92830b79a8c49cdce0d592627d5f18bb6370b.diff

[clang] [clang-repl] Refactor locking of runtime PTU stack (NFC) (PR #84176)

2024-03-11 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail closed https://github.com/llvm/llvm-project/pull/84176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-03-11 Thread Axel Lundberg via cfe-commits
@@ -555,13 +555,11 @@ static void handleImplicitConversion(ImplicitConversionData *Data, ReportOptions Opts, ValueHandle Src, ValueHandle Dst) { SourceLocation Loc = Data->Loc.acquire(); - ErrorType E

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-03-11 Thread Axel Lundberg via cfe-commits
Zonotora wrote: @zygoloid Thanks for your feedback! Fixed all comments except the last one. I totally agree with you about the distinction of UB checks, and that should be part of a different future PR! https://github.com/llvm/llvm-project/pull/75481 __

[clang] Add bit-precise overloads for builtin operators (PR #84755)

2024-03-11 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/84755 We previously were not adding them to the candidate set and so use of a bit-precise integer as a class member could lead to ambiguous overload sets. Fixes https://github.com/llvm/llvm-project/issues/82998

[clang] Add bit-precise overloads for builtin operators (PR #84755)

2024-03-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes We previously were not adding them to the candidate set and so use of a bit-precise integer as a class member could lead to ambiguous overload sets. Fixes https://github.com/llvm/llvm-project/issues/82

[clang] [analyzer] Turn NodeBuilderContext into a class (PR #84638)

2024-03-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/84638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Turn NodeBuilderContext into a class (PR #84638)

2024-03-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: Alright. So we can simply mark all the members private. I was surprised a bit. LGTM, but remove the TODO comment you fix. https://github.com/llvm/llvm-project/pull/84638 ___ cfe-commits mailing list cfe-commits@li

[clang] [analyzer] Turn NodeBuilderContext into a class (PR #84638)

2024-03-11 Thread Balazs Benics via cfe-commits
@@ -194,11 +194,12 @@ class CoreEngine { }; // TODO: Turn into a class. steakhal wrote: Remove this TODO, as its completed. https://github.com/llvm/llvm-project/pull/84638 ___ cfe-commits mailing list cfe-commits@l

[clang] [analyzer] Mention possibility of underflow in array overflow errors (PR #84201)

2024-03-11 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy ,NagyDonat Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. I scrolled over, and it looks harmless, so LGTM. https://github.com/llvm/llvm-project/pull/84201 ___ cfe-commits mailing list cf

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-11 Thread Balazs Benics via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: steakhal wrote: > I want to avoid that some f

[clang] [RemoveDIs] Update Clang front end to handle DbgRecords (PR #84756)

2024-03-11 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams created https://github.com/llvm/llvm-project/pull/84756 This patch fixes problems that pop up when clang emits DbgRecords instead of debug intrinsics. Note: this doesn't mean clang is emitting DbgRecords yet, because the modules it creates are still always in the ol

[clang] [RemoveDIs] Update Clang front end to handle DbgRecords (PR #84756)

2024-03-11 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams edited https://github.com/llvm/llvm-project/pull/84756 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RemoveDIs] Update Clang front end to handle DbgRecords (PR #84756)

2024-03-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Orlando Cazalet-Hyams (OCHyams) Changes This patch fixes problems that pop up when clang emits DbgRecords instead of debug intrinsics. Note: this doesn't mean clang is emitting DbgRecords yet, because the modules it creates are still alw

[clang] [RemoveDIs] Update Clang front end to handle DbgRecords (PR #84756)

2024-03-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Orlando Cazalet-Hyams (OCHyams) Changes This patch fixes problems that pop up when clang emits DbgRecords instead of debug intrinsics. Note: this doesn't mean clang is emitting DbgRecords yet, because the modules it creates are s

[clang] [RemoveDIs] Update Clang front end to handle DbgRecords (PR #84756)

2024-03-11 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 e77f5fe889909df3508fd929f2636a0ac211877a efabe4b06f38aaf3aed8cf02c97f566652ba5f15 --

[clang] [llvm] [analyzer] Mention possibility of underflow in array overflow errors (PR #84201)

2024-03-11 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy ,NagyDonat ,Balazs Benics Message-ID: In-Reply-To: https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/84201 >From 74c7c04cb456c0a058ca36a2ca4ffa4d70d576e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Wed, 6 Mar 2024 18

[clang] Clang repl implicit executor create (PR #84758)

2024-03-11 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail created https://github.com/llvm/llvm-project/pull/84758 Until now the IncrExecutor is created lazily on the first execution request. In order to process the PTUs that come from initialization, we have to do it upfront implicitly. From 2f7b523472543a92a9770188

[clang] Clang repl implicit executor create (PR #84758)

2024-03-11 Thread via cfe-commits
Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: Stefan Gränitz (weliveindetail) Changes Until now the IncrExecutor is created lazily on the first execution request. In order to process the PTUs that come from initialization, we have

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-03-11 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail edited https://github.com/llvm/llvm-project/pull/84758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Expose CreateExecutor() and ResetExecutor() in extended Interpreter interface (PR #84460)

2024-03-11 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: > > Do you mind incorporating this patch so that we avoid churn? > > Sure. Essentially, this drops lazy creation of the executor and makes it > dependent on the frontend action explicitly. Fine for me. We can still expose > explicit setup/tear-down. @vgvassilev I moved i

[clang] [llvm] [analyzer] Mention possibility of underflow in array overflow errors (PR #84201)

2024-03-11 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy ,NagyDonat ,Balazs Benics , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/84201 >From 74c7c04cb456c0a058ca36a2ca4ffa4d70d576e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?=

[clang] [llvm] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-11 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics Message-ID: In-Reply-To: https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/84469 >From c357aa998204e6693430c801f5b7d3a9e5e09e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Fri,

[clang] [clang][nullability] allow _Nonnull etc on nullable class types (PR #82705)

2024-03-11 Thread Sam McCall via cfe-commits
@@ -2156,9 +2156,10 @@ def TypeNonNull : TypeAttr { let Documentation = [TypeNonNullDocs]; } -def TypeNullable : TypeAttr { +def TypeNullable : DeclOrTypeAttr { let Spellings = [CustomKeyword<"_Nullable">]; let Documentation = [TypeNullableDocs]; +// let Subjects = Su

[clang] [llvm] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-11 Thread via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy ,Balazs Benics Message-ID: In-Reply-To: NagyDonat wrote: @steakhal Thanks for contributing the unit tests, I applied your commit. https://github.com/llvm/llvm-project/pull/84469 ___ cfe-comm

[clang] [llvm] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-11 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/84469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [llvm] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-11 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy ,Balazs Benics Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. I'm good now. https://github.com/llvm/llvm-project/pull/84469 ___ cfe-commits mailing list cfe

[clang] [llvm] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-11 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics Message-ID: In-Reply-To: @@ -0,0 +1,89 @@ +#include "clang/ASTMatchers/ASTMatchFinder.h" +#include "clang/ASTMatchers/ASTMatchers.h" +#include "clang/Analysis/AnalysisDeclContext.h" +#include "clang/Frontend/ASTUni

[clang] [clang][nullability] allow _Nonnull etc on nullable class types (PR #82705)

2024-03-11 Thread Sam McCall via cfe-commits
@@ -4096,6 +4096,11 @@ non-underscored keywords. For example: @property (assign, nullable) NSView *superview; @property (readonly, nonnull) NSArray *subviews; @end + +As well as built-in pointer types, ithe nullability attributes can be attached +to nullable typ

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-03-11 Thread Stefan Gränitz via cfe-commits
@@ -14,7 +14,7 @@ struct A { int a; A(int a) : a(a) {} virtual ~A(); }; // PartialTranslationUnit. inline A::~A() { printf("~A(%d)\n", a); } -// Create one instance with new and delete it. +// Create one instance with new and delete it. We crash here now: A *a1 = new A(1); --

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-11 Thread Stephan Bergmann via cfe-commits
stbergmann wrote: I think the discourse thread [Clang is overly aggressive when evaluating constexpr functions](https://discourse.llvm.org/t/clang-is-overly-aggressive-when-evaluating-constexpr-functions/67006) is relevant here. https://github.com/llvm/llvm-project/pull/77753

[clang] [clang][nullability] allow _Nonnull etc on nullable class types (PR #82705)

2024-03-11 Thread Sam McCall via cfe-commits
@@ -1494,6 +1494,15 @@ void Parser::ParseMicrosoftInheritanceClassAttributes(ParsedAttributes &attrs) { } } +void Parser::ParseNullabilityClassAttributes(ParsedAttributes &attrs) { + while (Tok.is(tok::kw__Nullable)) { sam-mccall wrote: It's not important

[clang] [clang][nullability] allow _Nonnull etc on nullable class types (PR #82705)

2024-03-11 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall edited https://github.com/llvm/llvm-project/pull/82705 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver] Default -msmall-data-limit= to 0 and clean up code (PR #83093)

2024-03-11 Thread Kito Cheng via cfe-commits
kito-cheng wrote: There is some discussion in last (2024/2/29) LLVM sync up meeting: We all agree that might not useful in linux target and those platforms disable GP relaxation, like Android and fuchsia; However it's still useful for embedded toolchain, so this change may surprise those embed

[clang] Add bit-precise overloads for builtin operators (PR #84755)

2024-03-11 Thread via cfe-commits
@@ -8955,6 +8962,22 @@ class BuiltinOperatorOverloadBuilder { (S.Context.getAuxTargetInfo() && S.Context.getAuxTargetInfo()->hasInt128Type())) ArithmeticTypes.push_back(S.Context.UnsignedInt128Ty); + +/// _BitInt overloads are a bit special. We don't

[clang] Add bit-precise overloads for builtin operators (PR #84755)

2024-03-11 Thread via cfe-commits
@@ -8955,6 +8962,22 @@ class BuiltinOperatorOverloadBuilder { (S.Context.getAuxTargetInfo() && S.Context.getAuxTargetInfo()->hasInt128Type())) ArithmeticTypes.push_back(S.Context.UnsignedInt128Ty); + +/// _BitInt overloads are a bit special. We don't

[clang] Add bit-precise overloads for builtin operators (PR #84755)

2024-03-11 Thread Erich Keane via cfe-commits
@@ -8955,6 +8962,22 @@ class BuiltinOperatorOverloadBuilder { (S.Context.getAuxTargetInfo() && S.Context.getAuxTargetInfo()->hasInt128Type())) ArithmeticTypes.push_back(S.Context.UnsignedInt128Ty); + +/// _BitInt overloads are a bit special. We don't

[clang] [HIP] Make the new driver bundle outputs for device-only (PR #84534)

2024-03-11 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/84534 >From 1d22692bf3133bbab33485b5e8d65239a7386200 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 8 Mar 2024 12:49:38 -0600 Subject: [PATCH] [HIP] Make the new driver bundle outputs for device-only Summary:

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-11 Thread Erich Keane via cfe-commits
erichkeane wrote: > > Left my comment on the main list, but I don't see this as a well motivated > > change, and even if GCC supported it, it would still be a very difficult to > > motivate extension without massive historical workloads already using it. > > This is needed by the Linux kernel,

[clang] [clang][nullability] allow _Nonnull etc on nullable class types (PR #82705)

2024-03-11 Thread Sam McCall via cfe-commits
@@ -215,6 +215,18 @@ void Sema::inferGslOwnerPointerAttribute(CXXRecordDecl *Record) { inferGslPointerAttribute(Record, Record); } +void Sema::inferNullableClassAttribute(CXXRecordDecl *CRD) { + static llvm::StringSet<> Nullable{ + "auto_ptr", "shared_ptr", "u

[clang] [clang][nullability] allow _Nonnull etc on nullable class types (PR #82705)

2024-03-11 Thread Sam McCall via cfe-commits
@@ -5955,6 +5955,20 @@ static void handleBuiltinAliasAttr(Sema &S, Decl *D, D->addAttr(::new (S.Context) BuiltinAliasAttr(S.Context, AL, Ident)); } +static void handleNullableTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + if (AL.isUsedAsTypeAttr()) +return; + + i

[clang] [clang][nullability] allow _Nonnull etc on nullable class types (PR #82705)

2024-03-11 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall updated https://github.com/llvm/llvm-project/pull/82705 >From eccc46840e343e7ba15200cd4b81316a51c46943 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Thu, 22 Feb 2024 16:00:44 +0100 Subject: [PATCH 1/2] [clang][nullability] allow _Nonnull etc on nullable class ty

[clang] [llvm] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-11 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics Message-ID: In-Reply-To: @@ -0,0 +1,89 @@ +#include "clang/ASTMatchers/ASTMatchFinder.h" +#include "clang/ASTMatchers/ASTMatchers.h" +#include "clang/Analysis/AnalysisDeclContext.h" +#include "clang/Frontend/ASTUni

[clang] [Clang][Sema] Fix crash when using name of UnresolvedUsingValueDecl with template arguments (PR #83842)

2024-03-11 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: So, it seems that this crash occurs because we filter out all non-template functions, which will trigger ADL if the only class member we found was a non-template function. https://github.com/llvm/llvm-project/pull/83842 ___ cfe-comm

[clang] [llvm] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-11 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics Message-ID: In-Reply-To: @@ -0,0 +1,89 @@ +#include "clang/ASTMatchers/ASTMatchFinder.h" +#include "clang/ASTMatchers/ASTMatchers.h" +#include "clang/Analysis/AnalysisDeclContext.h" +#include "clang/Frontend/ASTUni

[clang] [llvm] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-11 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics Message-ID: In-Reply-To: https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/84469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [C++20] [Modules] Introduce a tool 'clang-named-modules-querier' and two plugins 'ClangGetUsedFilesFromModulesPlugin' and 'ClangGetDeclsInModulesPlugin' (PR #72956)

2024-03-11 Thread Ben Boeckel via cfe-commits
mathstuf wrote: > ClangGetUsedFilesFromModulesPlugin This has a hole where if a currently-unused file is not listed, but it is changed in such a way that it now matters (e.g., it changes include order, adds/removes includes, etc.), we need to recompile consumers. > what happens if someone add

  1   2   3   4   5   >