Fix handling of default arguments in __attribute__((enable_if)).
authorRichard Smith <richard@metafoo.co.uk>
Thu, 28 May 2020 22:02:18 +0000 (15:02 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Thu, 28 May 2020 22:35:22 +0000 (15:35 -0700)
commit0dfb43deb6d5511a8ea69eeb7373a212ebd6c9c1
tree8253d8229e63fbe3fa013e64843008740fd86dc4
parentb0b2507717ca904ffe50248a44a5c653946b6732
Fix handling of default arguments in __attribute__((enable_if)).

We didn't properly build default argument expressions previously -- we
failed to build the wrapper CXXDefaultArgExpr node, which meant that
std::source_location misbehaved, and we didn't perform default argument
instantiation when necessary, which meant that dependent default
arguments in function templates didn't work at all.
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaOverload.cpp
clang/test/SemaCXX/enable_if.cpp