Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 4.7.0-beta1
Description
main.cpp needs to be parsed in >= C++14 mode to reproduce:
main.h
template<typename T>
decltype(auto) foo(T t)
{ return t; }
main.cpp
#include "main.h" int main() { foo(3); // error: function 'foo<int>' with deduced return type cannot be used before it is defined }
Attachments
For Gerrit Dashboard: QTCREATORBUG-20515 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
230952,2 | [backported/clang-7][Sema] Don't skip function bodies with 'auto' without trailing return type | release_60-based | clang/clang | Status: MERGED | +2 | 0 |