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
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
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:
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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
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
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
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
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
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
@@ -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
___
@@ -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
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
@@ -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;
@@ -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
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
@@ -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
@@ -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
+
@@ -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;
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
@@ -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
@@ -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
@@ -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
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
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
@@ -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;
+ ///
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
@@ -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
@@ -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
___
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
@@ -2392,6 +2397,8 @@ void
ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) {
for (const auto &Lock : LocksReleased)
ExpectedFunctionExitSet.removeLock(FactMan, Lock);
+ ConstructedObjectMapTy ConstructedObjects;
aaronpuchert wrote:
I wonder
@@ -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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
@@ -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,
+
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
@@ -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,
@@ -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,
+
@@ -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
@@ -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,
+
@@ -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,
+
@@ -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,
+
@@ -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,
+
@@ -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,
+
@@ -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,
+
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
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
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
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
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
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
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
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
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 - 100 of 379 matches
Mail list logo