[PATCH] D144943: [clang][Interp] Implement bitcasts (WIP)

2023-05-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144943/new/ https://reviews.llvm.org/D144943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D146030: [clang][Interp] Handle LambdaExprs

2023-05-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146030/new/ https://reviews.llvm.org/D146030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D147591: [clang][Interp] Handle CXXTemporaryObjectExprs

2023-05-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147591/new/ https://reviews.llvm.org/D147591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D147621: [clang][Interp] Start handling mutable record members

2023-05-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147621/new/ https://reviews.llvm.org/D147621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D147840: [clang][Interp] Handle DiscardResult for DeclRef- and ParenExprs

2023-05-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147840/new/ https://reviews.llvm.org/D147840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D148614: [clang][Interp] Add frame depth checking

2023-05-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148614/new/ https://reviews.llvm.org/D148614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D148689: [clang][Interp] Handle PredefinedExprs

2023-05-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148689/new/ https://reviews.llvm.org/D148689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D148690: [clang][Interp] Handle __extension__ unary operators

2023-05-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148690/new/ https://reviews.llvm.org/D148690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D148982: [clang][Interp] Fix ignoring conditional operators

2023-05-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148982/new/ https://reviews.llvm.org/D148982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D149133: [clang][Interp] BaseToDerived casts

2023-05-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149133/new/ https://reviews.llvm.org/D149133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D149013: [clang][Interp] Check pointers when accessing base class

2023-05-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149013/new/ https://reviews.llvm.org/D149013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D149149: [clang][Interp] Check one-past-the-end pointers in GetPtrField

2023-05-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149149/new/ https://reviews.llvm.org/D149149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D149633: [clang][codegen] Add F128 svnprintf_chk builtin

2023-05-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: ecnelises, tstellar, tuliom, efriedma. Herald added subscribers: kbarton, nemanjai. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://g

[PATCH] D149634: [clang][Interp] Implement inc/dec operators for floats

2023-05-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik, sepavloff. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Looks like I forgot these. Repository

[PATCH] D149641: [docs] Hide collaboration and include graphs in doxygen docs

2023-05-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, shafik. Herald added a reviewer: bollu. Herald added subscribers: bviyer, Moerafaat, zero9178, bzcheeseman, ayermolo, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, J

[PATCH] D149645: [clang][Interp] Optionally cast comparison result to non-bool

2023-05-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Our comparison opcodes always produce a Boolean v

[PATCH] D149645: [clang][Interp] Optionally cast comparison result to non-bool

2023-05-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D149645#4312162 , @erichkeane wrote: > For C, should we instead be teaching our boolean operations to understand it > might be int? I fear this will end up causing conversion problems later, > such as with: > > `int F = 1 >

[PATCH] D149645: [clang][Interp] Optionally cast comparison result to non-bool

2023-05-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 518707. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149645/new/ https://reviews.llvm.org/D149645 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/c.c Index: clang/test/AST/Interp/c.c ==

[PATCH] D149645: [clang][Interp] Optionally cast comparison result to non-bool

2023-05-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D149645#4312193 , @erichkeane wrote: > In D149645#4312190 , @tbaeder wrote: > >> In D149645#4312162 , @erichkeane >> wrote: >> >>> For C, sho

[PATCH] D148690: [clang][Interp] Handle __extension__ unary operators

2023-05-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/literals.cpp:791 +#endif return __FUNCTION__[index]; } aaron.ballman wrote: > tbaeder wrote: > > erichkeane wrote: > > > tbaeder wrote: > > > > It's weird that the above two statements warn

[PATCH] D149013: [clang][Interp] Check pointers when accessing base class

2023-05-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/records.cpp:509-512 + constexpr A *a2 = &b + 1; // expected-error {{must be initialized by a constant expression}} \ +// expected-note {{cannot access base class of pointer past the en

[PATCH] D149514: Check if First argument in _builtin_assume_aligned_ is of pointer type

2023-05-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. This patch was submitted by a beginner, because https://github.com/llvm/llvm-project/issues/62305 has the "good first issue" label. From the last few comments, I'm not sure they know how to proceed. Could you summarize what the next steps are? CHANGES SINCE LAST ACTIO

[PATCH] D149816: [clang][Interp] Implement __builtin_strcmp

2023-05-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Make our Function class keep a list of parameter

[PATCH] D147840: [clang][Interp] Handle DiscardResult for DeclRef- and ParenExprs

2023-05-03 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG92f67dc27f41: [clang][Interp] Handle DiscardResult for DeclRef- and ParenExprs (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147840/ne

[PATCH] D149634: [clang][Interp] Implement inc/dec operators for floats

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG338c2489f63e: [clang][Interp] Implement inc/dec operators for floats (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D149634?vs=518642&id=519365#toc Repository: rG LLVM Githu

[PATCH] D149550: [clang][Interp] Fix compound assign operator evaluation order

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:683-685 + // C++17 onwards require that we evaluate the RHS first. + // Compute RHS and save it in a temporary variable so we can + // load it again later. aaron.ballman wrote:

[PATCH] D149550: [clang][Interp] Fix compound assign operator evaluation order

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:683-685 + // C++17 onwards require that we evaluate the RHS first. + // Compute RHS and save it in a temporary variable so we can + // load it again later. tbaeder wrote: > aar

[PATCH] D149550: [clang][Interp] Fix compound assign operator evaluation order

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 519370. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149550/new/ https://reviews.llvm.org/D149550 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/floats.cpp clang/test/AST/Interp/literals.cpp Index: clang/test/AST/Interp

[PATCH] D148689: [clang][Interp] Handle PredefinedExprs

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/literals.cpp:783 + +namespace PredefinedExprs { + constexpr char heh(unsigned index) { shafik wrote: > Can we add tests for each predefined expressions, it does not look like there > are a lot of

[PATCH] D149824: [clang][Interp] Don't call getSource() on functions without a body

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For builtin functions, we create a Function insta

[PATCH] D149828: [clang][Interp] Evaluate Base when discarding a MemberExpr

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The Base expression might cause side-effects, so

[PATCH] D149831: [clang][Interp] Fix ignoring SubstNonTypeTemplateParmExpr

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a subscriber: kristof.beyls. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Ignore

[PATCH] D149834: [clang][Interp] Fix ignoring TypeTraitExprs

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://revi

[PATCH] D149837: [clang][Interp] Fix ignoring CompoundLiteralExprs

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://revi

[PATCH] D149837: [clang][Interp] Fix ignoring CompoundLiteralExprs

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:537 +} } return true; Obviously, this patch also fixes ignoring `InitListExpr`s. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D149641: [docs] Hide collaboration and include graphs in doxygen docs

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGeadf6db585e1: [docs] Hide collaboration and include graphs in doxygen docs (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D149550: [clang][Interp] Fix compound assign operator evaluation order

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 519428. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149550/new/ https://reviews.llvm.org/D149550 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/floats.cpp clang/test/AST/Interp/literals.cpp Index: clang/test/AST/Interp

[PATCH] D147621: [clang][Interp] Start handling mutable record members

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 519434. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147621/new/ https://reviews.llvm.org/D147621 Files: clang/lib/AST/Interp/Interp.cpp clang/lib/AST/Interp/Interp.h clang/test/AST/Interp/records.cpp Index: clang/test/AST/Interp/records.cpp

[PATCH] D149846: [clang][Interp] Check inc/dec family of ops for initialization

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix a few of the leftover FIXME comments from previ

[PATCH] D148689: [clang][Interp] Handle PredefinedExprs

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/literals.cpp:783 + +namespace PredefinedExprs { + constexpr char heh(unsigned index) { aaron.ballman wrote: > tbaeder wrote: > > shafik wrote: > > > Can we add tests for each predefined expressions

[PATCH] D148689: [clang][Interp] Handle PredefinedExprs

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 519479. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148689/new/ https://reviews.llvm.org/D148689 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/test/AST/Interp/literals.cpp Index: clang/test/AST

[PATCH] D149550: [clang][Interp] Fix compound assign operator evaluation order

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:683-685 + // C++17 onwards require that we evaluate the RHS first. + // Compute RHS and save it in a temporary variable so we can + // load it again later. aaron.ballman wrote:

[PATCH] D148689: [clang][Interp] Handle PredefinedExprs

2023-05-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/literals.cpp:849 +static_assert(strings_match(__func__, "foo")); +static_assert(strings_match(__PRETTY_FUNCTION__, "void PredefinedExprs::foo()")); + } aaron.ballman wrote: > You should ad

[PATCH] D152132: [clang][Inter] Fix lifetime diagnostics for dead records

2023-06-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This used to crash the interpreter, either becaus

[PATCH] D152140: [Clang] Limit FunctionTypeExtraBitfields::NumExceptionType to 16 bits.

2023-06-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/include/clang/AST/Type.h:3956 /// [implimits] 8 bits would be enough here. -unsigned NumExceptionType = 0; +unsigned NumExceptionType : 16; + Isn't using a `uint16_t` preferred over a bitfield? Repos

[PATCH] D151833: Respect "-fdiagnostics-absolute-paths" on emit include location

2023-06-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added subscribers: cjdb, aaron.ballman. tbaeder added a comment. LGTM, but maybe wait for a response from @aaron.ballman or @cjdb CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151833/new/ https://reviews.llvm.org/D151833 ___ cfe-commi

[PATCH] D151833: Respect "-fdiagnostics-absolute-paths" on emit include location

2023-06-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. @charmitro do you have commit rights or do you need someone to push on your behalf? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151833/new/ https://reviews.llvm.org/D151833 ___ cfe-commits mailing list cfe-commits@

[PATCH] D150843: [clang][Diagnostics] Refactor printableTextForNextCharacter

2023-06-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping @tahonermann CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150843/new/ https://reviews.llvm.org/D150843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D152090: [clang][Driver] Add -fcaret-diagnostics-max-lines as a driver option

2023-06-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D152090#4395827 , @MaskRay wrote: > `def fcaret_diagnostics_max_lines` in `Options.td` has the `NoDriverOption` > flag. Move it to other places with `BooleainFFlag` should work. > Then in `Clang.cpp` you can just write `Args.

[PATCH] D152246: [clang][ThreadSafety] Analyze known function pointer values

2023-06-06 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: delesley, aaronpuchert, Eugene.Zelenko, aaron.ballman. Herald added a reviewer: NoQ. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When we're cal

[PATCH] D152093: [clang][Analysis] Handle && and || against variable and its negation as tautology

2023-06-06 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Added some more reviewers based on lines owned in `CFG.cpp`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152093/new/ https://reviews.llvm.org/D152093 ___ cfe-commits mailing li

[PATCH] D150843: [clang][Diagnostics] Refactor printableTextForNextCharacter

2023-06-06 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D150843#4401189 , @tahonermann wrote: > The summary states that the changes are not quite NFC. In that case, we would > ideally have a test that demonstrates the changed behavior. Would adding such > a test be challenging?

[PATCH] D150843: [clang][Diagnostics] Refactor printableTextForNextCharacter

2023-06-06 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 529170. tbaeder marked 2 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150843/new/ https://reviews.llvm.org/D150843 Files: clang/lib/Frontend/TextDiagnostic.cpp Index: clang/lib/Frontend/TextDiagnostic.cpp

[PATCH] D152093: [clang][Analysis] Handle && and || against variable and its negation as tautology

2023-06-08 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/Analysis/CFG.cpp:1113-1114 + +const BinaryOperator *LHS = dyn_cast(LHSExpr); +const BinaryOperator *RHS = dyn_cast(RHSExpr); if (!LHS || !RHS) Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D152090: [clang][Driver] Add -fcaret-diagnostics-max-lines as a driver option

2023-06-08 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 529818. tbaeder marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152090/new/ https://reviews.llvm.org/D152090 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Cl

[PATCH] D152090: [clang][Driver] Add -fcaret-diagnostics-max-lines as a driver option

2023-06-08 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked an inline comment as done. tbaeder added inline comments. Comment at: clang/test/Driver/caret-diagnostics-max-lines.cpp:1 +//RUN: not %clang++ -fsyntax-only -fcaret-diagnostics-max-lines=2 %s 2>&1 | FileCheck %s -strict-whitespace + MaskRay wrote:

[PATCH] D152090: [clang][Driver] Add -fcaret-diagnostics-max-lines as a driver option

2023-06-08 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 529832. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152090/new/ https://reviews.llvm.org/D152090 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Clang.cpp clang/test/Driver/caret-diagnost

[PATCH] D152504: [clang][ThreadSafety] Analyze cleanup functions

2023-06-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: NoQ, aaron.ballman, krememek, dergachev.a, MikeStump. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When a declaration has a cleanup function att

[PATCH] D152495: [Clang][SemaCXX] Add unused warning for variables declared in condition expressions

2023-06-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:2852 - "Should not use decl without marking it used!"); - if (ND->hasAttr()) { Question for other reviewers: If we want to keep this assertion, would it instead make sense to mark

[PATCH] D152525: [clang][Diagnostics] Don't expand label fixit to the next line

2023-06-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, cjdb. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Now that we print >1 line of code snippet, we printed another line of code

[PATCH] D144943: [clang][Interp] Implement bitcasts (WIP)

2023-06-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Yes, FWIW I looked into this again last week and noticed a few unsolved problems as well. I'll post a comment once I consider it ready for actual review. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144943/new/ https://reviews.llvm.org/D144943 __

[PATCH] D152525: [clang][Diagnostics] Don't expand label fixit to the next line

2023-06-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. As far as the fixit goes, I guess the previous version was better, since it didn't leave an empty line behind? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152525/new/ https://reviews.llvm.org/D152525 ___

[PATCH] D150358: [clang][Interp] Remove args from called functions in more cases

2023-06-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a subscriber: MaskRay. tbaeder added inline comments. Comment at: clang/test/AST/Interp/functions.cpp:262 +namespace CallWithArgs { + /// This used to call problems during checkPotentialConstantExpression() runs. + constexpr void g(int a) {} aaro

[PATCH] D150843: [clang][Diagnostics] Refactor printableTextForNextCharacter

2023-06-09 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6669dc09a441: [clang][NFC] Refactor printableTextForNextCharacter (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D150843?vs=529170&id=530160#toc Repository: rG LLVM Github M

[PATCH] D152090: [clang][Driver] Add -fcaret-diagnostics-max-lines as a driver option

2023-06-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 530168. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152090/new/ https://reviews.llvm.org/D152090 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Clang.cpp clang/test/Driver/caret-diagnost

[PATCH] D152504: [clang][ThreadSafety] Analyze cleanup functions

2023-06-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 530175. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152504/new/ https://reviews.llvm.org/D152504 Files: clang/lib/Analysis/CFG.cpp clang/test/Sema/warn-thread-safety-analysis.c Index: clang/test/Sema/warn-thread-safety-analysis.c =

[PATCH] D152504: [clang][ThreadSafety] Analyze cleanup functions

2023-06-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/Analysis/CFG.cpp:1945 + auto DRE = + DeclRefExpr::Create(*Context, {}, {}, VD, false, SourceLocation(), + VD->getType(), VK_PRValue); NoQ wrote: > Is there a way to at

[PATCH] D152246: [clang][ThreadSafety] Analyze known function pointer values

2023-06-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 530177. tbaeder marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152246/new/ https://reviews.llvm.org/D152246 Files: clang/lib/Analysis/ThreadSafety.cpp Index: clang/lib/Analysis/ThreadSafety.cpp ===

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-06-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/records.cpp:650 +}; +#endif aaron.ballman wrote: > We should also have test cases for calling virtual functions from within a > constructor and a destructor, as that has special semantics. e.g., >

[PATCH] D152090: [clang][Driver] Add -fcaret-diagnostics-max-lines= as a driver option

2023-06-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked an inline comment as done. tbaeder added inline comments. Comment at: clang/include/clang/Driver/Options.td:2303 + Group, Flags<[NoXarchOption, CC1Option, CoreOption]>, + HelpText<"Set the maximum number of source lines to show in a caret diagnostic">, + Marsha

[PATCH] D152090: [clang][Driver] Add -fcaret-diagnostics-max-lines= as a driver option

2023-06-12 Thread Timm Bäder via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. tbaeder marked an inline comment as done. Closed by commit rG5cc721b3f96e: [clang][Driver] Add -fcaret-diagnostics-max-lines= as a driver option (authored by tbaeder).

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/Misc/diag-unused-source-ranges.cpp:1 +// RUN: %clang -fsyntax-only -Wunused -Wunused-template -Wunused-exception-parameter -Wunused-member-function -fdiagnostics-print-source-range-info %s 2>&1 | FileCheck %s --strict-whites

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Precommit-CI also found some problems on Windows Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152707/new/ https://reviews.llvm.org/D152707 ___ cfe-commits mailing list cfe-commi

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/Misc/diag-unused-source-ranges.h:1 +static void thing(void) {} Moving this file to `Inputs/` would make sense I think. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D152796: [clang][Sema] Fix diagnostic message for unused constant varialbe templates

2023-06-13 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder accepted this revision. tbaeder added a comment. This revision is now accepted and ready to land. Makes sense. LGTM provided precommit CI comes back green. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152796/new/ https://reviews.llvm.org/D

[PATCH] D152818: [Clang] Fix assertion when pragma FENV_ACCESS is used with a throw function.

2023-06-13 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Has the test case been obfuscated on purpose? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152818/new/ https://reviews.llvm.org/D152818 ___ cfe-commits mailing list cfe-commits@

[PATCH] D152818: [Clang] Fix assertion when pragma FENV_ACCESS is used with a throw function.

2023-06-13 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D152818#4417649 , @zahiraam wrote: > In D152818#4417644 , @tbaeder wrote: > >> Has the test case been obfuscated on purpose? > > This is a smaller reproducible from creduce. Didn't know

[PATCH] D153001: [clang][ThreadSafety] Add __builtin_instance_member (WIP)

2023-06-15 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaronpuchert, NoQ, aaron.ballman. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. As discussed in https://github.com/llvm/llvm-project/issues/20777

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-06-15 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG976d8b40cccf: [clang][Interp] Virtual function calls (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D142630?vs=527336&id=531697#toc Repository: rG LLVM Github Monorepo CHAN

[PATCH] D152548: [Clang][Interp] Diagnose uninitialized ctor of global record arrays

2023-06-15 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/cxx20.cpp:177 + // ref-note {{subobject 'f' is not initialized}} + We usually have a space after the `;` and keep the comments aligned on the `//`. Repository: rG LLVM Gith

[PATCH] D152525: [clang][Diagnostics] Don't expand label fixit to the next line

2023-06-15 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb1aba4a10099: [clang][Diagnostics] Don't expand label fixit to the next line (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D152525?vs=529922&id=531737#toc Repository: rG LL

[PATCH] D144164: [clang][Interp] Handle PtrMemOps

2023-06-15 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144164/new/ https://reviews.llvm.org/D144164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D144457: [clang][Interp] Handle global composite temporaries

2023-06-16 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144457/new/ https://reviews.llvm.org/D144457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D146030: [clang][Interp] Handle LambdaExprs

2023-06-16 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG461f91b1e4ef: [clang][Interp] Handle LambdaExprs (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146030/new/ https://reviews.llvm.org/D

[PATCH] D149846: [clang][Interp] Check inc/dec family of ops for initialization

2023-06-16 Thread Timm Bäder via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG459f495f49a1: [clang][Interp] Check inc/dec family of ops for initialization (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D148689: [clang][Interp] Handle PredefinedExprs

2023-06-16 Thread Timm Bäder via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1e9ac717877b: [clang][Interp] Handle PredefinedExprs (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D148689?vs=519835&id

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-12-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134859/new/ https://reviews.llvm.org/D134859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D137488: [clang][Interp] Array initialization via string literal

2022-12-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. @tahonermann Anything still missing here? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137488/new/ https://reviews.llvm.org/D137488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D135750: [clang][Interp] Track initialization state of local variables

2022-12-06 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked 9 inline comments as done. tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:835 IsTemporary = true; Ty = E->getType(); } shafik wrote: > Do we really want to the type of the expression? If we have a `

[PATCH] D139185: [clang][Interp] Use placement new to construct opcode args into vector

2022-12-07 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 480873. tbaeder marked 2 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139185/new/ https://reviews.llvm.org/D139185 Files: clang/lib/AST/Interp/ByteCodeEmitter.cpp clang/lib/AST/Interp/PrimType.h clang/lib/AST/Interp/So

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-12-08 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 481190. tbaeder added a comment. Remove conversion in `Floating::add()` and tests that relied on it. Compound assignment operators can be properly implemented later. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134859/new/ https://reviews.llvm.org

[PATCH] D135750: [clang][Interp] Track initialization state of local variables

2022-12-08 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/InterpBlock.h:97 void invokeCtor() { -std::memset(data(), 0, getSize()); +std::memset(rawData(), 0, Desc->getAllocSize()); if (Desc->CtorFn) aaron.ballman wrote: > tbaeder wrote: > >

[PATCH] D139700: [clang][Inter] Implement __builtin_expect

2022-12-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, tahonermann, shafik, erichkeane. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This adds a `InterpStack::discard()` version that t

[PATCH] D117862: [clang][tests] Fix a typo in wasm-toolchain.cpp tests

2022-01-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: sbc100, dlj, sunfish. tbaeder requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added a project: clang. This seemed odd to me while looking at the tests. Note that I couldn't make the tests fail when p

[PATCH] D117888: [clang][driver][wasm] Support -stdlib=libstdc++ for WebAssembly

2022-01-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: sbc100, dlj, aheejin, sunfish. Herald added subscribers: jgravelle-google, dschuff. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The WebAssembly toolchain currently supports

[PATCH] D116595: [clang][sema] Add missing diagnostic parameter

2022-01-24 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGba845787b3fd: [clang][sema] Add missing diagnostic parameter (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116595/new/ https://review

[PATCH] D117862: [clang][tests] Fix a typo in wasm-toolchain.cpp tests

2022-01-24 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3ad6de31c0cf: [clang][tests] Fix a c++/libc++ -stdlib value typo (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117862/new/ https://re

[PATCH] D117295: [clang][sema] Allow unnamed decls in C++20 module export{} blocks

2022-01-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 402813. tbaeder added a comment. Limited the change to c++2b CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117295/new/ https://reviews.llvm.org/D117295 Files: clang/lib/Sema/SemaModule.cpp clang/test/CXX/module/module.interface/p3.cpp clang/t

[PATCH] D117295: [clang][sema] Allow unnamed decls in C++20 module export{} blocks

2022-01-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked an inline comment as done. tbaeder added inline comments. Comment at: clang/lib/Sema/SemaModule.cpp:650-652 +if (S.getLangOpts().CPlusPlus2b) { + if (BlockStart.isInvalid()) +diagExportedUnnamedDecl(S, *UDK, D, BlockStart); Chuanqi

[PATCH] D117295: [clang][sema] Allow unnamed decls in C++20 module export{} blocks

2022-01-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 402874. tbaeder marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117295/new/ https://reviews.llvm.org/D117295 Files: clang/lib/Sema/SemaModule.cpp clang/test/Modules/cxx20-export.cpp Index: clang/test/Modules/cxx2

<    15   16   17   18   19   20   21   22   >