Skip to content

[Clang] Fixed auto parsing regression with brace initialization - #210347

Merged
to268 merged 1 commit into
llvm:mainfrom
to268:fix-cxx-auto-lbrace
Jul 17, 2026
Merged

[Clang] Fixed auto parsing regression with brace initialization#210347
to268 merged 1 commit into
llvm:mainfrom
to268:fix-cxx-auto-lbrace

Conversation

@to268

@to268 to268 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

The PR #208552 has introduced a regression where brace initialization was not taken into account auto foo{12}. It was also breaking dcl.type.general p2 rules, which is also now tested.

@to268 to268 added this to the LLVM 23.x Release milestone Jul 17, 2026
@github-project-automation github-project-automation Bot moved this to Needs Triage in LLVM Release Status Jul 17, 2026
@llvmorg-github-actions llvmorg-github-actions Bot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Jul 17, 2026
@llvmorg-github-actions

Copy link
Copy Markdown

@llvm/pr-subscribers-clang

Author: Tony Guillot (to268)

Changes

The PR #208552 has introduced a regression where brace initialization was not taken into account auto foo{12}. It was also breaking dcl.type.general p2 rules, which is also now tested.


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

2 Files Affected:

  • (modified) clang/lib/Parse/ParseDecl.cpp (+4-4)
  • (added) clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.type.general/p2.cpp (+13)
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 88f07bb104fcb..0825678acaf60 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -3879,10 +3879,10 @@ void Parser::ParseDeclarationSpecifiers(
       // when a variable name matches a type brought in by a using-directive.
       if (DS.getTypeSpecType() == DeclSpec::TST_auto) {
         Token Next = NextToken();
-        if (Next.isOneOf(tok::equal, tok::l_paren, tok::l_square, tok::amp,
-                         tok::ampamp, tok::star, tok::coloncolon, tok::comma,
-                         tok::semi, tok::colon, tok::greater, tok::r_paren,
-                         tok::arrow))
+        if (Next.isOneOf(tok::equal, tok::l_paren, tok::l_square, tok::l_brace,
+                         tok::amp, tok::ampamp, tok::star, tok::coloncolon,
+                         tok::comma, tok::semi, tok::colon, tok::greater,
+                         tok::r_paren, tok::arrow))
           goto DoneWithDeclSpec;
       }
 
diff --git a/clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.type.general/p2.cpp b/clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.type.general/p2.cpp
new file mode 100644
index 0000000000000..5b0079a1ba898
--- /dev/null
+++ b/clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.type.general/p2.cpp
@@ -0,0 +1,13 @@
+// RUN:  %clang_cc1 -std=c++2c -verify %s
+
+namespace bug {
+void func1() {
+  typedef float foo; // expected-note {{previous definition is here}}
+  auto foo{16};      // expected-error {{redefinition of 'foo' as different kind of symbol}}
+}
+
+typedef float bar;
+void func2() {
+  auto bar{16};
+}
+} // namespace bug

@github-actions

Copy link
Copy Markdown

🐧 Linux x64 Test Results

  • 97655 tests passed
  • 3008 tests skipped
  • 2 tests failed

Failed Tests

(click on a test name to see its output)

Profile-x86_64

Profile-x86_64.Linux/counter_promo_for.c (Likely Already Failing) This test is already failing at the base commit.
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
rm -fr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.prof
# executed command: rm -fr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.prof
# note: command had no output on stdout or stderr
# RUN: at line 2
rm -fr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.nopromo.prof
# executed command: rm -fr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.nopromo.prof
# note: command had no output on stdout or stderr
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang   -m64  -ldl  -fprofile-generate=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.prof/ -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.gen -O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_for.c -fno-slp-vectorize
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang -m64 -ldl -fprofile-generate=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.prof/ -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.gen -O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_for.c -fno-slp-vectorize
# note: command had no output on stdout or stderr
# RUN: at line 4
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang   -m64  -ldl  -fprofile-generate=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.prof/ -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.gen.ll -emit-llvm -S -O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_for.c -fno-slp-vectorize
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang -m64 -ldl -fprofile-generate=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.prof/ -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.gen.ll -emit-llvm -S -O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_for.c -fno-slp-vectorize
# .---command stderr------------
# | clang: warning: -ldl: 'linker' input unused [-Wunused-command-line-argument]
# `-----------------------------
# RUN: at line 5
cat /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.gen.ll | FileCheck --check-prefix=PROMO /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_for.c
# executed command: cat /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.gen.ll
# note: command had no output on stdout or stderr
# executed command: FileCheck --check-prefix=PROMO /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_for.c
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_for.c:30:16: error: PROMO-NEXT: expected string not found in input
# | // PROMO-NEXT: load{{.*}}@__profc_foo{{.*}} 8){{.*}}
# |                ^
# | <stdin>:69:39: note: scanning from here
# |  store i64 %3, ptr @__profc_foo, align 8
# |                                       ^
# | <stdin>:70:68: note: possible intended match here
# |  %pgocount.promoted22 = load i64, ptr getelementptr inbounds nuw (i8, ptr @__profc_foo, i64 16), align 8
# |                                                                    ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_for.c
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |           64:  br i1 %exitcond.not, label %for.cond.for.end_crit_edge, label %for.body, !llvm.loop !10 
# |           65:  
# |           66: for.cond.for.end_crit_edge: ; preds = %for.body 
# |           67:  %pgocount.promoted = load i64, ptr @__profc_foo, align 8 
# |           68:  %3 = add i64 %pgocount.promoted, %pgocount1215 
# |           69:  store i64 %3, ptr @__profc_foo, align 8 
# | next:30'0                                          {     search range start (exclusive)
# | next:30'1                                                error: no match found in search range
# |           70:  %pgocount.promoted22 = load i64, ptr getelementptr inbounds nuw (i8, ptr @__profc_foo, i64 16), align 8 
# | next:30'2                                                                        ?                                       possible intended match
# |           71:  %4 = add i64 %pgocount.promoted22, %pgocount1420 
# |           72:  store i64 %4, ptr getelementptr inbounds nuw (i8, ptr @__profc_foo, i64 16), align 8 
# |           73:  br label %for.end 
# |           74:  
# |           75: for.end: ; preds = %for.cond.for.end_crit_edge, %entry 
# |            .
# |            .
# |            .
# |          103: !6 = !{!"int", !7, i64 0} 
# |          104: !7 = !{!"omnipotent char", !8, i64 0} 
# |          105: !8 = !{!"Simple C/C++ TBAA"} 
# |          106: !9 = !{!6, !6, i64 0} 
# |          107: !10 = distinct !{!10, !11} 
# |          108: !11 = !{!"llvm.loop.mustprogress"} 
# | next:30'3                                        } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

Profile-x86_64.Linux/counter_promo_while.c (Likely Already Failing) This test is already failing at the base commit.
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
rm -fr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.prof
# executed command: rm -fr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.prof
# note: command had no output on stdout or stderr
# RUN: at line 2
rm -fr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.nopromo.prof
# executed command: rm -fr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.nopromo.prof
# note: command had no output on stdout or stderr
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang   -m64  -ldl  -fprofile-generate=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.prof/ -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.gen -O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_while.c -fno-slp-vectorize
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang -m64 -ldl -fprofile-generate=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.prof/ -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.gen -O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_while.c -fno-slp-vectorize
# note: command had no output on stdout or stderr
# RUN: at line 4
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang   -m64  -ldl  -fprofile-generate=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.prof/ -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.gen.ll -emit-llvm -S -O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_while.c -fno-slp-vectorize
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang -m64 -ldl -fprofile-generate=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.prof/ -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.gen.ll -emit-llvm -S -O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_while.c -fno-slp-vectorize
# .---command stderr------------
# | clang: warning: -ldl: 'linker' input unused [-Wunused-command-line-argument]
# `-----------------------------
# RUN: at line 5
cat /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.gen.ll | FileCheck --check-prefix=PROMO /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_while.c
# executed command: cat /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.gen.ll
# note: command had no output on stdout or stderr
# executed command: FileCheck --check-prefix=PROMO /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_while.c
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_while.c:25:16: error: PROMO-NEXT: expected string not found in input
# | // PROMO-NEXT: load{{.*}}@__profc_foo{{.*}} 8){{.*}}
# |                ^
# | <stdin>:69:39: note: scanning from here
# |  store i64 %3, ptr @__profc_foo, align 8
# |                                       ^
# | <stdin>:70:68: note: possible intended match here
# |  %pgocount.promoted22 = load i64, ptr getelementptr inbounds nuw (i8, ptr @__profc_foo, i64 16), align 8
# |                                                                    ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_while.c
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |           64:  br i1 %exitcond.not, label %while.cond.while.end_crit_edge, label %while.body, !llvm.loop !10 
# |           65:  
# |           66: while.cond.while.end_crit_edge: ; preds = %while.body 
# |           67:  %pgocount.promoted = load i64, ptr @__profc_foo, align 8 
# |           68:  %3 = add i64 %pgocount.promoted, %pgocount1215 
# |           69:  store i64 %3, ptr @__profc_foo, align 8 
# | next:25'0                                          {     search range start (exclusive)
# | next:25'1                                                error: no match found in search range
# |           70:  %pgocount.promoted22 = load i64, ptr getelementptr inbounds nuw (i8, ptr @__profc_foo, i64 16), align 8 
# | next:25'2                                                                        ?                                       possible intended match
# |           71:  %4 = add i64 %pgocount.promoted22, %pgocount1420 
# |           72:  store i64 %4, ptr getelementptr inbounds nuw (i8, ptr @__profc_foo, i64 16), align 8 
# |           73:  br label %while.end 
# |           74:  
# |           75: while.end: ; preds = %while.cond.while.end_crit_edge, %entry 
# |            .
# |            .
# |            .
# |          103: !6 = !{!"int", !7, i64 0} 
# |          104: !7 = !{!"omnipotent char", !8, i64 0} 
# |          105: !8 = !{!"Simple C/C++ TBAA"} 
# |          106: !9 = !{!6, !6, i64 0} 
# |          107: !10 = distinct !{!10, !11} 
# |          108: !11 = !{!"llvm.loop.mustprogress"} 
# | next:25'3                                        } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the infrastructure label.

1 similar comment
@github-actions

Copy link
Copy Markdown

🐧 Linux x64 Test Results

  • 97655 tests passed
  • 3008 tests skipped
  • 2 tests failed

Failed Tests

(click on a test name to see its output)

Profile-x86_64

Profile-x86_64.Linux/counter_promo_for.c (Likely Already Failing) This test is already failing at the base commit.
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
rm -fr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.prof
# executed command: rm -fr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.prof
# note: command had no output on stdout or stderr
# RUN: at line 2
rm -fr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.nopromo.prof
# executed command: rm -fr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.nopromo.prof
# note: command had no output on stdout or stderr
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang   -m64  -ldl  -fprofile-generate=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.prof/ -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.gen -O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_for.c -fno-slp-vectorize
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang -m64 -ldl -fprofile-generate=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.prof/ -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.gen -O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_for.c -fno-slp-vectorize
# note: command had no output on stdout or stderr
# RUN: at line 4
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang   -m64  -ldl  -fprofile-generate=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.prof/ -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.gen.ll -emit-llvm -S -O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_for.c -fno-slp-vectorize
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang -m64 -ldl -fprofile-generate=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.prof/ -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.gen.ll -emit-llvm -S -O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_for.c -fno-slp-vectorize
# .---command stderr------------
# | clang: warning: -ldl: 'linker' input unused [-Wunused-command-line-argument]
# `-----------------------------
# RUN: at line 5
cat /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.gen.ll | FileCheck --check-prefix=PROMO /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_for.c
# executed command: cat /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_for.c.tmp.promo.gen.ll
# note: command had no output on stdout or stderr
# executed command: FileCheck --check-prefix=PROMO /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_for.c
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_for.c:30:16: error: PROMO-NEXT: expected string not found in input
# | // PROMO-NEXT: load{{.*}}@__profc_foo{{.*}} 8){{.*}}
# |                ^
# | <stdin>:69:39: note: scanning from here
# |  store i64 %3, ptr @__profc_foo, align 8
# |                                       ^
# | <stdin>:70:68: note: possible intended match here
# |  %pgocount.promoted22 = load i64, ptr getelementptr inbounds nuw (i8, ptr @__profc_foo, i64 16), align 8
# |                                                                    ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_for.c
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |           64:  br i1 %exitcond.not, label %for.cond.for.end_crit_edge, label %for.body, !llvm.loop !10 
# |           65:  
# |           66: for.cond.for.end_crit_edge: ; preds = %for.body 
# |           67:  %pgocount.promoted = load i64, ptr @__profc_foo, align 8 
# |           68:  %3 = add i64 %pgocount.promoted, %pgocount1215 
# |           69:  store i64 %3, ptr @__profc_foo, align 8 
# | next:30'0                                          {     search range start (exclusive)
# | next:30'1                                                error: no match found in search range
# |           70:  %pgocount.promoted22 = load i64, ptr getelementptr inbounds nuw (i8, ptr @__profc_foo, i64 16), align 8 
# | next:30'2                                                                        ?                                       possible intended match
# |           71:  %4 = add i64 %pgocount.promoted22, %pgocount1420 
# |           72:  store i64 %4, ptr getelementptr inbounds nuw (i8, ptr @__profc_foo, i64 16), align 8 
# |           73:  br label %for.end 
# |           74:  
# |           75: for.end: ; preds = %for.cond.for.end_crit_edge, %entry 
# |            .
# |            .
# |            .
# |          103: !6 = !{!"int", !7, i64 0} 
# |          104: !7 = !{!"omnipotent char", !8, i64 0} 
# |          105: !8 = !{!"Simple C/C++ TBAA"} 
# |          106: !9 = !{!6, !6, i64 0} 
# |          107: !10 = distinct !{!10, !11} 
# |          108: !11 = !{!"llvm.loop.mustprogress"} 
# | next:30'3                                        } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

Profile-x86_64.Linux/counter_promo_while.c (Likely Already Failing) This test is already failing at the base commit.
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
rm -fr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.prof
# executed command: rm -fr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.prof
# note: command had no output on stdout or stderr
# RUN: at line 2
rm -fr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.nopromo.prof
# executed command: rm -fr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.nopromo.prof
# note: command had no output on stdout or stderr
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang   -m64  -ldl  -fprofile-generate=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.prof/ -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.gen -O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_while.c -fno-slp-vectorize
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang -m64 -ldl -fprofile-generate=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.prof/ -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.gen -O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_while.c -fno-slp-vectorize
# note: command had no output on stdout or stderr
# RUN: at line 4
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang   -m64  -ldl  -fprofile-generate=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.prof/ -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.gen.ll -emit-llvm -S -O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_while.c -fno-slp-vectorize
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang -m64 -ldl -fprofile-generate=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.prof/ -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.gen.ll -emit-llvm -S -O2 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_while.c -fno-slp-vectorize
# .---command stderr------------
# | clang: warning: -ldl: 'linker' input unused [-Wunused-command-line-argument]
# `-----------------------------
# RUN: at line 5
cat /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.gen.ll | FileCheck --check-prefix=PROMO /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_while.c
# executed command: cat /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-x86_64/Linux/Output/counter_promo_while.c.tmp.promo.gen.ll
# note: command had no output on stdout or stderr
# executed command: FileCheck --check-prefix=PROMO /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_while.c
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_while.c:25:16: error: PROMO-NEXT: expected string not found in input
# | // PROMO-NEXT: load{{.*}}@__profc_foo{{.*}} 8){{.*}}
# |                ^
# | <stdin>:69:39: note: scanning from here
# |  store i64 %3, ptr @__profc_foo, align 8
# |                                       ^
# | <stdin>:70:68: note: possible intended match here
# |  %pgocount.promoted22 = load i64, ptr getelementptr inbounds nuw (i8, ptr @__profc_foo, i64 16), align 8
# |                                                                    ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/profile/Linux/counter_promo_while.c
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |           64:  br i1 %exitcond.not, label %while.cond.while.end_crit_edge, label %while.body, !llvm.loop !10 
# |           65:  
# |           66: while.cond.while.end_crit_edge: ; preds = %while.body 
# |           67:  %pgocount.promoted = load i64, ptr @__profc_foo, align 8 
# |           68:  %3 = add i64 %pgocount.promoted, %pgocount1215 
# |           69:  store i64 %3, ptr @__profc_foo, align 8 
# | next:25'0                                          {     search range start (exclusive)
# | next:25'1                                                error: no match found in search range
# |           70:  %pgocount.promoted22 = load i64, ptr getelementptr inbounds nuw (i8, ptr @__profc_foo, i64 16), align 8 
# | next:25'2                                                                        ?                                       possible intended match
# |           71:  %4 = add i64 %pgocount.promoted22, %pgocount1420 
# |           72:  store i64 %4, ptr getelementptr inbounds nuw (i8, ptr @__profc_foo, i64 16), align 8 
# |           73:  br label %while.end 
# |           74:  
# |           75: while.end: ; preds = %while.cond.while.end_crit_edge, %entry 
# |            .
# |            .
# |            .
# |          103: !6 = !{!"int", !7, i64 0} 
# |          104: !7 = !{!"omnipotent char", !8, i64 0} 
# |          105: !8 = !{!"Simple C/C++ TBAA"} 
# |          106: !9 = !{!6, !6, i64 0} 
# |          107: !10 = distinct !{!10, !11} 
# |          108: !11 = !{!"llvm.loop.mustprogress"} 
# | next:25'3                                        } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the infrastructure label.

@dyung dyung moved this from Needs Triage to Needs Backport PR in LLVM Release Status Jul 17, 2026

@AaronBallman AaronBallman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@to268
to268 force-pushed the fix-cxx-auto-lbrace branch 2 times, most recently from e4e59fd to 938aec5 Compare July 17, 2026 20:27
@to268
to268 force-pushed the fix-cxx-auto-lbrace branch from 938aec5 to 03d28e3 Compare July 17, 2026 20:27
@to268
to268 merged commit d592aa5 into llvm:main Jul 17, 2026
11 of 12 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Backport PR to Done in LLVM Release Status Jul 17, 2026
@to268 to268 modified the milestone: LLVM 23.x Release Jul 17, 2026
@to268

to268 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

/cherry-pick d592aa5

@llvmbot

llvmbot commented Jul 17, 2026

Copy link
Copy Markdown
Member

/pull-request #210441

@to268
to268 deleted the fix-cxx-auto-lbrace branch July 17, 2026 21:32
@osamakader

Copy link
Copy Markdown
Contributor

Thanks @to268 for the fix.

dyung pushed a commit to llvmbot/llvm-project that referenced this pull request Jul 22, 2026
…#210347)

The PR llvm#208552 has introduced a regression where brace initialization
was not taken into account `auto foo{12}`. It was also breaking
`dcl.type.general` p2 rules, which is also now tested.

(cherry picked from commit d592aa5)
to268 added a commit to to268/llvm-project that referenced this pull request Aug 10, 2026
to268 added a commit to to268/llvm-project that referenced this pull request Aug 10, 2026
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

Projects

Development

Successfully merging this pull request may close these issues.

6 participants