[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / AST / function-alias.cpp
bloba9a2b79ad8bbe756f7ddd18bda1b72a444cf5841
1 // RUN: %clang_cc1 -std=c++17 -fsyntax-only %s
3 // Verify that ASTContext::getFunctionTypeWithExceptionSpec (called through
4 // ASTContext::hasSameFunctionTypeIgnoringExceptionSpec from
5 // ExprEvaluatorBase::handleCallExpr in lib/AST/ExprConstant.cpp) does not crash
6 // for a type alias.
8 constexpr int f() noexcept { return 0; }
10 using F = int();
12 constexpr int g(F * p) { return p(); }
14 constexpr int n = g(f);