diff options
| author | Richard Smith <richard@metafoo.co.uk> | 2019-10-27 13:18:16 -0700 |
|---|---|---|
| committer | Richard Smith <richard@metafoo.co.uk> | 2019-10-27 21:42:58 -0700 |
| commit | 39eef2cbb6ab1fda2e0beb8789cd49a3ce276b16 (patch) | |
| tree | 39d65554c2ab4e251cfec0d698266a4503e821fb /clang/lib | |
| parent | 525169efd1eefe044406bd41b3159359e0cabd4e (diff) | |
| download | bcm5719-llvm-39eef2cbb6ab1fda2e0beb8789cd49a3ce276b16.tar.gz bcm5719-llvm-39eef2cbb6ab1fda2e0beb8789cd49a3ce276b16.zip | |
PR43775: don't produce a bogus 'auto' -Wc++98-compat warning for CTAD
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaType.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index 02fc8110503..aa795e7b065 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -3139,7 +3139,7 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, T = SemaRef.Context.IntTy; D.setInvalidType(true); - } else if (!HaveTrailing && + } else if (Auto && !HaveTrailing && D.getContext() != DeclaratorContext::LambdaExprContext) { // If there was a trailing return type, we already got // warn_cxx98_compat_trailing_return_type in the parser. |

