gribozavr marked an inline comment as done. gribozavr added inline comments.
================ Comment at: clang/lib/Sema/SemaOverload.cpp:6369 // very difficult. Ideally, we should handle them more gracefully. - if (!EIA->getCond()->EvaluateWithSubstitution( + if (EIA->getCond()->isValueDependent() || + !EIA->getCond()->EvaluateWithSubstitution( ---------------- rsmith wrote: > This is treating value-dependent `enable_if` conditions as having failed. Is > that really appropriate? (When do we call this with value-depnedent > `enable_if` attributes? I'd expect it to only be called after substitution) This test case in `llvm-project/clang/test/SemaCXX/enable_if.cpp` passes a dependent condition: ``` void h(int); template <typename T> void outer() { void local_function() __attribute__((enable_if(::h(T()), ""))); local_function(); }; ``` According to https://reviews.llvm.org/D20130, it seems like it was decided to document implementation details as specification, and say that `enable_if` is evaluated during overload resolution, whenever that happens to happen. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61522/new/ https://reviews.llvm.org/D61522 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits