aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-06-12 01:51:59 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-06-12 01:51:59 +0000
commit54655be65585ed6618fdd7a19fa6c70efc321d3a (patch)
tree6ebcc7a899ed54cc8e0d069ac9186092a92f73b9 /lib/Sema/SemaDecl.cpp
parentc7d2e339f9a71a40db7b199082b42fe91e6fa2cb (diff)
If parsing a trailing-return-type fails, don't pretend we didn't have one at
all. Suppresses follow-on errors mentioned in PR13074. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158348 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 9ad8c30505..924b0f73d6 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -5158,7 +5158,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
QualType T = R->getAs<FunctionType>()->getResultType();
DeclaratorChunk &C = D.getTypeObject(0);
if (!T->isVoidType() && C.Fun.NumArgs == 0 && !C.Fun.isVariadic &&
- !C.Fun.TrailingReturnType &&
+ !C.Fun.hasTrailingReturnType() &&
C.Fun.getExceptionSpecType() == EST_None) {
SourceRange ParenRange(C.Loc, C.EndLoc);
Diag(C.Loc, diag::warn_empty_parens_are_function_decl) << ParenRange;