Debian Codegraph @

clang/test/AST/function-alias.cpp

raw
1 // RUN: %clang_cc1 -std=c++17 -fsyntax-only %s
2
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.
7
8 constexpr int f() noexcept { return 0; }
9
10 using F = int();
11
12 constexpr int g(F * p) { return p(); }
13
14 constexpr int n = g(f);