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

2023-04-25 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. Rename CheckBaseDerived to something more

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

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

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

2023-04-25 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. We can implement these similarly to

[PATCH] D149059: [clang][Interp] Fix zero-init of float and pointer arrays

2023-04-25 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 rGc9e403d1992b: [clang][Interp] Fix zero-init of float and pointer arrays (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D148981: [clang][Interp] PointerToBoolean casts

2023-04-25 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7766648c3aff: [clang][Interp] PointerToBoolean casts (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148981/new/

[PATCH] D149059: [clang][Interp] Fix zero-init of float and pointer arrays

2023-04-24 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 Zero opcode only exists for integer types.

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

2023-04-23 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

[PATCH] D149000: Update with warning message for comparison to NULL pointer

2023-04-23 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Both test failures look like you just need to add the additional new diagnostic. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149000/new/ https://reviews.llvm.org/D149000 ___

[PATCH] D148987: [clang][Interp] Check Neg ops for errors

2023-04-22 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. I'm not sure what to do with the float case here,

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

2023-04-22 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

[PATCH] D148981: [clang][Interp] PointerToBoolean casts

2023-04-21 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. Just emit `p != nullptr` for this. Repository:

[PATCH] D148925: [clang][Interp] Fix discarding void-typed comma expressions

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D148925#4287502 , @erichkeane wrote: > Cool! Mind adding the tests I proposed? it would be nice to ensure/show > side-effects are guaranteed. Sure, thanks for the test case! CHANGES SINCE LAST ACTION

[PATCH] D148925: [clang][Interp] Fix discarding void-typed comma expressions

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

[PATCH] D148925: Fix discarding void-typed comma expressions

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D148925#4287218 , @erichkeane wrote: > So things cast to 'void' can have side effects, right? Does the call to > discard still evaluate them? > > https://godbolt.org/z/a3ej9bxKe Yes. `discard(E)` is just `visit(E)`, except

[PATCH] D148925: Fix discarding void-typed comma expressions

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

[PATCH] D148925: Fix discarding void-typed comma expressions

2023-04-21 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. First, we need to handle void types in

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

2023-04-21 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/D142630/new/ https://reviews.llvm.org/D142630 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-04-21 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

[PATCH] D143334: [clang][Interp] Fix diagnosing uninitialized ctor record arrays

2023-04-21 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/D143334/new/ https://reviews.llvm.org/D143334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-04-21 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/D144164/new/ https://reviews.llvm.org/D144164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

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

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

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 515659. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144943/new/ https://reviews.llvm.org/D144943 Files: clang/lib/AST/Interp/Boolean.h clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h

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

2023-04-21 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

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

2023-04-21 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

[PATCH] D148901: [clang][Interp] Fix post-inc/dec operator result

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, taramana, erichkeane, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We pushed the wrong value on the stack, always

[PATCH] D148696: [clang][Sema][NFC] Sprinkle some const around in Sema

2023-04-20 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 rG80fda7a34663: [clang][Sema][NFC] Make a bunch of things const if possible (authored by tbaeder). Changed

[PATCH] D147875: [clang][Diagnostics] WIP: Show line numbers when printing code snippets

2023-04-20 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. CCing @njames93 since I have no idea how to properly fix the clang-tidy test failures. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147875/new/ https://reviews.llvm.org/D147875 ___ cfe-commits mailing list

[PATCH] D147875: [clang][Diagnostics] WIP: Show line numbers when printing code snippets

2023-04-20 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 515242. tbaeder added a comment. Fix all existing tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147875/new/ https://reviews.llvm.org/D147875 Files: clang/include/clang/Basic/DiagnosticOptions.def

[PATCH] D148696: [clang][Sema][NFC] Sprinkle some const around in Sema

2023-04-20 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked 5 inline comments as done. tbaeder added inline comments. Comment at: clang/lib/Sema/SemaLookup.cpp:1337 if (S->isClassScope()) -if (CXXRecordDecl *Record = -dyn_cast_or_null(S->getEntity())) +if (auto *Record =

[PATCH] D147875: [clang][Diagnostics] WIP: Show line numbers when printing code snippets

2023-04-19 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 514954. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147875/new/ https://reviews.llvm.org/D147875 Files: clang/include/clang/Basic/DiagnosticOptions.def clang/include/clang/Basic/DiagnosticOptions.h clang/include/clang/Driver/Options.td

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

2023-04-19 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]; } erichkeane wrote: > tbaeder wrote: > > It's weird that the above two statements warn about using `__FUNCTION__` > > and the return

[PATCH] D148696: [clang][Sema][NFC] Sprinkle some const around in Sema

2023-04-19 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 514933. Herald added a reviewer: jdoerfert. Herald added subscribers: jplehr, sstefan1. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148696/new/ https://reviews.llvm.org/D148696 Files: clang/include/clang/AST/DeclarationName.h

[PATCH] D148696: [clang][Sema][NFC] Sprinkle some const around in Sema

2023-04-19 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 514878. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148696/new/ https://reviews.llvm.org/D148696 Files: clang/include/clang/AST/DeclarationName.h clang/include/clang/Sema/Sema.h clang/lib/AST/DeclarationName.cpp clang/lib/Sema/Sema.cpp

[PATCH] D148696: [clang][Sema][NFC] Sprinkle some const around in Sema

2023-04-19 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. NFC but uploading for review for the pre-commit CI and maybe some actual

[PATCH] D147875: [clang][Diagnostics] WIP: Show line numbers when printing code snippets

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

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

2023-04-19 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]; } It's weird that the above two statements warn about using `__FUNCTION__` and the return statement doesn't. Repository: rG LLVM

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

2023-04-19 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. AFAIK this is just used to suppress warnings, so

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

2023-04-19 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. Repository: rG LLVM Github Monorepo

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

2023-04-19 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 514826. tbaeder added a comment. Move things around a bit and add some `+ 1`s to get matching diagnostic output with the current interpreter. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148614/new/ https://reviews.llvm.org/D148614 Files:

[PATCH] D148601: [Clang] Handle Error message to output proper Prefix

2023-04-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/Frontend/VerifyDiagnosticConsumer.cpp:1097 // source file(s) processed. +const auto = Diags.getDiagnosticOptions().VerifyPrefixes; if (Status == HasNoDirectives) { Can move this line inside the

[PATCH] D148601: [Clang] Handle Error message to output proper Prefix

2023-04-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. I am not 100% sure about the semantics of passing multiple prefixes, i.e. if the error is emitted for all prefixes individually or if it's only emitted if no `expected` line for any of the prefixes is found. In the latter case we should probably add all the prefixes to

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

2023-04-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 514572. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144943/new/ https://reviews.llvm.org/D144943 Files: clang/lib/AST/Interp/Boolean.h clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h

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

2023-04-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, tahonermann, erichkeane, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. There was already //some// form of this, but it

[PATCH] D148426: [clang][Interp] IntegralComplexToBoolean casts

2023-04-15 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1165 +return visit(LV); + return false; Since complex types are arrays with two elements, we can't dereference them like normal. This change just ignore the dereference.

[PATCH] D148426: [clang][Interp] IntegralComplexToBoolean casts

2023-04-15 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, tahonermann, erichkeane, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. I wanted to avoid adding too many opcodes for

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-04-14 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. So, if I understand the code correctly, we call `CheckEvaluationResult` with `SubObjectDecl=nullptr` when we're not checking an actual field but just an array/record, so we can't run into this problem anyway, so the assert seems fine. I don't fully understand the

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

2023-04-13 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/D142630/new/ https://reviews.llvm.org/D142630 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-04-13 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] D144457: [clang][Interp] Handle global composite temporaries

2023-04-13 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

[PATCH] D143334: [clang][Interp] Fix diagnosing uninitialized ctor record arrays

2023-04-13 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/D143334/new/ https://reviews.llvm.org/D143334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-04-13 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/D144164/new/ https://reviews.llvm.org/D144164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D147535: [clang][Interp] Don't create global variables more than once

2023-04-13 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf508d9b1d4fa: [clang][Interp] Dont create global variables more than once (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147535/new/

[PATCH] D147534: [clang][Interp] Make sure we have a variable scope for initializers

2023-04-13 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 rG25d6123854d1: [clang][Interp] Make sure we have a variable scope for initializers (authored by tbaeder). Repository: rG LLVM Github Monorepo

[PATCH] D147875: [clang][Diagnostics] WIP: Show line numbers when printing code snippets

2023-04-13 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 513144. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147875/new/ https://reviews.llvm.org/D147875 Files: clang/include/clang/Basic/DiagnosticOptions.def clang/include/clang/Basic/DiagnosticOptions.h clang/include/clang/Driver/Options.td

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

2023-04-12 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

[PATCH] D147875: [clang][Diagnostics] WIP: Show line numbers when printing code snippets

2023-04-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Since basically nobody has seen multiple snippet lines being printed, we probably need to fix up a bunch of diagnostics afterwards to be more useful, e.g. ./array.cpp:111:5: error: no matching function for call to 'func' 111 | func(1, 2, 3, 4), "hah,

[PATCH] D147888: Update declaration message of extern linkage

2023-04-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/SemaCXX/extern_static.cpp:1 +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 -Wabstract-vbase-init +void f(void) That's unnecessary, isn't it? Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D147875: [clang][Diagnostics] WIP: Show line numbers when printing code snippets

2023-04-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 512795. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147875/new/ https://reviews.llvm.org/D147875 Files: clang/include/clang/Basic/DiagnosticOptions.def clang/include/clang/Basic/DiagnosticOptions.h clang/include/clang/Driver/Options.td

[PATCH] D147875: [clang][Diagnostics] WIP: Show line numbers when printing code snippets

2023-04-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 512785. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147875/new/ https://reviews.llvm.org/D147875 Files: clang/include/clang/Basic/DiagnosticOptions.def clang/include/clang/Basic/DiagnosticOptions.h clang/include/clang/Driver/Options.td

[PATCH] D147875: [clang][Diagnostics] WIP: Show line numbers when printing code snippets

2023-04-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 512784. tbaeder set the repository for this revision to rG LLVM Github Monorepo. Herald added a subscriber: MaskRay. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147875/new/ https://reviews.llvm.org/D147875

[PATCH] D147989: [clang] Fix Attribute Placement

2023-04-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3424 "attribute %0 is ignored, place it after " - "\"%select{class|struct|interface|union|enum}1\" to apply attribute to " + "\"%select{class|struct|interface|union|enum|enum

[PATCH] D147875: [clang][Diagnostics] WIP: Show line numbers when printing code snippets

2023-04-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked an inline comment as done. tbaeder added a comment. Wow, in `FixIt/fixits-function-call`, this output: ./array.cpp:123:3: error: no matching function for call to 'f1' f1(a + 1); ^~ ./array.cpp:114:6: note: candidate function not viable: no known conversion from

[PATCH] D147875: [clang][Diagnostics] WIP: Show line numbers when printing code snippets

2023-04-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 512024. tbaeder edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147875/new/ https://reviews.llvm.org/D147875 Files: clang/include/clang/Frontend/TextDiagnostic.h clang/lib/Frontend/TextDiagnostic.cpp Index:

[PATCH] D147875: [clang][Diagnostics] WIP: Show line numbers when printing code snippets

2023-04-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/Frontend/TextDiagnostic.cpp:1141 +} + /// Emit a code snippet and caret line. Wrote this just to get things going but I hope there's something better than this...? Repository: rG LLVM Github Monorepo

[PATCH] D147875: [clang][Diagnostics] WIP: Show line numbers when printing code snippets

2023-04-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. Just putting this here because it's a pretty simple patch as it turns out.

[PATCH] D147845: [clang][Interp] Fix a crash when calling invalid constexpr functions

2023-04-08 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 rG1c818b0a4f92: [clang][Interp] Fix a crash when calling invalid constexpr functions (authored by tbaeder). Repository: rG LLVM Github Monorepo

[PATCH] D147845: [clang][Interp] Fix a crash when calling invalid constexpr functions

2023-04-08 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, shafik, erichkeane, tahonermann. 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

[PATCH] D147615: [clang][Sema][NFC] Save token name instead of the full token

2023-04-08 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG11ad7d2935af: [clang][Sema][NFC] Save token name instead of the full token (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147615/new/

[PATCH] D147534: [clang][Interp] Make sure we have a variable scope for initializers

2023-04-08 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/records.cpp:315 + auto T = Test(Arr, Pos); + // End of scope, should destroy Test. +} aaron.ballman wrote: > Would it make sense to give `Test` a constexpr destructor so that we can

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

2023-04-07 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:240 +return this->emitPop(*T, PE); + } + Next time this pattern shows up, I need to add a convenience function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

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

2023-04-07 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. Fixes

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

2023-04-06 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 511386. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144943/new/ https://reviews.llvm.org/D144943 Files: clang/lib/AST/Interp/Boolean.h clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h

[PATCH] D146788: [clang][Interp] Fix zero-initializing of floating types

2023-04-06 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 rG70e5a2a94354: [clang][Interp] Fix zero-initializing of floating types (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D141497: [clang][Interp] Record initialization via conditional operator

2023-04-06 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG92417f2d4b17: [clang][Interp] Record initialization via conditional operator (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2023-04-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. Repository: rG LLVM Github Monorepo

[PATCH] D147615: [clang][Sema][NFC] Save token name instead of the full token

2023-04-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added a reviewer: aaron.ballman. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This makes it a bit clearer why we're saving the token (so no need for the later

[PATCH] D146358: [clang][AST] Print name instead of type when diagnosing uninitialized subobject in constexpr variables

2023-04-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:2357-2361 +if (SubobjectDecl) { + Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) << SubobjectDecl; + Info.Note(SubobjectDecl->getLocation(), +

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

2023-04-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 is a CXXConstructExpr, so create a local

[PATCH] D147534: [clang][Interp] Make sure we have a variable scope for initializers

2023-04-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 510998. tbaeder added a comment. Move the scope and add a test that ensures destruction order of the temporaries. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147534/new/ https://reviews.llvm.org/D147534 Files:

[PATCH] D147535: [clang][Interp] Don't create global variables more than once

2023-04-04 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. just because we're being told to evaluate it

[PATCH] D147534: [clang][Interp] Make sure we have a variable scope for initializers

2023-04-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. Otherwise, we run into an assertion when trying

[PATCH] D145861: [clang][Interp] Ignore more non-VarDecl declarations

2023-04-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 rGee71cbddb77f: [clang][Interp] Ignore more non-VarDecl declarations (authored by tbaeder). Changed prior to commit:

[PATCH] D143334: [clang][Interp] Fix diagnosing uninitialized ctor record arrays

2023-04-04 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/D143334/new/ https://reviews.llvm.org/D143334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-04-04 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/D144164/new/ https://reviews.llvm.org/D144164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-04-04 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

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

2023-04-04 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

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

2023-04-04 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/D144943/new/ https://reviews.llvm.org/D144943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D144272: [clang][Interp] Ignore StaticAssertDecls

2023-04-03 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 rG192c2c5c8947: [clang][Interp] Ignore StaticAssertDecls (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D145860: [clang][Interp] Fix initializing fields after base class members

2023-04-03 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 rG056042d21b72: [clang][Interp] Fix initializing fields after base class members (authored by tbaeder). Changed prior to commit:

[PATCH] D145841: [clang][Interp] Fix diagnostics for calling non-constexpr constructors

2023-04-03 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG58cf70b2cdc1: [clang][Interp] Fix diagnostics for calling non-constexpr constructors (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D145841?vs=504406=510485#toc Repository:

[PATCH] D143466: [clang][Interp] Fix initializing base class members

2023-04-03 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 rGdb3dcdc08ce0: [clang][Interp] Fix initializing base class members (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D143480: [clang][Interp] Fix derived-to-base casts for >1 levels

2023-04-03 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 rG968b4172f6a9: [clang][Interp] Fix derived-to-base casts for 1 levels (authored by tbaeder). Changed prior to commit:

[PATCH] D147369: [clang][Interp] Support empty initlist initializers for complex types

2023-04-01 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

[PATCH] D141497: [clang][Interp] Record initialization via conditional operator

2023-03-31 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 510180. tbaeder added a comment. Screw it, just use a `llvm::function_ref`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141497/new/ https://reviews.llvm.org/D141497 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp

[PATCH] D146376: Update static_assert message for redundant cases

2023-03-31 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Does `git clang-format HEAD~1` not work on your system? It should only format the changed parts, not everything. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146376/new/ https://reviews.llvm.org/D146376

[PATCH] D142617: [clang][Interp] Check This pointer without creating InterpFrame

2023-03-31 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 rG943ef0642010: [clang][Interp] Check This pointer without creating InterpFrame (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D142448: [clang][Interp] Handle TypeTraitExprs

2023-03-31 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 rG8d2899acbcf1: [clang][Interp] Handle TypeTraitExprs (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D141831: [clang][Interp] Fix double-printing in InterpFrame::describe()

2023-03-31 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 rGd472c55fa28a: [clang][Interp] Fix double-printing InterpFrame::describe() (authored by tbaeder). Changed prior to commit:

[PATCH] D141784: [clang][Interp] Fix binary comma operators

2023-03-31 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 rGd29f70670db8: [clang][Interp] Fix binary comma operators (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D141772: [clang][Interp] Fix record initialization via CallExpr subclasses

2023-03-31 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 rGcef69ce7791f: [clang][Interp] Fix record initialization via CallExpr subclasses (authored by tbaeder). Changed prior to commit:

<    4   5   6   7   8   9   10   11   12   13   >