r340452 - [NFC] Test commit

2018-08-22 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Wed Aug 22 14:06:04 2018 New Revision: 340452 URL: http://llvm.org/viewvc/llvm-project?rev=340452&view=rev Log: [NFC] Test commit Modified: cfe/trunk/lib/Analysis/ThreadSafety.cpp Modified: cfe/trunk/lib/Analysis/ThreadSafety.cpp URL: http://llvm.org/viewvc/llvm-p

r340459 - Thread safety analysis: Allow relockable scopes

2018-08-22 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Wed Aug 22 15:14:53 2018 New Revision: 340459 URL: http://llvm.org/viewvc/llvm-project?rev=340459&view=rev Log: Thread safety analysis: Allow relockable scopes Summary: It's already allowed to prematurely release a scoped lock, now we also allow relocking it again, poss

r340575 - Remove unnecessary const_cast [NFC]

2018-08-23 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Thu Aug 23 14:13:32 2018 New Revision: 340575 URL: http://llvm.org/viewvc/llvm-project?rev=340575&view=rev Log: Remove unnecessary const_cast [NFC] This required adding a few const specifiers on functions. Also a minor formatting fix suggested in D49885. Modified:

r340580 - Remove more const_casts by using ConstStmtVisitor [NFC]

2018-08-23 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Thu Aug 23 14:53:04 2018 New Revision: 340580 URL: http://llvm.org/viewvc/llvm-project?rev=340580&view=rev Log: Remove more const_casts by using ConstStmtVisitor [NFC] Again, this required adding some const specifiers. Modified: cfe/trunk/lib/Analysis/ThreadSafety.

r352549 - Thread safety analysis: Improve diagnostics for double locking

2019-01-29 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Tue Jan 29 14:11:42 2019 New Revision: 352549 URL: http://llvm.org/viewvc/llvm-project?rev=352549&view=rev Log: Thread safety analysis: Improve diagnostics for double locking Summary: We use the existing diag::note_locked_here to tell the user where we saw the first loc

r352574 - Fix thread safety tests after r352549

2019-01-29 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Tue Jan 29 16:18:24 2019 New Revision: 352574 URL: http://llvm.org/viewvc/llvm-project?rev=352574&view=rev Log: Fix thread safety tests after r352549 Modified: cfe/trunk/test/PCH/thread-safety-attrs.cpp cfe/trunk/test/Sema/warn-thread-safety-analysis.c Modified

r356228 - Add missing override specifier [NFC]

2019-03-14 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Thu Mar 14 19:30:07 2019 New Revision: 356228 URL: http://llvm.org/viewvc/llvm-project?rev=356228&view=rev Log: Add missing override specifier [NFC] This should fix a -Winconsistent-missing-override warning that is only visible when Z3 is enabled. Modified: cfe/tru

r356427 - Thread safety analysis: Add note for unlock kind mismatch

2019-03-18 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Mon Mar 18 16:26:54 2019 New Revision: 356427 URL: http://llvm.org/viewvc/llvm-project?rev=356427&view=rev Log: Thread safety analysis: Add note for unlock kind mismatch Summary: Similar to D56967, we add the existing diag::note_locked_here to tell the user where we saw

r356430 - Minor renaming as suggested in review [NFC]

2019-03-18 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Mon Mar 18 17:14:46 2019 New Revision: 356430 URL: http://llvm.org/viewvc/llvm-project?rev=356430&view=rev Log: Minor renaming as suggested in review [NFC] See D59455. Modified: cfe/trunk/include/clang/Analysis/Analyses/ThreadSafety.h cfe/trunk/lib/Sema/Analysi

r342418 - Thread safety analysis: Run more tests with capability attributes [NFC]

2018-09-17 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Mon Sep 17 14:37:22 2018 New Revision: 342418 URL: http://llvm.org/viewvc/llvm-project?rev=342418&view=rev Log: Thread safety analysis: Run more tests with capability attributes [NFC] Summary: We run the tests for -Wthread-safety-{negative,verbose} with the new attribut

r342519 - Thread safety analysis: Fix crash for function pointers

2018-09-18 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Tue Sep 18 17:19:38 2018 New Revision: 342519 URL: http://llvm.org/viewvc/llvm-project?rev=342519&view=rev Log: Thread safety analysis: Fix crash for function pointers For function pointers, the FunctionDecl of the callee is unknown, so getDirectCallee will return nullp

r342600 - Thread safety analysis: Handle ObjCIvarRefExpr in SExprBuilder::translate

2018-09-19 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Wed Sep 19 16:57:38 2018 New Revision: 342600 URL: http://llvm.org/viewvc/llvm-project?rev=342600&view=rev Log: Thread safety analysis: Handle ObjCIvarRefExpr in SExprBuilder::translate Summary: This imitates the code for MemberExpr. Fixes PR38896. Reviewers: aaron.ba

r342605 - Thread Safety Analysis: warnings for attributes without arguments

2018-09-19 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Wed Sep 19 17:39:27 2018 New Revision: 342605 URL: http://llvm.org/viewvc/llvm-project?rev=342605&view=rev Log: Thread Safety Analysis: warnings for attributes without arguments Summary: When thread safety annotations are used without capability arguments, they are assu

r342787 - Thread safety analysis: Make sure FactEntrys stored in FactManager are immutable [NFC]

2018-09-21 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Fri Sep 21 16:08:30 2018 New Revision: 342787 URL: http://llvm.org/viewvc/llvm-project?rev=342787&view=rev Log: Thread safety analysis: Make sure FactEntrys stored in FactManager are immutable [NFC] Since FactEntrys are stored in the FactManager, we can't manipulate th

r342790 - Thread safety analysis: Make printSCFG compile again [NFC]

2018-09-21 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Fri Sep 21 16:46:35 2018 New Revision: 342790 URL: http://llvm.org/viewvc/llvm-project?rev=342790&view=rev Log: Thread safety analysis: Make printSCFG compile again [NFC] Not used productively, so no observable functional change. Note that printSCFG doesn't yet work re

r342823 - Eliminate some unneeded signed/unsigned conversions

2018-09-22 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Sat Sep 22 14:56:16 2018 New Revision: 342823 URL: http://llvm.org/viewvc/llvm-project?rev=342823&view=rev Log: Eliminate some unneeded signed/unsigned conversions No functional change is intended, but generally this should be a bit more safe. Modified: cfe/trunk/i

r343681 - Thread safety analysis: Unwrap __builtin_expect in getTrylockCallExpr

2018-10-03 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Wed Oct 3 04:58:19 2018 New Revision: 343681 URL: http://llvm.org/viewvc/llvm-project?rev=343681&view=rev Log: Thread safety analysis: Unwrap __builtin_expect in getTrylockCallExpr Summary: When people are really sure they'll get the lock they sometimes use __builtin_e

r343831 - Thread safety analysis: Examine constructor arguments

2018-10-04 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Thu Oct 4 16:51:14 2018 New Revision: 343831 URL: http://llvm.org/viewvc/llvm-project?rev=343831&view=rev Log: Thread safety analysis: Examine constructor arguments Summary: Instead of only examining call arguments, we also examine constructor arguments applying the sa

r343902 - Thread safety analysis: Handle conditional expression in getTrylockCallExpr

2018-10-05 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Fri Oct 5 18:09:28 2018 New Revision: 343902 URL: http://llvm.org/viewvc/llvm-project?rev=343902&view=rev Log: Thread safety analysis: Handle conditional expression in getTrylockCallExpr Summary: We unwrap conditional expressions containing try-lock functions. Additio

r362266 - Clarify when fix-it hints on warnings are appropriate

2019-05-31 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Fri May 31 14:27:39 2019 New Revision: 362266 URL: http://llvm.org/viewvc/llvm-project?rev=362266&view=rev Log: Clarify when fix-it hints on warnings are appropriate Summary: This is not a change in the rules, it's meant as a clarification about warnings. Since the reco

r363494 - [Clang] Rename -split-dwarf-file to -split-dwarf-output

2019-06-15 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Sat Jun 15 07:07:43 2019 New Revision: 363494 URL: http://llvm.org/viewvc/llvm-project?rev=363494&view=rev Log: [Clang] Rename -split-dwarf-file to -split-dwarf-output Summary: This is the first in a series of changes trying to align clang -cc1 flags for Split DWARF wit

r363496 - [Clang] Harmonize Split DWARF options with llc

2019-06-15 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Sat Jun 15 08:38:51 2019 New Revision: 363496 URL: http://llvm.org/viewvc/llvm-project?rev=363496&view=rev Log: [Clang] Harmonize Split DWARF options with llc Summary: With Split DWARF the resulting object file (then called skeleton CU) contains the file name of another

r363748 - Show note for -Wmissing-prototypes for functions with parameters

2019-06-18 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Tue Jun 18 15:52:39 2019 New Revision: 363748 URL: http://llvm.org/viewvc/llvm-project?rev=363748&view=rev Log: Show note for -Wmissing-prototypes for functions with parameters Summary: There was a search for non-prototype declarations for the function, but we only show

r363749 - Suggestions to fix -Wmissing-{prototypes, variable-declarations}

2019-06-18 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Tue Jun 18 15:57:08 2019 New Revision: 363749 URL: http://llvm.org/viewvc/llvm-project?rev=363749&view=rev Log: Suggestions to fix -Wmissing-{prototypes,variable-declarations} Summary: I've found that most often the proper way to fix this warning is to add `static`, bec

r363754 - Fix tests after r363749

2019-06-18 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Tue Jun 18 16:40:17 2019 New Revision: 363754 URL: http://llvm.org/viewvc/llvm-project?rev=363754&view=rev Log: Fix tests after r363749 We changed -Wmissing-prototypes there, which was used in these tests via -Weverything. Modified: cfe/trunk/test/Preprocessor/Weve

[clang-tools-extra] r363760 - Fix more tests after r363749

2019-06-18 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Tue Jun 18 18:54:05 2019 New Revision: 363760 URL: http://llvm.org/viewvc/llvm-project?rev=363760&view=rev Log: Fix more tests after r363749 Apparently -Wmissing-prototypes is used for quite a few integration tests. Modified: clang-tools-extra/trunk/test/clang-tidy

r364479 - [Clang] Remove unused -split-dwarf and obsolete -enable-split-dwarf

2019-06-26 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Wed Jun 26 14:36:35 2019 New Revision: 364479 URL: http://llvm.org/viewvc/llvm-project?rev=364479&view=rev Log: [Clang] Remove unused -split-dwarf and obsolete -enable-split-dwarf Summary: The changes in D59673 made the choice redundant, since we can achieve single-file

r364480 - Fix formatting after r364479

2019-06-26 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Wed Jun 26 14:39:19 2019 New Revision: 364480 URL: http://llvm.org/viewvc/llvm-project?rev=364480&view=rev Log: Fix formatting after r364479 The reflowing obscurs the functional changes, so here is a separate commit. Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

r349300 - Thread safety analysis: Allow scoped releasing of capabilities

2018-12-16 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Sun Dec 16 06:15:30 2018 New Revision: 349300 URL: http://llvm.org/viewvc/llvm-project?rev=349300&view=rev Log: Thread safety analysis: Allow scoped releasing of capabilities Summary: The pattern is problematic with C++ exceptions, and not as widespread as scoped locks,

r349308 - Thread safety analysis: Avoid intermediate copies [NFC]

2018-12-16 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Sun Dec 16 08:19:11 2018 New Revision: 349308 URL: http://llvm.org/viewvc/llvm-project?rev=349308&view=rev Log: Thread safety analysis: Avoid intermediate copies [NFC] The main reason is to reduce the number of constructor arguments though, especially since many of them

r373148 - Don't install example analyzer plugins

2019-09-28 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Sat Sep 28 06:28:50 2019 New Revision: 373148 URL: http://llvm.org/viewvc/llvm-project?rev=373148&view=rev Log: Don't install example analyzer plugins Summary: Fixes PR43430. Reviewers: hintonda, NoQ, Szelethus, lebedev.ri Reviewed By: lebedev.ri Differential Revisio

[clang] 1850f56 - Thread safety analysis: Support deferring locks

2020-06-08 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-06-08T17:00:29+02:00 New Revision: 1850f56c8abae637c2cc1b8d27b8577c5700101a URL: https://github.com/llvm/llvm-project/commit/1850f56c8abae637c2cc1b8d27b8577c5700101a DIFF: https://github.com/llvm/llvm-project/commit/1850f56c8abae637c2cc1b8d27b8577c5700101a.diff

[clang] f70912f - Thread safety analysis: Add note for double unlock

2020-06-08 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-06-08T17:00:29+02:00 New Revision: f70912f885f991d5af11d8ecb10b703f3cbed982 URL: https://github.com/llvm/llvm-project/commit/f70912f885f991d5af11d8ecb10b703f3cbed982 DIFF: https://github.com/llvm/llvm-project/commit/f70912f885f991d5af11d8ecb10b703f3cbed982.diff

[clang] f43859a - PR45000: Let Sema::SubstParmVarDecl handle default args of lambdas in initializers

2020-04-22 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-04-22T22:37:21+02:00 New Revision: f43859a099fa3587123717be941fa63ba8d0d4f2 URL: https://github.com/llvm/llvm-project/commit/f43859a099fa3587123717be941fa63ba8d0d4f2 DIFF: https://github.com/llvm/llvm-project/commit/f43859a099fa3587123717be941fa63ba8d0d4f2.diff

[clang] 391c15f - [NFC] Correct typo in comment after D76038

2020-04-22 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-04-23T02:26:02+02:00 New Revision: 391c15fccdc6b0d33bb651a298c07216e532904e URL: https://github.com/llvm/llvm-project/commit/391c15fccdc6b0d33bb651a298c07216e532904e DIFF: https://github.com/llvm/llvm-project/commit/391c15fccdc6b0d33bb651a298c07216e532904e.diff

[clang] ce7eb72 - Thread safety analysis: Reword warning after D72635

2020-04-27 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-04-27T22:23:52+02:00 New Revision: ce7eb72a3c87a9d15ba4962fa7a23aad24f98156 URL: https://github.com/llvm/llvm-project/commit/ce7eb72a3c87a9d15ba4962fa7a23aad24f98156 DIFF: https://github.com/llvm/llvm-project/commit/ce7eb72a3c87a9d15ba4962fa7a23aad24f98156.diff

Re: [PATCH] D78853: [Analysis] Fix null pointer dereference warnings [1/n]

2020-04-29 Thread Aaron Puchert via cfe-commits
Am 29.04.20 um 23:11 schrieb Mandeep Singh Grang: > My previous email details why we are doing > this: http://lists.llvm.org/pipermail/llvm-dev/2020-April/141167.html > Basically, we ran the PREfast static analysis tool on LLVM/Clang and > it reported a lot of warnings. I guess some of them are fal

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-04 Thread Aaron Puchert via cfe-commits
@@ -1530,7 +1532,6 @@ void ThreadSafetyAnalyzer::getEdgeLockset(FactSet& Result, } namespace { - aaronpuchert wrote: Nitpick: can you undo the whitespace change? https://github.com/llvm/llvm-project/pull/74020 ___

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-04 Thread Aaron Puchert via cfe-commits
@@ -2487,15 +2486,15 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) { // Clean up constructed object even if there are no attributes to // keep the number of objects in limbo as small as possible. - if (auto Object = LocksetBui

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-05 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert approved this pull request. Thanks, looks good to me! https://github.com/llvm/llvm-project/pull/74020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -0,0 +1,143 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s + +#include +#include +#include +#include + +__attribute__((__format__ (__scanf__, 1, 4))) +void f1(char *out, const size_t len, const char *format, ... /* args */) +{ +va_list args;

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) { checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); } +// Warn if parent function misses format attribute. Parent function misses +// format attribute if there is an argum

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert commented: Two additional checks that might be interesting: * Look at the `FormatIdx` argument. Is it a `DeclRefExpr` referring to a `ParmVarDecl`, perhaps with some conversions? (There is probably going to be an `LValueToRValue` conversion at least. There are sp

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) { checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); } +// Warn if parent function misses format attribute. Parent function misses +// format attribute if there is an argum

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -0,0 +1,132 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s + +#include +#include + +void f1(const std::string &str, ... /* args */) +{ +va_list args; +vscanf(str.c_str(), args); // no warning +vprintf(str.c_str(), args); // no warning +

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -0,0 +1,143 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s + +#include +#include +#include +#include + +__attribute__((__format__ (__scanf__, 1, 4))) +void f1(char *out, const size_t len, const char *format, ... /* args */) +{ +va_list args;

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/70024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) { checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); } +// Warn if parent function misses format attribute. Parent function misses +// format attribute if there is an argum

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) { checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); } +// Warn if parent function misses format attribute. Parent function misses +// format attribute if there is an argum

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) { checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); } +// Warn if parent function misses format attribute. Parent function misses +// format attribute if there is an argum

[clang] [clang][Sema] Add -Wswitch-default warning option (PR #73077)

2023-12-20 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: @gendalph, this warning is meant to always warn if a {{default}} label is missing, even if all enumeration values are covered. If you don't want a warning on enumerations, use the previously mentioned clang-tidy check [bugprone-switch-missing-default-case](https://clang.llv

[clang] [Clang][Sema] Fix Wswitch-default bad warning in template (PR #76007)

2023-12-20 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert approved this pull request. For now I guess this is Ok, although I think the better fix would be to diagnose missing or duplicate `default` labels even in the dependent case. Because `default` labels themselves are never dependent. https://github.com/llvm/llvm-p

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-03 Thread Aaron Puchert via cfe-commits
@@ -1544,7 +1544,10 @@ class BuildLockset : public ConstStmtVisitor { // The fact set for the function on exit. const FactSet &FunctionExitFSet; /// Maps constructed objects to `this` placeholder prior to initialization. - llvm::SmallDenseMap ConstructedObjects; + ///

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-03 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/74020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-03 Thread Aaron Puchert via cfe-commits
@@ -1718,6 +1720,13 @@ struct TestScopedLockable { MutexLock{&mu1}, a = 5; } + void temporary2(int x) { +if (check(MutexLock{&mu1}) || x) { + +} +check(MutexLock{&mu1}); aaronpuchert wrote: The `check` here doesn't do anything, right? http

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-03 Thread Aaron Puchert via cfe-commits
@@ -1718,6 +1720,13 @@ struct TestScopedLockable { MutexLock{&mu1}, a = 5; } + void temporary2(int x) { aaronpuchert wrote: I would suggest a speaking name for the test, like `temporary_cfg`. https://github.com/llvm/llvm-project/pull/74020 ___

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-03 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert commented: I have some suggestions, but in principle this is absolutely right. Thanks for finding this and providing a fix! > The issue is that the map lives within a CFG block. It didn't cross my mind to check how long `BuildLockset` lived, I always assumed i

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-03 Thread Aaron Puchert via cfe-commits
@@ -2392,6 +2397,8 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) { for (const auto &Lock : LocksReleased) ExpectedFunctionExitSet.removeLock(FactMan, Lock); + ConstructedObjectMapTy ConstructedObjects; aaronpuchert wrote: I wonder

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-03 Thread Aaron Puchert via cfe-commits
@@ -1718,6 +1720,13 @@ struct TestScopedLockable { MutexLock{&mu1}, a = 5; } + void temporary2(int x) { +if (check(MutexLock{&mu1}) || x) { + +} aaronpuchert wrote: The `if` is probably not needed here, right? We could just write ```suggestion

[clang] [clang][Sema] Add -Wswitch-default warning option (PR #73077)

2023-12-03 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: > There is one clang-tidy check (bugprone-switch-missing-default-case) also for > this feature. This excludes enumeration types though, while GCC `-Wswitch-default` warns on them as well. (Even if all enumeration values are covered.) > whether switch statements should have

[clang] [clang][Sema] Add -Wswitch-default warning option (PR #73077)

2023-12-03 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: In the end it probably boils down to how you view an enumeration type. Is it a type with the declared enumerators as inhabitants, or is it an integer type of some length with associated symbolic constants of that type? In other words, is an enumeration a "strong" type or a

[clang] [clang][Sema] Add -Wswitch-default warning option (PR #73077)

2023-12-04 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: > Aaron is the real decision maker here Specifically @AaronBallman, not me. https://github.com/llvm/llvm-project/pull/73077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [Clang][Sema] Fix Wswitch-default bad warning in template (PR #76007)

2023-12-21 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert approved this pull request. https://github.com/llvm/llvm-project/pull/76007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1721d52 - Let clang-repl link privately against Clang components

2022-03-28 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-03-28T23:53:53+02:00 New Revision: 1721d52a62067b8a5ceec58b417b2c73ad870b13 URL: https://github.com/llvm/llvm-project/commit/1721d52a62067b8a5ceec58b417b2c73ad870b13 DIFF: https://github.com/llvm/llvm-project/commit/1721d52a62067b8a5ceec58b417b2c73ad870b13.diff

[clang] 0e64a52 - Thread safety analysis: Mock getter for private mutexes can be undefined

2021-07-23 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-07-23T14:46:02+02:00 New Revision: 0e64a525c12a0822683d3bdc51b6294b5265f860 URL: https://github.com/llvm/llvm-project/commit/0e64a525c12a0822683d3bdc51b6294b5265f860 DIFF: https://github.com/llvm/llvm-project/commit/0e64a525c12a0822683d3bdc51b6294b5265f860.diff

[clang-tools-extra] c9a16e8 - Drop '* text=auto' from .gitattributes and normalize

2022-04-27 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-04-28T03:05:10+02:00 New Revision: c9a16e8c3d99173c7525e576d78eed57110d2b08 URL: https://github.com/llvm/llvm-project/commit/c9a16e8c3d99173c7525e576d78eed57110d2b08 DIFF: https://github.com/llvm/llvm-project/commit/c9a16e8c3d99173c7525e576d78eed57110d2b08.diff

[clang] dd1790c - Thread safety analysis: Pack CapabilityExpr using PointerIntPair (NFC)

2022-04-29 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-04-29T22:30:33+02:00 New Revision: dd1790cd05ae124e9e5d57dfe9279ff54f34b488 URL: https://github.com/llvm/llvm-project/commit/dd1790cd05ae124e9e5d57dfe9279ff54f34b488 DIFF: https://github.com/llvm/llvm-project/commit/dd1790cd05ae124e9e5d57dfe9279ff54f34b488.diff

[clang] d65c922 - Thread safety analysis: Store CapabilityExprs in ScopedLockableFactEntry (NFC)

2022-04-29 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-04-29T22:30:33+02:00 New Revision: d65c922450d1fdf0f44f4a10a8f33b11c6c01bf5 URL: https://github.com/llvm/llvm-project/commit/d65c922450d1fdf0f44f4a10a8f33b11c6c01bf5 DIFF: https://github.com/llvm/llvm-project/commit/d65c922450d1fdf0f44f4a10a8f33b11c6c01bf5.diff

[clang] f8afb8f - Thread safety analysis: Store capability kind in CapabilityExpr

2022-04-29 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-04-29T22:30:33+02:00 New Revision: f8afb8fdedae04ad2670857c97925c439d47d862 URL: https://github.com/llvm/llvm-project/commit/f8afb8fdedae04ad2670857c97925c439d47d862 DIFF: https://github.com/llvm/llvm-project/commit/f8afb8fdedae04ad2670857c97925c439d47d862.diff

[clang] 0314dba - Thread safety analysis: Don't pass capability kind where not needed (NFC)

2022-04-29 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-04-29T22:30:33+02:00 New Revision: 0314dbac026f58aaaf0a9ee4515f401f0d43ee76 URL: https://github.com/llvm/llvm-project/commit/0314dbac026f58aaaf0a9ee4515f401f0d43ee76 DIFF: https://github.com/llvm/llvm-project/commit/0314dbac026f58aaaf0a9ee4515f401f0d43ee76.diff

[clang] bfe63ab - Thread safety analysis: Support builtin pointer-to-member operators

2022-07-14 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-07-14T13:36:14+02:00 New Revision: bfe63ab63e22b61bd5898c65425e8ebe43189913 URL: https://github.com/llvm/llvm-project/commit/bfe63ab63e22b61bd5898c65425e8ebe43189913 DIFF: https://github.com/llvm/llvm-project/commit/bfe63ab63e22b61bd5898c65425e8ebe43189913.diff

[clang] e0c66c6 - Thread safety analysis: Don't erase TIL_Opcode type (NFC)

2022-07-14 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-07-14T13:36:35+02:00 New Revision: e0c66c699eb000f604e24b1c4e73b899b4d942d3 URL: https://github.com/llvm/llvm-project/commit/e0c66c699eb000f604e24b1c4e73b899b4d942d3 DIFF: https://github.com/llvm/llvm-project/commit/e0c66c699eb000f604e24b1c4e73b899b4d942d3.diff

[clang] 44ae49e - Thread safety analysis: Handle compound assignment and ->* overloads

2022-05-09 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-05-09T15:35:43+02:00 New Revision: 44ae49e1a72576ca6aa8835b3f72df9605516403 URL: https://github.com/llvm/llvm-project/commit/44ae49e1a72576ca6aa8835b3f72df9605516403 DIFF: https://github.com/llvm/llvm-project/commit/44ae49e1a72576ca6aa8835b3f72df9605516403.diff

[clang] 99d3582 - Comment parsing: Specify argument numbers for some block commands

2022-05-13 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-05-13T13:48:46+02:00 New Revision: 99d35826a043916b259a0e440a2aa5cabbad2773 URL: https://github.com/llvm/llvm-project/commit/99d35826a043916b259a0e440a2aa5cabbad2773 DIFF: https://github.com/llvm/llvm-project/commit/99d35826a043916b259a0e440a2aa5cabbad2773.diff

[clang] d3a4033 - Comment parsing: Allow inline commands to have 0 or more than 1 argument

2022-05-13 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-05-13T13:48:46+02:00 New Revision: d3a4033d6ee1d017e216ff7caeeeb5ca2e18a783 URL: https://github.com/llvm/llvm-project/commit/d3a4033d6ee1d017e216ff7caeeeb5ca2e18a783 DIFF: https://github.com/llvm/llvm-project/commit/d3a4033d6ee1d017e216ff7caeeeb5ca2e18a783.diff

[clang] d2396d8 - Comment parsing: Treat properties as zero-argument inline commands

2022-05-13 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-05-13T13:48:46+02:00 New Revision: d2396d896ee12ad20bc740174edfce2120d742b2 URL: https://github.com/llvm/llvm-project/commit/d2396d896ee12ad20bc740174edfce2120d742b2 DIFF: https://github.com/llvm/llvm-project/commit/d2396d896ee12ad20bc740174edfce2120d742b2.diff

[clang] 25862f5 - Try to disambiguate between overloads on Mac

2022-05-13 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-05-13T16:29:02+02:00 New Revision: 25862f53cce966cef2957825095861dec631d4f1 URL: https://github.com/llvm/llvm-project/commit/25862f53cce966cef2957825095861dec631d4f1 DIFF: https://github.com/llvm/llvm-project/commit/25862f53cce966cef2957825095861dec631d4f1.diff

[clang] ac7a9ef - Resolve overload ambiguity on Mac OS when printing size_t in diagnostics

2022-05-14 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-05-14T12:37:36+02:00 New Revision: ac7a9ef0ae3a5c63dc4e641f9912d8b659ebd720 URL: https://github.com/llvm/llvm-project/commit/ac7a9ef0ae3a5c63dc4e641f9912d8b659ebd720 DIFF: https://github.com/llvm/llvm-project/commit/ac7a9ef0ae3a5c63dc4e641f9912d8b659ebd720.diff

[clang] Thread safety analysis: provide printSCFG definition. (PR #80277)

2024-02-25 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert approved this pull request. Thanks, looks good to me! https://github.com/llvm/llvm-project/pull/80277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #70024)

2023-10-24 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/70024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #70024)

2023-10-24 Thread Aaron Puchert via cfe-commits
@@ -435,6 +435,86 @@ bool Sema::ConstantFoldAttrArgs(const AttributeCommonInfo &CI, return true; } +// Warn if parent function does not have builtin function format attribute. +void Sema::DiagnoseMissingFormatAttributes(NamedDecl *FDecl, +

[clang] [clang] Catch missing format attributes (PR #70024)

2023-10-24 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert commented: I assume this is meant to imitate the GCC warning of the same name, which I found pretty useful. Would be nice to have the same in Clang! https://github.com/llvm/llvm-project/pull/70024 ___ cfe-commits mailin

[clang] [clang] Catch missing format attributes (PR #70024)

2023-10-24 Thread Aaron Puchert via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c99 -Wmissing-format-attribute %s + +#include +#include + +va_list args; + +__attribute__((__format__ (__scanf__, 1, 4))) +void foo(char *out,

[clang] [clang] Catch missing format attributes (PR #70024)

2023-10-24 Thread Aaron Puchert via cfe-commits
@@ -435,6 +435,86 @@ bool Sema::ConstantFoldAttrArgs(const AttributeCommonInfo &CI, return true; } +// Warn if parent function does not have builtin function format attribute. +void Sema::DiagnoseMissingFormatAttributes(NamedDecl *FDecl, +

[clang] [clang] Catch missing format attributes (PR #70024)

2023-10-24 Thread Aaron Puchert via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c99 -Wmissing-format-attribute %s + +#include +#include + +va_list args; aaronpuchert wrote: This should be in the function b

[clang] [clang] Catch missing format attributes (PR #70024)

2023-10-24 Thread Aaron Puchert via cfe-commits
@@ -435,6 +435,86 @@ bool Sema::ConstantFoldAttrArgs(const AttributeCommonInfo &CI, return true; } +// Warn if parent function does not have builtin function format attribute. +void Sema::DiagnoseMissingFormatAttributes(NamedDecl *FDecl, +

[clang] [clang] Catch missing format attributes (PR #70024)

2023-10-24 Thread Aaron Puchert via cfe-commits
@@ -435,6 +435,86 @@ bool Sema::ConstantFoldAttrArgs(const AttributeCommonInfo &CI, return true; } +// Warn if parent function does not have builtin function format attribute. +void Sema::DiagnoseMissingFormatAttributes(NamedDecl *FDecl, +

[clang] [clang] Catch missing format attributes (PR #70024)

2023-10-24 Thread Aaron Puchert via cfe-commits
@@ -435,6 +435,86 @@ bool Sema::ConstantFoldAttrArgs(const AttributeCommonInfo &CI, return true; } +// Warn if parent function does not have builtin function format attribute. +void Sema::DiagnoseMissingFormatAttributes(NamedDecl *FDecl, +

[clang] [clang] Catch missing format attributes (PR #70024)

2023-10-24 Thread Aaron Puchert via cfe-commits
@@ -435,6 +435,86 @@ bool Sema::ConstantFoldAttrArgs(const AttributeCommonInfo &CI, return true; } +// Warn if parent function does not have builtin function format attribute. +void Sema::DiagnoseMissingFormatAttributes(NamedDecl *FDecl, +

[clang] [clang] Catch missing format attributes (PR #70024)

2023-10-24 Thread Aaron Puchert via cfe-commits
@@ -435,6 +435,86 @@ bool Sema::ConstantFoldAttrArgs(const AttributeCommonInfo &CI, return true; } +// Warn if parent function does not have builtin function format attribute. +void Sema::DiagnoseMissingFormatAttributes(NamedDecl *FDecl, +

[clang] [clang] Catch missing format attributes (PR #70024)

2023-10-24 Thread Aaron Puchert via cfe-commits
@@ -435,6 +435,86 @@ bool Sema::ConstantFoldAttrArgs(const AttributeCommonInfo &CI, return true; } +// Warn if parent function does not have builtin function format attribute. +void Sema::DiagnoseMissingFormatAttributes(NamedDecl *FDecl, +

[clang] f702a6f - Thread safety analysis: Improve documentation for ASSERT_CAPABILITY

2020-09-26 Thread Aaron Puchert via cfe-commits
Author: Russell Yanofsky Date: 2020-09-26T22:16:50+02:00 New Revision: f702a6fa7c9e4c0e2871b3d6657ce4dfa525ce52 URL: https://github.com/llvm/llvm-project/commit/f702a6fa7c9e4c0e2871b3d6657ce4dfa525ce52 DIFF: https://github.com/llvm/llvm-project/commit/f702a6fa7c9e4c0e2871b3d6657ce4dfa525ce52.di

[clang] 4855018 - Fix sphinx warnings in AttributeReference, NFC

2020-09-26 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-09-27T00:52:36+02:00 New Revision: 485501899d6c752ff05f4e045f7f89ace39ec413 URL: https://github.com/llvm/llvm-project/commit/485501899d6c752ff05f4e045f7f89ace39ec413 DIFF: https://github.com/llvm/llvm-project/commit/485501899d6c752ff05f4e045f7f89ace39ec413.diff

[clang] 916b750 - [CodeGen] Use existing EmitLambdaVLACapture (NFC)

2020-08-19 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-08-19T15:20:05+02:00 New Revision: 916b750a8d1ab47d41939b42bf1d6eeddbdef686 URL: https://github.com/llvm/llvm-project/commit/916b750a8d1ab47d41939b42bf1d6eeddbdef686 DIFF: https://github.com/llvm/llvm-project/commit/916b750a8d1ab47d41939b42bf1d6eeddbdef686.diff

[clang] 85fce44 - [Sema] Simplify ShouldDiagnoseUnusedDecl, NFC

2020-08-29 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-08-29T18:42:58+02:00 New Revision: 85fce449dc43447bf9d75163bda81e157f5b73e7 URL: https://github.com/llvm/llvm-project/commit/85fce449dc43447bf9d75163bda81e157f5b73e7 DIFF: https://github.com/llvm/llvm-project/commit/85fce449dc43447bf9d75163bda81e157f5b73e7.diff

[clang] b4a2d36 - [Sema] ICK_Function_Conversion is a third kind conversion

2020-08-29 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-08-29T18:42:36+02:00 New Revision: b4a2d36c3f74ea5574cd03a9c1a704bcffb1869e URL: https://github.com/llvm/llvm-project/commit/b4a2d36c3f74ea5574cd03a9c1a704bcffb1869e DIFF: https://github.com/llvm/llvm-project/commit/b4a2d36c3f74ea5574cd03a9c1a704bcffb1869e.diff

[clang] 8ca00c5 - Thread safety analysis: More consistent warning message

2020-09-01 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-09-01T23:16:05+02:00 New Revision: 8ca00c5cdc0b86a433b80db633f3ff46e6547895 URL: https://github.com/llvm/llvm-project/commit/8ca00c5cdc0b86a433b80db633f3ff46e6547895 DIFF: https://github.com/llvm/llvm-project/commit/8ca00c5cdc0b86a433b80db633f3ff46e6547895.diff

[clang] 8544def - Thread safety analysis: Document how try-acquire is handled

2020-09-05 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-09-05T14:26:43+02:00 New Revision: 8544defdcb09c25c5958e5f5b5762e9b9046 URL: https://github.com/llvm/llvm-project/commit/8544defdcb09c25c5958e5f5b5762e9b9046 DIFF: https://github.com/llvm/llvm-project/commit/8544defdcb09c25c5958e5f5b5762e9b9046.diff

[clang] 16975a6 - Set InvalidDecl directly when deserializing a Decl

2020-09-05 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-09-05T14:26:43+02:00 New Revision: 16975a638df3cda95c677055120b23e689d96dcd URL: https://github.com/llvm/llvm-project/commit/16975a638df3cda95c677055120b23e689d96dcd DIFF: https://github.com/llvm/llvm-project/commit/16975a638df3cda95c677055120b23e689d96dcd.diff

[clang] b2ce79e - Thread safety analysis: ValueDecl in Project is non-null

2020-09-05 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-09-05T17:26:12+02:00 New Revision: b2ce79ef66157dd752e3864ece57915e23a73f5d URL: https://github.com/llvm/llvm-project/commit/b2ce79ef66157dd752e3864ece57915e23a73f5d DIFF: https://github.com/llvm/llvm-project/commit/b2ce79ef66157dd752e3864ece57915e23a73f5d.diff

  1   2   3   4   >