Skip to content

Conversation

zyn0217
Copy link
Contributor

@zyn0217 zyn0217 commented Oct 19, 2025

The logical or expression should be parenthesized.

Fixes #164104

The logical or expression should be parenthesized.

Fixes llvm#164104
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Oct 19, 2025
@llvmbot
Copy link
Member

llvmbot commented Oct 19, 2025

@llvm/pr-subscribers-clang

Author: Younan Zhang (zyn0217)

Changes

The logical or expression should be parenthesized.

Fixes #164104


Full diff: https://github.com/llvm/llvm-project/pull/164148.diff

1 Files Affected:

  • (modified) clang/lib/Sema/SemaTemplateInstantiate.cpp (+3-3)
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp
index ca7e3b264cec4..038f39633760d 100644
--- a/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp
@@ -2864,9 +2864,9 @@ TemplateInstantiator::TransformNestedRequirement(
         TemplateArgs, Constraint->getSourceRange(), Satisfaction,
         /*TopLevelConceptId=*/nullptr, &NewConstraint);
 
-    assert(!Success || !Trap.hasErrorOccurred() &&
-                           "Substitution failures must be handled "
-                           "by CheckConstraintSatisfaction.");
+    assert((!Success || !Trap.hasErrorOccurred()) &&
+           "Substitution failures must be handled "
+           "by CheckConstraintSatisfaction.");
   }
 
   if (!Success || Satisfaction.HasSubstitutionFailure())

@zyn0217 zyn0217 enabled auto-merge (squash) October 19, 2025 03:43
@zwuis zwuis added the skip-precommit-approval PR for CI feedback, not intended for review label Oct 19, 2025
@zyn0217 zyn0217 merged commit ef46f8a into llvm:main Oct 19, 2025
13 of 14 checks passed
@zyn0217 zyn0217 deleted the post-parameter-mapping-5 branch October 19, 2025 04:06
@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 19, 2025

LLVM Buildbot has detected a new failure on builder lldb-arm-ubuntu running on linaro-lldb-arm-ubuntu while building clang at step 6 "test".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/22066

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/5/12 (3721 of 3730)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/6/12 (3722 of 3730)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/7/12 (3723 of 3730)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/8/12 (3724 of 3730)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/9/12 (3725 of 3730)
PASS: lldb-unit :: tools/lldb-server/tests/./LLDBServerTests/0/3 (3726 of 3730)
PASS: lldb-unit :: tools/lldb-server/tests/./LLDBServerTests/1/3 (3727 of 3730)
PASS: lldb-unit :: tools/lldb-server/tests/./LLDBServerTests/2/3 (3728 of 3730)
PASS: lldb-unit :: Process/gdb-remote/./ProcessGdbRemoteTests/8/37 (3729 of 3730)
TIMEOUT: lldb-api :: tools/lldb-dap/attach/TestDAP_attach.py (3730 of 3730)
******************** TEST 'lldb-api :: tools/lldb-dap/attach/TestDAP_attach.py' FAILED ********************
Script:
--
/usr/bin/python3.10 /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --arch armv8l --build-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/lldb --compiler /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/clang --dsymutil /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/dsymutil --make /usr/bin/gmake --llvm-tools-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --lldb-obj-root /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb --lldb-libs-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib --cmake-build-type Release /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/tools/lldb-dap/attach -p TestDAP_attach.py
--
Exit Code: -9
Timeout: Reached timeout of 600 seconds

Command Output (stdout):
--
lldb version 22.0.0git (https://github.com/llvm/llvm-project.git revision ef46f8a7d73c1657b2448fc2f3f41ff6eecc4c0f)
  clang revision ef46f8a7d73c1657b2448fc2f3f41ff6eecc4c0f
  llvm revision ef46f8a7d73c1657b2448fc2f3f41ff6eecc4c0f
Skipping the following test categories: ['libc++', 'msvcstl', 'dsym', 'gmodules', 'debugserver', 'objc']

--
Command Output (stderr):
--
========= DEBUG ADAPTER PROTOCOL LOGS =========
1760849164.272039890 (stdio) --> {"command":"initialize","type":"request","arguments":{"adapterID":"lldb-native","clientID":"vscode","columnsStartAt1":true,"linesStartAt1":true,"locale":"en-us","pathFormat":"path","supportsRunInTerminalRequest":true,"supportsVariablePaging":true,"supportsVariableType":true,"supportsStartDebuggingRequest":true,"supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryEvent":true,"$__lldb_sourceInitFile":false},"seq":1}
1760849164.272362471 (stdio) queued (command=initialize seq=1)
1760849164.277249098 (stdio) <-- {"body":{"$__lldb_version":"lldb version 22.0.0git (https://github.com/llvm/llvm-project.git revision ef46f8a7d73c1657b2448fc2f3f41ff6eecc4c0f)\n  clang revision ef46f8a7d73c1657b2448fc2f3f41ff6eecc4c0f\n  llvm revision ef46f8a7d73c1657b2448fc2f3f41ff6eecc4c0f","completionTriggerCharacters":["."," ","\t"],"exceptionBreakpointFilters":[{"description":"C++ Catch","filter":"cpp_catch","label":"C++ Catch","supportsCondition":true},{"description":"C++ Throw","filter":"cpp_throw","label":"C++ Throw","supportsCondition":true},{"description":"Objective-C Catch","filter":"objc_catch","label":"Objective-C Catch","supportsCondition":true},{"description":"Objective-C Throw","filter":"objc_throw","label":"Objective-C Throw","supportsCondition":true}],"supportTerminateDebuggee":true,"supportsBreakpointLocationsRequest":true,"supportsCancelRequest":true,"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDataBreakpoints":true,"supportsDelayedStackTraceLoading":true,"supportsDisassembleRequest":true,"supportsEvaluateForHovers":true,"supportsExceptionFilterOptions":true,"supportsExceptionInfoRequest":true,"supportsFunctionBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsInstructionBreakpoints":true,"supportsLogPoints":true,"supportsModuleSymbolsRequest":true,"supportsModulesRequest":true,"supportsReadMemoryRequest":true,"supportsSetVariable":true,"supportsSteppingGranularity":true,"supportsValueFormattingOptions":true,"supportsWriteMemoryRequest":true},"command":"initialize","request_seq":1,"seq":0,"success":true,"type":"response"}
1760849164.301991224 (stdio) --> {"command":"attach","type":"request","arguments":{"program":"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/tools/lldb-dap/attach/TestDAP_attach.test_by_name/d2ff7ff9-aaf2-41ed-a940-067a5fce106a","initCommands":["settings clear --all","settings set symbols.enable-external-lookup false","settings set target.inherit-tcc true","settings set target.disable-aslr false","settings set target.detach-on-error false","settings set target.auto-apply-fixits false","settings set plugin.process.gdb-remote.packet-timeout 60","settings set symbols.clang-modules-cache-path \"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api\"","settings set use-color false","settings set show-statusline false"]},"seq":2}
1760849164.302145004 (stdio) queued (command=attach seq=2)
1760849164.302978277 (stdio) <-- {"body":{"category":"console","output":"Running initCommands:\n"},"event":"output","seq":0,"type":"event"}
1760849164.303143501 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings clear --all\n"},"event":"output","seq":0,"type":"event"}
1760849164.303178787 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set symbols.enable-external-lookup false\n"},"event":"output","seq":0,"type":"event"}
1760849164.303209543 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set target.inherit-tcc true\n"},"event":"output","seq":0,"type":"event"}
1760849164.303239584 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set target.disable-aslr false\n"},"event":"output","seq":0,"type":"event"}
1760849164.303268671 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set target.detach-on-error false\n"},"event":"output","seq":0,"type":"event"}
1760849164.303298235 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set target.auto-apply-fixits false\n"},"event":"output","seq":0,"type":"event"}
1760849164.303389788 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set plugin.process.gdb-remote.packet-timeout 60\n"},"event":"output","seq":0,"type":"event"}
1760849164.303423405 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set symbols.clang-modules-cache-path \"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api\"\n"},"event":"output","seq":0,"type":"event"}
1760849164.303454399 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set use-color false\n"},"event":"output","seq":0,"type":"event"}
1760849164.303483248 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set show-statusline false\n"},"event":"output","seq":0,"type":"event"}
1760849165.183832407 (stdio) <-- {"command":"attach","request_seq":2,"seq":0,"success":true,"type":"response"}
1760849165.184305906 (stdio) <-- {"body":{"module":{"addressRange":"0xf1120000","id":"89138FA8-9BB1-F679-CDF9-9576E181F48D-80FCCD09","name":"libm.so.6","path":"/lib/arm-linux-gnueabihf/libm.so.6","symbolStatus":"Symbols not found."},"reason":"new"},"event":"module","seq":0,"type":"event"}
1760849165.184909344 (stdio) <-- {"event":"initialized","seq":0,"type":"event"}
1760849165.184941292 (stdio) <-- {"body":{"module":{"addressRange":"0xf10f0000","id":"9DDE71F0-9E71-BAFC-974E-DCC0B92EDD11-824088FA","name":"libgcc_s.so.1","path":"/lib/arm-linux-gnueabihf/libgcc_s.so.1","symbolStatus":"Symbols not found."},"reason":"new"},"event":"module","seq":0,"type":"event"}

assert(!Success || !Trap.hasErrorOccurred() &&
"Substitution failures must be handled "
"by CheckConstraintSatisfaction.");
assert((!Success || !Trap.hasErrorOccurred()) &&
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is really cursed syntax highlighting there.

@shafik
Copy link
Collaborator

shafik commented Oct 20, 2025

Thank you for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category skip-precommit-approval PR for CI feedback, not intended for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SemaTemplateInstantiate.cpp: warning: suggest parentheses around ‘&&’ within ‘||’

5 participants