anutosh491 wrote: There are quite some made by @kr-2003 and me here.
1) We realize even without this fix, stuff worked perfectly on our Macos ARM devices. So looks like a Ubuntu issue anyways  2) Obviously the try-catch block works when wrapped inside a class/function (not a top level decl) 3) If we build clang-repl with different configs, it works i) `-DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_ENABLE_PROJECTS=clang -DLLVM_USE_SPLIT_DWARF=ON -DLLVM_USE_LINKER=lld` With this ``` (base) abhinav@jarvis-2223:~/Desktop/Coding/llvm-project/build/bin$ ./clang-repl --version LLVM (http://llvm.org/): LLVM version 20.1.0-rc1 Optimized build. (base) abhinav@jarvis-2223:~/Desktop/Coding/llvm-project/build/bin$ ./clang-repl clang-repl> #include <iostream> clang-repl> try { throw 1; } catch { std::cout << "Caught Exception" << std::endl; } In file included from <<< inputs >>>:1: input_line_2:1:23: error: expected '(' 1 | try { throw 1; } catch { std::cout << "Caught Exception" << std::endl; } | ^ | ( error: Parsing failed. clang-repl> ``` ii) With the following it fails. ``` -DLLVM_ENABLE_PROJECTS=clang \ -DLLVM_TARGETS_TO_BUILD="host;NVPTX" \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ENABLE_ASSERTIONS=ON \ -DCLANG_ENABLE_STATIC_ANALYZER=OFF \ -DCLANG_ENABLE_ARCMT=OFF \ -DCLANG_ENABLE_FORMAT=OFF \ -DCLANG_ENABLE_BOOTSTRAP=OFF \ -DLLVM_ENABLE_ZSTD=OFF \ -DLLVM_ENABLE_TERMINFO=OFF \ -DLLVM_ENABLE_LIBXML2=OFF \ ``` Abhinav, could you also past the diff between how using two different configs affects the build ? Maybe that might point us to the root cause behind all of this. https://github.com/llvm/llvm-project/pull/127087 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits