Author: Timm Bäder Date: 2022-10-22T10:32:05+02:00 New Revision: d49fe7c95bdf35dcb39068550a7c4039769de414
URL: https://github.com/llvm/llvm-project/commit/d49fe7c95bdf35dcb39068550a7c4039769de414 DIFF: https://github.com/llvm/llvm-project/commit/d49fe7c95bdf35dcb39068550a7c4039769de414.diff LOG: [clang][Interp][NFC] Add another failing test case Function parameters need to be checked before the function is called. Added: Modified: clang/test/AST/Interp/cxx20.cpp Removed: ################################################################################ diff --git a/clang/test/AST/Interp/cxx20.cpp b/clang/test/AST/Interp/cxx20.cpp index 1b1a613b34b6..036e7f914bbe 100644 --- a/clang/test/AST/Interp/cxx20.cpp +++ b/clang/test/AST/Interp/cxx20.cpp @@ -77,4 +77,12 @@ constexpr int initializedLocal() { return a; } static_assert(initializedLocal() == 20); + +/// Similar here, but the uninitialized local is passed as a function parameter. +constexpr int inc(int a) { return a + 1; } +constexpr int f() { + int i; + return inc(i); +} +static_assert(f()); #endif _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits