[clang] Reapply "[Clang][Sema] Earlier type checking for builtin unary operators (#90500)" (PR #92283)
Caslyn wrote: Hi @sdkrystian & @erichkeane - my apologies! Yes, indeed this code calls its own increment operator and it should be `++*this` - I failed to see that. Thanks for the feedback here and helping us fix this bug in our code. https://github.com/llvm/llvm-project/pull/92283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Reapply "[Clang][Sema] Earlier type checking for builtin unary operators (#90500)" (PR #92283)
Caslyn wrote: Hi @sdkrystian - this appears to break in a circumstance where a custom iterator class defines the postfix operator: ``` FAILED: host_x64/obj/src/lib/zbitl/tests/zbitl-unittests.mem-config-test.cc.o ../../prebuilt/third_party/clang/custom/bin/clang++ -MD -MF host_x64/obj/src/lib/zbitl/tests/zbitl-unittests.mem-config-test.cc.o.d -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES -DRAPIDJSON_HAS_STDSTRING -DRAPIDJSON_HAS_CXX11_RANGE_FOR -DRAPIDJSON_HAS_CXX11_RVALUE_REFS -DRAPIDJSON_HAS_CXX11_TYPETRAITS -DRAPIDJSON_HAS_CXX11_N... In file included from ../../src/lib/zbitl/tests/mem-config-test.cc:6: ../../src/lib/zbitl/include/lib/zbitl/items/mem-config.h:61:7: error: expression is not assignable 61 | ++this; | ^ 1 error generated. ``` I went ahead and attached a reproducer. Could you please revert this change and investigate? [clang-crashreports.tar.gz](https://github.com/llvm/llvm-project/files/15337912/clang-crashreports.tar.gz) https://github.com/llvm/llvm-project/pull/92283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [openmp] [libcxx] [lld] [lto] Add minimum macos sdk requirement to test (PR #77695)
https://github.com/Caslyn closed https://github.com/llvm/llvm-project/pull/77695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [openmp] [libcxx] [lld] [lto] Add minimum macos sdk requirement to test (PR #77695)
@@ -5,6 +5,8 @@ ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -dylib -arch x86_64 -macos_version_min 10.10.0 -o %t.dylib %t.o -save-temps -undefined dynamic_lookup -exported_symbol _bar -lSystem -mllvm -lto-discard-value-names=false ; RUN: llvm-dis %t.dylib.lto.opt.bc -o - | FileCheck --check-prefix=KEEP %s +; REQUIRES: macos-sdk-10.15 Caslyn wrote: Confirmed the issue is fixed. Thanks @fhahn! Closing out this PR. https://github.com/llvm/llvm-project/pull/77695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[llvm] [libcxx] [lld] [openmp] [clang] [lto] Add minimum macos sdk requirement to test (PR #77695)
@@ -5,6 +5,8 @@ ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -dylib -arch x86_64 -macos_version_min 10.10.0 -o %t.dylib %t.o -save-temps -undefined dynamic_lookup -exported_symbol _bar -lSystem -mllvm -lto-discard-value-names=false ; RUN: llvm-dis %t.dylib.lto.opt.bc -o - | FileCheck --check-prefix=KEEP %s +; REQUIRES: macos-sdk-10.15 Caslyn wrote: Thanks very much @fhahn , we'll re-enable the test on our builder and check the fix. I'll confirm in this thread. https://github.com/llvm/llvm-project/pull/77695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[llvm] [openmp] [clang] [libcxx] [lld] [lto] Add minimum macos sdk requirement to test (PR #77695)
@@ -5,6 +5,8 @@ ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -dylib -arch x86_64 -macos_version_min 10.10.0 -o %t.dylib %t.o -save-temps -undefined dynamic_lookup -exported_symbol _bar -lSystem -mllvm -lto-discard-value-names=false ; RUN: llvm-dis %t.dylib.lto.opt.bc -o - | FileCheck --check-prefix=KEEP %s +; REQUIRES: macos-sdk-10.15 Caslyn wrote: > Hmmm, did you try this with a newer SDK to confirm it works as expected or is > possible that it now just doesn't run? ... @fhahn, you're right, testing locally this is too restrictive. The failing builder is using the MacOSX sdk version 13.3. Do you know if/how that version can have any effect on this test? https://github.com/llvm/llvm-project/pull/77695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[openmp] [lld] [llvm] [libcxx] [clang] [lto] Add minimum macos sdk requirement to test (PR #77695)
https://github.com/Caslyn ready_for_review https://github.com/llvm/llvm-project/pull/77695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[openmp] [lld] [llvm] [libcxx] [clang] [lto] Add minimum macos sdk requirement to test (PR #77695)
https://github.com/Caslyn updated https://github.com/llvm/llvm-project/pull/77695 >From 742c541068ff8764681c1546314c7b0bc5b2893a Mon Sep 17 00:00:00 2001 From: Caslyn Tonelli Date: Wed, 10 Jan 2024 14:16:25 -0800 Subject: [PATCH] [lto] Add minimum macos sdk requirement to test --- llvm/test/tools/lto/discard-value-names.ll | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm/test/tools/lto/discard-value-names.ll b/llvm/test/tools/lto/discard-value-names.ll index 7e2c82119028ab..d3d350ea736236 100644 --- a/llvm/test/tools/lto/discard-value-names.ll +++ b/llvm/test/tools/lto/discard-value-names.ll @@ -5,6 +5,8 @@ ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -dylib -arch x86_64 -macos_version_min 10.10.0 -o %t.dylib %t.o -save-temps -undefined dynamic_lookup -exported_symbol _bar -lSystem -mllvm -lto-discard-value-names=false ; RUN: llvm-dis %t.dylib.lto.opt.bc -o - | FileCheck --check-prefix=KEEP %s +; REQUIRES: macos-sdk-10.15 + ; FIXME: -lto-discard-value-names is ignored at the moment. ; DISCARD: %cmp.i = icmp ; DISCARD: %add = add i32 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [ASTMatchers] Fix classIsDerivedFrom for recusrive cases (PR #67307)
Caslyn wrote: Hi @sam-mccall - thank you, and apologies for the false alarm. After closer inspection, it looks like https://github.com/llvm/llvm-project/issues/66114#issuecomment-1732319259 explains the particular failures we're seeing. Indeed, no relation to this PR - please consider this matter closed here. https://github.com/llvm/llvm-project/pull/67307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [ASTMatchers] Fix classIsDerivedFrom for recusrive cases (PR #67307)
Caslyn wrote: Hi @ilya-biryukov - it seems this PR caused a couple test failures in RecursiveASTVisitorTests/ on the Fuchsia windows-x64 builder. Could you take a look to verify whether an additional fix (or revert) is needed? [clang-windows-x64-test failures](https://luci-milo.appspot.com/ui/p/fuchsia/builders/prod/clang-windows-x64/b8768972500924760625/test-results?sortby==) ``` Script: -- C:\b\s\w\ir\x\w\llvm_build\tools\clang\stage2-bins\tools\clang\unittests\Tooling\.\ToolingTests.exe --gtest_filter=RecursiveASTVisitor.StmtCallbacks_TraverseBinaryOperator -- C:/b/s/w/ir/x/w/llvm-llvm-project/clang/unittests/Tooling/RecursiveASTVisitorTests\CallbacksCommon.h:94 Expected equality of these values: ExpectedLog.trim().str() Which is: "WalkUpFromStmt CompoundStmt\nWalkUpFromStmt IntegerLiteral(1)\nTraverseBinaryOperator BinaryOperator(+)\n WalkUpFromStmt BinaryOperator(+)\n WalkUpFromStmt IntegerLiteral(2)\n WalkUpFromStmt IntegerLiteral(3)\nWalkUpFromStmt IntegerLiteral(4)" StringRef(Visitor.CallbackLog).trim().str() Which is: "RecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::WalkUpFromStmt CompoundStmt\nRecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::WalkUpFromStmt IntegerLiteral(1)\nRecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::TraverseBinaryOperator BinaryOperator(+)\n RecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::WalkUpFromStmt BinaryOperator(+)\n RecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::WalkUpFromStmt IntegerLiteral(2)\n RecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::WalkUpFromStmt IntegerLiteral(3)\nRecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::WalkUpFromStmt IntegerLiteral(4)" With diff: @@ -1,7 +1,7 @@ -WalkUpFromStmt CompoundStmt -WalkUpFromStmt IntegerLiteral(1) -TraverseBinaryOperator BinaryOperator(+) - WalkUpFromStmt BinaryOperator(+) - WalkUpFromStmt IntegerLiteral(2) - WalkUpFromStmt IntegerLiteral(3) -WalkUpFromStmt IntegerLiteral(4) +RecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::WalkUpFromStmt CompoundStmt +RecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::WalkUpFromStmt IntegerLiteral(1) +RecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::TraverseBinaryOperator BinaryOperator(+) + RecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::WalkUpFromStmt BinaryOperator(+) + RecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::WalkUpFromStmt IntegerLiteral(2) + RecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::WalkUpFromStmt IntegerLiteral(3) +RecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::WalkUpFromStmt IntegerLiteral(4) C:/b/s/w/ir/x/w/llvm-llvm-project/clang/unittests/Tooling/RecursiveASTVisitorTests/CallbacksBinaryOperator.cpp:49 Value of: visitorCallbackLogEqual( RecordingVisitor(ShouldTraversePostOrder::No), Code, R"txt( WalkUpFromStmt CompoundStmt WalkUpFromStmt IntegerLiteral(1) TraverseBinaryOperator BinaryOperator(+) WalkUpFromStmt BinaryOperator(+) WalkUpFromStmt IntegerLiteral(2) WalkUpFromStmt IntegerLiteral(3) WalkUpFromStmt IntegerLiteral(4) )txt") Actual: false Expected: true C:/b/s/w/ir/x/w/llvm-llvm-project/clang/unittests/Tooling/RecursiveASTVisitorTests\CallbacksCommon.h:94 Expected equality of these values: ExpectedLog.trim().str() Which is: "WalkUpFromStmt IntegerLiteral(1)\nTraverseBinaryOperator BinaryOperator(+)\n WalkUpFromStmt IntegerLiteral(2)\n WalkUpFromStmt IntegerLiteral(3)\n WalkUpFromStmt BinaryOperator(+)\nWalkUpFromStmt IntegerLiteral(4)\nWalkUpFromStmt CompoundStmt" StringRef(Visitor.CallbackLog).trim().str() Which is: "RecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::WalkUpFromStmt IntegerLiteral(1)\nRecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::TraverseBinaryOperator BinaryOperator(+)\n RecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::WalkUpFromStmt IntegerLiteral(2)\n RecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::WalkUpFromStmt IntegerLiteral(3)\n RecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::WalkUpFromStmt BinaryOperator(+)\nRecursiveASTVisitor_StmtCallbacks_TraverseBinaryOperator_Test::TestBody()::RecordingVisitor::WalkUpFromStmt